@things-factory/figure-viewer 10.1.222 → 10.1.226

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,9 +11,9 @@ export const RUNGS: Readonly<Record<Rung, readonly FigureCapability[]>> = Object
11
11
  flow: ['FlowNode']
12
12
  })
13
13
 
14
- /** Which rung a set of names is, or null when it is none of them -- not invented. */
14
+ /** Which rung a set of names is, or null when it is none of them -- not invented. A product's capability (`<namespace>.<Name>`, ADR-0167) is beside the ladder. */
15
15
  export function rungOf(names: readonly string[] | undefined): Rung | null {
16
- const has = new Set(names ?? [])
16
+ const has = new Set((names ?? []).filter(name => !name.includes('.')))
17
17
  if (has.size === 0) return 'none'
18
18
  for (const [rung, wanted] of Object.entries(RUNGS) as [Rung, readonly FigureCapability[]][])
19
19
  if (wanted.length === has.size && wanted.every(name => has.has(name))) return rung
@@ -19,12 +19,12 @@ export interface DetailFactsRow {
19
19
 
20
20
  /**
21
21
  * A place in words, as every screen that lists places says it: its role (파지 · 안착), what it accepts and how many it
22
- * holds -- 「파지 · 받는 것 BOX, WORKPIECE · 최대 1」.
22
+ * holds -- 「파지 · 받는 것 BOX, WORKPIECE · 최대 1」, or 「받는 것 모든 아이템」 for a place that names no type.
23
23
  */
24
- export function placeTerms(place: { role: string; accepts: readonly string[]; capacity: number }, say: Say): string {
24
+ export function placeTerms(place: { role: string; accepts?: readonly string[]; capacity: number }, say: Say): string {
25
25
  return [
26
26
  say(`figure.label.role-${place.role}`),
27
- say('figure.text.place-accepts', { accepts: place.accepts.join(', ') }),
27
+ place.accepts?.length ? say('figure.text.place-accepts', { accepts: place.accepts.join(', ') }) : say('figure.text.place-accepts-any'),
28
28
  say('figure.label.place-holds', { count: place.capacity })
29
29
  ].join(' · ')
30
30
  }
@@ -15,8 +15,9 @@ export function clipsDriving(asset: FigureAsset, id: string) {
15
15
  * How the detail view plays a clip (ADR-0051 §3.2, §8). A clip in no motion group plays at its own speed (the board's
16
16
  * `clips`). A clip of a group is the group's selection (the board's `motion`); and when the figure's data chooses that
17
17
  * group's clip, the data wins -- its default too -- so the clip is chosen through a data value the figure's own binding
18
- * turns into it, given as a saved value (`figureValues`), the way a board would. A clip no data value turns into (a
19
- * range, a scale, or only another value's fallback of an open field) cannot be chosen here.
18
+ * turns into it, given as a saved value (`figureValues`), the way a board would: the value itself, or the code of a
19
+ * table whose look names the clip (ADR-0166). A clip no data value turns into (an interval, a scale, or only another
20
+ * value's fallback of an open field) cannot be chosen here.
20
21
  */
21
22
  export type ClipPlay =
22
23
  | { kind: 'free' }
@@ -28,7 +29,9 @@ export function clipPlayOf(asset: FigureAsset, clip: string): ClipPlay {
28
29
  const group = (asset.motionGroups ?? []).find(g => g.clips.includes(clip))
29
30
  if (!group) return { kind: 'free' }
30
31
  const plan = asset.dataInterface ? compileFigureDataInterface(asset) : null
31
- const ready = plan?.bindings.find(r => r.binding.behavior.kind === 'motion-clip' && r.binding.behavior.group === group.id)
32
+ const ready = plan?.bindings.find(({ binding: b }) =>
33
+ b.rule === 'table' ? b.targets.group === group.id && Object.values(b.table).some(look => look.clip !== undefined) : b.behavior.kind === 'motion-clip' && b.behavior.group === group.id
34
+ )
32
35
  if (!ready) return { kind: 'group', group: group.id }
33
36
  const { binding, node } = ready
34
37
  const reached = (value: FigureDataValue): ClipPlay => ({ kind: 'data', group: group.id, accessor: binding.accessor, value })
@@ -36,12 +39,12 @@ export function clipPlayOf(asset: FigureAsset, clip: string): ClipPlay {
36
39
  const closed = node.kind === 'boolean' ? ['false', 'true'] : node.kind === 'text' && node.values ? node.values : null
37
40
  const typed = (key: string): FigureDataValue => (node.kind === 'boolean' ? key === 'true' : node.kind === 'number' ? Number(key) : key)
38
41
  if (binding.rule === 'value') return node.kind === 'text' && (!closed || closed.includes(clip)) ? reached(clip) : unreachable
39
- if (binding.rule !== 'map') return unreachable
40
- const param = binding.param ?? {}
41
- const key = Object.keys(param).find(k => k !== 'default' && param[k] === clip)
42
+ if (binding.rule !== 'table' || binding.lookup !== 'code') return unreachable
43
+ const table = binding.table
44
+ const key = Object.keys(table).find(k => k !== 'default' && table[k].clip === clip)
42
45
  if (key !== undefined) return reached(typed(key))
43
- /* Only the fallback turns into it: a value of a closed field the map does not name. */
44
- const spare = param.default === clip ? closed?.find(v => !Object.hasOwn(param, v)) : undefined
46
+ /* Only the default turns into it: a value of a closed field the table does not name. */
47
+ const spare = table.default?.clip === clip ? closed?.find(v => !Object.hasOwn(table, v)) : undefined
45
48
  return spare !== undefined ? reached(typed(spare)) : unreachable
46
49
  }
47
50
 
@@ -280,6 +280,15 @@ export const SidePanelStyles = css`
280
280
  padding: 2px;
281
281
  width: 40px;
282
282
  }
283
+ /*
284
+ * A button or a fold reached by the keyboard is ringed in the primary colour, as the canvas bar's tools are; the
285
+ * browser's own ring (orange on this theme) stood beside it (modeller sweep 2026-10-27 U27).
286
+ */
287
+ button:focus-visible,
288
+ summary:focus-visible {
289
+ outline: 2px solid var(--md-sys-color-primary);
290
+ outline-offset: 1px;
291
+ }
283
292
  input:focus,
284
293
  select:focus {
285
294
  outline: none;
@@ -1,5 +1,5 @@
1
1
  import type { FigureCapability } from '@hatiolab/figure-model';
2
2
  export type Rung = 'none' | 'hold' | 'flow';
3
3
  export declare const RUNGS: Readonly<Record<Rung, readonly FigureCapability[]>>;
4
- /** Which rung a set of names is, or null when it is none of them -- not invented. */
4
+ /** Which rung a set of names is, or null when it is none of them -- not invented. A product's capability (`<namespace>.<Name>`, ADR-0167) is beside the ladder. */
5
5
  export declare function rungOf(names: readonly string[] | undefined): Rung | null;
@@ -3,9 +3,9 @@ export const RUNGS = Object.freeze({
3
3
  hold: ['Capacity', 'Holdable'],
4
4
  flow: ['FlowNode']
5
5
  });
6
- /** Which rung a set of names is, or null when it is none of them -- not invented. */
6
+ /** Which rung a set of names is, or null when it is none of them -- not invented. A product's capability (`<namespace>.<Name>`, ADR-0167) is beside the ladder. */
7
7
  export function rungOf(names) {
8
- const has = new Set(names ?? []);
8
+ const has = new Set((names ?? []).filter(name => !name.includes('.')));
9
9
  if (has.size === 0)
10
10
  return 'none';
11
11
  for (const [rung, wanted] of Object.entries(RUNGS))
@@ -1 +1 @@
1
- {"version":3,"file":"capability-rung.js","sourceRoot":"","sources":["../client/capability-rung.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,KAAK,GAAwD,MAAM,CAAC,MAAM,CAAC;IACtF,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC;IAC9B,IAAI,EAAE,CAAC,UAAU,CAAC;CACnB,CAAC,CAAA;AAEF,qFAAqF;AACrF,MAAM,UAAU,MAAM,CAAC,KAAoC;IACzD,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAA;IAChC,IAAI,GAAG,CAAC,IAAI,KAAK,CAAC;QAAE,OAAO,MAAM,CAAA;IACjC,KAAK,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAA0C;QACzF,IAAI,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAAE,OAAO,IAAI,CAAA;IACpF,OAAO,IAAI,CAAA;AACb,CAAC","sourcesContent":["import type { FigureCapability } from '@hatiolab/figure-model'\n\n/*\n One rung per set of the format's capability names. Typed as the format's names, so a misspelt rung does not pass\n (ADR-0051 ④).\n*/\nexport type Rung = 'none' | 'hold' | 'flow'\nexport const RUNGS: Readonly<Record<Rung, readonly FigureCapability[]>> = Object.freeze({\n none: [],\n hold: ['Capacity', 'Holdable'],\n flow: ['FlowNode']\n})\n\n/** Which rung a set of names is, or null when it is none of them -- not invented. */\nexport function rungOf(names: readonly string[] | undefined): Rung | null {\n const has = new Set(names ?? [])\n if (has.size === 0) return 'none'\n for (const [rung, wanted] of Object.entries(RUNGS) as [Rung, readonly FigureCapability[]][])\n if (wanted.length === has.size && wanted.every(name => has.has(name))) return rung\n return null\n}\n\n"]}
1
+ {"version":3,"file":"capability-rung.js","sourceRoot":"","sources":["../client/capability-rung.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,KAAK,GAAwD,MAAM,CAAC,MAAM,CAAC;IACtF,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC;IAC9B,IAAI,EAAE,CAAC,UAAU,CAAC;CACnB,CAAC,CAAA;AAEF,mKAAmK;AACnK,MAAM,UAAU,MAAM,CAAC,KAAoC;IACzD,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;IACtE,IAAI,GAAG,CAAC,IAAI,KAAK,CAAC;QAAE,OAAO,MAAM,CAAA;IACjC,KAAK,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAA0C;QACzF,IAAI,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAAE,OAAO,IAAI,CAAA;IACpF,OAAO,IAAI,CAAA;AACb,CAAC","sourcesContent":["import type { FigureCapability } from '@hatiolab/figure-model'\n\n/*\n One rung per set of the format's capability names. Typed as the format's names, so a misspelt rung does not pass\n (ADR-0051 ④).\n*/\nexport type Rung = 'none' | 'hold' | 'flow'\nexport const RUNGS: Readonly<Record<Rung, readonly FigureCapability[]>> = Object.freeze({\n none: [],\n hold: ['Capacity', 'Holdable'],\n flow: ['FlowNode']\n})\n\n/** Which rung a set of names is, or null when it is none of them -- not invented. A product's capability (`<namespace>.<Name>`, ADR-0167) is beside the ladder. */\nexport function rungOf(names: readonly string[] | undefined): Rung | null {\n const has = new Set((names ?? []).filter(name => !name.includes('.')))\n if (has.size === 0) return 'none'\n for (const [rung, wanted] of Object.entries(RUNGS) as [Rung, readonly FigureCapability[]][])\n if (wanted.length === has.size && wanted.every(name => has.has(name))) return rung\n return null\n}\n\n"]}
@@ -15,11 +15,11 @@ export interface DetailFactsRow {
15
15
  }
16
16
  /**
17
17
  * A place in words, as every screen that lists places says it: its role (파지 · 안착), what it accepts and how many it
18
- * holds -- 「파지 · 받는 것 BOX, WORKPIECE · 최대 1」.
18
+ * holds -- 「파지 · 받는 것 BOX, WORKPIECE · 최대 1」, or 「받는 것 모든 아이템」 for a place that names no type.
19
19
  */
20
20
  export declare function placeTerms(place: {
21
21
  role: string;
22
- accepts: readonly string[];
22
+ accepts?: readonly string[];
23
23
  capacity: number;
24
24
  }, say: Say): string;
25
25
  /** One line of what the preview tells about a figure: its label, its value, and for places one line each. */
@@ -3,12 +3,12 @@ import { rungOf } from './capability-rung.js';
3
3
  import { authoredSizeOf, sizeRangeOf } from './preview-model.js';
4
4
  /**
5
5
  * A place in words, as every screen that lists places says it: its role (파지 · 안착), what it accepts and how many it
6
- * holds -- 「파지 · 받는 것 BOX, WORKPIECE · 최대 1」.
6
+ * holds -- 「파지 · 받는 것 BOX, WORKPIECE · 최대 1」, or 「받는 것 모든 아이템」 for a place that names no type.
7
7
  */
8
8
  export function placeTerms(place, say) {
9
9
  return [
10
10
  say(`figure.label.role-${place.role}`),
11
- say('figure.text.place-accepts', { accepts: place.accepts.join(', ') }),
11
+ place.accepts?.length ? say('figure.text.place-accepts', { accepts: place.accepts.join(', ') }) : say('figure.text.place-accepts-any'),
12
12
  say('figure.label.place-holds', { count: place.capacity })
13
13
  ].join(' · ');
14
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"detail-facts.js","sourceRoot":"","sources":["../client/detail-facts.ts"],"names":[],"mappings":"AAAA,OA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AAC,yBAAyB,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAE7H,IAAI,OAAO,IAAI,GAAG;QAChB,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,CAAC,uBAAuB,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAA;IACtK,IAAI,GAAG,CAAC,SAAS,EAAE,CAAC;QAClB,MAAM,EAAE,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAA;QACzG,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,CAAC,kBAAkB,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IAC/H,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC","sourcesContent":["import { figureBindingsOf, figureJointsOf, type FigureAsset } from '@hatiolab/figure-model'\n\nimport { rungOf } from './capability-rung.js'\nimport { authoredSizeOf, sizeRangeOf } from './preview-model.js'\n\ntype Say = (key: string, params?: Record<string, unknown>) => string\n\n/**\n * What the facts read off a figure's row besides its asset. figure-ui's catalogue row and figure-library's release both\n * give it. `score` absent means the caller does not keep one (no line); null means not measured yet.\n */\nexport interface DetailFactsRow {\n category?: string | null\n tags?: string[] | null\n score?: number | null\n updatedAt?: string | Date | null\n updater?: { name?: string | null } | null\n}\n\n/**\n * A place in words, as every screen that lists places says it: its role (파지 · 안착), what it accepts and how many it\n * holds -- 「파지 · 받는 것 BOX, WORKPIECE · 최대 1」.\n */\nexport function placeTerms(place: { role: string; accepts: readonly string[]; capacity: number }, say: Say): string {\n return [\n say(`figure.label.role-${place.role}`),\n say('figure.text.place-accepts', { accepts: place.accepts.join(', ') }),\n say('figure.label.place-holds', { count: place.capacity })\n ].join(' · ')\n}\n\n/** One line of what the preview tells about a figure: its label, its value, and for places one line each. */\nexport interface DetailFact {\n key: string\n label: string\n value: string\n lines?: string[]\n}\n\nconst number = (n: number) => Math.round(n).toLocaleString()\n\n/**\n * What a figure is, read off its asset and its row, in the words the modeller's properties already use. Nothing is\n * defaulted: what the figure does not say reads as a dash, and a score not yet measured is said so, not 0.\n */\nexport function detailFactsOf(asset: FigureAsset, row: DetailFactsRow, say: Say): DetailFact[] {\n const facts: DetailFact[] = []\n const dash = '—'\n\n facts.push({ key: 'category', label: say('figure.label.category'), value: row.category || dash })\n facts.push({ key: 'tags', label: say('figure.label.tags'), value: row.tags?.length ? row.tags.join(', ') : dash })\n facts.push({ key: 'placement', label: say('figure.label.figure-placement'), value: asset.placement ? say(`figure.label.placement-${asset.placement}`) : dash })\n\n /* The sizes a board may give it: a range on an axis that opens one, the authored size on one that is fixed. */\n const base = authoredSizeOf(asset)\n const axes = (['x', 'y', 'z'] as const).map(axis => {\n const range = sizeRangeOf(asset, axis)\n return `${axis.toUpperCase()} ${range ? `${number(range.min)}–${Number.isFinite(range.max) ? number(range.max) : '∞'}` : number(base[axis])}`\n })\n facts.push({ key: 'size', label: say('figure.label.instance-range'), value: `${axes.join(' · ')} mm` })\n if (asset.sizing === 'uniform') facts.push({ key: 'sizing', label: say('figure.label.sizing-rule'), value: say('figure.label.sizing-uniform') })\n\n const names = asset.document.capabilities.names ?? []\n const rung = rungOf(names)\n facts.push({ key: 'does', label: say('figure.label.what-this-does'), value: rung ? say(`figure.label.rung-${rung}`) : names.join(' · ') })\n\n const places = figureBindingsOf(asset)\n facts.push({\n key: 'places',\n label: say('figure.label.places'),\n value: places.length ? String(places.length) : dash,\n lines: places.map(place => `${place.label} · ${placeTerms(place, say)}`)\n })\n\n facts.push({ key: 'joints', label: say('figure.label.joint'), value: String(figureJointsOf(asset).joints.length) })\n const extensions = Object.keys((asset as { extensions?: Record<string, unknown> }).extensions ?? {})\n if (extensions.length) facts.push({ key: 'extensions', label: say('figure.label.extensions'), value: extensions.join(', ') })\n\n if ('score' in row)\n facts.push({ key: 'maturity', label: say('figure.label.maturity'), value: row.score == null ? say('figure.text.not-measured-yet') : String(Math.round(row.score)) })\n if (row.updatedAt) {\n const at = new Date(row.updatedAt).toLocaleString(undefined, { dateStyle: 'medium', timeStyle: 'short' })\n facts.push({ key: 'updated', label: say('field.updated_at'), value: row.updater?.name ? `${at} · ${row.updater.name}` : at })\n }\n return facts\n}\n"]}
1
+ {"version":3,"file":"detail-facts.js","sourceRoot":"","sources":["../client/detail-facts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAoB,MAAM,wBAAwB,CAAA;AAE3F,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAgBhE;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,KAAsE,EAAE,GAAQ;IACzG,OAAO;QACL,GAAG,CAAC,qBAAqB,KAAK,CAAC,IAAI,EAAE,CAAC;QACtC,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,2BAA2B,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,+BAA+B,CAAC;QACtI,GAAG,CAAC,0BAA0B,EAAE,EAAE,KAAK,EAAE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AM,EAAE,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAA;QACzG,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,CAAC,kBAAkB,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IAC/H,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC","sourcesContent":["import { figureBindingsOf, figureJointsOf, type FigureAsset } from '@hatiolab/figure-model'\n\nimport { rungOf } from './capability-rung.js'\nimport { authoredSizeOf, sizeRangeOf } from './preview-model.js'\n\ntype Say = (key: string, params?: Record<string, unknown>) => string\n\n/**\n * What the facts read off a figure's row besides its asset. figure-ui's catalogue row and figure-library's release both\n * give it. `score` absent means the caller does not keep one (no line); null means not measured yet.\n */\nexport interface DetailFactsRow {\n category?: string | null\n tags?: string[] | null\n score?: number | null\n updatedAt?: string | Date | null\n updater?: { name?: string | null } | null\n}\n\n/**\n * A place in words, as every screen that lists places says it: its role (파지 · 안착), what it accepts and how many it\n * holds -- 「파지 · 받는 것 BOX, WORKPIECE · 최대 1」, or 「받는 것 모든 아이템」 for a place that names no type.\n */\nexport function placeTerms(place: { role: string; accepts?: readonly string[]; capacity: number }, say: Say): string {\n return [\n say(`figure.label.role-${place.role}`),\n place.accepts?.length ? say('figure.text.place-accepts', { accepts: place.accepts.join(', ') }) : say('figure.text.place-accepts-any'),\n say('figure.label.place-holds', { count: place.capacity })\n ].join(' · ')\n}\n\n/** One line of what the preview tells about a figure: its label, its value, and for places one line each. */\nexport interface DetailFact {\n key: string\n label: string\n value: string\n lines?: string[]\n}\n\nconst number = (n: number) => Math.round(n).toLocaleString()\n\n/**\n * What a figure is, read off its asset and its row, in the words the modeller's properties already use. Nothing is\n * defaulted: what the figure does not say reads as a dash, and a score not yet measured is said so, not 0.\n */\nexport function detailFactsOf(asset: FigureAsset, row: DetailFactsRow, say: Say): DetailFact[] {\n const facts: DetailFact[] = []\n const dash = '—'\n\n facts.push({ key: 'category', label: say('figure.label.category'), value: row.category || dash })\n facts.push({ key: 'tags', label: say('figure.label.tags'), value: row.tags?.length ? row.tags.join(', ') : dash })\n facts.push({ key: 'placement', label: say('figure.label.figure-placement'), value: asset.placement ? say(`figure.label.placement-${asset.placement}`) : dash })\n\n /* The sizes a board may give it: a range on an axis that opens one, the authored size on one that is fixed. */\n const base = authoredSizeOf(asset)\n const axes = (['x', 'y', 'z'] as const).map(axis => {\n const range = sizeRangeOf(asset, axis)\n return `${axis.toUpperCase()} ${range ? `${number(range.min)}–${Number.isFinite(range.max) ? number(range.max) : '∞'}` : number(base[axis])}`\n })\n facts.push({ key: 'size', label: say('figure.label.instance-range'), value: `${axes.join(' · ')} mm` })\n if (asset.sizing === 'uniform') facts.push({ key: 'sizing', label: say('figure.label.sizing-rule'), value: say('figure.label.sizing-uniform') })\n\n const names = asset.document.capabilities.names ?? []\n const rung = rungOf(names)\n facts.push({ key: 'does', label: say('figure.label.what-this-does'), value: rung ? say(`figure.label.rung-${rung}`) : names.join(' · ') })\n\n const places = figureBindingsOf(asset)\n facts.push({\n key: 'places',\n label: say('figure.label.places'),\n value: places.length ? String(places.length) : dash,\n lines: places.map(place => `${place.label} · ${placeTerms(place, say)}`)\n })\n\n facts.push({ key: 'joints', label: say('figure.label.joint'), value: String(figureJointsOf(asset).joints.length) })\n const extensions = Object.keys((asset as { extensions?: Record<string, unknown> }).extensions ?? {})\n if (extensions.length) facts.push({ key: 'extensions', label: say('figure.label.extensions'), value: extensions.join(', ') })\n\n if ('score' in row)\n facts.push({ key: 'maturity', label: say('figure.label.maturity'), value: row.score == null ? say('figure.text.not-measured-yet') : String(Math.round(row.score)) })\n if (row.updatedAt) {\n const at = new Date(row.updatedAt).toLocaleString(undefined, { dateStyle: 'medium', timeStyle: 'short' })\n facts.push({ key: 'updated', label: say('field.updated_at'), value: row.updater?.name ? `${at} · ${row.updater.name}` : at })\n }\n return facts\n}\n"]}
@@ -9,8 +9,9 @@ export declare function clipsDriving(asset: FigureAsset, id: string): string[];
9
9
  * How the detail view plays a clip (ADR-0051 §3.2, §8). A clip in no motion group plays at its own speed (the board's
10
10
  * `clips`). A clip of a group is the group's selection (the board's `motion`); and when the figure's data chooses that
11
11
  * group's clip, the data wins -- its default too -- so the clip is chosen through a data value the figure's own binding
12
- * turns into it, given as a saved value (`figureValues`), the way a board would. A clip no data value turns into (a
13
- * range, a scale, or only another value's fallback of an open field) cannot be chosen here.
12
+ * turns into it, given as a saved value (`figureValues`), the way a board would: the value itself, or the code of a
13
+ * table whose look names the clip (ADR-0166). A clip no data value turns into (an interval, a scale, or only another
14
+ * value's fallback of an open field) cannot be chosen here.
14
15
  */
15
16
  export type ClipPlay = {
16
17
  kind: 'free';
@@ -13,7 +13,7 @@ export function clipPlayOf(asset, clip) {
13
13
  if (!group)
14
14
  return { kind: 'free' };
15
15
  const plan = asset.dataInterface ? compileFigureDataInterface(asset) : null;
16
- const ready = plan?.bindings.find(r => r.binding.behavior.kind === 'motion-clip' && r.binding.behavior.group === group.id);
16
+ const ready = plan?.bindings.find(({ binding: b }) => b.rule === 'table' ? b.targets.group === group.id && Object.values(b.table).some(look => look.clip !== undefined) : b.behavior.kind === 'motion-clip' && b.behavior.group === group.id);
17
17
  if (!ready)
18
18
  return { kind: 'group', group: group.id };
19
19
  const { binding, node } = ready;
@@ -23,14 +23,14 @@ export function clipPlayOf(asset, clip) {
23
23
  const typed = (key) => (node.kind === 'boolean' ? key === 'true' : node.kind === 'number' ? Number(key) : key);
24
24
  if (binding.rule === 'value')
25
25
  return node.kind === 'text' && (!closed || closed.includes(clip)) ? reached(clip) : unreachable;
26
- if (binding.rule !== 'map')
26
+ if (binding.rule !== 'table' || binding.lookup !== 'code')
27
27
  return unreachable;
28
- const param = binding.param ?? {};
29
- const key = Object.keys(param).find(k => k !== 'default' && param[k] === clip);
28
+ const table = binding.table;
29
+ const key = Object.keys(table).find(k => k !== 'default' && table[k].clip === clip);
30
30
  if (key !== undefined)
31
31
  return reached(typed(key));
32
- /* Only the fallback turns into it: a value of a closed field the map does not name. */
33
- const spare = param.default === clip ? closed?.find(v => !Object.hasOwn(param, v)) : undefined;
32
+ /* Only the default turns into it: a value of a closed field the table does not name. */
33
+ const spare = table.default?.clip === clip ? closed?.find(v => !Object.hasOwn(table, v)) : undefined;
34
34
  return spare !== undefined ? reached(typed(spare)) : unreachable;
35
35
  }
36
36
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"detail-motion.js","sourceRoot":"","sources":["../client/detail-motion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAA0C,MAAM,wBAAwB,CAAA;AAE3G,4FAA4F;AAC5F,MAAM,UAAU,iBAAiB,CAAC,KAAkB,EAAE,MAA8B,EAAE,IAAY;IAChG,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAA;IAC5F,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AACrF,CAAC;AAED,kHAAkH;AAClH,MAAM,UAAU,YAAY,CAAC,KAAkB,EAAE,EAAU;IACzD,OAAO,CAAC,GAAG,IAAI,GAAG,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AAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;IAC9I,MAAM,YAAY,GAAG,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;IACjF,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,CAAA;AACxC,CAAC","sourcesContent":["import { compileFigureDataInterface, type FigureAsset, type FigureDataValue } from '@hatiolab/figure-model'\n\n/** External values win over drivers; release only the controls owned by the chosen clip. */\nexport function parametersForClip(asset: FigureAsset, values: Record<string, number>, clip: string) {\n const driven = new Set((asset.drivers ?? []).filter(d => d.clip === clip).map(d => d.state))\n return Object.fromEntries(Object.entries(values).filter(([id]) => !driven.has(id)))\n}\n\n/** The clips that move an input. A clip can move many inputs, so it plays on its own row, never on an input's. */\nexport function clipsDriving(asset: FigureAsset, id: string) {\n return [...new Set((asset.drivers ?? []).filter(d => d.state === id).map(d => d.clip))]\n}\n\n/**\n * How the detail view plays a clip (ADR-0051 §3.2, §8). A clip in no motion group plays at its own speed (the board's\n * `clips`). A clip of a group is the group's selection (the board's `motion`); and when the figure's data chooses that\n * group's clip, the data wins -- its default too -- so the clip is chosen through a data value the figure's own binding\n * turns into it, given as a saved value (`figureValues`), the way a board would. A clip no data value turns into (a\n * range, a scale, or only another value's fallback of an open field) cannot be chosen here.\n */\nexport type ClipPlay =\n | { kind: 'free' }\n | { kind: 'group'; group: string }\n | { kind: 'data'; group: string; accessor: string; value: FigureDataValue }\n | { kind: 'unreachable'; group: string }\n\nexport function clipPlayOf(asset: FigureAsset, clip: string): ClipPlay {\n const group = (asset.motionGroups ?? []).find(g => g.clips.includes(clip))\n if (!group) return { kind: 'free' }\n const plan = asset.dataInterface ? compileFigureDataInterface(asset) : null\n const ready = plan?.bindings.find(r => r.binding.behavior.kind === 'motion-clip' && r.binding.behavior.group === group.id)\n if (!ready) return { kind: 'group', group: group.id }\n const { binding, node } = ready\n const reached = (value: FigureDataValue): ClipPlay => ({ kind: 'data', group: group.id, accessor: binding.accessor, value })\n const unreachable: ClipPlay = { kind: 'unreachable', group: group.id }\n const closed = node.kind === 'boolean' ? ['false', 'true'] : node.kind === 'text' && node.values ? node.values : null\n const typed = (key: string): FigureDataValue => (node.kind === 'boolean' ? key === 'true' : node.kind === 'number' ? Number(key) : key)\n if (binding.rule === 'value') return node.kind === 'text' && (!closed || closed.includes(clip)) ? reached(clip) : unreachable\n if (binding.rule !== 'map') return unreachable\n const param = binding.param ?? {}\n const key = Object.keys(param).find(k => k !== 'default' && param[k] === clip)\n if (key !== undefined) return reached(typed(key))\n /* Only the fallback turns into it: a value of a closed field the map does not name. */\n const spare = param.default === clip ? closed?.find(v => !Object.hasOwn(param, v)) : undefined\n return spare !== undefined ? reached(typed(spare)) : unreachable\n}\n\n/**\n * What the board is told for the clip playing (none: ''): the free clips' speeds, the group's selection, and the saved\n * data value that chooses it. Every key is written whole, so the clip played before is let go.\n */\nexport function playSettingsOf(asset: FigureAsset, playing: string) {\n const play = playing ? clipPlayOf(asset, playing) : null\n const clips = Object.fromEntries([...new Set((asset.drivers ?? []).filter(d => !(asset.motionGroups ?? []).some(g => g.clips.includes(d.clip))).map(d => d.clip))].map(c => [c, c === playing ? 1 : 0]))\n const motion = play && play.kind !== 'free' && play.kind !== 'unreachable' ? { [play.group]: { clip: playing, speed: 1, paused: false } } : {}\n const figureValues = play?.kind === 'data' ? { [play.accessor]: play.value } : {}\n return { clips, motion, figureValues }\n}\n"]}
1
+ {"version":3,"file":"detail-motion.js","sourceRoot":"","sources":["../client/detail-motion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAA0C,MAAM,wBAAwB,CAAA;AAE3G,4FAA4F;AAC5F,MAAM,UAAU,iBAAiB,CAAC,KAAkB,E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["import { compileFigureDataInterface, type FigureAsset, type FigureDataValue } from '@hatiolab/figure-model'\n\n/** External values win over drivers; release only the controls owned by the chosen clip. */\nexport function parametersForClip(asset: FigureAsset, values: Record<string, number>, clip: string) {\n const driven = new Set((asset.drivers ?? []).filter(d => d.clip === clip).map(d => d.state))\n return Object.fromEntries(Object.entries(values).filter(([id]) => !driven.has(id)))\n}\n\n/** The clips that move an input. A clip can move many inputs, so it plays on its own row, never on an input's. */\nexport function clipsDriving(asset: FigureAsset, id: string) {\n return [...new Set((asset.drivers ?? []).filter(d => d.state === id).map(d => d.clip))]\n}\n\n/**\n * How the detail view plays a clip (ADR-0051 §3.2, §8). A clip in no motion group plays at its own speed (the board's\n * `clips`). A clip of a group is the group's selection (the board's `motion`); and when the figure's data chooses that\n * group's clip, the data wins -- its default too -- so the clip is chosen through a data value the figure's own binding\n * turns into it, given as a saved value (`figureValues`), the way a board would: the value itself, or the code of a\n * table whose look names the clip (ADR-0166). A clip no data value turns into (an interval, a scale, or only another\n * value's fallback of an open field) cannot be chosen here.\n */\nexport type ClipPlay =\n | { kind: 'free' }\n | { kind: 'group'; group: string }\n | { kind: 'data'; group: string; accessor: string; value: FigureDataValue }\n | { kind: 'unreachable'; group: string }\n\nexport function clipPlayOf(asset: FigureAsset, clip: string): ClipPlay {\n const group = (asset.motionGroups ?? []).find(g => g.clips.includes(clip))\n if (!group) return { kind: 'free' }\n const plan = asset.dataInterface ? compileFigureDataInterface(asset) : null\n const ready = plan?.bindings.find(({ binding: b }) =>\n b.rule === 'table' ? b.targets.group === group.id && Object.values(b.table).some(look => look.clip !== undefined) : b.behavior.kind === 'motion-clip' && b.behavior.group === group.id\n )\n if (!ready) return { kind: 'group', group: group.id }\n const { binding, node } = ready\n const reached = (value: FigureDataValue): ClipPlay => ({ kind: 'data', group: group.id, accessor: binding.accessor, value })\n const unreachable: ClipPlay = { kind: 'unreachable', group: group.id }\n const closed = node.kind === 'boolean' ? ['false', 'true'] : node.kind === 'text' && node.values ? node.values : null\n const typed = (key: string): FigureDataValue => (node.kind === 'boolean' ? key === 'true' : node.kind === 'number' ? Number(key) : key)\n if (binding.rule === 'value') return node.kind === 'text' && (!closed || closed.includes(clip)) ? reached(clip) : unreachable\n if (binding.rule !== 'table' || binding.lookup !== 'code') return unreachable\n const table = binding.table\n const key = Object.keys(table).find(k => k !== 'default' && table[k].clip === clip)\n if (key !== undefined) return reached(typed(key))\n /* Only the default turns into it: a value of a closed field the table does not name. */\n const spare = table.default?.clip === clip ? closed?.find(v => !Object.hasOwn(table, v)) : undefined\n return spare !== undefined ? reached(typed(spare)) : unreachable\n}\n\n/**\n * What the board is told for the clip playing (none: ''): the free clips' speeds, the group's selection, and the saved\n * data value that chooses it. Every key is written whole, so the clip played before is let go.\n */\nexport function playSettingsOf(asset: FigureAsset, playing: string) {\n const play = playing ? clipPlayOf(asset, playing) : null\n const clips = Object.fromEntries([...new Set((asset.drivers ?? []).filter(d => !(asset.motionGroups ?? []).some(g => g.clips.includes(d.clip))).map(d => d.clip))].map(c => [c, c === playing ? 1 : 0]))\n const motion = play && play.kind !== 'free' && play.kind !== 'unreachable' ? { [play.group]: { clip: playing, speed: 1, paused: false } } : {}\n const figureValues = play?.kind === 'data' ? { [play.accessor]: play.value } : {}\n return { clips, motion, figureValues }\n}\n"]}
@@ -279,6 +279,15 @@ export const SidePanelStyles = css `
279
279
  padding: 2px;
280
280
  width: 40px;
281
281
  }
282
+ /*
283
+ * A button or a fold reached by the keyboard is ringed in the primary colour, as the canvas bar's tools are; the
284
+ * browser's own ring (orange on this theme) stood beside it (modeller sweep 2026-10-27 U27).
285
+ */
286
+ button:focus-visible,
287
+ summary:focus-visible {
288
+ outline: 2px solid var(--md-sys-color-primary);
289
+ outline-offset: 1px;
290
+ }
282
291
  input:focus,
283
292
  select:focus {
284
293
  outline: none;
@@ -1 +1 @@
1
- {"version":3,"file":"side-panel-styles.js","sourceRoot":"","sources":["../client/side-panel-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0bjC,CAAA","sourcesContent":["import { css } from 'lit'\n\n/**\n * The side panel's one look, for every element that draws in the modeller's side.\n *\n * The side is drawn by several elements (the type field, the figure's properties, a part's values, fastening, places,\n * motion, material, controls, clips, the environment) and each had styled its own fields: three label styles and\n * three field heights in one column (user, 2026-09-24: \"why are the styles and layout all different?\"). They share\n * this sheet now and keep only what is theirs.\n *\n * The vocabulary:\n * section one titled group; the side is a stack of them\n * h3 a group's title\n *\n * Three sizes and two weights (user 2026-10-01, the panel checked for balance: eight sizes, and titles smaller than\n * what they titled): a title at the body token and semibold, everything else at the small token, and a hint at the\n * micro one. Sections are 16 px above their title and 12 px below their last line.\n * div[inline-field] a short label and its one field on one line\n * div[field] a label and its field on one line; what else the field holds stands under the field\n * div[form] short labels beside their fields, the fields starting on one line\n * div[vector-row] a title, then X · Y · Z in one row of cells with the axis inside (`div[triple]` of\n * `div[cell]`) -- three values read together, as vector tools lay them out\n * div[pair] two controls side by side\n * label[toggle] a checkbox and its words\n * p[hint] · small the quiet line under a field\n * button[act] an action under the fields it acts on\n * [scrub] a label dragged sideways to scrub its field\n */\nexport const SidePanelStyles = css`\n :host {\n /*\n * A field's measure (user 2026-10-17: 「공간 낭비가 심하다 … 둔한 라운드와 여백」): 26px high, a 4px corner, and the\n * label's column. Labels and fields share a line, so a group reads as a list to scan, not a form to fill.\n */\n --figure-control-height: 26px;\n --figure-control-radius: 4px;\n --figure-label-width: 72px;\n font-size: var(--ui-t-small, 11.5px);\n color: var(--md-sys-color-on-surface);\n }\n /* The side is a stack of sections, each a titled group. */\n /*\n * Tight inside a group, loose between groups: rows 6px apart, so a group reads as one thing; groups parted by their\n * line and 16px, so the eye knows where the next one starts (user 2026-10-17: no tension and release).\n */\n section {\n display: grid;\n gap: 6px;\n padding: 16px 12px;\n border-bottom: 1px solid var(--md-sys-color-outline-variant, #c4c7c5);\n }\n section > h3 {\n margin: 0 0 4px;\n }\n section div[field] + div[field],\n section div[inline-field] + div[inline-field],\n section div[vector-row] + div[vector-row] {\n margin-top: 0;\n }\n h3 {\n display: flex;\n align-items: center;\n gap: 4px;\n margin: 14px 0 6px;\n font-size: var(--ui-t-body, 13px);\n font-weight: 600;\n color: var(--md-sys-color-on-surface);\n }\n h3:first-child {\n margin-top: 0;\n }\n /* Two weights only: a bold word in a line is the title's weight, not the browser's heavier one. */\n b,\n strong {\n font-weight: 600;\n }\n label,\n div[form] > span {\n font-size: inherit;\n color: var(--md-sys-color-on-surface-variant);\n }\n /* The label on the left, its field on the right; a hint or a second row under the field, in the field's column. */\n div[field] {\n display: grid;\n grid-template-columns: var(--figure-label-width) minmax(0, 1fr);\n align-items: center;\n gap: 4px 8px;\n }\n div[field] > * {\n grid-column: 2;\n }\n div[field] > label {\n grid-column: 1;\n overflow-wrap: anywhere;\n }\n /* A field with no label -- an action and its note -- and a checkbox with its words take the whole line. */\n div[field]:not(:has(> label:not([toggle]))) > *,\n div[field] > label[toggle] {\n grid-column: 1 / -1;\n }\n div[field] + div[field],\n div[field] + div[form],\n div[form] + div[field],\n div[vector-row] + div[vector-row],\n div[vector-row] + div[field],\n div[field] + div[vector-row] {\n margin-top: 6px;\n }\n div[form],\n div[inline-field],\n div[vector-row] {\n display: grid;\n grid-template-columns: var(--figure-label-width) minmax(0, 1fr);\n align-items: center;\n gap: 6px 8px;\n }\n div[form] > span,\n div[inline-field] > label,\n div[vector-row] > label {\n overflow-wrap: anywhere;\n white-space: normal;\n }\n /* A value read, not edited, beside its label: the field's size and colour, not the page's. */\n div[inline-field] > span[value] {\n font-size: inherit;\n color: var(--md-sys-color-on-surface);\n }\n /*\n * The unit is part of its label and reads in its colour. The outline grey (a line's colour) left 11.5px words at\n * 4.4:1 on the panel, under the 4.5:1 small text needs (2026-10-16).\n */\n label span[unit] {\n color: var(--md-sys-color-on-surface-variant);\n }\n div[inline-field] + div[inline-field],\n div[inline-field] + div[vector-row],\n div[vector-row] + div[inline-field] {\n margin-top: 5px;\n }\n /* A row of worded tools (align, snap; mirror copies). */\n div[tools] {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n }\n /* Words, no box: a row of tools reads as a row of words, each lit under the hand. */\n div[tools] button {\n height: var(--figure-control-height);\n padding: 0 6px;\n font: inherit;\n color: var(--md-sys-color-on-surface);\n background: none;\n border: none;\n border-radius: var(--figure-control-radius);\n cursor: pointer;\n }\n div[tools] button:hover:not(:disabled) {\n background: var(--md-sys-color-surface-container);\n }\n div[tools] button:disabled {\n opacity: 0.45;\n cursor: default;\n }\n div[pair] {\n display: flex;\n gap: 4px;\n }\n div[pair] > * {\n flex: 1;\n min-width: 0;\n }\n div[triple] {\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 4px;\n }\n /*\n * A field is a line, not a box: its value over one thin rule, the rule darkening under the hand and turning the\n * primary colour, twice as thick, with the focus. Boxed fields made the panel a stack of boxes (user 2026-10-17:\n * 「박스형 input … 난립을 완화하라 … 언더라인형의 도입」); a faint fill was tried first and still read as grey blocks.\n */\n input,\n select {\n width: 100%;\n min-width: 0;\n min-height: var(--figure-control-height);\n box-sizing: border-box;\n padding: 2px 2px;\n font: inherit;\n color: var(--md-sys-color-on-surface);\n background: transparent;\n border: 0;\n border-bottom: 1px solid var(--md-sys-color-outline-variant, #c4c7c5);\n border-radius: 0;\n }\n input:hover:not(:disabled):not(:focus),\n select:hover:not(:disabled):not(:focus) {\n border-bottom-color: var(--md-sys-color-on-surface-variant);\n }\n /* The browser's own box and dot, in the panel's colour. */\n input[type='checkbox'],\n input[type='radio'] {\n width: auto;\n min-height: 0;\n margin: 0;\n accent-color: var(--md-sys-color-primary);\n }\n /* A fold: the panel's chevron, not the browser's triangle. */\n summary {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 6px 0;\n list-style: none;\n cursor: pointer;\n color: var(--md-sys-color-on-surface-variant);\n }\n summary::-webkit-details-marker {\n display: none;\n }\n summary::before {\n content: '';\n flex: none;\n width: 6px;\n height: 6px;\n margin: 0 2px;\n border-right: 1.5px solid currentColor;\n border-bottom: 1.5px solid currentColor;\n transform: rotate(-45deg);\n transition: transform 0.15s;\n }\n details[open] > summary::before {\n transform: rotate(45deg);\n }\n /* A thin track and a small thumb: a slider is a line to drag along, not a block (user, 2026-09-24). */\n input[type='range'] {\n -webkit-appearance: none;\n appearance: none;\n min-height: 16px;\n height: 16px;\n padding: 0;\n border: none;\n background: transparent;\n cursor: pointer;\n }\n input[type='range']::-webkit-slider-runnable-track {\n height: 3px;\n border-radius: 2px;\n background: var(--md-sys-color-outline-variant);\n }\n input[type='range']::-webkit-slider-thumb {\n -webkit-appearance: none;\n width: 12px;\n height: 12px;\n margin-top: -4.5px;\n border: none;\n border-radius: 50%;\n background: var(--md-sys-color-primary);\n }\n input[type='range']::-moz-range-track {\n height: 3px;\n border-radius: 2px;\n background: var(--md-sys-color-outline-variant);\n }\n input[type='range']::-moz-range-thumb {\n width: 12px;\n height: 12px;\n border: none;\n border-radius: 50%;\n background: var(--md-sys-color-primary);\n }\n input[type='range']:focus {\n outline: none;\n }\n input[type='range']:focus-visible::-webkit-slider-thumb {\n outline: 2px solid var(--md-sys-color-primary);\n outline-offset: 2px;\n }\n input[type='color'] {\n padding: 2px;\n width: 40px;\n }\n input:focus,\n select:focus {\n outline: none;\n border-bottom-color: var(--md-sys-color-primary);\n box-shadow: inset 0 -1px 0 var(--md-sys-color-primary);\n }\n input:disabled,\n select:disabled {\n opacity: 0.6;\n }\n /* A number with its axis inside the cell, on the left. */\n div[cell] {\n display: flex;\n box-sizing: border-box;\n height: var(--figure-control-height);\n align-items: center;\n gap: 2px;\n padding-left: 2px;\n /* The same line as every field, the axis letter at its start. */\n background: transparent;\n border: 0;\n border-bottom: 1px solid var(--md-sys-color-outline-variant, #c4c7c5);\n border-radius: 0;\n }\n div[cell]:hover:not(:focus-within) {\n border-bottom-color: var(--md-sys-color-on-surface-variant);\n }\n div[cell]:focus-within {\n border-bottom-color: var(--md-sys-color-primary);\n box-shadow: inset 0 -1px 0 var(--md-sys-color-primary);\n }\n /* A label that scrubs its field when dragged sideways (vector tools' way). */\n [scrub] {\n cursor: ew-resize;\n user-select: none;\n touch-action: none;\n }\n div[cell] span[axis] {\n flex: none;\n font-size: var(--ui-t-micro, 11px);\n letter-spacing: 0.02em;\n color: var(--md-sys-color-on-surface-variant);\n }\n div[cell] input {\n min-height: 0;\n height: calc(var(--figure-control-height) - 2px);\n padding: 2px 2px 2px 2px;\n font-family: var(--ui-mono, ui-monospace, monospace);\n text-align: right;\n background: none;\n border: none;\n border-radius: 0;\n }\n div[cell] input:focus {\n outline: none;\n }\n /* An axis a rule sets: its number, read-only, on a quieter ground (ADR-0097). */\n /* A number a rule sets: its line dotted and its value in grey -- read, not edited. */\n div[cell][held] {\n border-bottom-style: dotted;\n }\n div[cell][held] input {\n color: var(--md-sys-color-on-surface-variant);\n font-style: italic;\n }\n p[held-axes] {\n margin: 2px 0 6px;\n }\n label[toggle] {\n display: flex;\n align-items: center;\n gap: 6px;\n color: var(--md-sys-color-on-surface);\n }\n /* Related choices and section state use the same type, spacing and colours in every panel. */\n [choice-row] {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 6px 14px;\n min-height: var(--figure-control-height);\n }\n h3 > [section-state] {\n margin-left: auto;\n font-size: var(--ui-t-micro, 11px);\n font-weight: 400;\n color: var(--md-sys-color-on-surface-variant);\n white-space: nowrap;\n }\n h3 > [section-state][active] {\n color: var(--md-sys-color-primary);\n }\n /* The 「?」 beside a title: no border, it says there is more rather than asking to be pressed. */\n button[help] {\n display: inline-flex;\n align-items: center;\n padding: 0;\n margin: 0;\n /* The quiet marks beside a title -- 「?」 and the group's 「⋯」 -- in one colour. */\n color: var(--md-sys-color-on-surface-variant);\n background: none;\n border: none;\n cursor: pointer;\n }\n /* Beside a title at the size every icon beside words takes (16), the group's 「⋯」 too. */\n button[help] md-icon {\n font-size: 16px;\n width: 16px;\n height: 16px;\n }\n button[help]:hover,\n button[help][aria-expanded='true'] {\n color: var(--md-sys-color-primary);\n }\n p[hint],\n small {\n display: block;\n margin: 2px 0 4px;\n font-size: var(--ui-t-micro, 11px);\n line-height: 1.5;\n color: var(--md-sys-color-on-surface-variant);\n }\n /*\n * An action under its fields: its icon and words in the primary colour, no box (user 2026-10-17: 「박스형 버튼의\n * 난립」). It was a band across the panel once (2026-10-01), then an outlined box; the icon and the colour say it is\n * pressed, and the hover lights its ground.\n */\n button[act] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n justify-self: start;\n gap: 6px;\n width: auto;\n max-width: 100%;\n margin: 0 0 0 -6px;\n padding: 0 6px;\n min-height: var(--figure-control-height);\n font: inherit;\n color: var(--md-sys-color-primary);\n background: none;\n border: none;\n border-radius: var(--figure-control-radius);\n cursor: pointer;\n }\n /*\n * Taking something back -- detach, clear, back to fixed, remove a row -- in one look: words in the label grey, no box,\n * a step quieter than the group's action in the primary colour (user 2026-10-16, 2026-10-17).\n */\n button[quiet] {\n display: inline-flex;\n align-items: center;\n justify-self: start;\n gap: 4px;\n height: var(--figure-control-height);\n padding: 0 6px;\n margin-left: -6px;\n font: inherit;\n color: var(--md-sys-color-on-surface-variant);\n background: none;\n border: none;\n border-radius: var(--figure-control-radius);\n cursor: pointer;\n }\n button[quiet]:hover:not(:disabled) {\n background-color: var(--md-sys-color-surface-container);\n }\n button[quiet]:disabled {\n opacity: 0.5;\n cursor: default;\n }\n button[quiet] md-icon {\n font-size: 16px;\n width: 16px;\n height: 16px;\n }\n button[act]:hover:not(:disabled) {\n background-color: var(--md-sys-color-surface-container);\n }\n button[act]:disabled {\n opacity: 0.5;\n cursor: default;\n }\n button[act] md-icon {\n font-size: 16px;\n width: 16px;\n height: 16px;\n }\n`\n"]}
1
+ {"version":3,"file":"side-panel-styles.js","sourceRoot":"","sources":["../client/side-panel-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmcjC,CAAA","sourcesContent":["import { css } from 'lit'\n\n/**\n * The side panel's one look, for every element that draws in the modeller's side.\n *\n * The side is drawn by several elements (the type field, the figure's properties, a part's values, fastening, places,\n * motion, material, controls, clips, the environment) and each had styled its own fields: three label styles and\n * three field heights in one column (user, 2026-09-24: \"why are the styles and layout all different?\"). They share\n * this sheet now and keep only what is theirs.\n *\n * The vocabulary:\n * section one titled group; the side is a stack of them\n * h3 a group's title\n *\n * Three sizes and two weights (user 2026-10-01, the panel checked for balance: eight sizes, and titles smaller than\n * what they titled): a title at the body token and semibold, everything else at the small token, and a hint at the\n * micro one. Sections are 16 px above their title and 12 px below their last line.\n * div[inline-field] a short label and its one field on one line\n * div[field] a label and its field on one line; what else the field holds stands under the field\n * div[form] short labels beside their fields, the fields starting on one line\n * div[vector-row] a title, then X · Y · Z in one row of cells with the axis inside (`div[triple]` of\n * `div[cell]`) -- three values read together, as vector tools lay them out\n * div[pair] two controls side by side\n * label[toggle] a checkbox and its words\n * p[hint] · small the quiet line under a field\n * button[act] an action under the fields it acts on\n * [scrub] a label dragged sideways to scrub its field\n */\nexport const SidePanelStyles = css`\n :host {\n /*\n * A field's measure (user 2026-10-17: 「공간 낭비가 심하다 … 둔한 라운드와 여백」): 26px high, a 4px corner, and the\n * label's column. Labels and fields share a line, so a group reads as a list to scan, not a form to fill.\n */\n --figure-control-height: 26px;\n --figure-control-radius: 4px;\n --figure-label-width: 72px;\n font-size: var(--ui-t-small, 11.5px);\n color: var(--md-sys-color-on-surface);\n }\n /* The side is a stack of sections, each a titled group. */\n /*\n * Tight inside a group, loose between groups: rows 6px apart, so a group reads as one thing; groups parted by their\n * line and 16px, so the eye knows where the next one starts (user 2026-10-17: no tension and release).\n */\n section {\n display: grid;\n gap: 6px;\n padding: 16px 12px;\n border-bottom: 1px solid var(--md-sys-color-outline-variant, #c4c7c5);\n }\n section > h3 {\n margin: 0 0 4px;\n }\n section div[field] + div[field],\n section div[inline-field] + div[inline-field],\n section div[vector-row] + div[vector-row] {\n margin-top: 0;\n }\n h3 {\n display: flex;\n align-items: center;\n gap: 4px;\n margin: 14px 0 6px;\n font-size: var(--ui-t-body, 13px);\n font-weight: 600;\n color: var(--md-sys-color-on-surface);\n }\n h3:first-child {\n margin-top: 0;\n }\n /* Two weights only: a bold word in a line is the title's weight, not the browser's heavier one. */\n b,\n strong {\n font-weight: 600;\n }\n label,\n div[form] > span {\n font-size: inherit;\n color: var(--md-sys-color-on-surface-variant);\n }\n /* The label on the left, its field on the right; a hint or a second row under the field, in the field's column. */\n div[field] {\n display: grid;\n grid-template-columns: var(--figure-label-width) minmax(0, 1fr);\n align-items: center;\n gap: 4px 8px;\n }\n div[field] > * {\n grid-column: 2;\n }\n div[field] > label {\n grid-column: 1;\n overflow-wrap: anywhere;\n }\n /* A field with no label -- an action and its note -- and a checkbox with its words take the whole line. */\n div[field]:not(:has(> label:not([toggle]))) > *,\n div[field] > label[toggle] {\n grid-column: 1 / -1;\n }\n div[field] + div[field],\n div[field] + div[form],\n div[form] + div[field],\n div[vector-row] + div[vector-row],\n div[vector-row] + div[field],\n div[field] + div[vector-row] {\n margin-top: 6px;\n }\n div[form],\n div[inline-field],\n div[vector-row] {\n display: grid;\n grid-template-columns: var(--figure-label-width) minmax(0, 1fr);\n align-items: center;\n gap: 6px 8px;\n }\n div[form] > span,\n div[inline-field] > label,\n div[vector-row] > label {\n overflow-wrap: anywhere;\n white-space: normal;\n }\n /* A value read, not edited, beside its label: the field's size and colour, not the page's. */\n div[inline-field] > span[value] {\n font-size: inherit;\n color: var(--md-sys-color-on-surface);\n }\n /*\n * The unit is part of its label and reads in its colour. The outline grey (a line's colour) left 11.5px words at\n * 4.4:1 on the panel, under the 4.5:1 small text needs (2026-10-16).\n */\n label span[unit] {\n color: var(--md-sys-color-on-surface-variant);\n }\n div[inline-field] + div[inline-field],\n div[inline-field] + div[vector-row],\n div[vector-row] + div[inline-field] {\n margin-top: 5px;\n }\n /* A row of worded tools (align, snap; mirror copies). */\n div[tools] {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n }\n /* Words, no box: a row of tools reads as a row of words, each lit under the hand. */\n div[tools] button {\n height: var(--figure-control-height);\n padding: 0 6px;\n font: inherit;\n color: var(--md-sys-color-on-surface);\n background: none;\n border: none;\n border-radius: var(--figure-control-radius);\n cursor: pointer;\n }\n div[tools] button:hover:not(:disabled) {\n background: var(--md-sys-color-surface-container);\n }\n div[tools] button:disabled {\n opacity: 0.45;\n cursor: default;\n }\n div[pair] {\n display: flex;\n gap: 4px;\n }\n div[pair] > * {\n flex: 1;\n min-width: 0;\n }\n div[triple] {\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 4px;\n }\n /*\n * A field is a line, not a box: its value over one thin rule, the rule darkening under the hand and turning the\n * primary colour, twice as thick, with the focus. Boxed fields made the panel a stack of boxes (user 2026-10-17:\n * 「박스형 input … 난립을 완화하라 … 언더라인형의 도입」); a faint fill was tried first and still read as grey blocks.\n */\n input,\n select {\n width: 100%;\n min-width: 0;\n min-height: var(--figure-control-height);\n box-sizing: border-box;\n padding: 2px 2px;\n font: inherit;\n color: var(--md-sys-color-on-surface);\n background: transparent;\n border: 0;\n border-bottom: 1px solid var(--md-sys-color-outline-variant, #c4c7c5);\n border-radius: 0;\n }\n input:hover:not(:disabled):not(:focus),\n select:hover:not(:disabled):not(:focus) {\n border-bottom-color: var(--md-sys-color-on-surface-variant);\n }\n /* The browser's own box and dot, in the panel's colour. */\n input[type='checkbox'],\n input[type='radio'] {\n width: auto;\n min-height: 0;\n margin: 0;\n accent-color: var(--md-sys-color-primary);\n }\n /* A fold: the panel's chevron, not the browser's triangle. */\n summary {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 6px 0;\n list-style: none;\n cursor: pointer;\n color: var(--md-sys-color-on-surface-variant);\n }\n summary::-webkit-details-marker {\n display: none;\n }\n summary::before {\n content: '';\n flex: none;\n width: 6px;\n height: 6px;\n margin: 0 2px;\n border-right: 1.5px solid currentColor;\n border-bottom: 1.5px solid currentColor;\n transform: rotate(-45deg);\n transition: transform 0.15s;\n }\n details[open] > summary::before {\n transform: rotate(45deg);\n }\n /* A thin track and a small thumb: a slider is a line to drag along, not a block (user, 2026-09-24). */\n input[type='range'] {\n -webkit-appearance: none;\n appearance: none;\n min-height: 16px;\n height: 16px;\n padding: 0;\n border: none;\n background: transparent;\n cursor: pointer;\n }\n input[type='range']::-webkit-slider-runnable-track {\n height: 3px;\n border-radius: 2px;\n background: var(--md-sys-color-outline-variant);\n }\n input[type='range']::-webkit-slider-thumb {\n -webkit-appearance: none;\n width: 12px;\n height: 12px;\n margin-top: -4.5px;\n border: none;\n border-radius: 50%;\n background: var(--md-sys-color-primary);\n }\n input[type='range']::-moz-range-track {\n height: 3px;\n border-radius: 2px;\n background: var(--md-sys-color-outline-variant);\n }\n input[type='range']::-moz-range-thumb {\n width: 12px;\n height: 12px;\n border: none;\n border-radius: 50%;\n background: var(--md-sys-color-primary);\n }\n input[type='range']:focus {\n outline: none;\n }\n input[type='range']:focus-visible::-webkit-slider-thumb {\n outline: 2px solid var(--md-sys-color-primary);\n outline-offset: 2px;\n }\n input[type='color'] {\n padding: 2px;\n width: 40px;\n }\n /*\n * A button or a fold reached by the keyboard is ringed in the primary colour, as the canvas bar's tools are; the\n * browser's own ring (orange on this theme) stood beside it (modeller sweep 2026-10-27 U27).\n */\n button:focus-visible,\n summary:focus-visible {\n outline: 2px solid var(--md-sys-color-primary);\n outline-offset: 1px;\n }\n input:focus,\n select:focus {\n outline: none;\n border-bottom-color: var(--md-sys-color-primary);\n box-shadow: inset 0 -1px 0 var(--md-sys-color-primary);\n }\n input:disabled,\n select:disabled {\n opacity: 0.6;\n }\n /* A number with its axis inside the cell, on the left. */\n div[cell] {\n display: flex;\n box-sizing: border-box;\n height: var(--figure-control-height);\n align-items: center;\n gap: 2px;\n padding-left: 2px;\n /* The same line as every field, the axis letter at its start. */\n background: transparent;\n border: 0;\n border-bottom: 1px solid var(--md-sys-color-outline-variant, #c4c7c5);\n border-radius: 0;\n }\n div[cell]:hover:not(:focus-within) {\n border-bottom-color: var(--md-sys-color-on-surface-variant);\n }\n div[cell]:focus-within {\n border-bottom-color: var(--md-sys-color-primary);\n box-shadow: inset 0 -1px 0 var(--md-sys-color-primary);\n }\n /* A label that scrubs its field when dragged sideways (vector tools' way). */\n [scrub] {\n cursor: ew-resize;\n user-select: none;\n touch-action: none;\n }\n div[cell] span[axis] {\n flex: none;\n font-size: var(--ui-t-micro, 11px);\n letter-spacing: 0.02em;\n color: var(--md-sys-color-on-surface-variant);\n }\n div[cell] input {\n min-height: 0;\n height: calc(var(--figure-control-height) - 2px);\n padding: 2px 2px 2px 2px;\n font-family: var(--ui-mono, ui-monospace, monospace);\n text-align: right;\n background: none;\n border: none;\n border-radius: 0;\n }\n div[cell] input:focus {\n outline: none;\n }\n /* An axis a rule sets: its number, read-only, on a quieter ground (ADR-0097). */\n /* A number a rule sets: its line dotted and its value in grey -- read, not edited. */\n div[cell][held] {\n border-bottom-style: dotted;\n }\n div[cell][held] input {\n color: var(--md-sys-color-on-surface-variant);\n font-style: italic;\n }\n p[held-axes] {\n margin: 2px 0 6px;\n }\n label[toggle] {\n display: flex;\n align-items: center;\n gap: 6px;\n color: var(--md-sys-color-on-surface);\n }\n /* Related choices and section state use the same type, spacing and colours in every panel. */\n [choice-row] {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 6px 14px;\n min-height: var(--figure-control-height);\n }\n h3 > [section-state] {\n margin-left: auto;\n font-size: var(--ui-t-micro, 11px);\n font-weight: 400;\n color: var(--md-sys-color-on-surface-variant);\n white-space: nowrap;\n }\n h3 > [section-state][active] {\n color: var(--md-sys-color-primary);\n }\n /* The 「?」 beside a title: no border, it says there is more rather than asking to be pressed. */\n button[help] {\n display: inline-flex;\n align-items: center;\n padding: 0;\n margin: 0;\n /* The quiet marks beside a title -- 「?」 and the group's 「⋯」 -- in one colour. */\n color: var(--md-sys-color-on-surface-variant);\n background: none;\n border: none;\n cursor: pointer;\n }\n /* Beside a title at the size every icon beside words takes (16), the group's 「⋯」 too. */\n button[help] md-icon {\n font-size: 16px;\n width: 16px;\n height: 16px;\n }\n button[help]:hover,\n button[help][aria-expanded='true'] {\n color: var(--md-sys-color-primary);\n }\n p[hint],\n small {\n display: block;\n margin: 2px 0 4px;\n font-size: var(--ui-t-micro, 11px);\n line-height: 1.5;\n color: var(--md-sys-color-on-surface-variant);\n }\n /*\n * An action under its fields: its icon and words in the primary colour, no box (user 2026-10-17: 「박스형 버튼의\n * 난립」). It was a band across the panel once (2026-10-01), then an outlined box; the icon and the colour say it is\n * pressed, and the hover lights its ground.\n */\n button[act] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n justify-self: start;\n gap: 6px;\n width: auto;\n max-width: 100%;\n margin: 0 0 0 -6px;\n padding: 0 6px;\n min-height: var(--figure-control-height);\n font: inherit;\n color: var(--md-sys-color-primary);\n background: none;\n border: none;\n border-radius: var(--figure-control-radius);\n cursor: pointer;\n }\n /*\n * Taking something back -- detach, clear, back to fixed, remove a row -- in one look: words in the label grey, no box,\n * a step quieter than the group's action in the primary colour (user 2026-10-16, 2026-10-17).\n */\n button[quiet] {\n display: inline-flex;\n align-items: center;\n justify-self: start;\n gap: 4px;\n height: var(--figure-control-height);\n padding: 0 6px;\n margin-left: -6px;\n font: inherit;\n color: var(--md-sys-color-on-surface-variant);\n background: none;\n border: none;\n border-radius: var(--figure-control-radius);\n cursor: pointer;\n }\n button[quiet]:hover:not(:disabled) {\n background-color: var(--md-sys-color-surface-container);\n }\n button[quiet]:disabled {\n opacity: 0.5;\n cursor: default;\n }\n button[quiet] md-icon {\n font-size: 16px;\n width: 16px;\n height: 16px;\n }\n button[act]:hover:not(:disabled) {\n background-color: var(--md-sys-color-surface-container);\n }\n button[act]:disabled {\n opacity: 0.5;\n cursor: default;\n }\n button[act] md-icon {\n font-size: 16px;\n width: 16px;\n height: 16px;\n }\n`\n"]}