@composy/layout-vue 0.0.1 → 0.0.2

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 (157) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/README.md +82 -75
  3. package/dist/index.css +9 -3
  4. package/dist/index.js +22 -11
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.css +1 -1
  7. package/dist/index.min.js +2038 -1
  8. package/dist/index.min.js.map +1 -0
  9. package/es/.dts-output-manifest.json +1 -0
  10. package/es/.dts.tsbuildinfo +1 -0
  11. package/es/components/LGrid.d.ts +0 -1
  12. package/es/components/LGrid.js +3 -3
  13. package/es/components/LGrid.js.map +1 -1
  14. package/es/components/LGridItem.d.ts +0 -1
  15. package/es/components/LGridItem.d.ts.map +1 -1
  16. package/es/components/LGridItem.js +4 -2
  17. package/es/components/LGridItem.js.map +1 -1
  18. package/es/components/LLayoutEditor.d.ts +5 -5
  19. package/es/components/LLayoutEditor.d.ts.map +1 -1
  20. package/es/components/LLayoutEditor.js +2 -2
  21. package/es/components/LLayoutEditor.js.map +1 -1
  22. package/es/components/LLayoutWorkspace.js +1 -1
  23. package/es/components/LLayoutWorkspace.js.map +1 -1
  24. package/es/components/LLayoutWorkspace.vue_vue_type_script_setup_true_lang.js +8 -5
  25. package/es/components/LLayoutWorkspace.vue_vue_type_script_setup_true_lang.js.map +1 -1
  26. package/es/components/LMaterialDragSource.d.ts +0 -1
  27. package/es/components/LMaterialDragSource.js +1 -1
  28. package/es/components/LMaterialRenderer.d.ts +0 -1
  29. package/es/components/LMaterialRenderer.js +1 -1
  30. package/es/components/LMetricCard.d.ts +0 -1
  31. package/es/components/LMetricCard.js +1 -1
  32. package/es/components/LTrendCard.d.ts +0 -1
  33. package/es/components/LTrendCard.js +1 -1
  34. package/es/components/index.d.ts +0 -1
  35. package/es/components/index.js +3 -3
  36. package/es/components/material-renderer.d.ts +0 -1
  37. package/es/components/material-renderer.d.ts.map +1 -1
  38. package/es/components/material-renderer.js +10 -3
  39. package/es/components/material-renderer.js.map +1 -1
  40. package/es/composables/index.d.ts +0 -1
  41. package/es/composables/index.js +1 -1
  42. package/es/composables/useLayoutEditor.d.ts +0 -1
  43. package/es/composables/useLayoutEditor.js +1 -1
  44. package/es/index.d.ts +0 -1
  45. package/es/index.js +3 -5
  46. package/es/style/css.js +1 -1
  47. package/es/style/index.css +1 -0
  48. package/es/style/index.js +1 -1
  49. package/es/style/workspace.css +18 -2
  50. package/es/types.d.ts +0 -1
  51. package/es/types.js +1 -1
  52. package/esm/components/LGrid.d.ts.map +1 -0
  53. package/esm/components/LGrid.js +91 -0
  54. package/esm/components/LGrid.js.map +1 -0
  55. package/esm/components/LGridItem.d.ts.map +1 -0
  56. package/esm/components/LGridItem.js +54 -0
  57. package/esm/components/LGridItem.js.map +1 -0
  58. package/esm/components/LLayoutEditor.d.ts +50 -0
  59. package/esm/components/LLayoutEditor.d.ts.map +1 -0
  60. package/esm/components/LLayoutEditor.js +81 -0
  61. package/esm/components/LLayoutEditor.js.map +1 -0
  62. package/esm/components/LLayoutWorkspace.js +17 -0
  63. package/esm/components/LLayoutWorkspace.js.map +1 -0
  64. package/esm/components/LLayoutWorkspace.vue_vue_type_script_setup_true_lang.js +2220 -0
  65. package/esm/components/LLayoutWorkspace.vue_vue_type_script_setup_true_lang.js.map +1 -0
  66. package/esm/components/LMaterialDragSource.d.ts.map +1 -0
  67. package/esm/components/LMaterialDragSource.js +92 -0
  68. package/esm/components/LMaterialDragSource.js.map +1 -0
  69. package/esm/components/LMaterialRenderer.d.ts.map +1 -0
  70. package/esm/components/LMaterialRenderer.js +48 -0
  71. package/esm/components/LMaterialRenderer.js.map +1 -0
  72. package/esm/components/LMetricCard.d.ts.map +1 -0
  73. package/esm/components/LMetricCard.js +39 -0
  74. package/esm/components/LMetricCard.js.map +1 -0
  75. package/esm/components/LTrendCard.d.ts.map +1 -0
  76. package/esm/components/LTrendCard.js +36 -0
  77. package/esm/components/LTrendCard.js.map +1 -0
  78. package/esm/components/index.d.ts.map +1 -0
  79. package/esm/components/index.js +19 -0
  80. package/esm/components/material-renderer.d.ts.map +1 -0
  81. package/esm/components/material-renderer.js +103 -0
  82. package/esm/components/material-renderer.js.map +1 -0
  83. package/esm/composables/index.d.ts.map +1 -0
  84. package/esm/composables/index.js +12 -0
  85. package/esm/composables/useLayoutEditor.d.ts.map +1 -0
  86. package/esm/composables/useLayoutEditor.js +22 -0
  87. package/esm/composables/useLayoutEditor.js.map +1 -0
  88. package/esm/index.d.ts.map +1 -0
  89. package/esm/index.js +22 -0
  90. package/esm/style/css.js +1 -0
  91. package/esm/style/index.js +1 -0
  92. package/{es → esm}/style/index.less +1 -1
  93. package/esm/style/workspace.css +2379 -0
  94. package/esm/types.d.ts.map +1 -0
  95. package/esm/types.js +10 -0
  96. package/lib/components/LGrid.cjs +3 -3
  97. package/lib/components/LGrid.cjs.map +1 -1
  98. package/lib/components/LGrid.d.cts +2 -0
  99. package/lib/components/LGrid.d.cts.map +1 -0
  100. package/lib/components/LGridItem.cjs +4 -2
  101. package/lib/components/LGridItem.cjs.map +1 -1
  102. package/lib/components/LGridItem.d.cts +51 -0
  103. package/lib/components/LGridItem.d.cts.map +1 -0
  104. package/lib/components/LLayoutEditor.cjs +2 -2
  105. package/lib/components/LLayoutEditor.cjs.map +1 -1
  106. package/lib/components/{LLayoutEditor.d.ts → LLayoutEditor.d.cts} +5 -5
  107. package/lib/components/LLayoutEditor.d.cts.map +1 -0
  108. package/lib/components/LLayoutWorkspace.cjs +1 -1
  109. package/lib/components/LLayoutWorkspace.cjs.map +1 -1
  110. package/lib/components/LLayoutWorkspace.vue_vue_type_script_setup_true_lang.cjs +8 -5
  111. package/lib/components/LLayoutWorkspace.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  112. package/lib/components/LMaterialDragSource.cjs +1 -1
  113. package/lib/components/LMaterialDragSource.d.cts +54 -0
  114. package/lib/components/LMaterialDragSource.d.cts.map +1 -0
  115. package/lib/components/LMaterialRenderer.cjs +1 -1
  116. package/lib/components/LMaterialRenderer.d.cts +62 -0
  117. package/lib/components/LMaterialRenderer.d.cts.map +1 -0
  118. package/lib/components/LMetricCard.cjs +1 -1
  119. package/lib/components/LMetricCard.d.cts +28 -0
  120. package/lib/components/LMetricCard.d.cts.map +1 -0
  121. package/lib/components/LTrendCard.cjs +1 -1
  122. package/lib/components/LTrendCard.d.cts +16 -0
  123. package/lib/components/LTrendCard.d.cts.map +1 -0
  124. package/lib/components/index.cjs +1 -1
  125. package/lib/components/index.d.cts +9 -0
  126. package/lib/components/index.d.cts.map +1 -0
  127. package/lib/components/material-renderer.cjs +10 -3
  128. package/lib/components/material-renderer.cjs.map +1 -1
  129. package/lib/components/material-renderer.d.cts +25 -0
  130. package/lib/components/material-renderer.d.cts.map +1 -0
  131. package/lib/composables/index.cjs +1 -1
  132. package/lib/composables/index.d.cts +1 -0
  133. package/lib/composables/index.d.cts.map +1 -0
  134. package/lib/composables/useLayoutEditor.cjs +1 -1
  135. package/lib/composables/useLayoutEditor.d.cts +2 -0
  136. package/lib/composables/useLayoutEditor.d.cts.map +1 -0
  137. package/lib/index.cjs +1 -1
  138. package/lib/index.d.cts +6 -0
  139. package/lib/index.d.cts.map +1 -0
  140. package/lib/style/index.css +0 -1
  141. package/lib/style/workspace.css +9 -1
  142. package/lib/types.cjs +1 -1
  143. package/lib/types.d.cts +25 -0
  144. package/lib/types.d.cts.map +1 -0
  145. package/package.json +25 -18
  146. /package/{lib → esm}/components/LGrid.d.ts +0 -0
  147. /package/{lib → esm}/components/LGridItem.d.ts +0 -0
  148. /package/{lib → esm}/components/LMaterialDragSource.d.ts +0 -0
  149. /package/{lib → esm}/components/LMaterialRenderer.d.ts +0 -0
  150. /package/{lib → esm}/components/LMetricCard.d.ts +0 -0
  151. /package/{lib → esm}/components/LTrendCard.d.ts +0 -0
  152. /package/{lib → esm}/components/index.d.ts +0 -0
  153. /package/{lib → esm}/components/material-renderer.d.ts +0 -0
  154. /package/{lib → esm}/composables/index.d.ts +0 -0
  155. /package/{lib → esm}/composables/useLayoutEditor.d.ts +0 -0
  156. /package/{lib → esm}/index.d.ts +0 -0
  157. /package/{lib → esm}/types.d.ts +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EACV,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AAExE,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,UAAU,CAAA;IAChB,SAAS,EAAE,eAAe,CAAA;IAC1B,YAAY,EAAE,MAAM,CAAA;CACrB;AACD,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,cAAc,CAAA;IACxB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,gBAAgB,GAAG,SAAS,kBAAkB,EAAE,CAAA;IAC5D,MAAM,CAAC,EAAE,kBAAkB,CAAA;CAC5B;AACD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,cAAc,CAAA;IACxB,MAAM,EAAE,kBAAkB,CAAA;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,CAAA;IACtC,OAAO,CAAC,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAA;IACxC,SAAS,CAAC,EAAE,gBAAgB,GAAG,SAAS,kBAAkB,EAAE,CAAA;CAC7D;AACD,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,YAAY,CAAA;CACrB"}
