@fmsim/board 1.0.88 → 2.0.0-beta.101

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.
Files changed (144) hide show
  1. package/custom-elements.json +7366 -3448
  2. package/demo/index-modeller.html +1 -1
  3. package/demo/index-player.html +2 -2
  4. package/demo/index-viewer.html +2 -2
  5. package/demo/index.html +2 -2
  6. package/dist/src/component/etc.js +36 -0
  7. package/dist/src/component/etc.js.map +1 -1
  8. package/dist/src/component/index.d.ts +1 -0
  9. package/dist/src/component/index.js +1 -0
  10. package/dist/src/component/index.js.map +1 -1
  11. package/dist/src/component/restful-attachment-creation-card.js +1 -1
  12. package/dist/src/component/restful-attachment-creation-card.js.map +1 -1
  13. package/dist/src/component/restful-attachment-selector.js +8 -9
  14. package/dist/src/component/restful-attachment-selector.js.map +1 -1
  15. package/dist/src/component/restful-input-attachment-selector.d.ts +1 -1
  16. package/dist/src/component/restful-input-attachment-selector.js +3 -3
  17. package/dist/src/component/restful-input-attachment-selector.js.map +1 -1
  18. package/dist/src/component/restful-input-fill-style.d.ts +13 -2
  19. package/dist/src/component/restful-input-fill-style.js.map +1 -1
  20. package/dist/src/component/restful-property-editor-backdrop-faces.d.ts +50 -0
  21. package/dist/src/component/restful-property-editor-backdrop-faces.js +524 -0
  22. package/dist/src/component/restful-property-editor-backdrop-faces.js.map +1 -0
  23. package/dist/src/index.d.ts +1 -0
  24. package/dist/src/index.js +1 -0
  25. package/dist/src/index.js.map +1 -1
  26. package/dist/src/layers/mcs-mouse-event-handler.js +8 -0
  27. package/dist/src/layers/mcs-mouse-event-handler.js.map +1 -1
  28. package/dist/src/layers/movement-layer.d.ts +7 -6
  29. package/dist/src/layers/movement-layer.js +56 -11
  30. package/dist/src/layers/movement-layer.js.map +1 -1
  31. package/dist/src/modeller/bulk-create-dialog.d.ts +51 -0
  32. package/dist/src/modeller/bulk-create-dialog.js +531 -0
  33. package/dist/src/modeller/bulk-create-dialog.js.map +1 -0
  34. package/dist/src/modeller/bulk-create.d.ts +101 -0
  35. package/dist/src/modeller/bulk-create.js +199 -0
  36. package/dist/src/modeller/bulk-create.js.map +1 -0
  37. package/dist/src/modeller/component-toolbar/component-menu.d.ts +1 -1
  38. package/dist/src/modeller/component-toolbar/component-toolbar.d.ts +4 -4
  39. package/dist/src/modeller/component-toolbar/component-toolbar.js.map +1 -1
  40. package/dist/src/modeller/edit-toolbar-style.js +43 -3
  41. package/dist/src/modeller/edit-toolbar-style.js.map +1 -1
  42. package/dist/src/modeller/edit-toolbar.d.ts +21 -14
  43. package/dist/src/modeller/edit-toolbar.js +371 -213
  44. package/dist/src/modeller/edit-toolbar.js.map +1 -1
  45. package/dist/src/modeller/property-sidebar/abstract-property.js +10 -2
  46. package/dist/src/modeller/property-sidebar/abstract-property.js.map +1 -1
  47. package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.js +1 -1
  48. package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.js.map +1 -1
  49. package/dist/src/modeller/property-sidebar/data-binding/data-binding.d.ts +2 -2
  50. package/dist/src/modeller/property-sidebar/data-binding/data-binding.js +18 -18
  51. package/dist/src/modeller/property-sidebar/data-binding/data-binding.js.map +1 -1
  52. package/dist/src/modeller/property-sidebar/effects/effects.d.ts +10 -1
  53. package/dist/src/modeller/property-sidebar/effects/effects.js +66 -1
  54. package/dist/src/modeller/property-sidebar/effects/effects.js.map +1 -1
  55. package/dist/src/modeller/property-sidebar/effects/event-handler-adapter.d.ts +44 -0
  56. package/dist/src/modeller/property-sidebar/effects/event-handler-adapter.js +70 -0
  57. package/dist/src/modeller/property-sidebar/effects/event-handler-adapter.js.map +1 -0
  58. package/dist/src/modeller/property-sidebar/effects/property-event-hover.js +3 -3
  59. package/dist/src/modeller/property-sidebar/effects/property-event-hover.js.map +1 -1
  60. package/dist/src/modeller/property-sidebar/effects/property-event.d.ts +13 -3
  61. package/dist/src/modeller/property-sidebar/effects/property-event.js +20 -11
  62. package/dist/src/modeller/property-sidebar/effects/property-event.js.map +1 -1
  63. package/dist/src/modeller/property-sidebar/inspector/inspector-controller.d.ts +62 -0
  64. package/dist/src/modeller/property-sidebar/inspector/inspector-controller.js +276 -0
  65. package/dist/src/modeller/property-sidebar/inspector/inspector-controller.js.map +1 -0
  66. package/dist/src/modeller/property-sidebar/inspector/inspector-group-view.d.ts +15 -0
  67. package/dist/src/modeller/property-sidebar/inspector/inspector-group-view.js +56 -0
  68. package/dist/src/modeller/property-sidebar/inspector/inspector-group-view.js.map +1 -0
  69. package/dist/src/modeller/property-sidebar/inspector/inspector-highlight.d.ts +7 -0
  70. package/dist/src/modeller/property-sidebar/inspector/inspector-highlight.js +25 -0
  71. package/dist/src/modeller/property-sidebar/inspector/inspector-highlight.js.map +1 -0
  72. package/dist/src/modeller/property-sidebar/inspector/inspector-model.d.ts +44 -0
  73. package/dist/src/modeller/property-sidebar/inspector/inspector-model.js +72 -0
  74. package/dist/src/modeller/property-sidebar/inspector/inspector-model.js.map +1 -0
  75. package/dist/src/modeller/property-sidebar/inspector/inspector-tree-view.d.ts +18 -0
  76. package/dist/src/modeller/property-sidebar/inspector/inspector-tree-view.js +61 -0
  77. package/dist/src/modeller/property-sidebar/inspector/inspector-tree-view.js.map +1 -0
  78. package/dist/src/modeller/property-sidebar/inspector/inspector.d.ts +17 -12
  79. package/dist/src/modeller/property-sidebar/inspector/inspector.js +281 -154
  80. package/dist/src/modeller/property-sidebar/inspector/inspector.js.map +1 -1
  81. package/dist/src/modeller/property-sidebar/property-sidebar.d.ts +2 -2
  82. package/dist/src/modeller/property-sidebar/property-sidebar.js +11 -24
  83. package/dist/src/modeller/property-sidebar/property-sidebar.js.map +1 -1
  84. package/dist/src/modeller/property-sidebar/shapes/ox-input-entity-id.d.ts +75 -0
  85. package/dist/src/modeller/property-sidebar/shapes/ox-input-entity-id.js +346 -0
  86. package/dist/src/modeller/property-sidebar/shapes/ox-input-entity-id.js.map +1 -0
  87. package/dist/src/modeller/property-sidebar/shapes/shapes.d.ts +23 -2
  88. package/dist/src/modeller/property-sidebar/shapes/shapes.js +96 -4
  89. package/dist/src/modeller/property-sidebar/shapes/shapes.js.map +1 -1
  90. package/dist/src/modeller/property-sidebar/specifics/specifics.d.ts +25 -1
  91. package/dist/src/modeller/property-sidebar/specifics/specifics.js +112 -2
  92. package/dist/src/modeller/property-sidebar/specifics/specifics.js.map +1 -1
  93. package/dist/src/modeller/property-sidebar/styles/styles.d.ts +6 -4
  94. package/dist/src/modeller/property-sidebar/styles/styles.js +140 -437
  95. package/dist/src/modeller/property-sidebar/styles/styles.js.map +1 -1
  96. package/dist/src/modeller/scene-viewer/ox-scene-layer.d.ts +4 -3
  97. package/dist/src/modeller/scene-viewer/ox-scene-layer.js +2 -1
  98. package/dist/src/modeller/scene-viewer/ox-scene-layer.js.map +1 -1
  99. package/dist/src/modeller/scene-viewer/ox-scene-viewer.d.ts +6 -5
  100. package/dist/src/modeller/scene-viewer/ox-scene-viewer.js +7 -3
  101. package/dist/src/modeller/scene-viewer/ox-scene-viewer.js.map +1 -1
  102. package/dist/src/ox-board-component-info.d.ts +3 -3
  103. package/dist/src/ox-board-component-info.js +58 -19
  104. package/dist/src/ox-board-component-info.js.map +1 -1
  105. package/dist/src/ox-board-list.js +12 -12
  106. package/dist/src/ox-board-list.js.map +1 -1
  107. package/dist/src/ox-board-modeller.d.ts +9 -6
  108. package/dist/src/ox-board-modeller.js +32 -33
  109. package/dist/src/ox-board-modeller.js.map +1 -1
  110. package/dist/src/ox-board-viewer.d.ts +129 -17
  111. package/dist/src/ox-board-viewer.js +804 -115
  112. package/dist/src/ox-board-viewer.js.map +1 -1
  113. package/dist/src/ox-editor-board-selector.d.ts +4 -1
  114. package/dist/src/ox-editor-board-selector.js +41 -12
  115. package/dist/src/ox-editor-board-selector.js.map +1 -1
  116. package/dist/src/ox-playback-controls.d.ts +157 -0
  117. package/dist/src/ox-playback-controls.js +1089 -0
  118. package/dist/src/ox-playback-controls.js.map +1 -0
  119. package/dist/src/ox-property-editor-theme.js +2 -2
  120. package/dist/src/ox-property-editor-theme.js.map +1 -1
  121. package/dist/src/playback/carrier-tracking-store.d.ts +51 -0
  122. package/dist/src/playback/carrier-tracking-store.js +115 -0
  123. package/dist/src/playback/carrier-tracking-store.js.map +1 -0
  124. package/dist/src/playback/playback-engine.d.ts +106 -0
  125. package/dist/src/playback/playback-engine.js +395 -0
  126. package/dist/src/playback/playback-engine.js.map +1 -0
  127. package/dist/src/selector/board-creation-popup.d.ts +4 -5
  128. package/dist/src/selector/board-creation-popup.js +16 -19
  129. package/dist/src/selector/board-creation-popup.js.map +1 -1
  130. package/dist/src/selector/board-thumbnail-card.js +8 -8
  131. package/dist/src/selector/board-thumbnail-card.js.map +1 -1
  132. package/dist/src/selector/ox-board-creation-card.d.ts +1 -1
  133. package/dist/src/selector/ox-board-creation-card.js +7 -7
  134. package/dist/src/selector/ox-board-creation-card.js.map +1 -1
  135. package/dist/src/selector/ox-board-selector.js +21 -10
  136. package/dist/src/selector/ox-board-selector.js.map +1 -1
  137. package/dist/tsconfig.tsbuildinfo +1 -1
  138. package/icons/components/text.png +0 -0
  139. package/icons/fab/mode-2d.svg +25 -0
  140. package/icons/fab/mode-3d.svg +25 -0
  141. package/icons/fab/playback-play.svg +49 -0
  142. package/icons/fab/playback-stop.svg +50 -0
  143. package/icons/icon-htoolbar.png +0 -0
  144. package/package.json +22 -21
