@things-factory/figure-ui 10.1.76 → 10.1.77
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.
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/dist-client/graphql/v3-store.d.ts +0 -3
- package/dist-client/graphql/v3-store.js +0 -39
- package/dist-client/graphql/v3-store.js.map +0 -1
- package/dist-client/modeller/figure-v3-capability.d.ts +0 -22
- package/dist-client/modeller/figure-v3-capability.js +0 -141
- package/dist-client/modeller/figure-v3-capability.js.map +0 -1
- package/dist-client/modeller/figure-v3-clips.d.ts +0 -31
- package/dist-client/modeller/figure-v3-clips.js +0 -268
- package/dist-client/modeller/figure-v3-clips.js.map +0 -1
- package/dist-client/modeller/figure-v3-controls.d.ts +0 -36
- package/dist-client/modeller/figure-v3-controls.js +0 -226
- package/dist-client/modeller/figure-v3-controls.js.map +0 -1
- package/dist-client/modeller/figure-v3-first-save.d.ts +0 -20
- package/dist-client/modeller/figure-v3-first-save.js +0 -118
- package/dist-client/modeller/figure-v3-first-save.js.map +0 -1
- package/dist-client/modeller/figure-v3-links.d.ts +0 -77
- package/dist-client/modeller/figure-v3-links.js +0 -649
- package/dist-client/modeller/figure-v3-links.js.map +0 -1
- package/dist-client/modeller/figure-v3-material.d.ts +0 -39
- package/dist-client/modeller/figure-v3-material.js +0 -323
- package/dist-client/modeller/figure-v3-material.js.map +0 -1
- package/dist-client/modeller/figure-v3-parts.d.ts +0 -69
- package/dist-client/modeller/figure-v3-parts.js +0 -559
- package/dist-client/modeller/figure-v3-parts.js.map +0 -1
- package/dist-client/modeller/figure-v3-preview.d.ts +0 -34
- package/dist-client/modeller/figure-v3-preview.js +0 -346
- package/dist-client/modeller/figure-v3-preview.js.map +0 -1
- package/dist-client/modeller/figure-v3-properties.d.ts +0 -45
- package/dist-client/modeller/figure-v3-properties.js +0 -239
- package/dist-client/modeller/figure-v3-properties.js.map +0 -1
- package/dist-client/modeller/figure-v3-recipe-catalog.d.ts +0 -38
- package/dist-client/modeller/figure-v3-recipe-catalog.js +0 -399
- package/dist-client/modeller/figure-v3-recipe-catalog.js.map +0 -1
- package/dist-client/modeller/figure-v3-verdict.d.ts +0 -64
- package/dist-client/modeller/figure-v3-verdict.js +0 -787
- package/dist-client/modeller/figure-v3-verdict.js.map +0 -1
- package/dist-client/modeller/v3-ai-proposal.d.ts +0 -51
- package/dist-client/modeller/v3-ai-proposal.js +0 -64
- package/dist-client/modeller/v3-ai-proposal.js.map +0 -1
- package/dist-client/modeller/v3-align.d.ts +0 -30
- package/dist-client/modeller/v3-align.js +0 -75
- package/dist-client/modeller/v3-align.js.map +0 -1
- package/dist-client/modeller/v3-canvas.d.ts +0 -72
- package/dist-client/modeller/v3-canvas.js +0 -379
- package/dist-client/modeller/v3-canvas.js.map +0 -1
- package/dist-client/modeller/v3-clips.d.ts +0 -39
- package/dist-client/modeller/v3-clips.js +0 -58
- package/dist-client/modeller/v3-clips.js.map +0 -1
- package/dist-client/modeller/v3-controls.d.ts +0 -28
- package/dist-client/modeller/v3-controls.js +0 -28
- package/dist-client/modeller/v3-controls.js.map +0 -1
- package/dist-client/modeller/v3-editor.d.ts +0 -203
- package/dist-client/modeller/v3-editor.js +0 -1526
- package/dist-client/modeller/v3-editor.js.map +0 -1
- package/dist-client/modeller/v3-fields.d.ts +0 -45
- package/dist-client/modeller/v3-fields.js +0 -83
- package/dist-client/modeller/v3-fields.js.map +0 -1
- package/dist-client/modeller/v3-figure-facts.d.ts +0 -35
- package/dist-client/modeller/v3-figure-facts.js +0 -55
- package/dist-client/modeller/v3-figure-facts.js.map +0 -1
- package/dist-client/modeller/v3-first-save.d.ts +0 -17
- package/dist-client/modeller/v3-first-save.js +0 -26
- package/dist-client/modeller/v3-first-save.js.map +0 -1
- package/dist-client/modeller/v3-gizmo.d.ts +0 -72
- package/dist-client/modeller/v3-gizmo.js +0 -111
- package/dist-client/modeller/v3-gizmo.js.map +0 -1
- package/dist-client/modeller/v3-help.d.ts +0 -18
- package/dist-client/modeller/v3-help.js +0 -37
- package/dist-client/modeller/v3-help.js.map +0 -1
- package/dist-client/modeller/v3-joint-drag.d.ts +0 -19
- package/dist-client/modeller/v3-joint-drag.js +0 -97
- package/dist-client/modeller/v3-joint-drag.js.map +0 -1
- package/dist-client/modeller/v3-joint-fan.d.ts +0 -9
- package/dist-client/modeller/v3-joint-fan.js +0 -276
- package/dist-client/modeller/v3-joint-fan.js.map +0 -1
- package/dist-client/modeller/v3-keys.d.ts +0 -22
- package/dist-client/modeller/v3-keys.js +0 -26
- package/dist-client/modeller/v3-keys.js.map +0 -1
- package/dist-client/modeller/v3-links.d.ts +0 -267
- package/dist-client/modeller/v3-links.js +0 -480
- package/dist-client/modeller/v3-links.js.map +0 -1
- package/dist-client/modeller/v3-live.d.ts +0 -37
- package/dist-client/modeller/v3-live.js +0 -68
- package/dist-client/modeller/v3-live.js.map +0 -1
- package/dist-client/modeller/v3-maturity.d.ts +0 -120
- package/dist-client/modeller/v3-maturity.js +0 -313
- package/dist-client/modeller/v3-maturity.js.map +0 -1
- package/dist-client/modeller/v3-occupancy.d.ts +0 -18
- package/dist-client/modeller/v3-occupancy.js +0 -24
- package/dist-client/modeller/v3-occupancy.js.map +0 -1
- package/dist-client/modeller/v3-palette.d.ts +0 -7
- package/dist-client/modeller/v3-palette.js +0 -46
- package/dist-client/modeller/v3-palette.js.map +0 -1
- package/dist-client/modeller/v3-preview-model.d.ts +0 -47
- package/dist-client/modeller/v3-preview-model.js +0 -68
- package/dist-client/modeller/v3-preview-model.js.map +0 -1
- package/dist-client/modeller/v3-product-session.d.ts +0 -510
- package/dist-client/modeller/v3-product-session.js +0 -157
- package/dist-client/modeller/v3-product-session.js.map +0 -1
- package/dist-client/modeller/v3-recipe-source.d.ts +0 -8
- package/dist-client/modeller/v3-recipe-source.js +0 -14
- package/dist-client/modeller/v3-recipe-source.js.map +0 -1
- package/dist-client/modeller/v3-recipes.d.ts +0 -37
- package/dist-client/modeller/v3-recipes.js +0 -103
- package/dist-client/modeller/v3-recipes.js.map +0 -1
- package/dist-client/modeller/v3-refusals.d.ts +0 -68
- package/dist-client/modeller/v3-refusals.js +0 -142
- package/dist-client/modeller/v3-refusals.js.map +0 -1
- package/dist-client/modeller/v3-renderer.d.ts +0 -40
- package/dist-client/modeller/v3-renderer.js +0 -73
- package/dist-client/modeller/v3-renderer.js.map +0 -1
- package/dist-client/modeller/v3-stage-model.d.ts +0 -39
- package/dist-client/modeller/v3-stage-model.js +0 -147
- package/dist-client/modeller/v3-stage-model.js.map +0 -1
- package/dist-client/modeller/v3-thumbnail.d.ts +0 -3
- package/dist-client/modeller/v3-thumbnail.js +0 -75
- package/dist-client/modeller/v3-thumbnail.js.map +0 -1
- package/dist-client/pages/figure-v3-modeller-page.d.ts +0 -102
- package/dist-client/pages/figure-v3-modeller-page.js +0 -548
- package/dist-client/pages/figure-v3-modeller-page.js.map +0 -1
- package/dist-client/tsconfig.chk.tsbuildinfo +0 -1
- package/dist-client/tsconfig.fui.tsbuildinfo +0 -1
- package/dist-client/tsconfig.scratch-fm.tsbuildinfo +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"figure-v3-parts.js","sourceRoot":"","sources":["../../client/modeller/figure-v3-parts.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGnD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAyB5C,yCAAyC;AACzC,MAAM,aAAa,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'@material/web/icon/icon.js'\nimport { css, html, LitElement, nothing } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { i18next, localize } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\nimport { PART_LIMIT } from '@hatiolab/figure-model'\nimport type { V3PrimitiveCreation } from '@hatiolab/figure-model'\nimport type { V3BudgetLine } from './v3-maturity.js'\nimport { partLabelOf } from './v3-fields.js'\n\n/**\n * 도형 팔레트와 부품 목록 — V3 자산의 것.\n *\n * 팔레트는 목록 위에, 눈 단추는 늘 자리를 차지하고, 조작은 고른 줄에서만 보인다.\n *\n * 부품의 도형은 V3 평가가 준 `provider` 로 읽는다. 「숨김」은 여기서도 **작업대의 것**이다 — 저장되지 않고, 자산의 `visibility`(상태에 따라\n * 보이고 안 보이는 것)와는 다른 것이다. 그것은 속성 패널의 몫이다.\n *\n * 이 컴포넌트는 정본을 만지지 않는다. 무엇을 하겠다는 것만 알린다.\n */\n\n/** 한 줄 — V3 평가에서 이 패널이 읽는 것만. */\nexport interface V3PartRow {\n id: string\n provider: string\n /** 작업대에서 잠깐 가린 것. 저장되지 않는다. */\n hidden?: boolean\n /** 자산이 지금 상태에서 보이지 않는다고 한 것. 저장되는 것이고, 여기서는 표시만 한다. */\n invisible?: boolean\n /** 되풀이한 부품이면 지금 몇 개로 그려지나. 되풀이는 한 부품이다 — 한 줄로 보인다. */\n copies?: number\n}\n\n/** 제공자마다의 아이콘. Material Symbols 이름이다. */\nconst PROVIDER_ICON: Record<string, string> = {\n box: 'deployed_code',\n cylinder: 'database',\n ellipticCylinder: 'database',\n frustum: 'change_history',\n sphere: 'circle',\n roundedBox: 'crop_square',\n roundedBoxXZ: 'crop_square',\n hollowBox: 'check_box_outline_blank',\n hollowBoxXZ: 'check_box_outline_blank',\n polygon: 'pentagon',\n portal: 'door_front'\n}\n\n/** 팔레트 — 저작 API 가 만들 수 있는 것만 보인다. */\n/*\n The palette. A plate and a wall are boxes of a shape a person reaches for, so they are starting sizes, not kinds of their own.\n*/\nexport type V3PaletteKind = V3PrimitiveCreation['kind'] | 'plate' | 'wall'\nconst RECIPES: Array<{ kind: V3PaletteKind; icon: string; label: string }> = [\n { kind: 'box', icon: 'deployed_code', label: 'figure.label.primitive-cube' },\n { kind: 'cylinder', icon: 'database', label: 'figure.label.primitive-cylinder' },\n { kind: 'rounded-box', icon: 'crop_square', label: 'figure.label.primitive-rounded-box' },\n { kind: 'sphere', icon: 'circle', label: 'figure.label.primitive-sphere' },\n { kind: 'frustum', icon: 'change_history', label: 'figure.label.primitive-frustum' },\n { kind: 'polygon', icon: 'hexagon', label: 'figure.label.primitive-polygon' },\n { kind: 'plate', icon: 'check_box_outline_blank', label: 'figure.label.primitive-plate' },\n { kind: 'wall', icon: 'crop_portrait', label: 'figure.label.primitive-wall' },\n { kind: 'portal', icon: 'door_front', label: 'figure.label.primitive-portal' },\n { kind: 'hollow-box', icon: 'inventory_2', label: 'figure.label.primitive-hollow-box' }\n]\n\n@customElement('figure-v3-parts')\nexport class FigureV3Parts extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n min-height: 0;\n overflow: hidden;\n background-color: var(--md-sys-color-surface-container-lowest);\n /* The divider beside it is the editor's frame's (ox-three-pane). */\n color: var(--md-sys-color-on-surface);\n font: var(--label-font, inherit);\n font-size: 0.76rem;\n /* Folds by its own width: the editor gives this column 140 px when it has two columns (UX, 2026-09-24). */\n container-type: inline-size;\n }\n section {\n padding: var(--spacing-medium, 8px) var(--spacing-large, 12px);\n border-bottom: 1px solid var(--md-sys-color-outline-variant);\n }\n section[list] {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n }\n h3 {\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n gap: 6px;\n margin: 0 0 6px 0;\n font-size: var(--ui-t-micro, 11px);\n font-weight: 700;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n color: var(--md-sys-color-on-surface-variant, var(--md-sys-color-on-surface));\n }\n /* The cost line: the grade's letter in its colour, then what the figure costs. */\n button[budget] {\n display: flex;\n align-items: flex-start;\n gap: 6px;\n width: 100%;\n margin: 0 0 6px;\n padding: 4px 6px;\n font: inherit;\n font-size: 0.68rem;\n line-height: 1.5;\n text-align: left;\n color: var(--md-sys-color-on-surface-variant);\n background: none;\n border: 1px solid var(--md-sys-color-outline-variant);\n border-radius: 6px;\n cursor: pointer;\n }\n button[budget]:hover {\n background: var(--md-sys-color-surface-container);\n }\n button[budget] b {\n flex: none;\n min-width: 16px;\n text-align: center;\n border-radius: 4px;\n color: var(--md-sys-color-on-primary-container);\n background: var(--md-sys-color-primary-container);\n }\n button[budget][grade='C'] b {\n color: var(--md-sys-color-on-tertiary-container);\n background: var(--md-sys-color-tertiary-container);\n }\n button[budget][grade='D'] {\n border-color: var(--md-sys-color-error);\n }\n button[budget][grade='D'] b {\n color: var(--md-sys-color-on-error);\n background: var(--md-sys-color-error);\n }\n button[budget] em {\n display: block;\n font-style: normal;\n color: var(--md-sys-color-error);\n }\n span[room][full] {\n color: var(--md-sys-color-error);\n font-weight: 600;\n }\n p[full] {\n margin: 4px 0 0;\n font-size: 0.68rem;\n color: var(--md-sys-color-error);\n }\n div[level] {\n display: grid;\n grid-template-columns: auto minmax(0, 1fr);\n align-items: center;\n gap: 6px;\n margin: 0 0 6px;\n font-size: 0.68rem;\n color: var(--md-sys-color-on-surface-variant);\n }\n div[level] select {\n min-width: 0;\n padding: 2px 4px;\n font: inherit;\n font-size: 0.7rem;\n color: var(--md-sys-color-on-surface);\n background: var(--md-sys-color-surface-container-lowest);\n border: 1px solid var(--md-sys-color-outline-variant);\n border-radius: 6px;\n }\n small[copies] {\n color: var(--md-sys-color-on-surface-variant);\n }\n span[room] {\n font-size: 0.7rem;\n font-weight: 400;\n letter-spacing: 0;\n text-transform: none;\n }\n /* Three to a row, small (user, 2026-09-24): the palette is reached for, not read -- the list below is what grows. */\n div[palette] {\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 3px;\n }\n button[shape] {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 1px;\n min-width: 0;\n padding: 5px 1px 4px;\n font: var(--label-font, inherit);\n font-size: 0.6rem;\n line-height: 1.2;\n text-align: center;\n overflow-wrap: anywhere;\n color: var(--md-sys-color-on-surface-variant, var(--md-sys-color-on-surface));\n background: none;\n border: 1px solid var(--md-sys-color-outline-variant);\n border-radius: 6px;\n cursor: pointer;\n }\n button[recipe-catalog] {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 4px 10px;\n font: inherit;\n font-size: 0.75rem;\n color: var(--md-sys-color-on-surface);\n background: none;\n border: 1px solid var(--md-sys-color-outline-variant);\n border-radius: 999em;\n cursor: pointer;\n }\n button[shape]:hover:not([disabled]) {\n color: var(--md-sys-color-on-primary-container);\n background-color: var(--md-sys-color-primary-container);\n border-color: transparent;\n }\n button[shape][disabled] {\n opacity: 0.35;\n cursor: default;\n }\n button[shape] md-icon {\n --md-icon-size: 18px;\n }\n ol {\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n gap: 2px;\n }\n li {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 4px 6px;\n border-radius: 6px;\n cursor: pointer;\n }\n li:hover {\n background-color: var(--md-sys-color-surface-container);\n }\n li[selected] {\n color: var(--md-sys-color-on-primary-container);\n background-color: var(--md-sys-color-primary-container);\n }\n li md-icon {\n --md-icon-size: 16px;\n flex: none;\n color: var(--md-sys-color-on-surface-variant, var(--md-sys-color-on-surface));\n }\n button[eye][all] {\n margin-left: auto;\n opacity: 0.75;\n }\n button[eye][all]:hover {\n opacity: 1;\n }\n button[eye] {\n display: flex;\n flex: none;\n padding: 1px;\n color: inherit;\n background: none;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n opacity: 0;\n }\n li:hover button[eye],\n li[selected] button[eye],\n button[eye][off] {\n opacity: 1;\n }\n button[eye][off] {\n color: var(--md-sys-color-tertiary);\n }\n button[eye] md-icon {\n --md-icon-size: 15px;\n color: inherit;\n }\n li[off] span[label],\n li[off] > md-icon,\n li[invisible] span[label],\n li[invisible] > md-icon {\n opacity: 0.45;\n }\n li[selected] md-icon {\n color: inherit;\n }\n span[label] {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 0.78rem;\n }\n span[label] small {\n margin-left: 4px;\n font-size: 0.66rem;\n color: var(--md-sys-color-on-surface-variant, var(--md-sys-color-on-surface));\n }\n div[ops] {\n display: none;\n gap: 1px;\n }\n li[selected] div[ops] {\n display: flex;\n }\n div[ops] button {\n display: flex;\n padding: 2px;\n color: inherit;\n background: none;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n }\n div[ops] button:hover:not([disabled]) {\n background-color: var(--md-sys-color-surface-container-lowest);\n }\n div[ops] button[disabled] {\n opacity: 0.3;\n cursor: default;\n }\n div[ops] md-icon {\n --md-icon-size: 15px;\n color: inherit;\n }\n /*\n Under 200 px the selected row's four buttons pushed its name out and the last one past the edge (seen at 140,\n 2026-09-24). They go to a line of their own under the name.\n */\n @container (max-width: 199px) {\n li[selected] {\n flex-wrap: wrap;\n }\n li[selected] div[ops] {\n flex-basis: 100%;\n justify-content: flex-end;\n }\n }\n p[quiet] {\n margin: 0;\n font-size: 0.76rem;\n line-height: 1.6;\n color: var(--md-sys-color-on-surface-variant, var(--md-sys-color-on-surface));\n }\n `\n ]\n\n @property({ type: Array }) parts: V3PartRow[] = []\n /** 고른 부품의 id. 자리(index)가 아니다 — V3 부품은 id 로 안정하게 가리킨다. */\n @property({ type: String }) selected = ''\n /** 편집할 수 없을 때(불러오는 중 · 저장 중) 팔레트와 조작을 잠근다. */\n @property({ type: Boolean }) locked = false\n /**\n * 이 도형이 치르는 값 — 삼각형 · 묶음 · 한 화면에 몇 대 · 등급. 부품을 더하는 바로 그 자리에서 보여야 로우폴리의\n * 기준이 저작을 이끈다. 등급이 D 면 무엇이 넘쳤는지를 적는다. 누르면 성숙도 탭이 열린다.\n */\n @property({ attribute: false }) budget?: V3BudgetLine\n /**\n * 디테일 등급(S/M/L)의 부품 한도(사용자 2026-09-24). 부품을 넣기 **전에** 몇 개 남았는지 보이고, 다 차면 팔레트가\n * 잠긴다. 되풀이는 한 부품으로 센다. 등급을 안 정했으면 한도는 없다.\n */\n @property({ attribute: false }) partBudget?: { level: 'S' | 'M' | 'L' | null; used: number; limit: number | null }\n /** How many recipe templates the catalog holds; none, and the section is not drawn. */\n @property({ type: Number }) recipeCount = 0\n\n render() {\n const b = this.partBudget\n const full = !!b && b.limit !== null && b.used >= b.limit\n return html`\n <section>\n <h3>${i18next.t('figure.label.shapes')}</h3>\n <div palette>\n ${RECIPES.map(\n recipe => html`\n <button\n shape\n ?disabled=${this.locked || full}\n title=${full ? i18next.t('figure.text.part-limit-reached') : i18next.t(recipe.label)}\n @click=${() => this.ask('add-part', { kind: recipe.kind })}\n >\n <md-icon>${recipe.icon}</md-icon>\n <span>${i18next.t(recipe.label)}</span>\n </button>\n `\n )}\n </div>\n ${full ? html`<p full>${i18next.t('figure.text.part-limit-reached-short', { level: b!.level, limit: b!.limit })}</p>` : nothing}\n </section>\n ${this.renderRecipes(full)}\n\n <section list>\n <h3>\n <span>${i18next.t('figure.label.parts')}</span>\n <span room ?full=${full} title=${i18next.t('figure.text.limit-comes-from-level')}\n >${b && b.limit !== null ? i18next.t('figure.text.n-of-limit', { used: b.used, limit: b.limit }) : (b?.used ?? this.parts.length)}</span\n >\n ${this.renderShowAll()}\n </h3>\n ${this.renderLevel()}\n ${this.renderBudget()}\n ${this.parts.length === 0\n ? html`<p quiet>${i18next.t('figure.text.no-parts-yet')}</p>`\n : html`<ol>\n ${this.parts.map((part, index) => this.renderRow(part, index))}\n </ol>`}\n </section>\n `\n }\n\n /** 디테일 등급 — 고르면 한도가 바뀐다. 목록 머리 아래. */\n private renderLevel() {\n const b = this.partBudget\n if (!b) return nothing\n return html`<div level>\n <label for=\"detail-level\">${i18next.t('figure.label.detail-level')}</label>\n <select\n id=\"detail-level\"\n title=${i18next.t('figure.text.detail-level-explained')}\n .value=${b.level ?? ''}\n ?disabled=${this.locked}\n @change=${(e: Event) => {\n const value = (e.target as HTMLSelectElement).value\n this.dispatchEvent(new CustomEvent('set-detail-level', { detail: { level: value || null }, bubbles: true, composed: true }))\n }}\n >\n <option value=\"\" ?selected=${!b.level}>${i18next.t('figure.label.detail-none')}</option>\n ${(['S', 'M', 'L'] as const).map(\n one => html`<option value=${one} ?selected=${one === b.level}>\n ${one} ${i18next.t('figure.label.detail-' + one)} · ${i18next.t('figure.text.n-parts-at-most', { limit: PART_LIMIT[one] })}\n </option>`\n )}\n </select>\n </div>`\n }\n\n private renderBudget() {\n const b = this.budget\n if (!b || !this.parts.length) return nothing\n const over = b.grade === 'D'\n return html`<button\n budget\n grade=${b.grade}\n title=${i18next.t('figure.text.parts-budget-open')}\n @click=${() => this.dispatchEvent(new CustomEvent('show-maturity', { bubbles: true, composed: true }))}\n >\n <b>${b.grade}</b>\n <span>\n <strong performance-cost>${i18next.t('figure.label.performance-cost')}</strong>\n ${i18next.t('figure.text.parts-budget', {\n triangles: b.triangles.toLocaleString(),\n groups: b.groups.toLocaleString(),\n instances: b.instances.toLocaleString()\n })}\n ${over\n ? html`<em\n >${i18next.t('figure.text.parts-budget-over', {\n budget: i18next.t('figure.label.budget-' + b.tightest.key),\n used: b.tightest.used.toLocaleString(),\n limit: b.tightest.limit.toLocaleString()\n })}</em\n >`\n : nothing}\n </span>\n </button>`\n }\n\n /** 한꺼번에 감추고 한꺼번에 되돌린다 — 하나라도 감춰져 있으면 다 되돌리고, 다 보이면 다 감춘다. */\n private renderShowAll() {\n if (this.parts.length === 0) return nothing\n const anyHidden = this.parts.some(part => part.hidden)\n return html`\n <button\n eye\n all\n ?off=${!anyHidden}\n title=${i18next.t(anyHidden ? 'figure.text.show-all-parts' : 'figure.text.hide-all-parts')}\n @click=${(e: Event) => {\n e.stopPropagation()\n this.ask('set-all-parts-hidden', { hidden: !anyHidden })\n }}\n >\n <md-icon>${anyHidden ? 'visibility' : 'visibility_off'}</md-icon>\n </button>\n `\n }\n\n private renderRow(part: V3PartRow, index: number) {\n const selected = part.id === this.selected\n const off = !!part.hidden\n return html`\n <li\n ?selected=${selected}\n ?off=${off}\n ?invisible=${!!part.invisible}\n @click=${() => this.ask('select-part', { id: part.id })}\n >\n <button\n eye\n ?off=${off}\n title=${i18next.t(off ? 'figure.text.show-this-part' : 'figure.text.hide-this-part')}\n @click=${(e: Event) => {\n e.stopPropagation()\n this.ask('toggle-part-hidden', { id: part.id })\n }}\n >\n <md-icon>${off ? 'visibility_off' : 'visibility'}</md-icon>\n </button>\n <md-icon>${PROVIDER_ICON[part.provider] ?? 'deployed_code'}</md-icon>\n <span label title=${part.id}\n >${partLabelOf(part.id)}${part.copies ? html` <small copies>× ${part.copies}</small>` : nothing}${part.invisible ? html`<small>${i18next.t('figure.label.state-hidden')}</small>` : nothing}</span\n >\n ${selected ? this.renderOps(part.id, index) : nothing}\n </li>\n `\n }\n\n /** 고른 줄의 조작. 못 하는 것은 빼지 않고 흐리게 둔다 — 자리가 밀리면 연달아 지우다 엉뚱한 것을 누른다. */\n private renderOps(id: string, index: number) {\n const count = this.parts.length\n const op = (name: string, icon: string, detail: object, enabled = true) => html`\n <button\n op=${name}\n ?disabled=${!enabled || this.locked}\n title=${i18next.t('figure.button.' + name)}\n @click=${(e: Event) => {\n e.stopPropagation()\n if (enabled && !this.locked) this.ask(name, detail)\n }}\n >\n <md-icon>${icon}</md-icon>\n </button>\n `\n return html`\n <div ops>\n ${op('move-part-up', 'arrow_upward', { id, to: index - 1 }, index > 0)}\n ${op('move-part-down', 'arrow_downward', { id, to: index + 1 }, index < count - 1)}\n ${op('duplicate-part', 'content_copy', { id })} ${op('remove-part', 'delete', { id })}\n </div>\n `\n }\n\n /**\n * Recipes (ADR-0095): the catalog of templates -- a door, a roller row -- opened over the modeller, put onto the chosen\n * part in one step.\n */\n private renderRecipes(full: boolean) {\n if (!this.recipeCount) return nothing\n return html`<section recipes>\n <h3>${i18next.t('figure.label.recipes')}</h3>\n <button recipe-catalog ?disabled=${this.locked || full} @click=${() => this.ask('open-recipe-catalog', {})}>\n <md-icon>widgets</md-icon>${i18next.t('figure.button.open-recipe-catalog', { count: this.recipeCount })}\n </button>\n </section>`\n }\n\n /** 정본을 고치지 않는다 — 무엇을 하겠다는 것만 알린다. */\n private ask(what: string, detail: object) {\n this.dispatchEvent(new CustomEvent(what, { detail, bubbles: true, composed: true }))\n }\n}\n"]}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
import type { V3Asset } from '@hatiolab/figure-model';
|
|
3
|
-
import { type ViewSettings } from './figure-view.js';
|
|
4
|
-
declare const FigureV3Preview_base: (new (...args: any[]) => LitElement) & typeof LitElement;
|
|
5
|
-
export declare class FigureV3Preview extends FigureV3Preview_base {
|
|
6
|
-
static styles: import("lit").CSSResult;
|
|
7
|
-
/** The figure being authored, as the editor holds it now. */
|
|
8
|
-
asset?: V3Asset;
|
|
9
|
-
/** Which figure: the type it is registered under here is this one's own, never a real type a board uses. */
|
|
10
|
-
context: string;
|
|
11
|
-
view: ViewSettings;
|
|
12
|
-
private stage;
|
|
13
|
-
private cannot;
|
|
14
|
-
/** Clip speeds and control values given here -- the preview's, not the figure's. */
|
|
15
|
-
private driving;
|
|
16
|
-
private giving;
|
|
17
|
-
private scene?;
|
|
18
|
-
private standing?;
|
|
19
|
-
private registered?;
|
|
20
|
-
private watcher?;
|
|
21
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
22
|
-
private renderDrivers;
|
|
23
|
-
private renderDial;
|
|
24
|
-
private drive;
|
|
25
|
-
private give;
|
|
26
|
-
private poseAsDefault;
|
|
27
|
-
private tellInstances;
|
|
28
|
-
willUpdate(changed: Map<string, unknown>): void;
|
|
29
|
-
firstUpdated(): void;
|
|
30
|
-
disconnectedCallback(): void;
|
|
31
|
-
private standUp;
|
|
32
|
-
private teardown;
|
|
33
|
-
}
|
|
34
|
-
export {};
|
|
@@ -1,346 +0,0 @@
|
|
|
1
|
-
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import { css, html, LitElement, nothing, unsafeCSS } from 'lit';
|
|
3
|
-
import { customElement, property, query, state } from 'lit/decorators.js';
|
|
4
|
-
import { i18next, localize } from '@operato/i18n';
|
|
5
|
-
import { compileV3Asset } from '@hatiolab/figure-model';
|
|
6
|
-
import { create, registerFigureV3, unregisterFigureV3 } from '@hatiolab/things-scene';
|
|
7
|
-
import { DEFAULT_VIEW, previewBoardDepth, sceneLook, WORKBENCH } from './figure-view.js';
|
|
8
|
-
import { dialShape } from './angle-dial.js';
|
|
9
|
-
import { authoredSizeOf, PREVIEW_FACTOR, PREVIEW_WAYS, previewClampsOf, previewInstances } from './v3-preview-model.js';
|
|
10
|
-
let FigureV3Preview = class FigureV3Preview extends localize(i18next)(LitElement) {
|
|
11
|
-
constructor() {
|
|
12
|
-
super(...arguments);
|
|
13
|
-
/** Which figure: the type it is registered under here is this one's own, never a real type a board uses. */
|
|
14
|
-
this.context = '';
|
|
15
|
-
this.view = DEFAULT_VIEW;
|
|
16
|
-
this.cannot = '';
|
|
17
|
-
/** Clip speeds and control values given here -- the preview's, not the figure's. */
|
|
18
|
-
this.driving = {};
|
|
19
|
-
this.giving = {};
|
|
20
|
-
}
|
|
21
|
-
static { this.styles = css `
|
|
22
|
-
:host {
|
|
23
|
-
position: relative;
|
|
24
|
-
display: flex;
|
|
25
|
-
min-width: 0;
|
|
26
|
-
min-height: 0;
|
|
27
|
-
overflow: hidden;
|
|
28
|
-
background-color: ${unsafeCSS(WORKBENCH)};
|
|
29
|
-
font-size: 0.76rem;
|
|
30
|
-
}
|
|
31
|
-
div[stage] {
|
|
32
|
-
position: absolute;
|
|
33
|
-
inset: 0;
|
|
34
|
-
width: 100%;
|
|
35
|
-
height: 100%;
|
|
36
|
-
}
|
|
37
|
-
/* Which is which: side by side means nothing without a legend. */
|
|
38
|
-
div[legend] {
|
|
39
|
-
position: absolute;
|
|
40
|
-
top: 8px;
|
|
41
|
-
left: 8px;
|
|
42
|
-
display: flex;
|
|
43
|
-
gap: 6px;
|
|
44
|
-
padding: 4px 8px;
|
|
45
|
-
color: rgba(255, 255, 255, 0.9);
|
|
46
|
-
background-color: rgba(28, 28, 30, 0.6);
|
|
47
|
-
border-radius: 6px;
|
|
48
|
-
font-size: 0.72rem;
|
|
49
|
-
flex-wrap: wrap;
|
|
50
|
-
max-width: calc(100% - 16px);
|
|
51
|
-
}
|
|
52
|
-
/* A variant drawn at another size than it asks: the figure does not declare that size. */
|
|
53
|
-
div[legend] small[clamp] {
|
|
54
|
-
margin-left: 4px;
|
|
55
|
-
color: #ffcc80;
|
|
56
|
-
}
|
|
57
|
-
div[clips] {
|
|
58
|
-
position: absolute;
|
|
59
|
-
right: 8px;
|
|
60
|
-
bottom: 8px;
|
|
61
|
-
display: flex;
|
|
62
|
-
flex-direction: column;
|
|
63
|
-
gap: 6px;
|
|
64
|
-
padding: 8px 10px;
|
|
65
|
-
color: rgba(255, 255, 255, 0.92);
|
|
66
|
-
background-color: rgba(28, 28, 30, 0.72);
|
|
67
|
-
border-radius: 8px;
|
|
68
|
-
font-size: 0.72rem;
|
|
69
|
-
}
|
|
70
|
-
div[clips] label {
|
|
71
|
-
display: grid;
|
|
72
|
-
grid-template-columns: auto 20px 96px 34px;
|
|
73
|
-
align-items: center;
|
|
74
|
-
gap: 8px;
|
|
75
|
-
}
|
|
76
|
-
div[clips] svg[dial] {
|
|
77
|
-
width: 20px;
|
|
78
|
-
height: 20px;
|
|
79
|
-
}
|
|
80
|
-
div[clips] svg[dial] path {
|
|
81
|
-
fill: rgba(255, 255, 255, 0.22);
|
|
82
|
-
}
|
|
83
|
-
div[clips] svg[dial] line {
|
|
84
|
-
stroke: var(--md-sys-color-primary, #7cc6ff);
|
|
85
|
-
stroke-width: 2;
|
|
86
|
-
stroke-linecap: round;
|
|
87
|
-
}
|
|
88
|
-
div[clips] svg[dial] circle {
|
|
89
|
-
fill: none;
|
|
90
|
-
stroke: rgba(255, 255, 255, 0.35);
|
|
91
|
-
}
|
|
92
|
-
div[clips] button[pose] {
|
|
93
|
-
align-self: stretch;
|
|
94
|
-
padding: 4px 8px;
|
|
95
|
-
font: inherit;
|
|
96
|
-
font-size: 0.7rem;
|
|
97
|
-
color: rgba(255, 255, 255, 0.92);
|
|
98
|
-
background-color: rgba(255, 255, 255, 0.14);
|
|
99
|
-
border: 1px solid rgba(255, 255, 255, 0.22);
|
|
100
|
-
border-radius: 5px;
|
|
101
|
-
cursor: pointer;
|
|
102
|
-
}
|
|
103
|
-
div[clips] button[pose]:hover {
|
|
104
|
-
background-color: rgba(255, 255, 255, 0.24);
|
|
105
|
-
}
|
|
106
|
-
div[clips] span[drive] {
|
|
107
|
-
opacity: 0.6;
|
|
108
|
-
font-size: 0.66rem;
|
|
109
|
-
}
|
|
110
|
-
div[clips] input {
|
|
111
|
-
width: 96px;
|
|
112
|
-
accent-color: var(--md-sys-color-primary);
|
|
113
|
-
}
|
|
114
|
-
div[clips] output {
|
|
115
|
-
font-variant-numeric: tabular-nums;
|
|
116
|
-
text-align: right;
|
|
117
|
-
opacity: 0.85;
|
|
118
|
-
}
|
|
119
|
-
div[cannot] {
|
|
120
|
-
position: absolute;
|
|
121
|
-
inset: 0;
|
|
122
|
-
display: flex;
|
|
123
|
-
align-items: center;
|
|
124
|
-
justify-content: center;
|
|
125
|
-
padding: 12px;
|
|
126
|
-
text-align: center;
|
|
127
|
-
line-height: 1.6;
|
|
128
|
-
color: #f4f4f4;
|
|
129
|
-
background-color: ${unsafeCSS(WORKBENCH)};
|
|
130
|
-
}
|
|
131
|
-
`; }
|
|
132
|
-
render() {
|
|
133
|
-
const asset = this.asset;
|
|
134
|
-
const controls = asset ? asset.document.model.inputs.filter(i => i.role === 'state') : [];
|
|
135
|
-
const clips = asset ? [...new Set((asset.drivers ?? []).map(d => d.clip))] : [];
|
|
136
|
-
let clampsByWay = {};
|
|
137
|
-
try {
|
|
138
|
-
clampsByWay = asset ? previewClampsOf(asset, authoredSizeOf(asset)) : {};
|
|
139
|
-
}
|
|
140
|
-
catch {
|
|
141
|
-
clampsByWay = {};
|
|
142
|
-
}
|
|
143
|
-
return html `<div stage></div>
|
|
144
|
-
${this.cannot
|
|
145
|
-
? html `<div cannot>${this.cannot}</div>`
|
|
146
|
-
: html `<div legend>
|
|
147
|
-
${PREVIEW_WAYS.map(way => {
|
|
148
|
-
const clamps = clampsByWay[way.name] ?? [];
|
|
149
|
-
return html `<span>
|
|
150
|
-
${way.axes.length ? way.name : i18next.t('figure.label.preview-base')}
|
|
151
|
-
${clamps.length
|
|
152
|
-
? html `<small clamp>${clamps.map(c => i18next.t('figure.text.preview-clamped', { axis: c.axis.toUpperCase(), asked: c.asked.toLocaleString(), used: c.used.toLocaleString() })).join(' · ')}</small>`
|
|
153
|
-
: nothing}
|
|
154
|
-
</span>`;
|
|
155
|
-
})}
|
|
156
|
-
</div>
|
|
157
|
-
${controls.length + clips.length ? this.renderDrivers(asset, controls, clips) : nothing}`}`;
|
|
158
|
-
}
|
|
159
|
-
renderDrivers(asset, controls, clips) {
|
|
160
|
-
const changed = controls.filter(c => this.giving[c.id] !== undefined && this.giving[c.id] !== asset.stateDefaults[c.id]);
|
|
161
|
-
return html `<div clips>
|
|
162
|
-
${changed.length
|
|
163
|
-
? html `<button pose title=${i18next.t('figure.text.pose-as-default-explained')} @click=${() => this.poseAsDefault()}>
|
|
164
|
-
${i18next.t('figure.button.pose-as-default')}
|
|
165
|
-
</button>`
|
|
166
|
-
: nothing}
|
|
167
|
-
${controls.map(control => {
|
|
168
|
-
const value = this.giving[control.id] ?? asset.stateDefaults[control.id] ?? control.min;
|
|
169
|
-
const step = Math.max((control.max - control.min) / 100, 0.01);
|
|
170
|
-
const label = asset.stateInputs?.[control.id]?.label ?? control.id;
|
|
171
|
-
return html `<label>
|
|
172
|
-
<span>${label} <span drive>${control.unit}</span></span>
|
|
173
|
-
${this.renderDial(control, value)}
|
|
174
|
-
<input
|
|
175
|
-
type="range"
|
|
176
|
-
min=${control.min}
|
|
177
|
-
max=${control.max}
|
|
178
|
-
step=${step}
|
|
179
|
-
.value=${String(value)}
|
|
180
|
-
@input=${(e) => this.give(control.id, Number(e.target.value))}
|
|
181
|
-
/>
|
|
182
|
-
<output>${Math.round(value)}</output>
|
|
183
|
-
</label>`;
|
|
184
|
-
})}
|
|
185
|
-
${clips.map(clip => {
|
|
186
|
-
const value = this.driving[clip] ?? 1;
|
|
187
|
-
return html `<label>
|
|
188
|
-
<span>${clip} <span drive>${i18next.t('figure.label.playback-speed')}</span></span>
|
|
189
|
-
<span></span>
|
|
190
|
-
<input type="range" min="0" max="3" step="0.05" .value=${String(value)} @input=${(e) => this.drive(clip, Number(e.target.value))} />
|
|
191
|
-
<output>${value.toFixed(2)}</output>
|
|
192
|
-
</label>`;
|
|
193
|
-
})}
|
|
194
|
-
</div>`;
|
|
195
|
-
}
|
|
196
|
-
renderDial(control, value) {
|
|
197
|
-
if (control.unit !== 'deg')
|
|
198
|
-
return html `<span></span>`;
|
|
199
|
-
const dial = dialShape(control.min, control.max, value);
|
|
200
|
-
const span = dial.radius * 2 + 2;
|
|
201
|
-
return html `<svg dial viewBox="0 0 ${span} ${span}" aria-hidden="true">
|
|
202
|
-
<path d=${dial.sector}></path>
|
|
203
|
-
<circle cx=${dial.centre.x} cy=${dial.centre.y} r=${dial.radius}></circle>
|
|
204
|
-
<line x1=${dial.centre.x} y1=${dial.centre.y} x2=${dial.needle.x} y2=${dial.needle.y}></line>
|
|
205
|
-
</svg>`;
|
|
206
|
-
}
|
|
207
|
-
drive(clip, value) {
|
|
208
|
-
this.driving = { ...this.driving, [clip]: value };
|
|
209
|
-
this.tellInstances('clips', this.driving);
|
|
210
|
-
}
|
|
211
|
-
give(id, value) {
|
|
212
|
-
this.giving = { ...this.giving, [id]: value };
|
|
213
|
-
this.tellInstances('parameters', this.giving);
|
|
214
|
-
}
|
|
215
|
-
poseAsDefault() {
|
|
216
|
-
this.dispatchEvent(new CustomEvent('v3-part-edit', { detail: { edit: { kind: 'set-state-defaults', values: { ...this.giving } } }, bubbles: true, composed: true }));
|
|
217
|
-
this.giving = {};
|
|
218
|
-
}
|
|
219
|
-
tellInstances(key, values) {
|
|
220
|
-
for (const component of this.scene?.root?.components ?? [])
|
|
221
|
-
component.set?.(key, { ...values });
|
|
222
|
-
}
|
|
223
|
-
willUpdate(changed) {
|
|
224
|
-
if (!this.hasUpdated)
|
|
225
|
-
return;
|
|
226
|
-
if (changed.has('asset') || changed.has('context')) {
|
|
227
|
-
this.standUp();
|
|
228
|
-
return;
|
|
229
|
-
}
|
|
230
|
-
if (!changed.has('view'))
|
|
231
|
-
return;
|
|
232
|
-
const before = changed.get('view');
|
|
233
|
-
const now = this.view ?? DEFAULT_VIEW;
|
|
234
|
-
if (before?.placement !== now.placement || before?.ceilingHeight !== now.ceilingHeight)
|
|
235
|
-
this.standUp();
|
|
236
|
-
else
|
|
237
|
-
this.scene?.root?.set?.(sceneLook(now));
|
|
238
|
-
}
|
|
239
|
-
firstUpdated() {
|
|
240
|
-
this.standUp();
|
|
241
|
-
this.watcher = new ResizeObserver(() => this.scene?.resize?.());
|
|
242
|
-
this.watcher.observe(this);
|
|
243
|
-
}
|
|
244
|
-
disconnectedCallback() {
|
|
245
|
-
super.disconnectedCallback();
|
|
246
|
-
this.watcher?.disconnect();
|
|
247
|
-
this.watcher = undefined;
|
|
248
|
-
this.teardown();
|
|
249
|
-
}
|
|
250
|
-
standUp() {
|
|
251
|
-
const asset = this.asset;
|
|
252
|
-
const view = this.view ?? DEFAULT_VIEW;
|
|
253
|
-
if (!asset || !asset.appearance.length) {
|
|
254
|
-
this.cannot = i18next.t('figure.text.preview-needs-a-part');
|
|
255
|
-
this.teardown();
|
|
256
|
-
return;
|
|
257
|
-
}
|
|
258
|
-
const signature = JSON.stringify([asset, view.placement, view.ceilingHeight]);
|
|
259
|
-
if (this.scene && this.standing === signature)
|
|
260
|
-
return;
|
|
261
|
-
try {
|
|
262
|
-
compileV3Asset(asset);
|
|
263
|
-
}
|
|
264
|
-
catch {
|
|
265
|
-
this.cannot = i18next.t('figure.text.preview-blocked-by-errors');
|
|
266
|
-
this.teardown();
|
|
267
|
-
return;
|
|
268
|
-
}
|
|
269
|
-
this.teardown();
|
|
270
|
-
this.driving = {};
|
|
271
|
-
try {
|
|
272
|
-
/* Registered as a board registers it, under a type of this preview's own: a real type's drawings stay as they are. */
|
|
273
|
-
const type = `figure-v3-preview-${this.context || 'new'}`;
|
|
274
|
-
registerFigureV3(type, asset);
|
|
275
|
-
this.registered = type;
|
|
276
|
-
const size = authoredSizeOf(asset);
|
|
277
|
-
const { components, board } = previewInstances(type, size);
|
|
278
|
-
this.scene = create({
|
|
279
|
-
target: this.stage,
|
|
280
|
-
model: {
|
|
281
|
-
type: 'model-layer',
|
|
282
|
-
width: board.width,
|
|
283
|
-
height: board.height,
|
|
284
|
-
depth: previewBoardDepth({ placement: asset.occupancy?.placement, base: { y: size.y } }, view.ceilingHeight, PREVIEW_FACTOR),
|
|
285
|
-
threed: true,
|
|
286
|
-
sky: 'color',
|
|
287
|
-
...sceneLook(view),
|
|
288
|
-
placement: view.placement,
|
|
289
|
-
heights: { floor: 0, ceiling: view.ceilingHeight },
|
|
290
|
-
pixelRatio: Math.min(3, (window.devicePixelRatio || 1) * 2),
|
|
291
|
-
components
|
|
292
|
-
},
|
|
293
|
-
mode: 0
|
|
294
|
-
});
|
|
295
|
-
this.standing = signature;
|
|
296
|
-
this.scene.resize?.();
|
|
297
|
-
this.scene.fit?.('ratio');
|
|
298
|
-
this.scene.root?.fitCameraToModel?.();
|
|
299
|
-
this.cannot = '';
|
|
300
|
-
}
|
|
301
|
-
catch (error) {
|
|
302
|
-
this.cannot = error.message;
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
teardown() {
|
|
306
|
-
this.scene?.dispose?.();
|
|
307
|
-
this.scene = undefined;
|
|
308
|
-
this.standing = undefined;
|
|
309
|
-
if (this.registered)
|
|
310
|
-
unregisterFigureV3(this.registered);
|
|
311
|
-
this.registered = undefined;
|
|
312
|
-
}
|
|
313
|
-
};
|
|
314
|
-
__decorate([
|
|
315
|
-
property({ attribute: false }),
|
|
316
|
-
__metadata("design:type", Object)
|
|
317
|
-
], FigureV3Preview.prototype, "asset", void 0);
|
|
318
|
-
__decorate([
|
|
319
|
-
property(),
|
|
320
|
-
__metadata("design:type", Object)
|
|
321
|
-
], FigureV3Preview.prototype, "context", void 0);
|
|
322
|
-
__decorate([
|
|
323
|
-
property({ attribute: false }),
|
|
324
|
-
__metadata("design:type", Object)
|
|
325
|
-
], FigureV3Preview.prototype, "view", void 0);
|
|
326
|
-
__decorate([
|
|
327
|
-
query('div[stage]'),
|
|
328
|
-
__metadata("design:type", HTMLDivElement)
|
|
329
|
-
], FigureV3Preview.prototype, "stage", void 0);
|
|
330
|
-
__decorate([
|
|
331
|
-
state(),
|
|
332
|
-
__metadata("design:type", Object)
|
|
333
|
-
], FigureV3Preview.prototype, "cannot", void 0);
|
|
334
|
-
__decorate([
|
|
335
|
-
state(),
|
|
336
|
-
__metadata("design:type", Object)
|
|
337
|
-
], FigureV3Preview.prototype, "driving", void 0);
|
|
338
|
-
__decorate([
|
|
339
|
-
state(),
|
|
340
|
-
__metadata("design:type", Object)
|
|
341
|
-
], FigureV3Preview.prototype, "giving", void 0);
|
|
342
|
-
FigureV3Preview = __decorate([
|
|
343
|
-
customElement('figure-v3-preview')
|
|
344
|
-
], FigureV3Preview);
|
|
345
|
-
export { FigureV3Preview };
|
|
346
|
-
//# sourceMappingURL=figure-v3-preview.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"figure-v3-preview.js","sourceRoot":"","sources":["../../client/modeller/figure-v3-preview.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;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O,QAAQ;QACd,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAAA;QACvB,IAAI,CAAC,KAAK,GAAG,SAAS,CAAA;QACtB,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAA;QACzB,IAAI,IAAI,CAAC,UAAU;YAAE,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;QACxD,IAAI,CAAC,UAAU,GAAG,SAAS,CAAA;IAC7B,CAAC;;AApM+B;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;8CAAgB;AAEnC;IAAX,QAAQ,EAAE;;gDAAa;AACQ;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;6CAAkC;AAEpC;IAA5B,KAAK,CAAC,YAAY,CAAC;8BAAiB,cAAc;8CAAA;AAClC;IAAhB,KAAK,EAAE;;+CAAoB;AAEX;IAAhB,KAAK,EAAE;;gDAA6C;AACpC;IAAhB,KAAK,EAAE;;+CAA4C;AA3HzC,eAAe;IAD3B,aAAa,CAAC,mBAAmB,CAAC;GACtB,eAAe,CAuT3B","sourcesContent":["import { css, html, LitElement, nothing, unsafeCSS } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { compileV3Asset } from '@hatiolab/figure-model'\nimport type { V3Asset } from '@hatiolab/figure-model'\nimport { create, registerFigureV3, unregisterFigureV3 } from '@hatiolab/things-scene'\n\nimport { DEFAULT_VIEW, previewBoardDepth, sceneLook, WORKBENCH, type ViewSettings } from './figure-view.js'\nimport { dialShape } from './angle-dial.js'\nimport { authoredSizeOf, PREVIEW_FACTOR, PREVIEW_WAYS, previewClampsOf, previewInstances } from './v3-preview-model.js'\n\n/**\n * The figure placed on a board.\n *\n * The editing canvas shows the figure at the size it was made. Half of what a figure is lies in how it answers a\n * different size, so here the figure being authored is registered as a board registers it and placed as\n * `FigureInstance`s: the size it was made, and each of the seven ways of growing one, two or three axes twice as\n * large, side by side at one scale, four to a row. The board draws them as it will on a real board --\n * placement, lights, environment, the same V3 renderer.\n *\n * The controls: each value that poses the figure with a slider (and a dial for an angle), each clip's\n * speed, and 「이 자세를 기본으로」 to keep the pose as the one it stands in. Nothing here is edited; the canvas edits.\n */\n\ninterface SceneHandle {\n dispose?: () => void\n resize?: () => void\n fit?: (type?: string) => void\n root?: {\n set?: (patch: Record<string, unknown>) => void\n fitCameraToModel?: () => void\n components?: { set?: (property: string, value: unknown) => void }[]\n }\n}\n\n@customElement('figure-v3-preview')\nexport class FigureV3Preview extends localize(i18next)(LitElement) {\n static styles = css`\n :host {\n position: relative;\n display: flex;\n min-width: 0;\n min-height: 0;\n overflow: hidden;\n background-color: ${unsafeCSS(WORKBENCH)};\n font-size: 0.76rem;\n }\n div[stage] {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n }\n /* Which is which: side by side means nothing without a legend. */\n div[legend] {\n position: absolute;\n top: 8px;\n left: 8px;\n display: flex;\n gap: 6px;\n padding: 4px 8px;\n color: rgba(255, 255, 255, 0.9);\n background-color: rgba(28, 28, 30, 0.6);\n border-radius: 6px;\n font-size: 0.72rem;\n flex-wrap: wrap;\n max-width: calc(100% - 16px);\n }\n /* A variant drawn at another size than it asks: the figure does not declare that size. */\n div[legend] small[clamp] {\n margin-left: 4px;\n color: #ffcc80;\n }\n div[clips] {\n position: absolute;\n right: 8px;\n bottom: 8px;\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 8px 10px;\n color: rgba(255, 255, 255, 0.92);\n background-color: rgba(28, 28, 30, 0.72);\n border-radius: 8px;\n font-size: 0.72rem;\n }\n div[clips] label {\n display: grid;\n grid-template-columns: auto 20px 96px 34px;\n align-items: center;\n gap: 8px;\n }\n div[clips] svg[dial] {\n width: 20px;\n height: 20px;\n }\n div[clips] svg[dial] path {\n fill: rgba(255, 255, 255, 0.22);\n }\n div[clips] svg[dial] line {\n stroke: var(--md-sys-color-primary, #7cc6ff);\n stroke-width: 2;\n stroke-linecap: round;\n }\n div[clips] svg[dial] circle {\n fill: none;\n stroke: rgba(255, 255, 255, 0.35);\n }\n div[clips] button[pose] {\n align-self: stretch;\n padding: 4px 8px;\n font: inherit;\n font-size: 0.7rem;\n color: rgba(255, 255, 255, 0.92);\n background-color: rgba(255, 255, 255, 0.14);\n border: 1px solid rgba(255, 255, 255, 0.22);\n border-radius: 5px;\n cursor: pointer;\n }\n div[clips] button[pose]:hover {\n background-color: rgba(255, 255, 255, 0.24);\n }\n div[clips] span[drive] {\n opacity: 0.6;\n font-size: 0.66rem;\n }\n div[clips] input {\n width: 96px;\n accent-color: var(--md-sys-color-primary);\n }\n div[clips] output {\n font-variant-numeric: tabular-nums;\n text-align: right;\n opacity: 0.85;\n }\n div[cannot] {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 12px;\n text-align: center;\n line-height: 1.6;\n color: #f4f4f4;\n background-color: ${unsafeCSS(WORKBENCH)};\n }\n `\n\n /** The figure being authored, as the editor holds it now. */\n @property({ attribute: false }) asset?: V3Asset\n /** Which figure: the type it is registered under here is this one's own, never a real type a board uses. */\n @property() context = ''\n @property({ attribute: false }) view: ViewSettings = DEFAULT_VIEW\n\n @query('div[stage]') private stage!: HTMLDivElement\n @state() private cannot = ''\n /** Clip speeds and control values given here -- the preview's, not the figure's. */\n @state() private driving: Record<string, number> = {}\n @state() private giving: Record<string, number> = {}\n\n private scene?: SceneHandle\n private standing?: string\n private registered?: string\n private watcher?: ResizeObserver\n\n render() {\n const asset = this.asset\n const controls = asset ? asset.document.model.inputs.filter(i => i.role === 'state') : []\n const clips = asset ? [...new Set((asset.drivers ?? []).map(d => d.clip))] : []\n let clampsByWay: ReturnType<typeof previewClampsOf> = {}\n try {\n clampsByWay = asset ? previewClampsOf(asset, authoredSizeOf(asset)) : {}\n } catch {\n clampsByWay = {}\n }\n return html`<div stage></div>\n ${this.cannot\n ? html`<div cannot>${this.cannot}</div>`\n : html`<div legend>\n ${PREVIEW_WAYS.map(way => {\n const clamps = clampsByWay[way.name] ?? []\n return html`<span>\n ${way.axes.length ? way.name : i18next.t('figure.label.preview-base')}\n ${clamps.length\n ? html`<small clamp>${clamps.map(c => i18next.t('figure.text.preview-clamped', { axis: c.axis.toUpperCase(), asked: c.asked.toLocaleString(), used: c.used.toLocaleString() })).join(' · ')}</small>`\n : nothing}\n </span>`\n })}\n </div>\n ${controls.length + clips.length ? this.renderDrivers(asset!, controls, clips) : nothing}`}`\n }\n\n private renderDrivers(asset: V3Asset, controls: V3Asset['document']['model']['inputs'], clips: string[]) {\n const changed = controls.filter(c => this.giving[c.id] !== undefined && this.giving[c.id] !== asset.stateDefaults[c.id])\n return html`<div clips>\n ${changed.length\n ? html`<button pose title=${i18next.t('figure.text.pose-as-default-explained')} @click=${() => this.poseAsDefault()}>\n ${i18next.t('figure.button.pose-as-default')}\n </button>`\n : nothing}\n ${controls.map(control => {\n const value = this.giving[control.id] ?? asset.stateDefaults[control.id] ?? control.min\n const step = Math.max((control.max - control.min) / 100, 0.01)\n const label = asset.stateInputs?.[control.id]?.label ?? control.id\n return html`<label>\n <span>${label} <span drive>${control.unit}</span></span>\n ${this.renderDial(control, value)}\n <input\n type=\"range\"\n min=${control.min}\n max=${control.max}\n step=${step}\n .value=${String(value)}\n @input=${(e: Event) => this.give(control.id, Number((e.target as HTMLInputElement).value))}\n />\n <output>${Math.round(value)}</output>\n </label>`\n })}\n ${clips.map(clip => {\n const value = this.driving[clip] ?? 1\n return html`<label>\n <span>${clip} <span drive>${i18next.t('figure.label.playback-speed')}</span></span>\n <span></span>\n <input type=\"range\" min=\"0\" max=\"3\" step=\"0.05\" .value=${String(value)} @input=${(e: Event) => this.drive(clip, Number((e.target as HTMLInputElement).value))} />\n <output>${value.toFixed(2)}</output>\n </label>`\n })}\n </div>`\n }\n\n private renderDial(control: { unit: string; min: number; max: number }, value: number) {\n if (control.unit !== 'deg') return html`<span></span>`\n const dial = dialShape(control.min, control.max, value)\n const span = dial.radius * 2 + 2\n return html`<svg dial viewBox=\"0 0 ${span} ${span}\" aria-hidden=\"true\">\n <path d=${dial.sector}></path>\n <circle cx=${dial.centre.x} cy=${dial.centre.y} r=${dial.radius}></circle>\n <line x1=${dial.centre.x} y1=${dial.centre.y} x2=${dial.needle.x} y2=${dial.needle.y}></line>\n </svg>`\n }\n\n private drive(clip: string, value: number) {\n this.driving = { ...this.driving, [clip]: value }\n this.tellInstances('clips', this.driving)\n }\n\n private give(id: string, value: number) {\n this.giving = { ...this.giving, [id]: value }\n this.tellInstances('parameters', this.giving)\n }\n\n private poseAsDefault() {\n this.dispatchEvent(new CustomEvent('v3-part-edit', { detail: { edit: { kind: 'set-state-defaults', values: { ...this.giving } } }, bubbles: true, composed: true }))\n this.giving = {}\n }\n\n private tellInstances(key: 'clips' | 'parameters', values: Record<string, number>) {\n for (const component of this.scene?.root?.components ?? []) component.set?.(key, { ...values })\n }\n\n willUpdate(changed: Map<string, unknown>) {\n if (!this.hasUpdated) return\n if (changed.has('asset') || changed.has('context')) {\n this.standUp()\n return\n }\n if (!changed.has('view')) return\n const before = changed.get('view') as ViewSettings | undefined\n const now = this.view ?? DEFAULT_VIEW\n if (before?.placement !== now.placement || before?.ceilingHeight !== now.ceilingHeight) this.standUp()\n else this.scene?.root?.set?.(sceneLook(now))\n }\n\n firstUpdated() {\n this.standUp()\n this.watcher = new ResizeObserver(() => this.scene?.resize?.())\n this.watcher.observe(this)\n }\n\n disconnectedCallback() {\n super.disconnectedCallback()\n this.watcher?.disconnect()\n this.watcher = undefined\n this.teardown()\n }\n\n private standUp() {\n const asset = this.asset\n const view = this.view ?? DEFAULT_VIEW\n if (!asset || !asset.appearance.length) {\n this.cannot = i18next.t('figure.text.preview-needs-a-part')\n this.teardown()\n return\n }\n const signature = JSON.stringify([asset, view.placement, view.ceilingHeight])\n if (this.scene && this.standing === signature) return\n try {\n compileV3Asset(asset)\n } catch {\n this.cannot = i18next.t('figure.text.preview-blocked-by-errors')\n this.teardown()\n return\n }\n this.teardown()\n this.driving = {}\n try {\n /* Registered as a board registers it, under a type of this preview's own: a real type's drawings stay as they are. */\n const type = `figure-v3-preview-${this.context || 'new'}`\n registerFigureV3(type, asset)\n this.registered = type\n const size = authoredSizeOf(asset)\n const { components, board } = previewInstances(type, size)\n this.scene = create({\n target: this.stage,\n model: {\n type: 'model-layer',\n width: board.width,\n height: board.height,\n depth: previewBoardDepth({ placement: asset.occupancy?.placement, base: { y: size.y } }, view.ceilingHeight, PREVIEW_FACTOR),\n threed: true,\n sky: 'color',\n ...sceneLook(view),\n placement: view.placement,\n heights: { floor: 0, ceiling: view.ceilingHeight },\n pixelRatio: Math.min(3, (window.devicePixelRatio || 1) * 2),\n components\n },\n mode: 0\n }) as SceneHandle\n this.standing = signature\n this.scene.resize?.()\n this.scene.fit?.('ratio')\n this.scene.root?.fitCameraToModel?.()\n this.cannot = ''\n } catch (error) {\n this.cannot = (error as Error).message\n }\n }\n\n private teardown() {\n this.scene?.dispose?.()\n this.scene = undefined\n this.standing = undefined\n if (this.registered) unregisterFigureV3(this.registered)\n this.registered = undefined\n }\n}\n"]}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import '@material/web/icon/icon.js';
|
|
2
|
-
import { LitElement, nothing } from 'lit';
|
|
3
|
-
declare const FigureV3Properties_base: (new (...args: any[]) => LitElement) & typeof LitElement;
|
|
4
|
-
/**
|
|
5
|
-
* 속성 — the modeller's figure properties.
|
|
6
|
-
*
|
|
7
|
-
* The tab opens with what the figure is: its name, the face it is placed by, the room it takes up, where the
|
|
8
|
-
* catalogue files it.
|
|
9
|
-
*
|
|
10
|
-
* Two kinds of change leave this tab, and it does neither itself:
|
|
11
|
-
* - `v3-command` carries an authoring command (rename, declare the room, the mounting face). The page runs it
|
|
12
|
-
* through the session, so it is one step of the same undo history as every other edit, and is saved with it.
|
|
13
|
-
* - `v3-catalog` carries a change to the row (category, tags). Those are not in the asset; the page writes them
|
|
14
|
-
* to the saved row at once, so they need a saved figure.
|
|
15
|
-
*
|
|
16
|
-
* Not here yet, because V3 has no place for them: editing the declared room by hand (V3 declares it from the
|
|
17
|
-
* parts, as graph expressions), and the detail level. Both wait on a V3 ruling.
|
|
18
|
-
*/
|
|
19
|
-
export declare class FigureV3Properties extends FigureV3Properties_base {
|
|
20
|
-
static styles: import("lit").CSSResult[];
|
|
21
|
-
/** The source being edited. */
|
|
22
|
-
source?: string;
|
|
23
|
-
/** The saved row, if any. Category and tags live on it. */
|
|
24
|
-
figureId?: string;
|
|
25
|
-
figureCategory?: string;
|
|
26
|
-
figureTags?: string[];
|
|
27
|
-
/** The part and face picked for the mounting face, before 「이 면으로」 is pressed. */
|
|
28
|
-
private pickedPart?;
|
|
29
|
-
private pickedFace?;
|
|
30
|
-
private facts;
|
|
31
|
-
render(): import("lit-html").TemplateResult<1> | typeof nothing;
|
|
32
|
-
private renderName;
|
|
33
|
-
/**
|
|
34
|
-
* The face the figure is placed by. In V3 it is part of the room declaration, so choosing one declares the room
|
|
35
|
-
* again from the parts — the only way V3 declares it — with the new face. The hint says so.
|
|
36
|
-
*/
|
|
37
|
-
private renderPlacement;
|
|
38
|
-
private renderSpace;
|
|
39
|
-
private renderMounting;
|
|
40
|
-
private renderCatalog;
|
|
41
|
-
private declare;
|
|
42
|
-
private command;
|
|
43
|
-
private catalog;
|
|
44
|
-
}
|
|
45
|
-
export {};
|