Model 1C modules as object parts
This commit is contained in:
@@ -207,6 +207,7 @@ def render_html5_source(node: object | None, *, oob: bool = False) -> str:
|
||||
name = "source" if node is None else getattr(node, "qualified_name", None) or getattr(node, "name", "source")
|
||||
kind = "" if node is None else _enum_text(getattr(node, "kind", ""))
|
||||
lineage_id = "" if node is None else str(getattr(node, "lineage_id", ""))
|
||||
attributes = {} if node is None else getattr(node, "attributes", {}) or {}
|
||||
source_path = "" if node is None else str(
|
||||
getattr(node, "source_path", None) or getattr(getattr(node, "source_ref", None), "source_path", None) or ""
|
||||
)
|
||||
@@ -218,30 +219,68 @@ def render_html5_source(node: object | None, *, oob: bool = False) -> str:
|
||||
line_count = len(source_text.splitlines()) or 1
|
||||
source_size = len(source_text)
|
||||
oob_attr = ' hx-swap-oob="outerHTML"' if oob else ""
|
||||
owner_name = str(attributes.get("owner_qualified_name") or "")
|
||||
owner_kind = str(attributes.get("owner_kind") or "")
|
||||
object_part = str(attributes.get("object_part") or attributes.get("module_role") or "")
|
||||
form_name = str(attributes.get("form_name") or "")
|
||||
cache_attrs = (
|
||||
f'data-html5-object-cache="warm" data-html5-owner="{escape(owner_name)}" '
|
||||
f'data-html5-object-part="{escape(object_part)}"'
|
||||
if owner_name
|
||||
else 'data-html5-object-cache="cold"'
|
||||
)
|
||||
return f"""
|
||||
<article
|
||||
class="source-panel"
|
||||
data-html5-source
|
||||
data-html5-source-name="{escape(str(name))}"
|
||||
data-html5-lineage-id="{escape(lineage_id)}"
|
||||
{cache_attrs}
|
||||
{oob_attr}
|
||||
>
|
||||
<header class="source-head">
|
||||
<div>
|
||||
<strong>{escape(str(name))}</strong>
|
||||
<small>{escape(kind or "source")}</small>
|
||||
<small>{escape(_source_kind_label(kind or "source", owner_name, object_part, form_name))}</small>
|
||||
</div>
|
||||
<dl>
|
||||
{_metric("Lines", line_count)}
|
||||
{_metric("Location", location)}
|
||||
</dl>
|
||||
</header>
|
||||
{_source_object_cache_summary(owner_name, owner_kind, object_part, form_name)}
|
||||
{_source_summary(kind or "source", line_count, source_size, location)}
|
||||
<pre class="code">{escape(source_text)}</pre>
|
||||
</article>
|
||||
"""
|
||||
|
||||
|
||||
def _source_kind_label(kind: str, owner_name: str, object_part: str, form_name: str) -> str:
|
||||
if not owner_name:
|
||||
return kind
|
||||
if object_part.startswith("form."):
|
||||
return f"{kind} · часть формы {form_name or 'форма'}"
|
||||
if object_part == "object.manager":
|
||||
return f"{kind} · менеджер объекта"
|
||||
if object_part == "object.record_set":
|
||||
return f"{kind} · набор записей объекта"
|
||||
if object_part == "object.module":
|
||||
return f"{kind} · модуль объекта"
|
||||
return f"{kind} · часть объекта"
|
||||
|
||||
|
||||
def _source_object_cache_summary(owner_name: str, owner_kind: str, object_part: str, form_name: str) -> str:
|
||||
if not owner_name:
|
||||
return ""
|
||||
form_text = f" · форма {form_name}" if form_name else ""
|
||||
return f"""
|
||||
<p class="object-cache" data-html5-object-cache-summary>
|
||||
Открыт программный текст части объекта 1С: {escape(owner_name)} · {escape(owner_kind or "OBJECT")} · {escape(object_part)}{escape(form_text)}.
|
||||
Объектный контекст подгружен сервером в cache-warm режим для быстрых переходов по формам, модулям и обработчикам.
|
||||
</p>
|
||||
"""
|
||||
|
||||
|
||||
def _source_summary(kind: str, line_count: int, source_size: int, location: str) -> str:
|
||||
return f"""
|
||||
<p class="source-summary" data-html5-source-summary>
|
||||
|
||||
@@ -18,6 +18,7 @@ _HTML5_OBJECT_CONTEXT_KINDS = {
|
||||
NodeKind.ENUM.value,
|
||||
NodeKind.REPORT.value,
|
||||
NodeKind.DATA_PROCESSOR.value,
|
||||
NodeKind.FORM.value,
|
||||
NodeKind.CHART_OF_CHARACTERISTIC_TYPES.value,
|
||||
NodeKind.CHART_OF_ACCOUNTS.value,
|
||||
NodeKind.CHART_OF_CALCULATION_TYPES.value,
|
||||
@@ -512,17 +513,7 @@ def _object_action_links(
|
||||
quoted_project = quote(project_id)
|
||||
quoted_object = quote(object_name, safe="")
|
||||
lineage = str(lineage_id or "")
|
||||
first_module = next(iter(modules), None)
|
||||
module_lineage = str(getattr(first_module, "lineage_id", "") or "")
|
||||
source_link = (
|
||||
f'<a class="button" href="/html5/projects/{quoted_project}/source/{quote(module_lineage, safe="")}" '
|
||||
'hx-get="/html5/projects/{project}/source/{module}" hx-target="[data-html5-source]" hx-swap="outerHTML">Source</a>'.format(
|
||||
project=quoted_project,
|
||||
module=quote(module_lineage, safe=""),
|
||||
)
|
||||
if module_lineage
|
||||
else ""
|
||||
)
|
||||
module_links = "".join(_module_action_link(quoted_project, module) for module in _sorted_object_modules(modules))
|
||||
symbol_link = (
|
||||
f'<a class="button" href="/html5/projects/{quoted_project}/symbols/{quote(lineage, safe="")}/detail" '
|
||||
'hx-get="/html5/projects/{project}/symbols/{lineage}/detail" hx-target="[data-html5-symbol-detail]" hx-swap="outerHTML">Symbol</a>'.format(
|
||||
@@ -576,12 +567,68 @@ def _object_action_links(
|
||||
hx-target="[data-html5-flowchart]"
|
||||
hx-swap="outerHTML"
|
||||
>Flowchart</a>
|
||||
{source_link}
|
||||
{module_links}
|
||||
{symbol_link}
|
||||
</nav>
|
||||
"""
|
||||
|
||||
|
||||
def _sorted_object_modules(modules: Iterable[object]) -> list[object]:
|
||||
priority = {
|
||||
"OBJECT_MODULE": 0,
|
||||
"MANAGER_MODULE": 1,
|
||||
"RECORD_SET_MODULE": 2,
|
||||
"FORM_MODULE": 3,
|
||||
"MODULE": 9,
|
||||
}
|
||||
return sorted(
|
||||
list(modules),
|
||||
key=lambda module: (
|
||||
priority.get(_module_role(module), 8),
|
||||
str((getattr(module, "attributes", {}) or {}).get("form_name") or ""),
|
||||
str(getattr(module, "qualified_name", "") or getattr(module, "name", "")),
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
def _module_action_link(quoted_project: str, module: object) -> str:
|
||||
lineage = str(getattr(module, "lineage_id", "") or "")
|
||||
if not lineage:
|
||||
return ""
|
||||
quoted_lineage = quote(lineage, safe="")
|
||||
label = _module_action_label(module)
|
||||
return f"""
|
||||
<a
|
||||
class="button"
|
||||
href="/html5/projects/{quoted_project}/source/{quoted_lineage}"
|
||||
hx-get="/html5/projects/{quoted_project}/source/{quoted_lineage}"
|
||||
hx-target="[data-html5-source]"
|
||||
hx-swap="outerHTML"
|
||||
data-html5-module-action="{escape(_module_role(module))}"
|
||||
>{escape(label)}</a>
|
||||
"""
|
||||
|
||||
|
||||
def _module_action_label(module: object) -> str:
|
||||
attributes = getattr(module, "attributes", {}) or {}
|
||||
role = _module_role(module)
|
||||
if role == "OBJECT_MODULE":
|
||||
return "Модуль объекта"
|
||||
if role == "MANAGER_MODULE":
|
||||
return "Модуль менеджера"
|
||||
if role == "RECORD_SET_MODULE":
|
||||
return "Модуль набора"
|
||||
if role == "FORM_MODULE":
|
||||
form_name = str(attributes.get("form_name") or "")
|
||||
return f"Модуль формы {form_name}" if form_name else "Модуль формы"
|
||||
return str(getattr(module, "name", None) or "Модуль")
|
||||
|
||||
|
||||
def _module_role(module: object) -> str:
|
||||
attributes = getattr(module, "attributes", {}) or {}
|
||||
return str(attributes.get("module_role") or attributes.get("role") or getattr(module, "module_role", "") or "MODULE")
|
||||
|
||||
|
||||
def _tabular_section_item(section: object) -> str:
|
||||
tabular_section = getattr(section, "tabular_section", None)
|
||||
columns = getattr(section, "columns", []) or []
|
||||
|
||||
@@ -962,6 +962,11 @@ class ModuleSourceResponse(BaseModel):
|
||||
name: str
|
||||
qualified_name: str
|
||||
module_role: str = "MODULE"
|
||||
owner_qualified_name: str | None = None
|
||||
owner_kind: str | None = None
|
||||
object_part: str | None = None
|
||||
form_name: str | None = None
|
||||
form_qualified_name: str | None = None
|
||||
source_path: str
|
||||
source_text: str
|
||||
routines_count: int = 0
|
||||
@@ -1167,6 +1172,7 @@ class NamedNode(BaseModel):
|
||||
kind: str
|
||||
name: str
|
||||
qualified_name: str
|
||||
attributes: dict = Field(default_factory=dict)
|
||||
|
||||
|
||||
class ImpactResponse(BaseModel):
|
||||
@@ -5041,7 +5047,7 @@ def _metadata_child_group_children(
|
||||
for edge in snapshot.edges
|
||||
if edge.source_lineage == owner_id
|
||||
and edge.kind in edge_kinds
|
||||
and (edge.kind != EdgeKind.CONTAINS or edge.attributes.get("link_type") == "METADATA_MODULE")
|
||||
and (edge.kind != EdgeKind.CONTAINS or edge.attributes.get("link_type") in {"METADATA_MODULE", "FORM_MODULE"})
|
||||
]
|
||||
nodes_by_id = {node.lineage_id: node for node in snapshot.nodes}
|
||||
child_nodes = sorted(
|
||||
@@ -5366,7 +5372,7 @@ def _flowchart_owner_index(snapshot: SirSnapshot, nodes_by_lineage: dict[str, ob
|
||||
target = nodes_by_lineage.get(edge.target_lineage)
|
||||
if source is None or target is None:
|
||||
continue
|
||||
if edge.kind == EdgeKind.CONTAINS and edge.attributes.get("link_type") == "METADATA_MODULE":
|
||||
if edge.kind == EdgeKind.CONTAINS and edge.attributes.get("link_type") in {"METADATA_MODULE", "FORM_MODULE"}:
|
||||
owner_by_lineage[target.lineage_id] = source
|
||||
elif edge.kind in {EdgeKind.HAS_COMMAND, EdgeKind.HAS_ROLE, EdgeKind.HAS_ATTRIBUTE, EdgeKind.HAS_TABULAR_SECTION, EdgeKind.HAS_FORM, EdgeKind.HAS_ELEMENT}:
|
||||
owner_by_lineage[target.lineage_id] = source
|
||||
@@ -5424,13 +5430,16 @@ def _metadata_tree_path_for_node(snapshot: SirSnapshot, node_id: str) -> list[st
|
||||
return ["main-configuration", "common", f"common.{common_branch}", node.lineage_id]
|
||||
return ["main-configuration", f"branch.{spec.code}", node.lineage_id]
|
||||
|
||||
parent_edge = next((edge for edge in snapshot.edges if edge.target_lineage == node.lineage_id), None)
|
||||
parent_edges = [edge for edge in snapshot.edges if edge.target_lineage == node.lineage_id]
|
||||
parent_edge = next((edge for edge in parent_edges if edge.attributes.get("link_type") == "FORM_MODULE"), None)
|
||||
if parent_edge is None:
|
||||
parent_edge = next(iter(parent_edges), None)
|
||||
if parent_edge is None:
|
||||
return [node.lineage_id]
|
||||
owner_node = _find_snapshot_node(snapshot, parent_edge.source_lineage)
|
||||
if owner_node is None:
|
||||
return [node.lineage_id]
|
||||
group_name = _metadata_group_name_for_edge(parent_edge.kind)
|
||||
group_name = _metadata_group_name_for_edge(parent_edge)
|
||||
return [*_metadata_tree_path_for_node(snapshot, owner_node.lineage_id), f"{owner_node.lineage_id}.{group_name}", node.lineage_id]
|
||||
|
||||
|
||||
@@ -5539,7 +5548,10 @@ def _common_branch_label_for_spec(spec_code: str) -> str | None:
|
||||
return None
|
||||
|
||||
|
||||
def _metadata_group_name_for_edge(edge_kind: EdgeKind) -> str:
|
||||
def _metadata_group_name_for_edge(edge) -> str:
|
||||
edge_kind = getattr(edge, "kind", edge)
|
||||
if edge_kind == EdgeKind.CONTAINS and getattr(edge, "attributes", {}).get("link_type") == "FORM_MODULE":
|
||||
return "Модуль формы"
|
||||
return {
|
||||
EdgeKind.HAS_ATTRIBUTE: "Реквизиты",
|
||||
EdgeKind.HAS_TABULAR_SECTION: "Табличные части",
|
||||
@@ -5591,7 +5603,7 @@ def _metadata_child_group_count(snapshot: SirSnapshot, owner_id: str, group_name
|
||||
for edge in snapshot.edges
|
||||
if edge.source_lineage == owner_id
|
||||
and edge.kind in edge_kinds
|
||||
and (edge.kind != EdgeKind.CONTAINS or edge.attributes.get("link_type") == "METADATA_MODULE")
|
||||
and (edge.kind != EdgeKind.CONTAINS or edge.attributes.get("link_type") in {"METADATA_MODULE", "FORM_MODULE"})
|
||||
)
|
||||
|
||||
|
||||
@@ -5614,7 +5626,7 @@ def _metadata_child_count_index(snapshot: SirSnapshot, owner_ids: list[str]) ->
|
||||
result: dict[str, Counter[EdgeKind]] = {owner_id: Counter() for owner_id in owner_set}
|
||||
for edge in snapshot.edges:
|
||||
if edge.source_lineage in owner_set and (
|
||||
edge.kind != EdgeKind.CONTAINS or edge.attributes.get("link_type") == "METADATA_MODULE"
|
||||
edge.kind != EdgeKind.CONTAINS or edge.attributes.get("link_type") in {"METADATA_MODULE", "FORM_MODULE"}
|
||||
):
|
||||
result[edge.source_lineage][edge.kind] += 1
|
||||
return result
|
||||
@@ -9017,10 +9029,16 @@ def _normalized_module_source_response(module, owner) -> ModuleSourceResponse:
|
||||
attributes = module.attributes or {}
|
||||
source_text = str(attributes.get("source_text", ""))
|
||||
routines = _normalized_module_routines(source_text)
|
||||
module_role = str(module.module_kind or attributes.get("module_role") or "MODULE")
|
||||
return ModuleSourceResponse(
|
||||
name=module.name,
|
||||
qualified_name=module.qualified_name or module.name,
|
||||
module_role=str(module.module_kind or attributes.get("module_role") or "MODULE"),
|
||||
module_role=module_role,
|
||||
owner_qualified_name=str(attributes.get("owner_qualified_name") or getattr(owner, "qualified_name", "") or "") or None,
|
||||
owner_kind=str(attributes.get("owner_kind") or getattr(owner, "object_kind", "") or "") or None,
|
||||
object_part=str(attributes.get("object_part") or _module_object_part_for_response(module_role, str(attributes.get("form_name") or ""))),
|
||||
form_name=str(attributes.get("form_name") or "") or None,
|
||||
form_qualified_name=str(attributes.get("form_qualified_name") or "") or None,
|
||||
source_path=module.source_path or "",
|
||||
source_text=source_text,
|
||||
routines_count=len(routines),
|
||||
@@ -9028,6 +9046,16 @@ def _normalized_module_source_response(module, owner) -> ModuleSourceResponse:
|
||||
)
|
||||
|
||||
|
||||
def _module_object_part_for_response(module_role: str, form_name: str = "") -> str:
|
||||
return {
|
||||
"OBJECT_MODULE": "object.module",
|
||||
"MANAGER_MODULE": "object.manager",
|
||||
"RECORD_SET_MODULE": "object.record_set",
|
||||
"FORM_MODULE": f"form.{form_name}.module" if form_name else "form.module",
|
||||
"MODULE": "module",
|
||||
}.get(module_role, "module")
|
||||
|
||||
|
||||
def _normalized_module_routines(source_text: str) -> list[ModuleRoutineResponse]:
|
||||
if not source_text:
|
||||
return []
|
||||
@@ -9150,11 +9178,17 @@ def _module_sources_for_object(snapshot: SirSnapshot, qualified_name: str) -> li
|
||||
if module is None or module.kind != NodeKind.MODULE:
|
||||
continue
|
||||
routines = _module_routines(snapshot, module.lineage_id, nodes_by_lineage)
|
||||
module_role = str(edge.attributes.get("module_role") or module.attributes.get("module_role") or "MODULE")
|
||||
modules.append(
|
||||
ModuleSourceResponse(
|
||||
name=module.name,
|
||||
qualified_name=module.qualified_name,
|
||||
module_role=str(edge.attributes.get("module_role", "MODULE")),
|
||||
module_role=module_role,
|
||||
owner_qualified_name=str(module.attributes.get("owner_qualified_name") or owner.qualified_name or "") or None,
|
||||
owner_kind=str(module.attributes.get("owner_kind") or owner.kind.value or "") or None,
|
||||
object_part=str(edge.attributes.get("object_part") or module.attributes.get("object_part") or _module_object_part_for_response(module_role, str(module.attributes.get("form_name") or ""))),
|
||||
form_name=str(edge.attributes.get("form_name") or module.attributes.get("form_name") or "") or None,
|
||||
form_qualified_name=str(module.attributes.get("form_qualified_name") or "") or None,
|
||||
source_path=module.source_ref.source_path,
|
||||
source_text=str(module.attributes.get("source_text", "")),
|
||||
routines_count=len(routines),
|
||||
@@ -9180,11 +9214,22 @@ def _module_source_response(
|
||||
None,
|
||||
)
|
||||
routines = _module_routines(snapshot, module.lineage_id, nodes_by_lineage)
|
||||
owner = nodes_by_lineage.get(owner_edge.source_lineage) if owner_edge else None
|
||||
module_role = str((owner_edge.attributes.get("module_role") if owner_edge else None) or module.attributes.get("module_role") or "MODULE")
|
||||
return [
|
||||
ModuleSourceResponse(
|
||||
name=module.name,
|
||||
qualified_name=module.qualified_name,
|
||||
module_role=str(owner_edge.attributes.get("module_role", "MODULE")) if owner_edge else "MODULE",
|
||||
module_role=module_role,
|
||||
owner_qualified_name=str(module.attributes.get("owner_qualified_name") or getattr(owner, "qualified_name", "") or "") or None,
|
||||
owner_kind=str(module.attributes.get("owner_kind") or getattr(getattr(owner, "kind", None), "value", "") or "") or None,
|
||||
object_part=str(
|
||||
(owner_edge.attributes.get("object_part") if owner_edge else None)
|
||||
or module.attributes.get("object_part")
|
||||
or _module_object_part_for_response(module_role, str(module.attributes.get("form_name") or ""))
|
||||
),
|
||||
form_name=str((owner_edge.attributes.get("form_name") if owner_edge else None) or module.attributes.get("form_name") or "") or None,
|
||||
form_qualified_name=str(module.attributes.get("form_qualified_name") or "") or None,
|
||||
source_path=module.source_ref.source_path,
|
||||
source_text=str(module.attributes.get("source_text", "")),
|
||||
routines_count=len(routines),
|
||||
@@ -10676,4 +10721,5 @@ def _named_node(node) -> NamedNode:
|
||||
kind=node.kind.value,
|
||||
name=node.name,
|
||||
qualified_name=node.qualified_name,
|
||||
attributes=getattr(node, "attributes", {}) or {},
|
||||
)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
.band,.panel,.editor{border:1px solid var(--line);background:var(--card)}.band{max-width:1180px;margin:auto;padding:18px}.section-title,.topbar,.editor-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.button,button{display:inline-flex;align-items:center;justify-content:center;height:32px;border:1px solid var(--line);background:#fff;padding:0 12px;text-decoration:none;font-weight:700;cursor:pointer}table{width:100%;border-collapse:collapse}th,td{border-top:1px solid var(--line);padding:12px;text-align:left}td small{display:block;color:var(--muted)}td .button,td form{margin-right:6px}.delete-project{display:inline-flex;gap:4px;vertical-align:middle}.delete-project input{height:32px;width:120px;border:1px solid var(--line);padding:0 6px}
|
||||
.workspace{min-height:100vh;padding-bottom:34px}.topbar{position:sticky;top:0;z-index:2;height:54px;border-bottom:1px solid var(--line);background:rgba(255,255,255,.94);padding:0 14px}.brand{font-weight:900;text-decoration:none;color:var(--brand)}.project-nav{display:flex;gap:6px;overflow:auto;flex:1}.project-link{white-space:nowrap;text-decoration:none;border:1px solid var(--line);padding:6px 10px;background:#fff}.project-link.active{background:var(--brand);border-color:var(--brand);color:#fff}
|
||||
.layout{display:grid;grid-template-columns:280px minmax(0,1fr)320px;height:calc(100vh - 88px)}.panel{overflow:auto}.panel-title{padding:12px;border-bottom:1px solid var(--line);font-size:12px;font-weight:900;text-transform:uppercase;color:var(--muted)}.tree-item{display:block;padding:10px 12px;border-bottom:1px solid var(--line);text-decoration:none}.tree-item span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tree-item small{color:var(--muted)}
|
||||
.editor{min-width:0;overflow:hidden;border-top:0;border-bottom:0}.editor-head{height:72px;border-bottom:1px solid var(--line);padding:0 14px}.editor-head h1{margin:0;font-size:18px}.search{display:flex;gap:6px}.search input{height:32px;width:260px;border:1px solid var(--line);padding:0 10px}.source-panel{height:calc(100% - 72px);display:grid;grid-template-rows:auto auto minmax(0,1fr);overflow:hidden}.source-head{display:flex;justify-content:space-between;gap:12px;align-items:center;min-height:54px;padding:10px 14px;border-bottom:1px solid var(--line);background:#fff}.source-head strong,.source-head small{display:block}.source-head small{color:var(--muted)}.source-head dl{display:flex;gap:12px;margin:0}.source-head div div{padding:0}.source-head dt{font-size:11px;color:var(--muted)}.source-head dd{margin:0;font-weight:800}.source-summary{margin:0;padding:8px 14px;border-bottom:1px solid var(--line);background:#fffdf8;color:var(--muted);font-size:12px;font-weight:800}.code{height:100%;margin:0;overflow:auto;padding:16px;background:#fbfaf7;font:13px/1.55 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre-wrap}
|
||||
.editor{min-width:0;overflow:hidden;border-top:0;border-bottom:0}.editor-head{height:72px;border-bottom:1px solid var(--line);padding:0 14px}.editor-head h1{margin:0;font-size:18px}.search{display:flex;gap:6px}.search input{height:32px;width:260px;border:1px solid var(--line);padding:0 10px}.source-panel{height:calc(100% - 72px);display:grid;grid-template-rows:auto auto auto minmax(0,1fr);overflow:hidden}.source-head{display:flex;justify-content:space-between;gap:12px;align-items:center;min-height:54px;padding:10px 14px;border-bottom:1px solid var(--line);background:#fff}.source-head strong,.source-head small{display:block}.source-head small{color:var(--muted)}.source-head dl{display:flex;gap:12px;margin:0}.source-head div div{padding:0}.source-head dt{font-size:11px;color:var(--muted)}.source-head dd{margin:0;font-weight:800}.source-summary,.object-cache{margin:0;padding:8px 14px;border-bottom:1px solid var(--line);background:#fffdf8;color:var(--muted);font-size:12px;font-weight:800;line-height:1.45}.object-cache{background:#f8fbff}.code{height:100%;margin:0;overflow:auto;padding:16px;background:#fbfaf7;font:13px/1.55 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre-wrap}
|
||||
.metrics{display:grid;grid-template-columns:1fr 1fr;margin:0}.metrics div{padding:12px;border-bottom:1px solid var(--line)}.metrics dt{color:var(--muted);font-size:12px}.metrics dd{margin:2px 0 0;font-size:22px;font-weight:800}.compact{list-style:none;margin:0;padding:0}.compact li{display:flex;justify-content:space-between;padding:8px 12px;border-bottom:1px solid var(--line)}.object-actions{display:flex;gap:6px;flex-wrap:wrap;padding:10px 12px;border-bottom:1px solid var(--line);background:#fbfcfe}.object-actions .button{height:28px;padding:0 9px;font-size:12px}.object-actions .button[data-html5-object-action-active="true"],.object-actions .button[aria-current="page"]{background:var(--brand);border-color:var(--brand);color:#fff}.object-breadcrumb{display:flex;gap:6px;flex-wrap:wrap;padding:9px 12px;border-bottom:1px solid var(--line);background:#fff;font-size:12px;font-weight:800;color:var(--muted)}.object-breadcrumb span:not(:last-child)::after{content:"/";margin-left:6px;color:#98a2b3}.object-breadcrumb span:last-child{color:var(--ink)}.object-summary,.symbol-summary,.review-summary,.project-summary,.object-report-summary,.authoring-summary{margin:0;padding:10px 12px;border-bottom:1px solid var(--line);background:#f8fbff;color:var(--muted);font-size:12px;font-weight:800;line-height:1.45}.symbol{display:grid;gap:3px;padding:10px 12px;border-bottom:1px solid var(--line);cursor:pointer}.symbol:hover{background:#f8fbff}.symbol span,.symbol small{color:var(--muted)}.symbol-focus,.symbol-reference,.object-focus,.object-context-item{display:grid;gap:3px;padding:10px 12px;border-bottom:1px solid var(--line)}.symbol-focus small,.symbol-reference span,.symbol-reference small,.object-focus span,.object-context-item small{color:var(--muted)}.inline-actions{display:flex;gap:8px;flex-wrap:wrap;font-size:12px;font-weight:800}.inline-actions a{color:var(--brand);text-decoration:none}.report-grid{display:grid;grid-template-columns:1fr 1fr;margin:0}.report-grid div{padding:10px 12px;border-bottom:1px solid var(--line)}.report-grid dt{color:var(--muted);font-size:12px}.report-grid dd{margin:2px 0 0;font-size:20px;font-weight:900}.review-item,.authoring-change{display:grid;gap:3px;padding:10px 12px;border-bottom:1px solid var(--line)}.authoring-change[hx-get]{cursor:pointer}.authoring-change[hx-get]:hover{background:#f8fbff}.review-item span,.review-item small,.authoring-change span,.authoring-change small{color:var(--muted)}.diff-item{display:grid;grid-template-columns:72px minmax(0,1fr);gap:8px;padding:8px 12px;border-bottom:1px solid var(--line)}.diff-item span{color:var(--muted);font-weight:800}.diff-item code{white-space:pre-wrap;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px}.status{position:fixed;bottom:0;left:0;right:0;display:flex;gap:18px;overflow:auto;height:34px;align-items:center;border-top:1px solid var(--line);background:#fff;padding:0 12px;color:var(--muted);font-size:12px}.empty-state{max-width:720px;margin:80px auto;background:#fff;border:1px solid var(--line);padding:28px}
|
||||
.setup-layout{display:grid;grid-template-columns:340px minmax(0,1fr);gap:16px;max-width:1180px;margin:18px auto;padding:0 16px}.setup-workspace{background:#f3f6fb}.setup-card{padding:16px;border-bottom:1px solid var(--line)}.setup-card h1{margin:0;font-size:24px}.setup-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.setup-main{min-height:620px}.settings-form{display:grid;grid-template-columns:2fr 1fr 1fr auto;gap:8px;align-items:end;padding:12px 16px;border-bottom:1px solid var(--line);background:#fff}.settings-form label{display:grid;gap:4px;font-size:12px;font-weight:800;color:var(--muted);text-transform:uppercase}.settings-form input{height:32px;border:1px solid var(--line);padding:0 8px}.saved{float:right;color:var(--ok);font-weight:900}.setup-actions-panel,.ops-filter{display:flex;gap:8px;flex-wrap:wrap;align-items:end;padding:12px 16px;border-bottom:1px solid var(--line);background:#fbfcfe}.ops-filter input{height:32px;min-width:180px;border:1px solid var(--line);padding:0 8px}.inline-form{display:flex;gap:8px;align-items:end}.inline-form label{display:grid;gap:4px;font-size:12px;font-weight:800;color:var(--muted);text-transform:uppercase}.inline-form select{height:32px;min-width:240px;border:1px solid var(--line);background:#fff;padding:0 8px}.rollback-form,.authoring-preview-form{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px;border-bottom:1px solid var(--line);background:#fbfcfe}.rollback-form input,.authoring-preview-form input,.authoring-preview-form textarea{min-width:0;border:1px solid var(--line);padding:0 8px}.rollback-form input,.authoring-preview-form input{height:32px}.authoring-preview-form textarea{grid-column:1/-1;min-height:88px;padding:8px;resize:vertical;font:12px/1.45 ui-monospace,SFMono-Regular,Consolas,monospace}.rollback-form button,.authoring-preview-form button{grid-column:1/-1}.setup-summary{display:grid;gap:0}.compact-lead{margin:0;padding:0 16px 16px}.setup-metrics,.ops-summary{display:grid;grid-template-columns:repeat(4,1fr);margin:0;border-top:1px solid var(--line)}.ops-summary{grid-template-columns:repeat(5,1fr);margin:12px 0}.setup-metrics div,.ops-summary div{padding:16px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);background:#fff}.setup-metrics div:last-child,.ops-summary div:last-child{border-right:0}.setup-metrics dt,.ops-summary dt{font-size:12px;color:var(--muted)}.setup-metrics dd,.ops-summary dd{margin:4px 0 0;font-size:28px;font-weight:900}.status-pill{border:1px solid var(--line);padding:6px 10px;background:#eef6f1;color:var(--ok);font-weight:800}.flush{border-top:1px solid var(--line)}.padded{padding:12px 16px;margin:0}.setup-detail,.history-item,.source-card,.check-item{display:grid;gap:3px;padding:12px 16px;border-bottom:1px solid var(--line)}.setup-detail span,.setup-detail small,.history-item span,.history-item small,.source-card span,.source-card small,.check-item span,.check-item small,.check-head span,.check-head small{color:var(--muted)}.source-list,.history-list,.check-list{display:grid}.check-head{display:flex;gap:10px;align-items:center;padding:12px 16px;border-bottom:1px solid var(--line);background:#fff}.job-log{margin:0;padding:0;list-style:none}.job-log li{padding:8px 16px;border-bottom:1px solid var(--line);color:var(--muted);font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px}
|
||||
@media(max-width:980px){.layout{grid-template-columns:1fr;height:auto}.tree,.inspector{max-height:320px}.editor{min-height:520px}.hero{display:block}.shell{padding:16px}}
|
||||
|
||||
Reference in New Issue
Block a user