@@ -1 +1 @@
1
- {"version":3,"file":"restful-input-fill-style.js","sourceRoot":"","sources":["../../../src/component/restful-input-fill-style.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,0BAA0B,CAAA;AACjC,OAAO,kCAAkC,CAAA;AACzC,OAAO,wCAAwC,CAAA;AAC/C,OAAO,2CAA2C,CAAA;AAClD,OAAO,uCAAuC,CAAA;AAE9C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA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AAE,IAAI,EAAE,MAAM,EAAE,CAAC;uDAAkC;AAEP;IAArD,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;yDAA2B;AAtDrE,sBAAsB;IADlC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,sBAAsB,CAqVlC","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport '@operato/i18n/ox-i18n.js'\nimport '@operato/input/ox-input-color.js'\nimport '@operato/input/ox-input-color-stops.js'\nimport '@operato/input/ox-input-color-gradient.js'\nimport './restrul-input-background-pattern.js'\n\nimport { css, html, PropertyValues } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { ColorStop, GradientOption, OxFormField, OxInputColorGradient } from '@operato/input'\n\nimport { BackgroundPatternOption, RestfulInputBackgroundPattern } from './restrul-input-background-pattern.js'\n\nexport type FillStyle =\n | {\n type?: 'no' | 'solid' | 'gradient' | 'pattern'\n gradientType?: 'linear' | 'radial'\n colorStops?: ColorStop[]\n rotation?: number\n center?: 'center' | 'left-top' | 'right-top' | 'right-bottom' | 'left-bottom'\n image?: HTMLImageElement | string\n offsetX?: number\n offsetY?: number\n width?: number\n height?: number\n align?: 'left-top' | 'top' | 'right-top' | 'left' | 'center' | 'right' | 'left-bottom' | 'bottom' | 'right-bottom'\n fitPattern?: boolean\n noRepeat?: boolean\n guideOnly?: boolean\n color?: string\n }\n | 'no'\n | string\n\n@customElement('restful-input-fill-style')\nexport class RestfulInputColorStyle extends OxFormField {\n static styles = css`\n :host {\n display: flex;\n flex-direction: column;\n }\n\n [fill-type] {\n display: flex;\n margin: 0 0 14px 0;\n }\n\n [fill-type] * {\n flex: auto;\n margin: 0;\n text-align: left;\n align-self: center;\n }\n\n .grid-10 {\n display: grid;\n\n grid-template-columns: repeat(10, 1fr);\n grid-gap: 5px;\n grid-auto-rows: minmax(24px, auto);\n }\n\n .grid-10 > ox-input-color {\n grid-column: span 4;\n }\n\n .grid-10 > .icon-only-label {\n grid-column: span 1;\n\n background: var(--url-icon-properties-label) no-repeat;\n float: left;\n margin: 0;\n }\n\n .icon-only-label.color {\n background-position: 100% -500px;\n }\n\n [editors] > :not([active]) {\n display: none;\n }\n `\n\n @property({ type: Object }) value?: FillStyle\n @property({ type: String }) fillType?: string\n @property({ type: String }) solid?: string\n @property({ type: Object }) gradient?: GradientOption\n @property({ type: Object }) pattern?: BackgroundPatternOption\n\n @property({ type: Boolean, attribute: 'color-only' }) colorOnly: boolean = false\n\n private _block_reset: boolean = false\n\n updated(changes: PropertyValues<this>) {\n changes.has('value') && this._onChangedValue(this.value || {})\n }\n\n render() {\n return html`\n <div @change=${(e: Event) => this._onChangedFillType(e)} fill-type>\n <input\n type=\"radio\"\n id=\"fill-type-no\"\n name=\"fill-type\"\n value=\"no\"\n .checked=${!this.fillType || this.fillType == 'no'}\n />\n <label for=\"fill-type-no\"><ox-i18n msgid=\"label.no-fill\">no fill</ox-i18n></label>\n <input type=\"radio\" id=\"fill-type-solid\" name=\"fill-type\" value=\"solid\" .checked=${this.fillType == 'solid'} />\n <label for=\"fill-type-solid\"><ox-i18n msgid=\"label.solid\">solid</ox-i18n></label>\n <input\n type=\"radio\"\n id=\"fill-type-gradient\"\n name=\"fill-type\"\n value=\"gradient\"\n .checked=${this.fillType == 'gradient'}\n />\n\n <label for=\"fill-type-gradient\"><ox-i18n msgid=\"label.gradient\">gradient</ox-i18n></label>\n\n ${this.colorOnly\n ? html``\n : html`\n <input\n type=\"radio\"\n id=\"fill-type-pattern\"\n name=\"fill-type\"\n value=\"pattern\"\n .checked=${this.fillType == 'pattern'}\n />\n <label for=\"fill-type-pattern\"><ox-i18n msgid=\"label.pattern\">pattern</ox-i18n></label>\n `}\n </div>\n\n <div editors>\n <div ?active=${this.fillType == 'no'}></div>\n\n <div class=\"grid-10\" ?active=${this.fillType == 'solid'}>\n <label class=\"icon-only-label color\"></label>\n <ox-input-color @change=${(e: Event) => this._onChangedSolid(e)} .value=${this.solid}> </ox-input-color>\n </div>\n\n <div ?active=${this.fillType == 'gradient'}>\n <ox-input-color-gradient @change=${(e: Event) => this._onChandedGradient(e)} .value=${this.gradient}>\n </ox-input-color-gradient>\n </div>\n\n <div ?active=${this.fillType == 'pattern'}>\n <restful-input-background-pattern @change=${(e: Event) => this._onChangedPattern(e)} .value=${this.pattern}>\n </restful-input-background-pattern>\n </div>\n </div>\n `\n }\n\n async _onChangedValue(value: FillStyle) {\n /*\n * this._block_reset의 역할은 내부 사용자 인터렉션에 의한 value의 변경시에는 각 type별 이전값을 유지하기 위함이다.\n */\n await this.requestUpdate()\n\n /* 설정 값에 따라서, 멤버 속성을 설정한다. */\n if (!value) {\n this.fillType = 'no'\n\n if (!this._block_reset) {\n this.solid = undefined\n this.gradient = undefined\n this.pattern = undefined\n }\n\n this._block_reset = false\n return\n }\n\n switch (typeof value) {\n case 'string':\n this.fillType = 'solid'\n this.solid = value\n\n if (!this._block_reset) {\n this.gradient = undefined\n this.pattern = undefined\n }\n break\n case 'object':\n this.fillType = value.type\n\n if (value.type === 'gradient') {\n this.gradient = {\n type: value.gradientType || 'linear',\n colorStops: value.colorStops || [\n {\n position: 0,\n color: this.solid || '#000000'\n },\n {\n position: 1,\n color: this.solid || '#FFFFFF'\n }\n ],\n rotation: Number(value.rotation) || 0,\n center: value.center\n }\n\n if (!this._block_reset) {\n this.pattern = undefined\n this.solid = undefined\n }\n } else if (value.type === 'pattern') {\n this.pattern = {\n image: value.image,\n offsetX: Number(value.offsetX) || 0,\n offsetY: Number(value.offsetY) || 0,\n width: Number(value.width),\n height: Number(value.height),\n align: value.align,\n fitPattern: value.fitPattern,\n noRepeat: value.noRepeat,\n guideOnly: value.guideOnly,\n color: value.color\n }\n\n if (!this._block_reset) {\n this.gradient = undefined\n this.solid = undefined\n }\n }\n\n break\n default:\n }\n\n this._block_reset = false\n }\n\n _onChangedFillType(e: Event) {\n const element = e.target as HTMLInputElement\n this.fillType = element.value\n\n switch (this.fillType) {\n case 'gradient':\n if (!this.gradient) {\n this.gradient = {\n type: 'linear',\n colorStops: [\n {\n position: 0,\n color: this.solid || '#000000'\n },\n {\n position: 1,\n color: this.solid || '#FFFFFF'\n }\n ],\n rotation: 0,\n center: 'center'\n }\n }\n\n this.value = {\n type: 'gradient',\n gradientType: this.gradient.type || 'linear',\n colorStops: this.gradient.colorStops || [\n {\n position: 0,\n color: this.solid || '#000000'\n },\n {\n position: 1,\n color: this.solid || '#FFFFFF'\n }\n ],\n rotation: Number(this.gradient.rotation) || 0,\n center: this.gradient.center\n }\n break\n\n case 'pattern':\n if (!this.pattern) this.pattern = {}\n\n this.value = {\n type: 'pattern',\n image: this.pattern.image,\n offsetX: Number(this.pattern.offsetX) || 0,\n offsetY: Number(this.pattern.offsetY) || 0,\n width: Number(this.pattern.width),\n height: Number(this.pattern.height),\n align: this.pattern.align,\n fitPattern: this.pattern.fitPattern,\n noRepeat: this.pattern.noRepeat,\n guideOnly: this.pattern.guideOnly,\n color: this.pattern.color\n }\n break\n\n case 'solid':\n if (!this.solid) this.solid = '#fff'\n this.value = this.solid\n break\n\n case 'no':\n this.value = ''\n break\n }\n\n this._block_reset = true\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n }\n\n _onChangedSolid(e: Event) {\n if (this.fillType !== 'solid') return\n\n this.solid = (e.target as HTMLInputElement).value\n\n this.value = this.solid\n\n this._block_reset = true\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n }\n\n _onChandedGradient(e: Event) {\n /*\n * TODO Gradient의 rotation은 symmetry 기능 등으로 외부에서 변경될 수도 있다.\n * 이 점을 감안해서, 외부 변경에 대한 대응을 해야 한다.\n */\n\n if (this.fillType !== 'gradient') {\n return\n }\n\n this.gradient = (e.target as OxInputColorGradient).value\n\n this.value = {\n type: 'gradient',\n gradientType: this.gradient.type || 'linear',\n colorStops: this.gradient.colorStops || [\n {\n position: 0,\n color: this.solid || '#000000'\n },\n {\n position: 1,\n color: this.solid || '#FFFFFF'\n }\n ],\n rotation: Number(this.gradient.rotation) || 0,\n center: this.gradient.center\n }\n\n this._block_reset = true\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n }\n\n _onChangedPattern(e: Event) {\n if (this.fillType !== 'pattern') return\n\n this.pattern = (e.target as RestfulInputBackgroundPattern).value\n\n this.value = {\n type: 'pattern',\n image: this.pattern?.image,\n offsetX: Number(this.pattern?.offsetX) || 0,\n offsetY: Number(this.pattern?.offsetY) || 0,\n width: Number(this.pattern?.width),\n height: Number(this.pattern?.height),\n align: this.pattern?.align,\n fitPattern: this.pattern?.fitPattern,\n noRepeat: this.pattern?.noRepeat,\n guideOnly: this.pattern?.guideOnly,\n color: this.pattern?.color\n }\n\n this._block_reset = true\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n }\n}\n"]}
1
+ {"version":3,"file":"restful-input-fill-style.js","sourceRoot":"","sources":["../../../src/component/restful-input-fill-style.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,0BAA0B,CAAA;AACjC,OAAO,kCAAkC,CAAA;AACzC,OAAO,wCAAwC,CAAA;AAC/C,OAAO,2CAA2C,CAAA;AAClD,OAAO,uCAAuC,CAAA;AAE9C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAmCrC,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,WAAW;IAAhD;;QAsDiD,cAAS,GAAY,KAAK,CAAA;QAExE,iBAAY,GAAY,KAAK,CAAA;IA6RvC,CAAC;IA3RC,OAAO,CAAC,OAA6B;QACnC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAA;IAChE,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,MAAA,IAAI,CAAC,OAAO,0CAAE,KAAK;YAC1B,UAAU,EAAE,MAAA,IAAI,CAAC,OAAO,0CAAE,UAAU;YACpC,QAAQ,EAAE,MAAA,IAAI,CAAC,OAAO,0CAAE,QAAQ;YAChC,SAAS,EAAE,MAAA,IAAI,CAAC,OAAO,0CAAE,SAAS;YAClC,KAAK,EAAE,MAAA,IAAI,CAAC,OAAO,0CAAE,KAAK;SAC3B,CAAA;QAED,IAAI,CAAC,YAAY,GAAG,IAAI,CAAA;QACxB,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;IAClF,CAAC;;AAnVM,6BAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6ClB,AA7CY,CA6CZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDAAkB;AACjB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wDAAkB;AACjB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDAAe;AACd;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wDAA0B;AACzB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uDAAkC;AAEP;IAArD,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;yDAA2B;AAtDrE,sBAAsB;IADlC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,sBAAsB,CAqVlC","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport '@operato/i18n/ox-i18n.js'\nimport '@operato/input/ox-input-color.js'\nimport '@operato/input/ox-input-color-stops.js'\nimport '@operato/input/ox-input-color-gradient.js'\nimport './restrul-input-background-pattern.js'\n\nimport { css, html, PropertyValues } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { OxFormField } from '@operato/input'\n\ntype ColorStop = { color: string; position: number }\ntype GradientOption = {\n type?: 'linear' | 'radial'\n colorStops?: ColorStop[]\n rotation?: number\n center?: string\n}\ntype OxInputColorGradient = HTMLElement & { value: GradientOption }\n\nimport { BackgroundPatternOption, RestfulInputBackgroundPattern } from './restrul-input-background-pattern.js'\n\nexport type FillStyle =\n | {\n type?: 'no' | 'solid' | 'gradient' | 'pattern'\n gradientType?: 'linear' | 'radial'\n colorStops?: ColorStop[]\n rotation?: number\n center?: string\n image?: HTMLImageElement | string\n offsetX?: number\n offsetY?: number\n width?: number\n height?: number\n align?: 'left-top' | 'top' | 'right-top' | 'left' | 'center' | 'right' | 'left-bottom' | 'bottom' | 'right-bottom'\n fitPattern?: boolean\n noRepeat?: boolean\n guideOnly?: boolean\n color?: string\n }\n | 'no'\n | string\n\n@customElement('restful-input-fill-style')\nexport class RestfulInputColorStyle extends OxFormField {\n static styles = css`\n :host {\n display: flex;\n flex-direction: column;\n }\n\n [fill-type] {\n display: flex;\n margin: 0 0 14px 0;\n }\n\n [fill-type] * {\n flex: auto;\n margin: 0;\n text-align: left;\n align-self: center;\n }\n\n .grid-10 {\n display: grid;\n\n grid-template-columns: repeat(10, 1fr);\n grid-gap: 5px;\n grid-auto-rows: minmax(24px, auto);\n }\n\n .grid-10 > ox-input-color {\n grid-column: span 4;\n }\n\n .grid-10 > .icon-only-label {\n grid-column: span 1;\n\n background: var(--url-icon-properties-label) no-repeat;\n float: left;\n margin: 0;\n }\n\n .icon-only-label.color {\n background-position: 100% -500px;\n }\n\n [editors] > :not([active]) {\n display: none;\n }\n `\n\n @property({ type: Object }) value?: FillStyle\n @property({ type: String }) fillType?: string\n @property({ type: String }) solid?: string\n @property({ type: Object }) gradient?: GradientOption\n @property({ type: Object }) pattern?: BackgroundPatternOption\n\n @property({ type: Boolean, attribute: 'color-only' }) colorOnly: boolean = false\n\n private _block_reset: boolean = false\n\n updated(changes: PropertyValues<this>) {\n changes.has('value') && this._onChangedValue(this.value || {})\n }\n\n render() {\n return html`\n <div @change=${(e: Event) => this._onChangedFillType(e)} fill-type>\n <input\n type=\"radio\"\n id=\"fill-type-no\"\n name=\"fill-type\"\n value=\"no\"\n .checked=${!this.fillType || this.fillType == 'no'}\n />\n <label for=\"fill-type-no\"><ox-i18n msgid=\"label.no-fill\">no fill</ox-i18n></label>\n <input type=\"radio\" id=\"fill-type-solid\" name=\"fill-type\" value=\"solid\" .checked=${this.fillType == 'solid'} />\n <label for=\"fill-type-solid\"><ox-i18n msgid=\"label.solid\">solid</ox-i18n></label>\n <input\n type=\"radio\"\n id=\"fill-type-gradient\"\n name=\"fill-type\"\n value=\"gradient\"\n .checked=${this.fillType == 'gradient'}\n />\n\n <label for=\"fill-type-gradient\"><ox-i18n msgid=\"label.gradient\">gradient</ox-i18n></label>\n\n ${this.colorOnly\n ? html``\n : html`\n <input\n type=\"radio\"\n id=\"fill-type-pattern\"\n name=\"fill-type\"\n value=\"pattern\"\n .checked=${this.fillType == 'pattern'}\n />\n <label for=\"fill-type-pattern\"><ox-i18n msgid=\"label.pattern\">pattern</ox-i18n></label>\n `}\n </div>\n\n <div editors>\n <div ?active=${this.fillType == 'no'}></div>\n\n <div class=\"grid-10\" ?active=${this.fillType == 'solid'}>\n <label class=\"icon-only-label color\"></label>\n <ox-input-color @change=${(e: Event) => this._onChangedSolid(e)} .value=${this.solid}> </ox-input-color>\n </div>\n\n <div ?active=${this.fillType == 'gradient'}>\n <ox-input-color-gradient @change=${(e: Event) => this._onChandedGradient(e)} .value=${this.gradient}>\n </ox-input-color-gradient>\n </div>\n\n <div ?active=${this.fillType == 'pattern'}>\n <restful-input-background-pattern @change=${(e: Event) => this._onChangedPattern(e)} .value=${this.pattern}>\n </restful-input-background-pattern>\n </div>\n </div>\n `\n }\n\n async _onChangedValue(value: FillStyle) {\n /*\n * this._block_reset의 역할은 내부 사용자 인터렉션에 의한 value의 변경시에는 각 type별 이전값을 유지하기 위함이다.\n */\n await this.requestUpdate()\n\n /* 설정 값에 따라서, 멤버 속성을 설정한다. */\n if (!value) {\n this.fillType = 'no'\n\n if (!this._block_reset) {\n this.solid = undefined\n this.gradient = undefined\n this.pattern = undefined\n }\n\n this._block_reset = false\n return\n }\n\n switch (typeof value) {\n case 'string':\n this.fillType = 'solid'\n this.solid = value\n\n if (!this._block_reset) {\n this.gradient = undefined\n this.pattern = undefined\n }\n break\n case 'object':\n this.fillType = value.type\n\n if (value.type === 'gradient') {\n this.gradient = {\n type: value.gradientType || 'linear',\n colorStops: value.colorStops || [\n {\n position: 0,\n color: this.solid || '#000000'\n },\n {\n position: 1,\n color: this.solid || '#FFFFFF'\n }\n ],\n rotation: Number(value.rotation) || 0,\n center: value.center\n }\n\n if (!this._block_reset) {\n this.pattern = undefined\n this.solid = undefined\n }\n } else if (value.type === 'pattern') {\n this.pattern = {\n image: value.image,\n offsetX: Number(value.offsetX) || 0,\n offsetY: Number(value.offsetY) || 0,\n width: Number(value.width),\n height: Number(value.height),\n align: value.align,\n fitPattern: value.fitPattern,\n noRepeat: value.noRepeat,\n guideOnly: value.guideOnly,\n color: value.color\n }\n\n if (!this._block_reset) {\n this.gradient = undefined\n this.solid = undefined\n }\n }\n\n break\n default:\n }\n\n this._block_reset = false\n }\n\n _onChangedFillType(e: Event) {\n const element = e.target as HTMLInputElement\n this.fillType = element.value\n\n switch (this.fillType) {\n case 'gradient':\n if (!this.gradient) {\n this.gradient = {\n type: 'linear',\n colorStops: [\n {\n position: 0,\n color: this.solid || '#000000'\n },\n {\n position: 1,\n color: this.solid || '#FFFFFF'\n }\n ],\n rotation: 0,\n center: 'center'\n }\n }\n\n this.value = {\n type: 'gradient',\n gradientType: this.gradient.type || 'linear',\n colorStops: this.gradient.colorStops || [\n {\n position: 0,\n color: this.solid || '#000000'\n },\n {\n position: 1,\n color: this.solid || '#FFFFFF'\n }\n ],\n rotation: Number(this.gradient.rotation) || 0,\n center: this.gradient.center\n }\n break\n\n case 'pattern':\n if (!this.pattern) this.pattern = {}\n\n this.value = {\n type: 'pattern',\n image: this.pattern.image,\n offsetX: Number(this.pattern.offsetX) || 0,\n offsetY: Number(this.pattern.offsetY) || 0,\n width: Number(this.pattern.width),\n height: Number(this.pattern.height),\n align: this.pattern.align,\n fitPattern: this.pattern.fitPattern,\n noRepeat: this.pattern.noRepeat,\n guideOnly: this.pattern.guideOnly,\n color: this.pattern.color\n }\n break\n\n case 'solid':\n if (!this.solid) this.solid = '#fff'\n this.value = this.solid\n break\n\n case 'no':\n this.value = ''\n break\n }\n\n this._block_reset = true\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n }\n\n _onChangedSolid(e: Event) {\n if (this.fillType !== 'solid') return\n\n this.solid = (e.target as HTMLInputElement).value\n\n this.value = this.solid\n\n this._block_reset = true\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n }\n\n _onChandedGradient(e: Event) {\n /*\n * TODO Gradient의 rotation은 symmetry 기능 등으로 외부에서 변경될 수도 있다.\n * 이 점을 감안해서, 외부 변경에 대한 대응을 해야 한다.\n */\n\n if (this.fillType !== 'gradient') {\n return\n }\n\n this.gradient = (e.target as OxInputColorGradient).value\n\n this.value = {\n type: 'gradient',\n gradientType: this.gradient.type || 'linear',\n colorStops: this.gradient.colorStops || [\n {\n position: 0,\n color: this.solid || '#000000'\n },\n {\n position: 1,\n color: this.solid || '#FFFFFF'\n }\n ],\n rotation: Number(this.gradient.rotation) || 0,\n center: this.gradient.center\n }\n\n this._block_reset = true\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n }\n\n _onChangedPattern(e: Event) {\n if (this.fillType !== 'pattern') return\n\n this.pattern = (e.target as RestfulInputBackgroundPattern).value\n\n this.value = {\n type: 'pattern',\n image: this.pattern?.image,\n offsetX: Number(this.pattern?.offsetX) || 0,\n offsetY: Number(this.pattern?.offsetY) || 0,\n width: Number(this.pattern?.width),\n height: Number(this.pattern?.height),\n align: this.pattern?.align,\n fitPattern: this.pattern?.fitPattern,\n noRepeat: this.pattern?.noRepeat,\n guideOnly: this.pattern?.guideOnly,\n color: this.pattern?.color\n }\n\n this._block_reset = true\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n }\n}\n"]}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * @license Copyright © HatioLab Inc. All rights reserved.
3
+ *
4
+ * fmsim-restful 환경에서는 GraphQL/attachment 의존이 있는 ox-input-fill-style 대신
5
+ * restful-input-fill-style 을 사용해야 한다. ox-property-editor-backdrop-faces 와
6
+ * 동일한 cube-picker UI 를 유지하되 fillStyle 에디터만 restful 버전으로 교체.
7
+ *
8
+ * 양쪽 동기화 시 주의: ox-property-editor-backdrop-faces.ts (operato/property-editor)
9
+ * 변경 시 이 파일도 함께 업데이트.
10
+ */
11
+ import './restful-input-fill-style.js';
12
+ import '@operato/i18n/ox-i18n.js';
13
+ import { LitElement, type TemplateResult } from 'lit';
14
+ import { OxPropertyEditor } from '@operato/property-editor';
15
+ import type { PropertySpec } from '@operato/property-editor';
16
+ type FaceName = 'east' | 'west' | 'north' | 'south' | 'ceiling' | 'floor';
17
+ interface FaceState {
18
+ fillStyle?: any;
19
+ visible?: boolean;
20
+ alpha?: number;
21
+ rotation?: 0 | 90 | 180 | 270;
22
+ mirror?: boolean;
23
+ }
24
+ type FacesValue = Partial<Record<FaceName, FaceState>>;
25
+ export declare class RestfulInputBackdropFaces extends LitElement {
26
+ value: FacesValue;
27
+ private _selected;
28
+ static styles: import("lit").CSSResult;
29
+ private _face;
30
+ private _swatchColor;
31
+ private _select;
32
+ private _commit;
33
+ private _patchFace;
34
+ private _onFillStyleChange;
35
+ private _onVisibleChange;
36
+ private _onAlphaChange;
37
+ private _onRotationChange;
38
+ private _onMirrorChange;
39
+ private _copyToOpposite;
40
+ private _copyToAllWalls;
41
+ private _renderLabel;
42
+ private _faceClass;
43
+ private _ghostClass;
44
+ render(): TemplateResult<1>;
45
+ }
46
+ export declare class RestfulPropertyEditorBackdropFaces extends OxPropertyEditor {
47
+ static styles: import("lit").CSSResult[];
48
+ editorTemplate(value: any, spec: PropertySpec): TemplateResult;
49
+ }
50
+ export {};
@@ -0,0 +1,524 @@
1
+ /**
2
+ * @license Copyright © HatioLab Inc. All rights reserved.
3
+ *
4
+ * fmsim-restful 환경에서는 GraphQL/attachment 의존이 있는 ox-input-fill-style 대신
5
+ * restful-input-fill-style 을 사용해야 한다. ox-property-editor-backdrop-faces 와
6
+ * 동일한 cube-picker UI 를 유지하되 fillStyle 에디터만 restful 버전으로 교체.
7
+ *
8
+ * 양쪽 동기화 시 주의: ox-property-editor-backdrop-faces.ts (operato/property-editor)
9
+ * 변경 시 이 파일도 함께 업데이트.
10
+ */
11
+ import { __decorate } from "tslib";
12
+ import './restful-input-fill-style.js';
13
+ import '@operato/i18n/ox-i18n.js';
14
+ import { css, html, LitElement, nothing } from 'lit';
15
+ import { customElement, property, state } from 'lit/decorators.js';
16
+ import { OxPropertyEditor } from '@operato/property-editor';
17
+ const OPPOSITE = {
18
+ east: 'west',
19
+ west: 'east',
20
+ north: 'south',
21
+ south: 'north',
22
+ ceiling: 'floor',
23
+ floor: 'ceiling'
24
+ };
25
+ const AXIS_LABEL = {
26
+ east: '+X',
27
+ west: '−X',
28
+ north: '−Z',
29
+ south: '+Z',
30
+ ceiling: '+Y',
31
+ floor: '−Y'
32
+ };
33
+ const DEFAULT_FACES = {
34
+ east: { fillStyle: '#dde2e8', visible: true, alpha: 0.35, rotation: 0, mirror: false },
35
+ west: { fillStyle: '#dde2e8', visible: true, alpha: 0.35, rotation: 0, mirror: false },
36
+ north: { fillStyle: '#dde2e8', visible: true, alpha: 0.35, rotation: 0, mirror: false },
37
+ south: { fillStyle: '#dde2e8', visible: true, alpha: 0.35, rotation: 0, mirror: false },
38
+ ceiling: { fillStyle: '#e8e8ec', visible: true, alpha: 1.0, rotation: 0, mirror: false },
39
+ floor: { fillStyle: '#9c9c9c', visible: true, alpha: 1.0, rotation: 0, mirror: false }
40
+ };
41
+ let RestfulInputBackdropFaces = class RestfulInputBackdropFaces extends LitElement {
42
+ constructor() {
43
+ super(...arguments);
44
+ this.value = {};
45
+ this._selected = 'ceiling';
46
+ }
47
+ _face(name) {
48
+ var _a, _b;
49
+ return { ...DEFAULT_FACES[name], ...((_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a[name]) !== null && _b !== void 0 ? _b : {}) };
50
+ }
51
+ _swatchColor(name) {
52
+ var _a;
53
+ const fs = this._face(name).fillStyle;
54
+ if (typeof fs === 'string' && fs && fs !== 'transparent')
55
+ return fs;
56
+ if (fs && typeof fs === 'object') {
57
+ if (fs.type === 'gradient' && Array.isArray(fs.colorStops) && ((_a = fs.colorStops[0]) === null || _a === void 0 ? void 0 : _a.color)) {
58
+ return fs.colorStops[0].color;
59
+ }
60
+ if (fs.color)
61
+ return fs.color;
62
+ }
63
+ return undefined;
64
+ }
65
+ _select(name) {
66
+ this._selected = name;
67
+ }
68
+ _commit(next) {
69
+ this.value = next;
70
+ this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }));
71
+ }
72
+ _patchFace(name, patch) {
73
+ const next = { ...(this.value || {}) };
74
+ next[name] = { ...this._face(name), ...patch };
75
+ this._commit(next);
76
+ }
77
+ _onFillStyleChange(e) {
78
+ e.stopPropagation();
79
+ const target = e.target;
80
+ this._patchFace(this._selected, { fillStyle: target.value });
81
+ }
82
+ _onVisibleChange(e) {
83
+ e.stopPropagation();
84
+ const target = e.target;
85
+ this._patchFace(this._selected, { visible: target.checked });
86
+ }
87
+ _onAlphaChange(e) {
88
+ e.stopPropagation();
89
+ const target = e.target;
90
+ const v = parseFloat(target.value);
91
+ const alpha = Number.isFinite(v) ? Math.max(0, Math.min(1, v)) : 1;
92
+ this._patchFace(this._selected, { alpha });
93
+ }
94
+ _onRotationChange(e) {
95
+ e.stopPropagation();
96
+ const target = e.target;
97
+ const n = parseInt(target.value, 10);
98
+ const rotation = n === 90 || n === 180 || n === 270 ? n : 0;
99
+ this._patchFace(this._selected, { rotation });
100
+ }
101
+ _onMirrorChange(e) {
102
+ e.stopPropagation();
103
+ const target = e.target;
104
+ this._patchFace(this._selected, { mirror: target.checked });
105
+ }
106
+ _copyToOpposite() {
107
+ const src = this._face(this._selected);
108
+ const opposite = OPPOSITE[this._selected];
109
+ const next = { ...(this.value || {}) };
110
+ next[opposite] = { ...src };
111
+ this._commit(next);
112
+ }
113
+ _copyToAllWalls() {
114
+ const src = this._face(this._selected);
115
+ const next = { ...(this.value || {}) };
116
+ for (const w of ['east', 'west', 'north', 'south']) {
117
+ next[w] = { ...src };
118
+ }
119
+ this._commit(next);
120
+ }
121
+ _renderLabel(name, x, y) {
122
+ const f = this._face(name);
123
+ const swatch = this._swatchColor(name);
124
+ const selected = this._selected === name;
125
+ return html `
126
+ <div
127
+ class="face-label ${selected ? 'selected' : ''}"
128
+ style="left: ${x}px; top: ${y}px;"
129
+ @click=${() => this._select(name)}
130
+ title=${`${name} (${AXIS_LABEL[name]})`}
131
+ >
132
+ <span
133
+ class="swatch"
134
+ style=${swatch ? `background: ${swatch};` : ''}
135
+ ?data-empty=${!swatch}
136
+ ></span>
137
+ <ox-i18n msgid="label.${name}">${name}</ox-i18n>
138
+ ${f.visible === false ? html `<span class="eye" title="hidden">⊘</span>` : nothing}
139
+ </div>
140
+ `;
141
+ }
142
+ _faceClass(name) {
143
+ const cls = ['face-poly'];
144
+ if (this._selected === name)
145
+ cls.push('selected');
146
+ if (this._face(name).visible === false)
147
+ cls.push('hidden-face');
148
+ return cls.join(' ');
149
+ }
150
+ _ghostClass(name) {
151
+ const cls = ['face-ghost'];
152
+ if (this._selected === name)
153
+ cls.push('selected');
154
+ if (this._face(name).visible === false)
155
+ cls.push('invisible');
156
+ return cls.join(' ');
157
+ }
158
+ render() {
159
+ var _a, _b, _c, _d, _e, _f;
160
+ const sel = this._face(this._selected);
161
+ return html `
162
+ <div class="cube-picker">
163
+ <svg viewBox="0 0 288 160" aria-label="Backdrop face picker">
164
+ <polygon
165
+ class=${this._faceClass('ceiling')}
166
+ points="90,69 170,69 198,41 118,41"
167
+ fill="${(_a = this._swatchColor('ceiling')) !== null && _a !== void 0 ? _a : '#fff8e1'}"
168
+ @click=${() => this._select('ceiling')}
169
+ />
170
+ <polygon
171
+ class=${this._faceClass('east')}
172
+ points="170,125 198,97 198,41 170,69"
173
+ fill="${(_b = this._swatchColor('east')) !== null && _b !== void 0 ? _b : '#ffcdd2'}"
174
+ @click=${() => this._select('east')}
175
+ />
176
+ <polygon
177
+ class=${this._faceClass('south')}
178
+ points="90,125 170,125 170,69 90,69"
179
+ fill="${(_c = this._swatchColor('south')) !== null && _c !== void 0 ? _c : '#c8e6c9'}"
180
+ @click=${() => this._select('south')}
181
+ />
182
+
183
+ <polygon
184
+ class=${this._ghostClass('north')}
185
+ points="118,97 198,97 198,41 118,41"
186
+ @click=${() => this._select('north')}
187
+ />
188
+ <polygon
189
+ class=${this._ghostClass('west')}
190
+ points="118,97 90,125 90,69 118,41"
191
+ @click=${() => this._select('west')}
192
+ />
193
+ <polygon
194
+ class=${this._ghostClass('floor')}
195
+ points="118,97 198,97 170,125 90,125"
196
+ @click=${() => this._select('floor')}
197
+ />
198
+ </svg>
199
+
200
+ ${this._renderLabel('ceiling', 144, 20)} ${this._renderLabel('floor', 144, 146)}
201
+ ${this._renderLabel('east', 220, 83)} ${this._renderLabel('west', 38, 83)}
202
+ ${this._renderLabel('north', 220, 51)} ${this._renderLabel('south', 38, 115)}
203
+ </div>
204
+
205
+ <div class="face-detail">
206
+ <div class="face-detail-title">
207
+ <span><ox-i18n msgid="label.${this._selected}">${this._selected}</ox-i18n></span>
208
+ <small>${AXIS_LABEL[this._selected]}</small>
209
+ </div>
210
+
211
+ <div class="row">
212
+ <label><ox-i18n msgid="label.visible">visible</ox-i18n></label>
213
+ <div class="ctl">
214
+ <input type="checkbox" ?checked=${sel.visible !== false} @change=${this._onVisibleChange} />
215
+ </div>
216
+ </div>
217
+
218
+ <div class="fill-row">
219
+ <restful-input-fill-style .value=${sel.fillStyle} @change=${this._onFillStyleChange}>
220
+ </restful-input-fill-style>
221
+ </div>
222
+
223
+ <div class="row">
224
+ <label><ox-i18n msgid="label.alpha">alpha</ox-i18n></label>
225
+ <div class="ctl">
226
+ <input
227
+ type="range"
228
+ min="0"
229
+ max="1"
230
+ step="0.05"
231
+ .value=${String((_d = sel.alpha) !== null && _d !== void 0 ? _d : 1)}
232
+ @input=${this._onAlphaChange}
233
+ />
234
+ <span class="alpha-readout">${((_e = sel.alpha) !== null && _e !== void 0 ? _e : 1).toFixed(2)}</span>
235
+ </div>
236
+ </div>
237
+
238
+ <div class="row">
239
+ <label><ox-i18n msgid="label.rotation">rotation</ox-i18n></label>
240
+ <div class="ctl">
241
+ <select .value=${String((_f = sel.rotation) !== null && _f !== void 0 ? _f : 0)} @change=${this._onRotationChange}>
242
+ <option value="0">0°</option>
243
+ <option value="90">90°</option>
244
+ <option value="180">180°</option>
245
+ <option value="270">270°</option>
246
+ </select>
247
+ <label class="mirror-toggle">
248
+ <input type="checkbox" ?checked=${sel.mirror === true} @change=${this._onMirrorChange} />
249
+ <ox-i18n msgid="label.mirror">mirror</ox-i18n>
250
+ </label>
251
+ </div>
252
+ </div>
253
+
254
+ <div class="actions">
255
+ <button @click=${this._copyToOpposite} title="Copy current face to opposite">
256
+ ↔ <ox-i18n msgid="label.copy-to-opposite">opposite</ox-i18n>
257
+ </button>
258
+ <button @click=${this._copyToAllWalls} title="Copy current face to all 4 walls">
259
+ <ox-i18n msgid="label.copy-to-walls">all walls</ox-i18n>
260
+ </button>
261
+ </div>
262
+ </div>
263
+ `;
264
+ }
265
+ };
266
+ RestfulInputBackdropFaces.styles = css `
267
+ :host {
268
+ display: block;
269
+ font: 12px Arial, sans-serif;
270
+ }
271
+
272
+ .cube-picker {
273
+ position: relative;
274
+ width: 100%;
275
+ max-width: 260px;
276
+ height: 160px;
277
+ margin: 0 auto 8px;
278
+ }
279
+ .cube-picker svg {
280
+ display: block;
281
+ width: 100%;
282
+ height: 100%;
283
+ overflow: visible;
284
+ }
285
+
286
+ .face-poly {
287
+ cursor: pointer;
288
+ stroke: #3a3f4a;
289
+ stroke-width: 1;
290
+ stroke-linejoin: round;
291
+ transition:
292
+ filter 0.15s,
293
+ stroke 0.15s,
294
+ stroke-width 0.15s;
295
+ }
296
+ .face-poly:hover {
297
+ filter: brightness(1.15);
298
+ }
299
+ .face-poly.selected {
300
+ stroke: var(--md-sys-color-primary, #e15c5c);
301
+ stroke-width: 2.5;
302
+ }
303
+ .face-poly.hidden-face {
304
+ stroke-dasharray: 3 2;
305
+ opacity: 0.4;
306
+ }
307
+
308
+ .face-ghost {
309
+ cursor: pointer;
310
+ fill: none;
311
+ stroke: #8a93a6;
312
+ stroke-width: 1;
313
+ stroke-dasharray: 3 3;
314
+ stroke-linejoin: round;
315
+ opacity: 0.4;
316
+ pointer-events: stroke;
317
+ transition:
318
+ stroke 0.15s,
319
+ stroke-width 0.15s,
320
+ opacity 0.15s;
321
+ }
322
+ .face-ghost:hover {
323
+ opacity: 0.85;
324
+ stroke: var(--md-sys-color-primary, #e15c5c);
325
+ }
326
+ .face-ghost.selected {
327
+ stroke: var(--md-sys-color-primary, #e15c5c);
328
+ stroke-width: 2;
329
+ opacity: 1;
330
+ }
331
+ .face-ghost.invisible {
332
+ opacity: 0.2;
333
+ }
334
+
335
+ .face-label {
336
+ position: absolute;
337
+ display: inline-flex;
338
+ align-items: center;
339
+ gap: 4px;
340
+ padding: 2px 6px 2px 4px;
341
+ font: 600 10px Arial, sans-serif;
342
+ background: var(--md-sys-color-surface, #fff);
343
+ border: 1px solid var(--md-sys-color-outline-variant, #d8dde6);
344
+ border-radius: 10px;
345
+ cursor: pointer;
346
+ user-select: none;
347
+ transform: translate(-50%, -50%);
348
+ white-space: nowrap;
349
+ transition:
350
+ border-color 0.15s,
351
+ background 0.15s,
352
+ color 0.15s;
353
+ text-transform: capitalize;
354
+ }
355
+ .face-label:hover {
356
+ border-color: var(--md-sys-color-primary, #e15c5c);
357
+ }
358
+ .face-label.selected {
359
+ border-color: var(--md-sys-color-primary, #e15c5c);
360
+ background: var(--md-sys-color-primary-container, #fde7e7);
361
+ color: var(--md-sys-color-on-primary-container, #b91c1c);
362
+ }
363
+ .face-label .swatch {
364
+ width: 12px;
365
+ height: 12px;
366
+ border-radius: 2px;
367
+ border: 1px solid rgba(0, 0, 0, 0.15);
368
+ flex: none;
369
+ }
370
+ .face-label .swatch[data-empty] {
371
+ background: repeating-linear-gradient(45deg, #fff, #fff 2px, #ccc 2px, #ccc 4px);
372
+ }
373
+ .face-label .eye {
374
+ font-size: 9px;
375
+ opacity: 0.55;
376
+ margin-left: 1px;
377
+ }
378
+
379
+ .face-detail {
380
+ border-top: 1px dashed var(--md-sys-color-outline-variant, #d8dde6);
381
+ padding-top: 10px;
382
+ margin-top: 4px;
383
+ }
384
+ .face-detail-title {
385
+ display: flex;
386
+ justify-content: space-between;
387
+ align-items: baseline;
388
+ font-weight: 600;
389
+ font-size: 11px;
390
+ color: var(--md-sys-color-primary, #e15c5c);
391
+ text-transform: uppercase;
392
+ letter-spacing: 0.5px;
393
+ margin-bottom: 8px;
394
+ }
395
+ .face-detail-title small {
396
+ font-weight: 400;
397
+ text-transform: none;
398
+ letter-spacing: 0;
399
+ color: var(--md-sys-color-on-secondary-container, #8a93a6);
400
+ font: 10px monospace;
401
+ }
402
+
403
+ .row {
404
+ display: grid;
405
+ grid-template-columns: 60px 1fr;
406
+ gap: 8px;
407
+ align-items: center;
408
+ margin-bottom: 6px;
409
+ }
410
+ .row > label {
411
+ text-align: right;
412
+ font-size: 11px;
413
+ color: var(--md-sys-color-on-secondary-container, #6b7280);
414
+ }
415
+ .row .ctl {
416
+ display: flex;
417
+ align-items: center;
418
+ gap: 6px;
419
+ }
420
+ .ctl input[type='range'] {
421
+ flex: 1;
422
+ accent-color: var(--md-sys-color-primary, #e15c5c);
423
+ }
424
+ .ctl input[type='checkbox'] {
425
+ accent-color: var(--md-sys-color-primary, #e15c5c);
426
+ }
427
+ .alpha-readout {
428
+ width: 30px;
429
+ text-align: right;
430
+ font: 11px monospace;
431
+ }
432
+
433
+ .row select,
434
+ .row .mirror-toggle {
435
+ font: 10px Arial, sans-serif;
436
+ padding: 5px 6px;
437
+ border: 1px solid var(--md-sys-color-outline-variant, #d8dde6);
438
+ border-radius: 4px;
439
+ background: var(--md-sys-color-surface, #fff);
440
+ color: inherit;
441
+ cursor: pointer;
442
+ }
443
+ .row select {
444
+ flex: 1;
445
+ outline: none;
446
+ }
447
+ .row select:hover,
448
+ .row .mirror-toggle:hover {
449
+ border-color: var(--md-sys-color-primary, #e15c5c);
450
+ color: var(--md-sys-color-primary, #e15c5c);
451
+ }
452
+ .row .mirror-toggle {
453
+ display: inline-flex;
454
+ align-items: center;
455
+ gap: 4px;
456
+ }
457
+ .row .mirror-toggle input[type='checkbox'] {
458
+ margin: 0;
459
+ }
460
+
461
+ .fill-row {
462
+ margin-bottom: 6px;
463
+ }
464
+ restful-input-fill-style {
465
+ font: 12px Arial, sans-serif;
466
+ display: block;
467
+ }
468
+
469
+ .actions {
470
+ margin-top: 8px;
471
+ display: flex;
472
+ gap: 6px;
473
+ }
474
+ .actions button {
475
+ flex: 1;
476
+ font: 10px Arial, sans-serif;
477
+ padding: 5px 6px;
478
+ border: 1px solid var(--md-sys-color-outline-variant, #d8dde6);
479
+ border-radius: 4px;
480
+ background: var(--md-sys-color-surface, #fff);
481
+ color: inherit;
482
+ cursor: pointer;
483
+ }
484
+ .actions button:hover {
485
+ border-color: var(--md-sys-color-primary, #e15c5c);
486
+ color: var(--md-sys-color-primary, #e15c5c);
487
+ }
488
+ `;
489
+ __decorate([
490
+ property({ type: Object })
491
+ ], RestfulInputBackdropFaces.prototype, "value", void 0);
492
+ __decorate([
493
+ state()
494
+ ], RestfulInputBackdropFaces.prototype, "_selected", void 0);
495
+ RestfulInputBackdropFaces = __decorate([
496
+ customElement('restful-input-backdrop-faces')
497
+ ], RestfulInputBackdropFaces);
498
+ export { RestfulInputBackdropFaces };
499
+ let RestfulPropertyEditorBackdropFaces = class RestfulPropertyEditorBackdropFaces extends OxPropertyEditor {
500
+ editorTemplate(value, spec) {
501
+ const { fullwidth = true } = spec.editor || {};
502
+ return html `
503
+ <restful-input-backdrop-faces
504
+ id="editor"
505
+ .value=${value}
506
+ ?fullwidth=${fullwidth}
507
+ ?disabled=${this.disabled}
508
+ ></restful-input-backdrop-faces>
509
+ `;
510
+ }
511
+ };
512
+ RestfulPropertyEditorBackdropFaces.styles = [
513
+ ...OxPropertyEditor.styles,
514
+ css `
515
+ restful-input-backdrop-faces#editor {
516
+ font: 12px Arial, sans-serif;
517
+ }
518
+ `
519
+ ];
520
+ RestfulPropertyEditorBackdropFaces = __decorate([
521
+ customElement('restful-property-editor-backdrop-faces')
522
+ ], RestfulPropertyEditorBackdropFaces);
523
+ export { RestfulPropertyEditorBackdropFaces };
524
+ //# sourceMappingURL=restful-property-editor-backdrop-faces.js.map