package/esm/types.js ADDED
@@ -0,0 +1,10 @@
1
+ /*!
2
+ * ***********************************
3
+ * @composy/layout-vue v0.0.1 *
4
+ * Built with rollup *
5
+ * Build time: 2024-10-12 17:52:50 *
6
+ * Build mode: production *
7
+ * Minified: No *
8
+ * ***********************************
9
+ */
10
+ /*! End of @composy/layout-vue | Powered by @composy/builder */
@@ -2,7 +2,7 @@
2
2
  * ***********************************
3
3
  * @composy/layout-vue v0.0.1 *
4
4
  * Built with rollup *
5
- * Build time: 2024-08-17 11:47:09 *
5
+ * Build time: 2024-10-12 17:52:50 *
6
6
  * Build mode: production *
7
7
  * Minified: No *
8
8
  * ***********************************
@@ -56,8 +56,8 @@ const LGrid = (0, vue.defineComponent)({
56
56
  resize();
57
57
  });
58
58
  (0, vue.onBeforeUnmount)(() => observer?.disconnect());
59
- (0, vue.watch)(() => props.breakpoint, (value) => {
60
- activeBreakpoint.value = value ?? props.document.defaultBreakpointId;
59
+ (0, vue.watch)(() => [props.breakpoint, props.document.defaultBreakpointId], ([value, defaultBreakpoint]) => {
60
+ activeBreakpoint.value = value ?? defaultBreakpoint;
61
61
  });
62
62
  expose({ getBreakpoint: () => activeBreakpoint.value });
63
63
  return () => (0, vue.h)("div", {
@@ -1 +1 @@
1
- {"version":3,"file":"LGrid.cjs","names":[],"sources":["../../src/components/LGrid.ts"],"sourcesContent":["import {\n computed,\n defineComponent,\n h,\n onBeforeUnmount,\n onMounted,\n ref,\n type PropType,\n watch,\n} from 'vue'\nimport { resolveGridStyle, resolveItemStyle } from '@composy/layout-runtime'\nimport type { LGridProps } from '../types'\nimport {\n renderMaterialForTarget,\n type VueMaterialSource,\n} from './material-renderer'\n\nexport const LGrid = defineComponent<LGridProps>({\n name: 'LGrid',\n props: {\n document: { type: Object, required: true },\n breakpoint: { type: String, default: undefined },\n readonly: { type: Boolean, default: false },\n materials: {\n type: [Object, Array] as PropType<VueMaterialSource>,\n default: undefined,\n },\n target: { type: String, default: 'vue' },\n },\n setup(props, { slots, expose }) {\n const root = ref<HTMLElement>()\n const activeBreakpoint = ref(\n props.breakpoint ?? props.document.defaultBreakpointId\n )\n const resolved = computed(\n () =>\n props.document.breakpoints.find(\n bp => bp.id === activeBreakpoint.value\n ) ?? props.document.breakpoints[0]\n )\n const gridStyle = computed(() =>\n resolveGridStyle(props.document, resolved.value.id)\n )\n const resize = () => {\n if (props.breakpoint || !root.value) return\n const width = root.value.getBoundingClientRect().width\n const match = props.document.breakpoints.find(\n bp =>\n (bp.minWidth === undefined || width >= bp.minWidth) &&\n (bp.maxWidth === undefined || width < bp.maxWidth)\n )\n activeBreakpoint.value = match?.id ?? props.document.defaultBreakpointId\n }\n let observer: ResizeObserver | undefined\n onMounted(() => {\n if (typeof ResizeObserver !== 'undefined' && root.value) {\n observer = new ResizeObserver(resize)\n observer.observe(root.value)\n }\n resize()\n })\n onBeforeUnmount(() => observer?.disconnect())\n watch(\n () => props.breakpoint,\n value => {\n activeBreakpoint.value = value ?? props.document.defaultBreakpointId\n }\n )\n expose({ getBreakpoint: () => activeBreakpoint.value })\n return () =>\n h(\n 'div',\n {\n ref: root,\n class: 'ldesign-layout-grid',\n style: gridStyle.value,\n dir: gridStyle.value.direction,\n },\n props.document.items.map(item => {\n const placement = item.layout[activeBreakpoint.value]\n if (!placement || placement.hidden) return null\n return h(\n 'div',\n {\n class: 'ldesign-layout-item',\n 'data-layout-item-id': item.id,\n 'data-layout-type': item.type,\n style: resolveItemStyle(item, activeBreakpoint.value),\n tabindex: props.readonly ? undefined : 0,\n },\n slots.item?.({\n item,\n placement,\n breakpointId: activeBreakpoint.value,\n }) ??\n slots.default?.({\n item,\n placement,\n breakpointId: activeBreakpoint.value,\n }) ??\n renderMaterialForTarget(\n props.materials as VueMaterialSource,\n item,\n props.target as 'vue' | 'webcomponent',\n placement,\n activeBreakpoint.value\n )\n )\n })\n )\n },\n})\n"],"mappings":";;;;;;;;;;;;;;AAiBO,MAAM,SAAA,GAAA,IAAA,gBAAA,CAAoC;CAC/C,MAAM;CACN,OAAO;EACL,UAAU;GAAE,MAAM;GAAQ,UAAU;EAAK;EACzC,YAAY;GAAE,MAAM;GAAQ,SAAS,KAAA;EAAU;EAC/C,UAAU;GAAE,MAAM;GAAS,SAAS;EAAM;EAC1C,WAAW;GACT,MAAM,CAAC,QAAQ,KAAK;GACpB,SAAS,KAAA;EACX;EACA,QAAQ;GAAE,MAAM;GAAQ,SAAS;EAAM;CACzC;CACA,MAAM,OAAO,EAAE,OAAO,UAAU;EAC9B,MAAM,QAAA,GAAA,IAAA,IAAA,CAAwB;EAC9B,MAAM,oBAAA,GAAA,IAAA,IAAA,CACJ,MAAM,cAAc,MAAM,SAAS,mBACrC;EACA,MAAM,YAAA,GAAA,IAAA,SAAA,OAEF,MAAM,SAAS,YAAY,MACzB,OAAM,GAAG,OAAO,iBAAiB,KACnC,KAAK,MAAM,SAAS,YAAY,EACpC;EACA,MAAM,aAAA,GAAA,IAAA,SAAA,QAAA,GAAA,wBAAA,iBAAA,CACa,MAAM,UAAU,SAAS,MAAM,EAAE,CACpD;EACA,MAAM,eAAe;GACnB,IAAI,MAAM,cAAc,CAAC,KAAK,OAAO;GACrC,MAAM,QAAQ,KAAK,MAAM,sBAAsB,CAAA,CAAE;GACjD,MAAM,QAAQ,MAAM,SAAS,YAAY,MACvC,QACG,GAAG,aAAa,KAAA,KAAa,SAAS,GAAG,cACzC,GAAG,aAAa,KAAA,KAAa,QAAQ,GAAG,SAC7C;GACA,iBAAiB,QAAQ,OAAO,MAAM,MAAM,SAAS;EACvD;EACA,IAAI;EACJ,CAAA,GAAA,IAAA,UAAA,OAAgB;GACd,IAAI,OAAO,mBAAmB,eAAe,KAAK,OAAO;IACvD,WAAW,IAAI,eAAe,MAAM;IACpC,SAAS,QAAQ,KAAK,KAAK;GAC7B;GACA,OAAO;EACT,CAAC;EACD,CAAA,GAAA,IAAA,gBAAA,OAAsB,UAAU,WAAW,CAAC;EAC5C,CAAA,GAAA,IAAA,MAAA,OACQ,MAAM,aACZ,UAAS;GACP,iBAAiB,QAAQ,SAAS,MAAM,SAAS;EACnD,CACF;EACA,OAAO,EAAE,qBAAqB,iBAAiB,MAAM,CAAC;EACtD,cAAA,GAAA,IAAA,EAAA,CAEI,OACA;GACE,KAAK;GACL,OAAO;GACP,OAAO,UAAU;GACjB,KAAK,UAAU,MAAM;EACvB,GACA,MAAM,SAAS,MAAM,KAAI,SAAQ;GAC/B,MAAM,YAAY,KAAK,OAAO,iBAAiB;GAC/C,IAAI,CAAC,aAAa,UAAU,QAAQ,OAAO;GAC3C,QAAA,GAAA,IAAA,EAAA,CACE,OACA;IACE,OAAO;IACP,uBAAuB,KAAK;IAC5B,oBAAoB,KAAK;IACzB,QAAA,GAAA,wBAAA,iBAAA,CAAwB,MAAM,iBAAiB,KAAK;IACpD,UAAU,MAAM,WAAW,KAAA,IAAY;GACzC,GACA,MAAM,OAAO;IACX;IACA;IACA,cAAc,iBAAiB;GACjC,CAAC,KACC,MAAM,UAAU;IACd;IACA;IACA,cAAc,iBAAiB;GACjC,CAAC,KACD,0BAAA,wBACE,MAAM,WACN,MACA,MAAM,QACN,WACA,iBAAiB,KACnB,CACJ;EACF,CAAC,CACH;CACJ;AACF,CAAC"}
1
+ {"version":3,"file":"LGrid.cjs","names":[],"sources":["../../src/components/LGrid.ts"],"sourcesContent":["import {\n computed,\n defineComponent,\n h,\n onBeforeUnmount,\n onMounted,\n ref,\n type PropType,\n watch,\n} from 'vue'\nimport { resolveGridStyle, resolveItemStyle } from '@composy/layout-runtime'\nimport type { LGridProps } from '../types'\nimport {\n renderMaterialForTarget,\n type VueMaterialSource,\n} from './material-renderer'\n\nexport const LGrid = defineComponent<LGridProps>({\n name: 'LGrid',\n props: {\n document: { type: Object, required: true },\n breakpoint: { type: String, default: undefined },\n readonly: { type: Boolean, default: false },\n materials: {\n type: [Object, Array] as PropType<VueMaterialSource>,\n default: undefined,\n },\n target: { type: String, default: 'vue' },\n },\n setup(props, { slots, expose }) {\n const root = ref<HTMLElement>()\n const activeBreakpoint = ref(\n props.breakpoint ?? props.document.defaultBreakpointId\n )\n const resolved = computed(\n () =>\n props.document.breakpoints.find(\n bp => bp.id === activeBreakpoint.value\n ) ?? props.document.breakpoints[0]\n )\n const gridStyle = computed(() =>\n resolveGridStyle(props.document, resolved.value.id)\n )\n const resize = () => {\n if (props.breakpoint || !root.value) return\n const width = root.value.getBoundingClientRect().width\n const match = props.document.breakpoints.find(\n bp =>\n (bp.minWidth === undefined || width >= bp.minWidth) &&\n (bp.maxWidth === undefined || width < bp.maxWidth)\n )\n activeBreakpoint.value = match?.id ?? props.document.defaultBreakpointId\n }\n let observer: ResizeObserver | undefined\n onMounted(() => {\n if (typeof ResizeObserver !== 'undefined' && root.value) {\n observer = new ResizeObserver(resize)\n observer.observe(root.value)\n }\n resize()\n })\n onBeforeUnmount(() => observer?.disconnect())\n watch(\n () => [props.breakpoint, props.document.defaultBreakpointId],\n ([value, defaultBreakpoint]) => {\n activeBreakpoint.value = value ?? defaultBreakpoint\n }\n )\n expose({ getBreakpoint: () => activeBreakpoint.value })\n return () =>\n h(\n 'div',\n {\n ref: root,\n class: 'ldesign-layout-grid',\n style: gridStyle.value,\n dir: gridStyle.value.direction,\n },\n props.document.items.map(item => {\n const placement = item.layout[activeBreakpoint.value]\n if (!placement || placement.hidden) return null\n return h(\n 'div',\n {\n class: 'ldesign-layout-item',\n 'data-layout-item-id': item.id,\n 'data-layout-type': item.type,\n style: resolveItemStyle(item, activeBreakpoint.value),\n tabindex: props.readonly ? undefined : 0,\n },\n slots.item?.({\n item,\n placement,\n breakpointId: activeBreakpoint.value,\n }) ??\n slots.default?.({\n item,\n placement,\n breakpointId: activeBreakpoint.value,\n }) ??\n renderMaterialForTarget(\n props.materials as VueMaterialSource,\n item,\n props.target as 'vue' | 'webcomponent',\n placement,\n activeBreakpoint.value\n )\n )\n })\n )\n },\n})\n"],"mappings":";;;;;;;;;;;;;;AAiBO,MAAM,SAAA,GAAA,IAAA,gBAAA,CAAoC;CAC/C,MAAM;CACN,OAAO;EACL,UAAU;GAAE,MAAM;GAAQ,UAAU;EAAK;EACzC,YAAY;GAAE,MAAM;GAAQ,SAAS,KAAA;EAAU;EAC/C,UAAU;GAAE,MAAM;GAAS,SAAS;EAAM;EAC1C,WAAW;GACT,MAAM,CAAC,QAAQ,KAAK;GACpB,SAAS,KAAA;EACX;EACA,QAAQ;GAAE,MAAM;GAAQ,SAAS;EAAM;CACzC;CACA,MAAM,OAAO,EAAE,OAAO,UAAU;EAC9B,MAAM,QAAA,GAAA,IAAA,IAAA,CAAwB;EAC9B,MAAM,oBAAA,GAAA,IAAA,IAAA,CACJ,MAAM,cAAc,MAAM,SAAS,mBACrC;EACA,MAAM,YAAA,GAAA,IAAA,SAAA,OAEF,MAAM,SAAS,YAAY,MACzB,OAAM,GAAG,OAAO,iBAAiB,KACnC,KAAK,MAAM,SAAS,YAAY,EACpC;EACA,MAAM,aAAA,GAAA,IAAA,SAAA,QAAA,GAAA,wBAAA,iBAAA,CACa,MAAM,UAAU,SAAS,MAAM,EAAE,CACpD;EACA,MAAM,eAAe;GACnB,IAAI,MAAM,cAAc,CAAC,KAAK,OAAO;GACrC,MAAM,QAAQ,KAAK,MAAM,sBAAsB,CAAA,CAAE;GACjD,MAAM,QAAQ,MAAM,SAAS,YAAY,MACvC,QACG,GAAG,aAAa,KAAA,KAAa,SAAS,GAAG,cACzC,GAAG,aAAa,KAAA,KAAa,QAAQ,GAAG,SAC7C;GACA,iBAAiB,QAAQ,OAAO,MAAM,MAAM,SAAS;EACvD;EACA,IAAI;EACJ,CAAA,GAAA,IAAA,UAAA,OAAgB;GACd,IAAI,OAAO,mBAAmB,eAAe,KAAK,OAAO;IACvD,WAAW,IAAI,eAAe,MAAM;IACpC,SAAS,QAAQ,KAAK,KAAK;GAC7B;GACA,OAAO;EACT,CAAC;EACD,CAAA,GAAA,IAAA,gBAAA,OAAsB,UAAU,WAAW,CAAC;EAC5C,CAAA,GAAA,IAAA,MAAA,OACQ,CAAC,MAAM,YAAY,MAAM,SAAS,mBAAmB,IAC1D,CAAC,OAAO,uBAAuB;GAC9B,iBAAiB,QAAQ,SAAS;EACpC,CACF;EACA,OAAO,EAAE,qBAAqB,iBAAiB,MAAM,CAAC;EACtD,cAAA,GAAA,IAAA,EAAA,CAEI,OACA;GACE,KAAK;GACL,OAAO;GACP,OAAO,UAAU;GACjB,KAAK,UAAU,MAAM;EACvB,GACA,MAAM,SAAS,MAAM,KAAI,SAAQ;GAC/B,MAAM,YAAY,KAAK,OAAO,iBAAiB;GAC/C,IAAI,CAAC,aAAa,UAAU,QAAQ,OAAO;GAC3C,QAAA,GAAA,IAAA,EAAA,CACE,OACA;IACE,OAAO;IACP,uBAAuB,KAAK;IAC5B,oBAAoB,KAAK;IACzB,QAAA,GAAA,wBAAA,iBAAA,CAAwB,MAAM,iBAAiB,KAAK;IACpD,UAAU,MAAM,WAAW,KAAA,IAAY;GACzC,GACA,MAAM,OAAO;IACX;IACA;IACA,cAAc,iBAAiB;GACjC,CAAC,KACC,MAAM,UAAU;IACd;IACA;IACA,cAAc,iBAAiB;GACjC,CAAC,KACD,0BAAA,wBACE,MAAM,WACN,MACA,MAAM,QACN,WACA,iBAAiB,KACnB,CACJ;EACF,CAAC,CACH;CACJ;AACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { LGridProps } from '../types';
2
+ export declare const LGrid: import("vue").DefineComponent<LGridProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LGridProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LGrid.d.cts","sourceRoot":"","sources":["../../src/components/LGrid.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAM1C,eAAO,MAAM,KAAK,gSA8FhB,CAAA"}
@@ -2,7 +2,7 @@
2
2
  * ***********************************
3
3
  * @composy/layout-vue v0.0.1 *
4
4
  * Built with rollup *
5
- * Build time: 2024-08-17 11:47:09 *
5
+ * Build time: 2024-10-12 17:52:50 *
6
6
  * Build mode: production *
7
7
  * Minified: No *
8
8
  * ***********************************
@@ -10,6 +10,7 @@
10
10
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
11
11
  const require_material_renderer = require("./material-renderer.cjs");
12
12
  let vue = require("vue");
13
+ let _composy_layout_runtime = require("@composy/layout-runtime");
13
14
  //#region src/components/LGridItem.ts
14
15
  const LGridItem = (0, vue.defineComponent)({
15
16
  name: "LGridItem",
@@ -39,7 +40,8 @@ const LGridItem = (0, vue.defineComponent)({
39
40
  return () => (0, vue.h)("div", {
40
41
  class: "ldesign-layout-item",
41
42
  "data-layout-item-id": props.item.id,
42
- "data-layout-type": props.item.type
43
+ "data-layout-type": props.item.type,
44
+ style: (0, _composy_layout_runtime.resolveItemStyle)(props.item, props.breakpointId)
43
45
  }, slots.default?.({
44
46
  item: props.item,
45
47
  placement: props.placement,
@@ -1 +1 @@
1
- {"version":3,"file":"LGridItem.cjs","names":[],"sources":["../../src/components/LGridItem.ts"],"sourcesContent":["import { defineComponent, h, type PropType } from 'vue'\nimport type { LayoutNode, LayoutPlacement } from '@composy/layout-core'\nimport {\n renderMaterialForTarget,\n type VueMaterialSource,\n} from './material-renderer'\n\nexport const LGridItem = defineComponent({\n name: 'LGridItem',\n props: {\n item: { type: Object as () => LayoutNode, required: true },\n placement: { type: Object as () => LayoutPlacement, required: true },\n breakpointId: { type: String, required: true },\n materials: {\n type: [Object, Array] as PropType<VueMaterialSource>,\n default: undefined,\n },\n target: { type: String, default: 'vue' },\n },\n setup(props, { slots }) {\n return () =>\n h(\n 'div',\n {\n class: 'ldesign-layout-item',\n 'data-layout-item-id': props.item.id,\n 'data-layout-type': props.item.type,\n },\n slots.default?.({\n item: props.item,\n placement: props.placement,\n breakpointId: props.breakpointId,\n }) ??\n renderMaterialForTarget(\n props.materials as VueMaterialSource,\n props.item,\n props.target as 'vue' | 'webcomponent',\n props.placement,\n props.breakpointId\n )\n )\n },\n})\n"],"mappings":";;;;;;;;;;;;;AAOO,MAAM,aAAA,GAAA,IAAA,gBAAA,CAA4B;CACvC,MAAM;CACN,OAAO;EACL,MAAM;GAAE,MAAM;GAA4B,UAAU;EAAK;EACzD,WAAW;GAAE,MAAM;GAAiC,UAAU;EAAK;EACnE,cAAc;GAAE,MAAM;GAAQ,UAAU;EAAK;EAC7C,WAAW;GACT,MAAM,CAAC,QAAQ,KAAK;GACpB,SAAS,KAAA;EACX;EACA,QAAQ;GAAE,MAAM;GAAQ,SAAS;EAAM;CACzC;CACA,MAAM,OAAO,EAAE,SAAS;EACtB,cAAA,GAAA,IAAA,EAAA,CAEI,OACA;GACE,OAAO;GACP,uBAAuB,MAAM,KAAK;GAClC,oBAAoB,MAAM,KAAK;EACjC,GACA,MAAM,UAAU;GACd,MAAM,MAAM;GACZ,WAAW,MAAM;GACjB,cAAc,MAAM;EACtB,CAAC,KACC,0BAAA,wBACE,MAAM,WACN,MAAM,MACN,MAAM,QACN,MAAM,WACN,MAAM,YACR,CACJ;CACJ;AACF,CAAC"}
1
+ {"version":3,"file":"LGridItem.cjs","names":[],"sources":["../../src/components/LGridItem.ts"],"sourcesContent":["import { defineComponent, h, type PropType } from 'vue'\nimport type { LayoutNode, LayoutPlacement } from '@composy/layout-core'\nimport { resolveItemStyle } from '@composy/layout-runtime'\nimport {\n renderMaterialForTarget,\n type VueMaterialSource,\n} from './material-renderer'\n\nexport const LGridItem = defineComponent({\n name: 'LGridItem',\n props: {\n item: { type: Object as () => LayoutNode, required: true },\n placement: { type: Object as () => LayoutPlacement, required: true },\n breakpointId: { type: String, required: true },\n materials: {\n type: [Object, Array] as PropType<VueMaterialSource>,\n default: undefined,\n },\n target: { type: String, default: 'vue' },\n },\n setup(props, { slots }) {\n return () =>\n h(\n 'div',\n {\n class: 'ldesign-layout-item',\n 'data-layout-item-id': props.item.id,\n 'data-layout-type': props.item.type,\n style: resolveItemStyle(props.item, props.breakpointId),\n },\n slots.default?.({\n item: props.item,\n placement: props.placement,\n breakpointId: props.breakpointId,\n }) ??\n renderMaterialForTarget(\n props.materials as VueMaterialSource,\n props.item,\n props.target as 'vue' | 'webcomponent',\n props.placement,\n props.breakpointId\n )\n )\n },\n})\n"],"mappings":";;;;;;;;;;;;;;AAQO,MAAM,aAAA,GAAA,IAAA,gBAAA,CAA4B;CACvC,MAAM;CACN,OAAO;EACL,MAAM;GAAE,MAAM;GAA4B,UAAU;EAAK;EACzD,WAAW;GAAE,MAAM;GAAiC,UAAU;EAAK;EACnE,cAAc;GAAE,MAAM;GAAQ,UAAU;EAAK;EAC7C,WAAW;GACT,MAAM,CAAC,QAAQ,KAAK;GACpB,SAAS,KAAA;EACX;EACA,QAAQ;GAAE,MAAM;GAAQ,SAAS;EAAM;CACzC;CACA,MAAM,OAAO,EAAE,SAAS;EACtB,cAAA,GAAA,IAAA,EAAA,CAEI,OACA;GACE,OAAO;GACP,uBAAuB,MAAM,KAAK;GAClC,oBAAoB,MAAM,KAAK;GAC/B,QAAA,GAAA,wBAAA,iBAAA,CAAwB,MAAM,MAAM,MAAM,YAAY;EACxD,GACA,MAAM,UAAU;GACd,MAAM,MAAM;GACZ,WAAW,MAAM;GACjB,cAAc,MAAM;EACtB,CAAC,KACC,0BAAA,wBACE,MAAM,WACN,MAAM,MACN,MAAM,QACN,MAAM,WACN,MAAM,YACR,CACJ;CACJ;AACF,CAAC"}
@@ -0,0 +1,51 @@
1
+ import { type PropType } from 'vue';
2
+ import type { LayoutNode, LayoutPlacement } from '@composy/layout-core';
3
+ import { type VueMaterialSource } from './material-renderer';
4
+ export declare const LGridItem: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
+ item: {
6
+ type: () => LayoutNode;
7
+ required: true;
8
+ };
9
+ placement: {
10
+ type: () => LayoutPlacement;
11
+ required: true;
12
+ };
13
+ breakpointId: {
14
+ type: StringConstructor;
15
+ required: true;
16
+ };
17
+ materials: {
18
+ type: PropType<VueMaterialSource>;
19
+ default: any;
20
+ };
21
+ target: {
22
+ type: StringConstructor;
23
+ default: string;
24
+ };
25
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
26
+ [key: string]: any;
27
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
28
+ item: {
29
+ type: () => LayoutNode;
30
+ required: true;
31
+ };
32
+ placement: {
33
+ type: () => LayoutPlacement;
34
+ required: true;
35
+ };
36
+ breakpointId: {
37
+ type: StringConstructor;
38
+ required: true;
39
+ };
40
+ materials: {
41
+ type: PropType<VueMaterialSource>;
42
+ default: any;
43
+ };
44
+ target: {
45
+ type: StringConstructor;
46
+ default: string;
47
+ };
48
+ }>> & Readonly<{}>, {
49
+ materials: VueMaterialSource;
50
+ target: string;
51
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LGridItem.d.cts","sourceRoot":"","sources":["../../src/components/LGridItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAA;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAEvE,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,qBAAqB,CAAA;AAE5B,eAAO,MAAM,SAAS;;cAGM,MAAM,UAAU;;;;cACX,MAAM,eAAe;;;;;;;;cAGvB,QAAQ,CAAC,iBAAiB,CAAC;;;;;;;;;;;cAJ9B,MAAM,UAAU;;;;cACX,MAAM,eAAe;;;;;;;;cAGvB,QAAQ,CAAC,iBAAiB,CAAC;;;;;;;;;;4EA6BxD,CAAA"}
@@ -2,7 +2,7 @@
2
2
  * ***********************************
3
3
  * @composy/layout-vue v0.0.1 *
4
4
  * Built with rollup *
5
- * Build time: 2024-08-17 11:47:09 *
5
+ * Build time: 2024-10-12 17:52:50 *
6
6
  * Build mode: production *
7
7
  * Minified: No *
8
8
  * ***********************************
@@ -28,7 +28,7 @@ const LLayoutEditor = (0, vue.defineComponent)({
28
28
  },
29
29
  preview: Object,
30
30
  materials: {
31
- type: Object,
31
+ type: [Object, Array],
32
32
  default: void 0
33
33
  }
34
34
  },
@@ -1 +1 @@
1
- {"version":3,"file":"LLayoutEditor.cjs","names":[],"sources":["../../src/components/LLayoutEditor.ts"],"sourcesContent":["import {\n defineComponent,\n h,\n onBeforeUnmount,\n onMounted,\n shallowRef,\n watch,\n} from 'vue'\nimport { createLayoutEditor } from '@composy/layout-editor'\nimport type {\n LayoutDocument,\n MaterialDefinition,\n MaterialRegistry,\n} from '@composy/layout-core'\nimport type {\n LayoutEditorEngine,\n LayoutEditorOptions,\n} from '@composy/layout-editor'\n\nexport const LLayoutEditor = defineComponent({\n name: 'LLayoutEditor',\n props: {\n document: { type: Object as () => LayoutDocument, required: true },\n engine: { type: Object as () => LayoutEditorEngine, required: true },\n mode: {\n type: String as () => 'edit' | 'preview' | 'readonly',\n default: 'edit',\n },\n preview: Object as () => LayoutEditorOptions['preview'],\n materials: { type: Object, default: undefined },\n },\n emits: ['update:document', 'change', 'ready'],\n setup(props, { slots, emit, expose }) {\n const editor = shallowRef(\n createLayoutEditor({\n document: props.document,\n engine: props.engine,\n materials: props.materials as\n MaterialRegistry | readonly MaterialDefinition[] | undefined,\n preview: props.preview,\n })\n )\n let lastEmittedDocument = JSON.stringify(props.document)\n onMounted(() => {\n editor.value.on('document:change', event => {\n lastEmittedDocument = JSON.stringify(event.document)\n emit('update:document', event.document)\n emit('change', event)\n })\n editor.value.mount()\n editor.value.setMode(props.mode)\n emit('ready', editor.value)\n })\n watch(\n () => props.document,\n value => {\n const next = JSON.stringify(value)\n if (next !== lastEmittedDocument) {\n editor.value.load(value)\n lastEmittedDocument = next\n }\n }\n )\n watch(\n () => props.mode,\n value => editor.value.setMode(value)\n )\n const onKeydown = (event: KeyboardEvent) => {\n editor.value.handleKeyboard(event)\n }\n onBeforeUnmount(() => editor.value.destroy())\n expose({ editor })\n return () =>\n h(\n 'div',\n {\n class: 'ldesign-layout-editor',\n 'data-layout-mode': props.mode,\n 'aria-keyshortcuts':\n 'ArrowLeft ArrowRight ArrowUp ArrowDown Delete Control+C Control+V Control+X Control+D',\n onKeydown,\n },\n slots.default?.({ editor: editor.value })\n )\n },\n})\n"],"mappings":";;;;;;;;;;;;;AAmBO,MAAM,iBAAA,GAAA,IAAA,gBAAA,CAAgC;CAC3C,MAAM;CACN,OAAO;EACL,UAAU;GAAE,MAAM;GAAgC,UAAU;EAAK;EACjE,QAAQ;GAAE,MAAM;GAAoC,UAAU;EAAK;EACnE,MAAM;GACJ,MAAM;GACN,SAAS;EACX;EACA,SAAS;EACT,WAAW;GAAE,MAAM;GAAQ,SAAS,KAAA;EAAU;CAChD;CACA,OAAO;EAAC;EAAmB;EAAU;CAAO;CAC5C,MAAM,OAAO,EAAE,OAAO,MAAM,UAAU;EACpC,MAAM,UAAA,GAAA,IAAA,WAAA,EAAA,GAAA,uBAAA,mBAAA,CACe;GACjB,UAAU,MAAM;GAChB,QAAQ,MAAM;GACd,WAAW,MAAM;GAEjB,SAAS,MAAM;EACjB,CAAC,CACH;EACA,IAAI,sBAAsB,KAAK,UAAU,MAAM,QAAQ;EACvD,CAAA,GAAA,IAAA,UAAA,OAAgB;GACd,OAAO,MAAM,GAAG,oBAAmB,UAAS;IAC1C,sBAAsB,KAAK,UAAU,MAAM,QAAQ;IACnD,KAAK,mBAAmB,MAAM,QAAQ;IACtC,KAAK,UAAU,KAAK;GACtB,CAAC;GACD,OAAO,MAAM,MAAM;GACnB,OAAO,MAAM,QAAQ,MAAM,IAAI;GAC/B,KAAK,SAAS,OAAO,KAAK;EAC5B,CAAC;EACD,CAAA,GAAA,IAAA,MAAA,OACQ,MAAM,WACZ,UAAS;GACP,MAAM,OAAO,KAAK,UAAU,KAAK;GACjC,IAAI,SAAS,qBAAqB;IAChC,OAAO,MAAM,KAAK,KAAK;IACvB,sBAAsB;GACxB;EACF,CACF;EACA,CAAA,GAAA,IAAA,MAAA,OACQ,MAAM,OACZ,UAAS,OAAO,MAAM,QAAQ,KAAK,CACrC;EACA,MAAM,aAAa,UAAyB;GAC1C,OAAO,MAAM,eAAe,KAAK;EACnC;EACA,CAAA,GAAA,IAAA,gBAAA,OAAsB,OAAO,MAAM,QAAQ,CAAC;EAC5C,OAAO,EAAE,OAAO,CAAC;EACjB,cAAA,GAAA,IAAA,EAAA,CAEI,OACA;GACE,OAAO;GACP,oBAAoB,MAAM;GAC1B,qBACE;GACF;EACF,GACA,MAAM,UAAU,EAAE,QAAQ,OAAO,MAAM,CAAC,CAC1C;CACJ;AACF,CAAC"}
1
+ {"version":3,"file":"LLayoutEditor.cjs","names":[],"sources":["../../src/components/LLayoutEditor.ts"],"sourcesContent":["import {\n defineComponent,\n h,\n onBeforeUnmount,\n onMounted,\n shallowRef,\n type PropType,\n watch,\n} from 'vue'\nimport { createLayoutEditor } from '@composy/layout-editor'\nimport type {\n LayoutDocument,\n MaterialDefinition,\n MaterialRegistry,\n} from '@composy/layout-core'\nimport type {\n LayoutEditorEngine,\n LayoutEditorOptions,\n} from '@composy/layout-editor'\n\nexport const LLayoutEditor = defineComponent({\n name: 'LLayoutEditor',\n props: {\n document: { type: Object as () => LayoutDocument, required: true },\n engine: { type: Object as () => LayoutEditorEngine, required: true },\n mode: {\n type: String as () => 'edit' | 'preview' | 'readonly',\n default: 'edit',\n },\n preview: Object as () => LayoutEditorOptions['preview'],\n materials: {\n type: [Object, Array] as PropType<\n MaterialRegistry | readonly MaterialDefinition[]\n >,\n default: undefined,\n },\n },\n emits: ['update:document', 'change', 'ready'],\n setup(props, { slots, emit, expose }) {\n const editor = shallowRef(\n createLayoutEditor({\n document: props.document,\n engine: props.engine,\n materials: props.materials as\n MaterialRegistry | readonly MaterialDefinition[] | undefined,\n preview: props.preview,\n })\n )\n let lastEmittedDocument = JSON.stringify(props.document)\n onMounted(() => {\n editor.value.on('document:change', event => {\n lastEmittedDocument = JSON.stringify(event.document)\n emit('update:document', event.document)\n emit('change', event)\n })\n editor.value.mount()\n editor.value.setMode(props.mode)\n emit('ready', editor.value)\n })\n watch(\n () => props.document,\n value => {\n const next = JSON.stringify(value)\n if (next !== lastEmittedDocument) {\n editor.value.load(value)\n lastEmittedDocument = next\n }\n }\n )\n watch(\n () => props.mode,\n value => editor.value.setMode(value)\n )\n const onKeydown = (event: KeyboardEvent) => {\n editor.value.handleKeyboard(event)\n }\n onBeforeUnmount(() => editor.value.destroy())\n expose({ editor })\n return () =>\n h(\n 'div',\n {\n class: 'ldesign-layout-editor',\n 'data-layout-mode': props.mode,\n 'aria-keyshortcuts':\n 'ArrowLeft ArrowRight ArrowUp ArrowDown Delete Control+C Control+V Control+X Control+D',\n onKeydown,\n },\n slots.default?.({ editor: editor.value })\n )\n },\n})\n"],"mappings":";;;;;;;;;;;;;AAoBO,MAAM,iBAAA,GAAA,IAAA,gBAAA,CAAgC;CAC3C,MAAM;CACN,OAAO;EACL,UAAU;GAAE,MAAM;GAAgC,UAAU;EAAK;EACjE,QAAQ;GAAE,MAAM;GAAoC,UAAU;EAAK;EACnE,MAAM;GACJ,MAAM;GACN,SAAS;EACX;EACA,SAAS;EACT,WAAW;GACT,MAAM,CAAC,QAAQ,KAAK;GAGpB,SAAS,KAAA;EACX;CACF;CACA,OAAO;EAAC;EAAmB;EAAU;CAAO;CAC5C,MAAM,OAAO,EAAE,OAAO,MAAM,UAAU;EACpC,MAAM,UAAA,GAAA,IAAA,WAAA,EAAA,GAAA,uBAAA,mBAAA,CACe;GACjB,UAAU,MAAM;GAChB,QAAQ,MAAM;GACd,WAAW,MAAM;GAEjB,SAAS,MAAM;EACjB,CAAC,CACH;EACA,IAAI,sBAAsB,KAAK,UAAU,MAAM,QAAQ;EACvD,CAAA,GAAA,IAAA,UAAA,OAAgB;GACd,OAAO,MAAM,GAAG,oBAAmB,UAAS;IAC1C,sBAAsB,KAAK,UAAU,MAAM,QAAQ;IACnD,KAAK,mBAAmB,MAAM,QAAQ;IACtC,KAAK,UAAU,KAAK;GACtB,CAAC;GACD,OAAO,MAAM,MAAM;GACnB,OAAO,MAAM,QAAQ,MAAM,IAAI;GAC/B,KAAK,SAAS,OAAO,KAAK;EAC5B,CAAC;EACD,CAAA,GAAA,IAAA,MAAA,OACQ,MAAM,WACZ,UAAS;GACP,MAAM,OAAO,KAAK,UAAU,KAAK;GACjC,IAAI,SAAS,qBAAqB;IAChC,OAAO,MAAM,KAAK,KAAK;IACvB,sBAAsB;GACxB;EACF,CACF;EACA,CAAA,GAAA,IAAA,MAAA,OACQ,MAAM,OACZ,UAAS,OAAO,MAAM,QAAQ,KAAK,CACrC;EACA,MAAM,aAAa,UAAyB;GAC1C,OAAO,MAAM,eAAe,KAAK;EACnC;EACA,CAAA,GAAA,IAAA,gBAAA,OAAsB,OAAO,MAAM,QAAQ,CAAC;EAC5C,OAAO,EAAE,OAAO,CAAC;EACjB,cAAA,GAAA,IAAA,EAAA,CAEI,OACA;GACE,OAAO;GACP,oBAAoB,MAAM;GAC1B,qBACE;GACF;EACF,GACA,MAAM,UAAU,EAAE,QAAQ,OAAO,MAAM,CAAC,CAC1C;CACJ;AACF,CAAC"}
@@ -1,4 +1,5 @@
1
- import type { LayoutDocument } from '@composy/layout-core';
1
+ import { type PropType } from 'vue';
2
+ import type { LayoutDocument, MaterialDefinition, MaterialRegistry } from '@composy/layout-core';
2
3
  import type { LayoutEditorEngine, LayoutEditorOptions } from '@composy/layout-editor';
3
4
  export declare const LLayoutEditor: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
5
  document: {
@@ -15,7 +16,7 @@ export declare const LLayoutEditor: import("vue").DefineComponent<import("vue").
15
16
  };
16
17
  preview: () => LayoutEditorOptions["preview"];
17
18
  materials: {
18
- type: ObjectConstructor;
19
+ type: PropType<MaterialRegistry | readonly MaterialDefinition[]>;
19
20
  default: any;
20
21
  };
21
22
  }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -35,7 +36,7 @@ export declare const LLayoutEditor: import("vue").DefineComponent<import("vue").
35
36
  };
36
37
  preview: () => LayoutEditorOptions["preview"];
37
38
  materials: {
38
- type: ObjectConstructor;
39
+ type: PropType<MaterialRegistry | readonly MaterialDefinition[]>;
39
40
  default: any;
40
41
  };
41
42
  }>> & Readonly<{
@@ -44,6 +45,5 @@ export declare const LLayoutEditor: import("vue").DefineComponent<import("vue").
44
45
  onReady?: (...args: any[]) => any;
45
46
  }>, {
46
47
  mode: "edit" | "preview" | "readonly";
47
- materials: Record<string, any>;
48
+ materials: MaterialRegistry | readonly MaterialDefinition<import("@composy/layout-core").JsonRecord>[];
48
49
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
49
- //# sourceMappingURL=LLayoutEditor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LLayoutEditor.d.cts","sourceRoot":"","sources":["../../src/components/LLayoutEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,QAAQ,EAEd,MAAM,KAAK,CAAA;AAEZ,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,wBAAwB,CAAA;AAE/B,eAAO,MAAM,aAAa;;cAGM,MAAM,cAAc;;;;cACtB,MAAM,kBAAkB;;;;cAEhC,MAAM,MAAM,GAAG,SAAS,GAAG,UAAU;;;aAGpC,MAAM,mBAAmB,CAAC,SAAS,CAAC;;cAE5B,QAAQ,CAC/B,gBAAgB,GAAG,SAAS,kBAAkB,EAAE,CACjD;;;;;;;cAVyB,MAAM,cAAc;;;;cACtB,MAAM,kBAAkB;;;;cAEhC,MAAM,MAAM,GAAG,SAAS,GAAG,UAAU;;;aAGpC,MAAM,mBAAmB,CAAC,SAAS,CAAC;;cAE5B,QAAQ,CAC/B,gBAAgB,GAAG,SAAS,kBAAkB,EAAE,CACjD;;;;;;;;;;4EA0DL,CAAA"}
@@ -2,7 +2,7 @@
2
2
  * ***********************************
3
3
  * @composy/layout-vue v0.0.1 *
4
4
  * Built with rollup *
5
- * Build time: 2024-08-17 11:47:09 *
5
+ * Build time: 2024-10-12 17:52:50 *
6
6
  * Build mode: production *
7
7
  * Minified: No *
8
8
  * ***********************************