@composy/layout-runtime 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.
- package/CHANGELOG.md +35 -0
- package/README.md +101 -17
- package/dist/index.js +68 -20
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +191 -1
- package/dist/index.min.js.map +1 -0
- package/es/.dts-output-manifest.json +1 -0
- package/es/.dts.tsbuildinfo +1 -0
- package/es/index.d.ts +0 -1
- package/es/index.js +1 -1
- package/es/material-renderer.d.ts +0 -1
- package/es/material-renderer.js +40 -7
- package/es/material-renderer.js.map +1 -1
- package/es/runtime.d.ts +0 -1
- package/es/runtime.js +27 -12
- package/es/runtime.js.map +1 -1
- package/es/styles.d.ts +0 -1
- package/es/styles.js +3 -3
- package/es/styles.js.map +1 -1
- package/esm/index.js +13 -0
- package/esm/material-renderer.js +102 -0
- package/esm/material-renderer.js.map +1 -0
- package/esm/runtime.js +171 -0
- package/esm/runtime.js.map +1 -0
- package/esm/styles.js +39 -0
- package/esm/styles.js.map +1 -0
- package/lib/index.cjs +1 -1
- package/lib/{index.d.ts → index.d.cts} +0 -1
- package/lib/material-renderer.cjs +40 -7
- package/lib/material-renderer.cjs.map +1 -1
- package/lib/{material-renderer.d.ts → material-renderer.d.cts} +0 -1
- package/lib/runtime.cjs +27 -12
- package/lib/runtime.cjs.map +1 -1
- package/lib/{runtime.d.ts → runtime.d.cts} +0 -1
- package/lib/styles.cjs +3 -3
- package/lib/styles.cjs.map +1 -1
- package/lib/{styles.d.ts → styles.d.cts} +0 -1
- package/package.json +13 -7
- package/es/index.d.ts.map +0 -1
- package/es/material-renderer.d.ts.map +0 -1
- package/es/runtime.d.ts.map +0 -1
- package/es/styles.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.min.js","names":[],"sources":["../src/styles.ts","../src/material-renderer.ts","../src/runtime.ts"],"sourcesContent":["import type {\n BreakpointId,\n LayoutDocument,\n LayoutNode,\n LayoutPlacement,\n} from '@composy/layout-core'\nimport { getEffectiveGrid, getBreakpoint } from '@composy/layout-core'\n\nexport interface GridStyleResult {\n display: 'grid'\n gridTemplateColumns: string\n gridAutoRows: string\n gap: string\n direction: 'ltr' | 'rtl'\n minHeight?: string\n maxHeight?: string\n}\n\nexport function resolveGridStyle(\n document: LayoutDocument,\n breakpointId: BreakpointId\n): GridStyleResult {\n const grid = getEffectiveGrid(document, breakpointId)\n const breakpoint = getBreakpoint(document, breakpointId)\n const style: GridStyleResult = {\n display: 'grid',\n gridTemplateColumns: `repeat(${grid.columns}, minmax(0, 1fr))`,\n gridAutoRows: `${grid.rowSize}px`,\n gap: `${grid.gap}px`,\n direction: grid.direction,\n }\n if (document.grid.minRows !== undefined)\n style.minHeight = `${Math.max(\n 0,\n document.grid.minRows * (grid.rowSize + grid.gap) - grid.gap\n )}px`\n if (document.grid.maxRows !== undefined)\n style.maxHeight = `${Math.max(\n 0,\n document.grid.maxRows * (grid.rowSize + grid.gap) - grid.gap\n )}px`\n if (breakpoint?.canvasWidth)\n style.gridTemplateColumns = `repeat(${grid.columns}, minmax(0, 1fr))`\n return style\n}\n\nexport function resolveItemStyle(\n node: LayoutNode,\n breakpointId: BreakpointId\n): Record<string, string> {\n const placement = node.layout[breakpointId]\n if (!placement) return { display: 'none' }\n return {\n gridColumn: `${placement.x + 1} / span ${placement.w}`,\n gridRow: `${placement.y + 1} / span ${placement.h}`,\n display: placement.hidden ? 'none' : '',\n }\n}\n","import {\n createMaterialRegistry,\n type LayoutNode,\n type MaterialDefinition,\n type MaterialRegistry,\n} from '@composy/layout-core'\nimport type { LayoutRenderContext, LayoutRenderHandle } from './runtime'\n\nexport type RuntimeMaterialSource =\n MaterialRegistry | readonly MaterialDefinition[] | undefined\n\nexport function normalizeMaterialSource(\n source: RuntimeMaterialSource\n): MaterialRegistry | undefined {\n if (!source) return undefined\n if (Array.isArray(source)) return createMaterialRegistry(source)\n return source as MaterialRegistry\n}\n\nexport function renderRuntimeMaterial(\n context: LayoutRenderContext,\n materials: MaterialRegistry | undefined\n): LayoutRenderHandle | undefined {\n const material = materials?.get(context.item.type)\n const renderer =\n material?.renderers?.webcomponent ?? material?.renderers?.html\n if (!material || !renderer) return undefined\n\n const host = context.shell.ownerDocument\n let node: Node | undefined\n if (renderer.tagName) {\n node = host.createElement(renderer.tagName)\n } else if (renderer.render) {\n const rendered = renderer.render({\n item: context.item,\n placement: context.placement,\n breakpointId: context.breakpointId,\n })\n if (isDomNode(rendered)) node = rendered\n else if (typeof rendered === 'string') {\n const wrapper = host.createElement('div')\n wrapper.innerHTML = sanitizeMarkup(host, rendered)\n node = wrapper\n }\n }\n if (!node) return undefined\n\n const appliedProps = new Set<string>()\n const applyProps = (item: LayoutNode): void => {\n if (!isElement(node, host)) return\n const nextProps = item.props ?? {}\n for (const key of appliedProps) {\n if (key in nextProps) continue\n node.removeAttribute(key)\n delete node.dataset[`prop${toDataKey(key)}`]\n appliedProps.delete(key)\n }\n for (const [key, value] of Object.entries(nextProps)) {\n appliedProps.add(key)\n try {\n ;(node as unknown as Record<string, unknown>)[key] = value\n } catch {\n // Some custom elements expose readonly properties. The attribute is a\n // useful fallback for string-like values.\n }\n if (\n value === null ||\n value === undefined ||\n typeof value === 'object' ||\n typeof value === 'function'\n ) {\n if (value !== null && value !== undefined)\n node.dataset[`prop${toDataKey(key)}`] = JSON.stringify(value)\n } else node.setAttribute(key, String(value))\n }\n }\n applyProps(context.item)\n context.shell.replaceChildren(node)\n return {\n update(next) {\n applyProps(next.item)\n },\n destroy() {\n if (node?.parentNode === context.shell) context.shell.removeChild(node)\n },\n }\n}\n\nfunction toDataKey(value: string): string {\n return value.replace(/[^a-zA-Z0-9]/g, '')\n}\n\nfunction isDomNode(value: unknown): value is Node {\n return Boolean(\n value &&\n typeof value === 'object' &&\n 'nodeType' in value &&\n typeof (value as { cloneNode?: unknown }).cloneNode === 'function'\n )\n}\n\nfunction isElement(\n value: Node | undefined,\n document: Document\n): value is HTMLElement {\n if (!value || value.nodeType !== 1) return false\n const ElementConstructor = document.defaultView?.HTMLElement\n return ElementConstructor\n ? value instanceof ElementConstructor\n : typeof (value as Element).setAttribute === 'function'\n}\n\nfunction sanitizeMarkup(document: Document, value: string): string {\n const template = document.createElement('template')\n template.innerHTML = value\n template.content\n .querySelectorAll('script,style,iframe,object,embed,foreignObject')\n .forEach(node => node.remove())\n template.content.querySelectorAll<HTMLElement>('*').forEach(element => {\n for (const attribute of Array.from(element.attributes)) {\n const name = attribute.name.toLowerCase()\n const content = attribute.value.trim().toLowerCase()\n if (\n name.startsWith('on') ||\n (['href', 'src', 'xlink:href', 'formaction', 'srcdoc'].includes(name) &&\n /^(?:javascript:|data:text\\/html)/i.test(content))\n )\n element.removeAttribute(attribute.name)\n }\n })\n return template.innerHTML\n}\n","import type {\n BreakpointId,\n LayoutDocument,\n LayoutNode,\n LayoutPlacement,\n MaterialDefinition,\n MaterialRegistry,\n} from '@composy/layout-core'\nimport { resolveBreakpoint, validateLayoutDocument } from '@composy/layout-core'\nimport { resolveGridStyle, resolveItemStyle } from './styles'\nimport {\n normalizeMaterialSource,\n renderRuntimeMaterial,\n} from './material-renderer'\n\nexport interface LayoutRenderContext {\n shell: HTMLElement\n item: LayoutNode\n placement: LayoutPlacement\n breakpointId: BreakpointId\n}\nexport interface LayoutRenderHandle {\n update?(context: LayoutRenderContext): void\n destroy?(): void\n}\nexport interface LayoutRuntimeOptions {\n container: HTMLElement\n document?: LayoutDocument\n /** Lets a host adapter provide an existing light-DOM item shell. */\n getItemShell?: (item: LayoutNode) => HTMLElement | undefined\n renderItem?: (context: LayoutRenderContext) => LayoutRenderHandle | void\n /** Material registry used by the framework-neutral default renderer. */\n materials?: MaterialRegistry | readonly MaterialDefinition[]\n observeResize?: boolean\n onBreakpointChange?: (id: BreakpointId) => void\n onError?: (error: unknown) => void\n}\n\nexport interface LayoutRuntime {\n mount(): void\n update(document: LayoutDocument): void\n setBreakpoint(id?: BreakpointId): void\n getBreakpoint(): BreakpointId | undefined\n getContainer(): HTMLElement\n destroy(): void\n}\n\nexport function createLayoutRuntime(\n options: LayoutRuntimeOptions\n): LayoutRuntime {\n let document = options.document\n let mounted = false\n let manualBreakpoint: BreakpointId | undefined\n let activeBreakpoint: BreakpointId | undefined\n let observer: ResizeObserver | undefined\n const handles = new Map<string, LayoutRenderHandle>()\n const shells = new Map<string, HTMLElement>()\n const ownedShells = new Set<HTMLElement>()\n const materials = normalizeMaterialSource(options.materials)\n\n function render(): void {\n if (!mounted || !document) return\n const result = validateLayoutDocument(document)\n if (!result.valid) {\n options.onError?.(\n new Error(result.issues[0]?.message ?? 'Invalid layout document')\n )\n return\n }\n const breakpointId =\n manualBreakpoint ?? activeBreakpoint ?? document.defaultBreakpointId\n activeBreakpoint = breakpointId\n const gridStyle = resolveGridStyle(document, breakpointId)\n Object.assign(options.container.style, gridStyle)\n const currentIds = new Set(document.items.map(item => item.id))\n for (const [id, handle] of handles) {\n if (currentIds.has(id)) continue\n disposeHandle(id, handle)\n const shell = shells.get(id)\n if (shell && ownedShells.has(shell)) shell.remove()\n if (shell) ownedShells.delete(shell)\n shells.delete(id)\n }\n for (const item of document.items) {\n const placement = item.layout[breakpointId]\n let shell = shells.get(item.id)\n if (!shell) {\n shell = options.getItemShell?.(item)\n if (!shell) {\n shell = options.container.ownerDocument.createElement('div')\n shell.className = 'ldesign-layout-item'\n shell.dataset.layoutItemId = item.id\n shell.dataset.layoutType = item.type\n ownedShells.add(shell)\n options.container.appendChild(shell)\n }\n shells.set(item.id, shell)\n }\n Object.assign(shell.style, resolveItemStyle(item, breakpointId))\n if (!placement) {\n const handle = handles.get(item.id)\n if (handle) disposeHandle(item.id, handle)\n continue\n }\n const context = { shell, item, placement, breakpointId }\n try {\n let handle = handles.get(item.id)\n if (!handle) {\n handle = options.renderItem\n ? (options.renderItem(context) ?? {})\n : (renderRuntimeMaterial(context, materials) ?? {})\n handles.set(item.id, handle)\n } else handle.update?.(context)\n } catch (error) {\n options.onError?.(error)\n }\n }\n }\n\n function disposeHandle(id: string, handle = handles.get(id)): void {\n if (!handle) return\n handles.delete(id)\n try {\n handle.destroy?.()\n } catch (error) {\n options.onError?.(error)\n }\n }\n\n function updateBreakpoint(width: number): void {\n if (!document || manualBreakpoint) return\n const next = resolveBreakpoint(document, width).id\n if (next !== activeBreakpoint) {\n const previous = activeBreakpoint\n activeBreakpoint = next\n options.onBreakpointChange?.(next)\n if (previous !== next) render()\n }\n }\n\n function updateBreakpointFromContainer(): void {\n if (!document || manualBreakpoint) return\n const width =\n options.container.getBoundingClientRect().width ||\n options.container.clientWidth\n // A hidden or detached container has no measurable width. Keep the\n // document default until the first real resize instead of selecting the\n // smallest breakpoint for width 0.\n if (width > 0) updateBreakpoint(width)\n else if (activeBreakpoint !== document.defaultBreakpointId) {\n const previous = activeBreakpoint\n activeBreakpoint = document.defaultBreakpointId\n if (previous) options.onBreakpointChange?.(activeBreakpoint)\n }\n }\n\n return {\n mount() {\n if (mounted) return\n mounted = true\n if (\n options.observeResize !== false &&\n typeof ResizeObserver !== 'undefined'\n ) {\n observer = new ResizeObserver(entries => {\n const width =\n entries[0]?.contentRect.width ?? options.container.clientWidth\n if (width > 0) updateBreakpoint(width)\n else updateBreakpointFromContainer()\n })\n observer.observe(options.container)\n }\n updateBreakpointFromContainer()\n render()\n },\n update(next) {\n document = next\n render()\n },\n setBreakpoint(id) {\n if (id && document && !document.breakpoints.some(bp => bp.id === id)) {\n options.onError?.(new Error(`Unknown breakpoint ${id}.`))\n return\n }\n manualBreakpoint = id\n if (id) activeBreakpoint = id\n else updateBreakpointFromContainer()\n render()\n },\n getBreakpoint() {\n return activeBreakpoint\n },\n getContainer() {\n return options.container\n },\n destroy() {\n if (!mounted) return\n observer?.disconnect()\n observer = undefined\n for (const [id, handle] of handles) disposeHandle(id, handle)\n handles.clear()\n for (const shell of shells.values())\n if (ownedShells.has(shell)) shell.remove()\n shells.clear()\n ownedShells.clear()\n options.container.style.removeProperty('display')\n options.container.style.removeProperty('grid-template-columns')\n options.container.style.removeProperty('grid-auto-rows')\n options.container.style.removeProperty('gap')\n options.container.style.removeProperty('direction')\n options.container.style.removeProperty('min-height')\n options.container.style.removeProperty('max-height')\n manualBreakpoint = undefined\n activeBreakpoint = undefined\n mounted = false\n },\n }\n}\n\nexport { resolveGridStyle, resolveItemStyle }\n"],"mappings":";;;;;;;;;;;;;CAkBO,SAAS,EACd,GACA,GAAA;EAEA,MAAM,KAAA,GAAA,EAAA,iBAAA,CAAwB,GAAU,CAAA,GAClC,KAAA,GAAA,EAAA,cAAA,CAA2B,GAAU,CAAA,GACrC,IAAyB;GAC7B,SAAS;GACT,qBAAqB,UAAU,EAAK,QAAA;GACpC,cAAc,GAAG,EAAK,QAAA;GACtB,KAAK,GAAG,EAAK,IAAA;GACb,WAAW,EAAK;EAAA;EAclB,OAAA,KAZ8B,MAA1B,EAAS,KAAK,YAChB,EAAM,YAAY,GAAG,KAAK,IACxB,GACA,EAAS,KAAK,WAAW,EAAK,UAAU,EAAK,OAAO,EAAK,GAAA,EAAA,MAAA,KAE/B,MAA1B,EAAS,KAAK,YAChB,EAAM,YAAY,GAAG,KAAK,IACxB,GACA,EAAS,KAAK,WAAW,EAAK,UAAU,EAAK,OAAO,EAAK,GAAA,EAAA,MAEzD,GAAY,gBACd,EAAM,sBAAsB,UAAU,EAAK,QAAA,qBACtC;CACT;CAEO,SAAS,EACd,GACA,GAAA;EAEA,MAAM,IAAY,EAAK,OAAO;EAC9B,OAAK,IACE;GACL,YAAY,GAAG,EAAU,IAAI,EAAA,UAAY,EAAU;GACnD,SAAS,GAAG,EAAU,IAAI,EAAA,UAAY,EAAU;GAChD,SAAS,EAAU,SAAS,SAAS;EAAA,IAJhB,EAAE,SAAS,OAAA;CAMpC;CCtCO,SAAS,EACd,GACA,GAAA;EAEA,MAAM,IAAW,GAAW,IAAI,EAAQ,KAAK,IAAA,GACvC,IACJ,GAAU,WAAW,gBAAgB,GAAU,WAAW;EAC5D,IAAA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jD,IAAQ,IAAG,EAAiB,CAAA,IAC3B,EAAA;IAAA,CAAA,GAEP,EAAS,QAAQ,EAAQ,SAAA,IAE3B,EAAA,GACA,EAAA;GACF;GACA,OAAO,GAAA;IACL,IAAW,GACX,EAAA;GACF;GACA,cAAc,GAAA;IACR,KAAM,KAAA,CAAa,EAAS,YAAY,MAAK,MAAM,EAAG,OAAO,CAAA,IAC/D,EAAQ,0BAAU,IAAI,MAAM,sBAAsB,EAAA,EAAA,CAAA,KAGpD,IAAmB,GACf,IAAI,IAAmB,IACtB,EAAA,GACL,EAAA;GACF;GACA,qBACS;GAET,oBACS,EAAQ;GAEjB,UAAA;IACE,IAAK,GAAL;KACA,GAAU,WAAA,GACV,IAAA,KAAW;KACX,KAAA,MAAA,CAAY,GAAI,MAAW,GAAS,EAAc,GAAI,CAAA;KACtD,EAAQ,MAAA;KACR,KAAA,MAAW,KAAS,EAAO,OAAA,GACrB,EAAY,IAAI,CAAA,KAAQ,EAAM,OAAA;KACpC,EAAO,MAAA,GACP,EAAY,MAAA,GACZ,EAAQ,UAAU,MAAM,eAAe,SAAA,GACvC,EAAQ,UAAU,MAAM,eAAe,uBAAA,GACvC,EAAQ,UAAU,MAAM,eAAe,gBAAA,GACvC,EAAQ,UAAU,MAAM,eAAe,KAAA,GACvC,EAAQ,UAAU,MAAM,eAAe,WAAA,GACvC,EAAQ,UAAU,MAAM,eAAe,YAAA,GACvC,EAAQ,UAAU,MAAM,eAAe,YAAA,GACvC,IAAA,KAAmB,GACnB,IAAA,KAAmB,GACnB,IAAA,CAAU;IAlBI;GAmBhB;EAAA;CAEJ,GAAA,QAAA,mBAAA,GAAA,QAAA,mBAAA;AAAA,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":1,"configuration":"4fb447bbb8042361265edff8de78fcf5085f42666af81151cd484edec82251ed","sources":{"D:\\WorkBench\\ldesign\\libraries\\layout\\packages\\runtime\\src\\styles.ts":["D:\\WorkBench\\ldesign\\libraries\\layout\\packages\\runtime\\es\\styles.d.ts"],"D:\\WorkBench\\ldesign\\libraries\\layout\\packages\\runtime\\src\\material-renderer.ts":["D:\\WorkBench\\ldesign\\libraries\\layout\\packages\\runtime\\es\\material-renderer.d.ts"],"D:\\WorkBench\\ldesign\\libraries\\layout\\packages\\runtime\\src\\runtime.ts":["D:\\WorkBench\\ldesign\\libraries\\layout\\packages\\runtime\\es\\runtime.d.ts"],"D:\\WorkBench\\ldesign\\libraries\\layout\\packages\\runtime\\src\\index.ts":["D:\\WorkBench\\ldesign\\libraries\\layout\\packages\\runtime\\es\\index.d.ts"]}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.float16.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../core/es/types/layout.d.ts","../../core/es/types/patch.d.ts","../../core/es/errors/index.d.ts","../../core/es/types/events.d.ts","../../core/es/types/material.d.ts","../../core/es/types/index.d.ts","../../core/es/schema/factory.d.ts","../../core/es/schema/normalize.d.ts","../../core/es/validation/index.d.ts","../../core/es/migration/index.d.ts","../../core/es/breakpoint/resolver.d.ts","../../core/es/transaction/index.d.ts","../../core/es/materials/registry.d.ts","../../core/es/index.d.ts","../src/styles.ts","../src/material-renderer.ts","../src/runtime.ts","../src/index.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/globals.typedarray.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/buffer.buffer.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/globals.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/web-globals/blob.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/web-globals/console.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/web-globals/crypto.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/web-globals/domexception.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/web-globals/encoding.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/web-globals/events.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/utility.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/header.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/readable.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/fetch.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/formdata.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/connector.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/client-stats.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/client.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/errors.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/dispatcher.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/global-dispatcher.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/global-origin.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/pool-stats.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/pool.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/handlers.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/balanced-pool.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/round-robin-pool.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/h2c-client.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/agent.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/dispatcher1-wrapper.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/mock-interceptor.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/mock-call-history.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/mock-agent.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/mock-client.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/mock-pool.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/snapshot-agent.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/mock-errors.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/proxy-agent.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/socks5-proxy-agent.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/env-http-proxy-agent.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/retry-handler.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/retry-agent.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/api.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/cache-interceptor.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/interceptors.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/util.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/cookies.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/patch.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/websocket.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/eventsource.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/diagnostics-channel.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/content-type.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/cache.d.ts","../../../../../node_modules/.pnpm/undici-types@8.9.0/node_modules/undici-types/index.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/web-globals/fetch.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/web-globals/importmeta.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/web-globals/messaging.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/web-globals/navigator.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/web-globals/performance.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/web-globals/storage.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/web-globals/streams.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/web-globals/timers.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/web-globals/url.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/assert.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/assert/strict.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/async_hooks.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/buffer.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/child_process.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/cluster.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/console.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/constants.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/crypto.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/dgram.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/diagnostics_channel.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/dns.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/dns/promises.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/domain.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/events.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/ffi.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/fs.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/fs/promises.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/http.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/http2.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/https.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/inspector.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/inspector.generated.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/inspector/promises.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/module.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/net.d.ts","../../../../../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/os.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/path.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/path/posix.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/path/win32.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/perf_hooks.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/process.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/punycode.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/querystring.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/quic.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/readline.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/readline/promises.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/repl.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/sea.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/sqlite.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/stream.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/stream/consumers.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/stream/iter.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/stream/promises.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/stream/web.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/string_decoder.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/test.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/test/reporters.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/timers.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/timers/promises.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/tls.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/trace_events.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/tty.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/url.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/util.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/util/types.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/v8.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/vfs.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/vm.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/wasi.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/worker_threads.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/zlib.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/zlib/iter.d.ts","../../../../../node_modules/.pnpm/@types+node@26.6.3/node_modules/@types/node/index.d.ts","../../../../../node_modules/.pnpm/@types+jsonfile@6.1.4/node_modules/@types/jsonfile/index.d.ts","../../../../../node_modules/.pnpm/@types+jsonfile@6.1.4/node_modules/@types/jsonfile/utils.d.ts","../../../../../node_modules/.pnpm/@types+fs-extra@11.0.4/node_modules/@types/fs-extra/index.d.ts","../../../../../node_modules/.pnpm/@types+less@3.0.8/node_modules/@types/less/index.d.ts"],"fileIdsList":[[54,68,133,141,146,149,151,152,153,166],[51,54,55,56,57,58,59,60,61,68,133,141,146,149,151,152,153,166],[49,50,51,68,133,141,146,149,151,152,153,166],[49,50,52,53,68,133,141,146,149,151,152,153,166],[68,133,141,146,149,151,152,153,166],[49,68,133,141,146,149,151,152,153,166],[63,65,68,133,141,146,149,151,152,153,166],[62,65,68,133,141,146,149,151,152,153,166],[62,63,64,68,133,141,146,149,151,152,153,166],[62,68,133,141,146,149,151,152,153,166],[68,133,141,146,149,151,152,153,166,194,195,196],[68,133,141,146,149,151,152,153,166,184,194],[68,130,131,133,141,146,149,151,152,153,166],[68,132,133,141,146,149,151,152,153,166],[133,141,146,149,151,152,153,166],[68,133,141,146,149,151,152,153,166,175],[68,133,134,139,141,144,146,149,151,152,153,155,166,171,184],[68,133,134,135,141,144,146,149,151,152,153,166],[68,133,136,141,146,149,151,152,153,166,185],[68,133,137,138,141,146,149,151,152,153,157,166],[68,133,138,141,146,149,151,152,153,166,171,181],[68,133,139,141,144,146,149,151,152,153,155,166],[68,132,133,140,141,146,149,151,152,153,166],[68,133,141,142,146,149,151,152,153,166],[68,133,141,143,144,146,149,151,152,153,166],[68,132,133,141,144,146,149,151,152,153,166],[68,133,141,144,146,147,149,151,152,153,166,171,184],[68,133,141,144,146,147,149,151,152,153,166,173,175],[68,120,133,141,144,146,148,149,151,152,153,155,166,171,184],[68,133,141,144,146,148,149,151,152,153,155,166,171,181,184],[68,133,141,146,148,149,150,151,152,153,166,171,181,184],[67,68,69,70,71,72,73,74,75,76,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193],[68,133,141,144,146,149,151,152,153,166],[68,133,141,146,149,151,153,166],[68,133,141,146,149,151,152,153,154,166,184],[68,133,141,144,146,149,151,152,153,155,166,171],[68,133,141,146,149,151,152,153,157,166],[68,133,141,146,149,151,152,153,158,166],[68,133,141,144,146,149,151,152,153,161,166],[68,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192],[68,133,141,146,149,151,152,153,163,166],[68,133,141,146,149,151,152,153,164,166],[68,133,138,141,146,147,149,151,152,153,155,166,173,181],[68,133,141,144,146,149,151,152,153,166,167],[68,133,141,146,149,151,152,153,166,168,185,189],[68,133,141,144,146,149,151,152,153,166,171,173,174,175],[68,133,141,146,149,151,152,153,166,172,175],[68,133,141,144,146,149,151,152,153,166,171,173],[68,133,141,144,146,149,151,152,153,166,171,174,175],[68,133,141,146,149,151,152,153,166,175,185],[68,133,141,146,149,151,152,153,166,176],[68,130,133,141,146,149,151,152,153,166,171,178,184],[68,133,141,146,149,151,152,153,166,171,177],[68,133,141,144,146,149,151,152,153,166,179,180],[68,133,141,146,149,151,152,153,166,179,180],[68,133,138,141,146,149,151,152,153,155,166,171,181],[68,133,141,146,149,151,152,153,166,182],[68,133,141,146,149,151,152,153,155,166,183],[68,133,141,146,148,149,151,152,153,164,166,184],[68,133,141,146,149,151,152,153,166,185,186],[68,133,138,141,146,149,151,152,153,166,186],[68,133,141,146,149,151,152,153,166,171,187],[68,133,141,146,147,149,151,152,153,166],[68,133,141,146,149,151,152,153,154,166,189],[68,133,141,146,149,151,152,153,166,190],[68,133,136,141,146,149,151,152,153,166],[68,133,138,141,146,149,151,152,153,166],[68,133,141,146,149,151,152,153,166,185],[68,120,133,141,146,149,151,152,153,166],[68,133,141,146,149,151,152,153,166,184],[68,133,141,146,149,151,152,153,166,191],[68,133,141,146,149,151,152,153,161,166],[68,133,141,146,149,151,152,153,166,180],[68,120,133,141,144,146,147,149,151,152,153,155,161,166,171,175,184,187,189,191],[68,133,141,146,149,151,152,153,166,171,192],[68,133,141,146,149,151,152,153,166,173,193],[68,83,86,89,90,133,141,146,149,151,152,153,166,184],[68,86,133,141,146,149,151,152,153,166,171,184],[68,86,90,133,141,146,149,151,152,153,166,184],[68,133,141,146,149,151,152,153,166,171],[68,80,133,141,146,149,151,152,153,166],[68,84,133,141,146,149,151,152,153,166],[68,82,83,86,133,141,146,149,151,152,153,166,184],[68,133,141,146,149,151,152,153,155,166,181],[68,133,141,146,149,151,152,153,166,194],[68,80,133,141,146,149,151,152,153,166,194],[68,82,86,133,141,146,149,151,152,153,155,166,184],[68,77,78,79,81,85,133,141,144,146,149,151,152,153,166,171,184],[68,86,133,141,146,149,151,152,153,166],[68,86,95,104,133,141,146,149,151,152,153,166],[68,78,84,133,141,146,149,151,152,153,166],[68,86,114,115,133,141,146,149,151,152,153,166],[68,78,81,86,133,141,146,149,151,152,153,166,175,184,194],[68,82,86,133,141,146,149,151,152,153,166,184],[68,77,133,141,146,149,151,152,153,166],[68,80,81,82,84,85,86,87,88,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,115,116,117,118,119,133,141,146,149,151,152,153,166],[68,86,107,110,133,141,146,149,151,152,153,166],[68,86,95,97,98,133,141,146,149,151,152,153,166],[68,84,86,97,99,133,141,146,149,151,152,153,166],[68,85,133,141,146,149,151,152,153,166],[68,78,80,86,133,141,146,149,151,152,153,166],[68,86,90,97,99,133,141,146,149,151,152,153,166],[68,90,133,141,146,149,151,152,153,166],[68,84,86,89,133,141,146,149,151,152,153,166,184],[68,78,82,86,95,133,141,146,149,151,152,153,166],[68,86,107,133,141,146,149,151,152,153,166],[68,99,133,141,146,149,151,152,153,166],[68,78,82,86,90,133,141,146,149,151,152,153,166],[68,80,86,114,133,141,146,149,151,152,153,166,175,191,194]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"196cb558a13d4533a5163286f30b0509ce0210e4b316c56c38d4c0fd2fb38405","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},"f6a23658c754861e27139cd4b85fc08f499fe333da9816a0b7b0a3a819e5e80b","c71dc2a73350abcdaa763e394b0e972026d592cea7b62dc9b8c1d7b3aa0a77b7","34a3400a45194b2da52ad0648e9f3231bc0654506aa2ee3a4c6a47eddf70d1e4","e7e8e22d2344b6fb56838ba690c8bd077c02ef568ab3f20405894f2b9a84f7af","34f55e28967f47dd972bf7f73f20198b445529dda8479b17bb4ce2df5afc1612","b97260550538e9a7cf0a5e01704738ff78a69c798e4d3b99ac92817e49af6443","1881fd04a9ac9a855bb3b5aa0008767e142a84999aa36be5c8bdaaf705f09fdc","10e742aabb08db15a9748fdda0830979d3976b043af2989c273dd2500a073d23","f8c5d9db1577fc460a9f17bee5eb54be22484b4354fb79430640f2547e4697ef","4ff5ea4131af82549d9ff8eed5f105e570d8c789fb4b3a17c545df3cbef3f06c","2ecdef4667a42cc26f6179231427d5e05dddcfab813175e333a02c7c2d51afe7","6bbaf56145d3037db230641f3f979e1a6680be334eb74d2c4ffaa4c2ef0605aa","e068c7dd6b64d2d10bfd1b3b55ec4bee04dde9d2d34097eee45306a46c5ceec0","0e84f0145fb0f514d3049f612205bb35ed99275f1c71dd4ebead12d5b3416c43",{"version":"454db1a789c4bfbba0cc68d0b465c1776e84e002bcdaca8a74c6d57d7ed76539","signature":"26e598e2abfef3f2513f846769b048151e3632cc1573bb348423d62c63490b25"},{"version":"d8d05c4bc21ea0c7aa6bba1e40c0b56a6a495e47a1f15f592b9bb9a80b8cb6b2","signature":"c9450333f013368472c6393b54b66d4f2271b0b233a95e7b2ca9ee6ec7cd2f7f"},{"version":"831eb063bedca8f7a72b2a0495d00b6b60a773ac3cec0ceb22839fc780f8cec8","signature":"6d5faa7d926ffc542022c568a2152458d6653db9476f06238e77e630bbb5df8c"},{"version":"5d85f639ff962c73ca74689d07439069e3dc780b41c21254486a28711bae1f80","signature":"f89362f33bf75462e89de94eee94f5937d0a7493ea1d5b09283174905b85a64d"},{"version":"0ccdaa19852d25ecd84eec365c3bfa16e7859cadecf6e9ca6d0dbbbee439743f","affectsGlobalScope":true,"impliedFormat":1},{"version":"f9b68a1c3f8f45b4c199fa5b3ac09497230cb8f2f0cdcfebe5817b30b836a64a","affectsGlobalScope":true,"impliedFormat":1},{"version":"f53a7652392cf26ebbe4e29fd0672aa87c93bd6d0241289c13fab87b9ac35c8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5e01375c9e124a83b52ee4b3244ed1a4d214a6cfb54ac73e164a823a4a7860a","affectsGlobalScope":true,"impliedFormat":1},{"version":"f90ae2bbce1505e67f2f6502392e318f5714bae82d2d969185c4a6cecc8af2fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b58e207b93a8f1c88bbf2a95ddc686ac83962b13830fe8ad3f404ffc7051fb4","affectsGlobalScope":true,"impliedFormat":1},{"version":"1fefabcb2b06736a66d2904074d56268753654805e829989a46a0161cd8412c5","affectsGlobalScope":true,"impliedFormat":1},{"version":"b00a630557d1622ad312633bdbfbdb9c6b7220d948dca9f899db30679f160074","affectsGlobalScope":true,"impliedFormat":1},{"version":"c18a99f01eb788d849ad032b31cafd49de0b19e083fe775370834c5675d7df8e","affectsGlobalScope":true,"impliedFormat":1},{"version":"5247874c2a23b9a62d178ae84f2db6a1d54e6c9a2e7e057e178cc5eea13757fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"cdcf9ea426ad970f96ac930cd176d5c69c6c24eebd9fc580e1572d6c6a88f62c","impliedFormat":1},{"version":"88809d6c1b9c78d04a133646a6feb926def05a8774c308c7c93bc32ee163d271","impliedFormat":1},{"version":"156a859e21ef3244d13afeeba4e49760a6afa035c149dda52f0c45ea8903b338","impliedFormat":1},{"version":"21d7fab00c101ddf754b392e11534e6b20c6bda269b2ccbcdf3453cbe21d8a39","impliedFormat":1},{"version":"615754924717c0b1e293e083b83503c0a872717ad5aa60ed7f1a699eb1b4ea5c","impliedFormat":1},{"version":"d3c85d4dde1a4918009e37426ee4a940cbbd4100e2e74d03e2de0d50a77bb488","impliedFormat":1},{"version":"68834d631c8838c715f225509cfc3927913b9cc7a4870460b5b60c8dbdb99baf","impliedFormat":1},{"version":"60e3ba4b2d24548107060e5d13bffafbbbaa53d001c07bbe40386deda569b5e8","impliedFormat":1},{"version":"a712be2c8cbe0154bd17d1d7bff503d7c04331e0745eb9eea3d303e0e5d9401e","impliedFormat":1},{"version":"25bd6ae1b97ea991433337310fc406cc7c9f271b67b7c79dd24eee384759f3d4","impliedFormat":1},{"version":"ea6bc8de8b59f90a7a3960005fd01988f98fd0784e14bc6922dde2e93305ec7d","impliedFormat":1},{"version":"36107995674b29284a115e21a0618c4c2751b32a8766dd4cb3ba740308b16d59","impliedFormat":1},{"version":"914a0ae30d96d71915fc519ccb4efbf2b62c0ddfb3a3fc6129151076bc01dc60","impliedFormat":1},{"version":"38004e6801340cb890afb8cb5a9fc8972297e7f88ab94026e4b0b3c61fb32f8a","impliedFormat":1},{"version":"4ca7fb8f6018ea836b1ad24f67d5e7c2cf7410af7462e0ccc90b012944f5d7ae","impliedFormat":1},{"version":"4d327f7d72ad0918275cea3eee49a6a8dc8114ae1d5b7f3f5d0774de75f7439a","impliedFormat":1},{"version":"149f9a9e7f04e67afa0e2a49fc0ff421035c01d6b793cfcae7d2e9f6819431e2","impliedFormat":1},{"version":"e8a9dfa4c75ef6d25df8b40eaa9c31e0a69452aaf2ced4a3f4215dbdbaa876f4","impliedFormat":1},{"version":"a70af845a2eb9dd6e2723e319e14ea7fb28b129ec1361c21509b49305448c323","impliedFormat":1},{"version":"b53dc572d4f187904207ae1166652de47aab8eeb00c254d009cb226863076b56","impliedFormat":1},{"version":"57354d2f022ed64ede57b2e052306dd076a138b551abc7d30ef5e6718ce2f76a","impliedFormat":1},{"version":"0b6e25234b4eec6ed96ab138d96eb70b135690d7dd01f3dd8a8ab291c35a683a","impliedFormat":1},{"version":"9666f2f84b985b62400d2e5ab0adae9ff44de9b2a34803c2c5bd3c8325b17dc0","impliedFormat":1},{"version":"40cd35c95e9cf22cfa5bd84e96408b6fcbca55295f4ff822390abb11afbc3dca","impliedFormat":1},{"version":"b1616b8959bf557feb16369c6124a97a0e74ed6f49d1df73bb4b9ddf68acf3f3","impliedFormat":1},{"version":"f501234c5aeeeb5d7659412335227466aaacf30b952372d60afeb21c02c96348","impliedFormat":1},{"version":"40b463c6766ca1b689bfcc46d26b5e295954f32ad43e37ee6953c0a677e4ae2b","impliedFormat":1},{"version":"358f74dc35927dc88ea86dd201a2b98e701c281615e6b30a4c153eb0bb90ef71","impliedFormat":1},{"version":"8b91ff5bb912be3ea213cbcf0075aace1f5d4ff249a0d227ed673868cb7bfabc","impliedFormat":1},{"version":"80aae6afc67faa5ac0b32b5b8bc8cc9f7fa299cff15cf09cc2e11fd28c6ae29e","impliedFormat":1},{"version":"f473cd2288991ff3221165dcf73cd5d24da30391f87e85b3dd4d0450c787a391","impliedFormat":1},{"version":"499e5b055a5aba1e1998f7311a6c441a369831c70905cc565ceac93c28083d53","impliedFormat":1},{"version":"8aee8b6d4f9f62cf3776cda1305fb18763e2aade7e13cea5bbe699112df85214","impliedFormat":1},{"version":"98498b101803bb3dde9f76a56e65c14b75db1cc8bec5f4db72be541570f74fc5","impliedFormat":1},{"version":"706abfbafe0ed5f685357375e89bbf48879549ea1772185d77d15f587c5c9400","impliedFormat":1},{"version":"5d0375ca7310efb77e3ef18d068d53784faf62705e0ad04569597ae0e755c401","impliedFormat":1},{"version":"013ff793053d33a15be4614efdd6c50247bbf0b26d6bc58ba338622a7441b543","impliedFormat":1},{"version":"addf417b9eb3f938fddf8d81e96393a165e4be0d4a8b6402292f9c634b1cb00d","impliedFormat":1},{"version":"436d7b4543b340b0f3eef4310d524242e41369b9652aa9c70428767c4dcac455","impliedFormat":1},{"version":"adf27937dba6af9f08a68c5b1d3fce0ca7d4b960c57e6d6c844e7d1a8e53adae","impliedFormat":1},{"version":"12950411eeab8563b349cb7959543d92d8d02c289ed893d78499a19becb5a8cc","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"e99963ae1e3a48ca7a7958c02f3e88bb963eb7978c28b68ae6b8c9f03309d83c","impliedFormat":1},{"version":"c3f5289820990ab66b70c7fb5b63cb674001009ff84b13de40619619a9c8175f","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3275d55fac10b799c9546804126239baf020d220136163f763b55a74e50e750","affectsGlobalScope":true,"impliedFormat":1},{"version":"fa68a0a3b7cb32c00e39ee3cd31f8f15b80cac97dce51b6ee7fc14a1e8deb30b","affectsGlobalScope":true,"impliedFormat":1},{"version":"1cf059eaf468efcc649f8cf6075d3cb98e9a35a0fe9c44419ec3d2f5428d7123","affectsGlobalScope":true,"impliedFormat":1},{"version":"6c36e755bced82df7fb6ce8169265d0a7bb046ab4e2cb6d0da0cb72b22033e89","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"279d0cc1a72879918854265c3405369aa2d4d23509b8694ea102995b298cc5e2","affectsGlobalScope":true,"impliedFormat":1},{"version":"90e85f9bc549dfe2b5749b45fe734144e96cd5d04b38eae244028794e142a77e","affectsGlobalScope":true,"impliedFormat":1},{"version":"e0a5deeb610b2a50a6350bd23df6490036a1773a8a71d70f2f9549ab009e67ee","affectsGlobalScope":true,"impliedFormat":1},{"version":"594ae90cacd813fa392ff80d2e0a8eff4e41f4a136329a940e321399dd8895b4","impliedFormat":1},{"version":"d1f333ade8ff35a409b4984e1f11956fe11c61855b0c7e9b59f0313e48b40c4a","impliedFormat":1},{"version":"0224aa4b3464895d69c413a640a19ac2166778a74eb5eb3b36b021c72d42b274","impliedFormat":1},{"version":"575aa163c4c32e5b82e0e99b1f9f80806e1d78bfa259706e05139251c022277b","affectsGlobalScope":true,"impliedFormat":1},{"version":"7fb21326854faaa31ef02c9d51629fb6acedacb9396e74bf22ff8409441ea9ae","impliedFormat":1},{"version":"2fbf504c4791f9d32cd766cfe6b605bcda63289b925401953a7900db9af85348","impliedFormat":1},{"version":"ed0fb633cae35948d9e144004299a4bdf1ab912667c787b7fbffcd6d8c7b92a2","impliedFormat":1},{"version":"1678b04557dca52feab73cc67610918a7f5e25bfdba3e7fa081acd625d93106d","impliedFormat":1},{"version":"9019e48ace02a7f39315d84261f4a3dd23b7a3b1f6584e694001ac93971791b7","impliedFormat":1},{"version":"2f78692a85ada51c8f0988184d34d28436c1040e8ccf0758ba70d4b32b9776ad","impliedFormat":1},{"version":"97581dc7099ef3d844c83706d53a7ecf895c0e867fbf6b9dc035bb3080f677bd","impliedFormat":1},{"version":"e494b286c8e27c52f8c7f945aa80ff223f2a3cd4f7a2619fa8991f1459e26f07","impliedFormat":1},{"version":"f54f5f9e10bbceba7515dfad0ffc89dffdb8d749d0604594c57a725cf6d79c20","impliedFormat":1},{"version":"41d17e1ad9a002feb11c8cdd2777e5bbc0cdb1e3f595d237e4dded0b6949983b","impliedFormat":1},{"version":"8c7e618c2a91ea7f6b5cca272a295864e92c16413be8fc56a943e8c7d5320011","affectsGlobalScope":true,"impliedFormat":1},{"version":"13f487e411f9657df0e76572e500c1209b8fe95ee3b4cc6e6e7913c15f56207d","impliedFormat":1},{"version":"9d37b8a9678efbcdf38238b59ce8e6f7db70aba1a516f3a4a671a301dbacfb3d","impliedFormat":1},{"version":"a47a792b8cff71443be8dfb199f2b77e102a7bf9d4f90c18059f05d9af2d7413","impliedFormat":1},{"version":"ad50512520720d10294c629cb4e2df23891c3fcbeaca00fbfb9e6bbea65f3dd6","impliedFormat":1},{"version":"189769511b45c93b23ba76069f7701d3b631cfbedc1eb94c7753486c78736f78","impliedFormat":1},{"version":"2c2bdaa1d8ead9f68628d6d9d250e46ee8e81aa4898b4769a36956ae15e060fe","impliedFormat":1},{"version":"ba389fd3d7fba6670e97bc82eb12469dcb371d22f24e63859c1df5a083c823ed","impliedFormat":1},{"version":"5ff4433a2deae4f85ab1377e90a7554ce6b47ae51c69a84ca30a6e22fae85834","impliedFormat":1},{"version":"82b91e4e42e6c41bc7fc1b6c2dc5eba6a2ba98375eb1f210e6ff6bba2d54177e","impliedFormat":1},{"version":"97234c5303866576f913d0ccae7d58d6322d9e803c7bf1228a3fda46ab8087b2","affectsGlobalScope":true,"impliedFormat":1},{"version":"961dec547748827cb6b45f6fdc66273f7bacd9c73103c6779f070f2fd07f23f9","impliedFormat":1},{"version":"4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","impliedFormat":1},{"version":"73eeb740dacc45adc607a4f59f90fa9dbe2717d93d82f115f45f34e18f8d644a","impliedFormat":1},{"version":"ec501101c2a96133a6c695f934c8f6642149cc728571b29cbb7b770984c1088e","impliedFormat":1},{"version":"b214ebcf76c51b115453f69729ee8aa7b7f8eccdae2a922b568a45c2d7ff52f7","impliedFormat":1},{"version":"429c9cdfa7d126255779efd7e6d9057ced2d69c81859bbab32073bad52e9ba76","impliedFormat":1},{"version":"d251cda16f3f6a3e07f07c9e6e823ef6c583c63f653eb8777dafa749a78298e3","impliedFormat":1},{"version":"361939136b496a38b3e6b7be750bbb6998ef289bb8dd304c673138542ca16137","affectsGlobalScope":true,"impliedFormat":1},{"version":"230763250f20449fa7b3c9273e1967adb0023dc890d4be1553faca658ee65971","impliedFormat":1},{"version":"c3e9078b60cb329d1221f5878e88cecfa3e74460550e605a58fcfb41a66029ff","impliedFormat":1},{"version":"89e2568ebc2ec1e4149384b105e80e8bbf41eb4d711547f1121f4f628028de96","impliedFormat":1},{"version":"441b9bb09013654aa3d050e68b06464d8959b473e85868249d9d18f692acd35b","impliedFormat":1},{"version":"bc18a1991ba681f03e13285fa1d7b99b03b67ee671b7bc936254467177543890","impliedFormat":1},{"version":"55246f15e33ff1e2e9e679b25fa9790a48db55dc63d567fe25fac8b6a0efe911","impliedFormat":1},{"version":"fa94bbf532b7af8f394b95fa310980d6e20bd2d4c871c6a6cb9f70f03750a44b","impliedFormat":1},{"version":"925734f303b7f0cc111d42aeb21781d38a79e6d5ac05b2b1400cd1861a75d27b","impliedFormat":1},{"version":"5b26c4dd672d88336bb929787c9bfb55119e80ba89ec6dc923da1c063892843e","affectsGlobalScope":true,"impliedFormat":1},{"version":"7fa2214bb0d64701bc6f9ce8cde2fd2ff8c571e0b23065fa04a8a5a6beb91511","impliedFormat":1},{"version":"7286e4e5f80c0b1ab16addbdbbc9dd47fbae1c42034189261177b84d745cde3b","impliedFormat":1},{"version":"f12624a4a8d042b68914eac1b0a16571fc1c523173fcdf2517c65d191bd5a86c","impliedFormat":1},{"version":"cd2a656ba1d250c2002190b683e3826bf4362b6919450bc0f9bbf5612ebad837","impliedFormat":1},{"version":"841983e39bd4cbb463be385e92fda11057cab368bf27100a801c492f1d86cbaa","impliedFormat":1},{"version":"3e221ff0522e6ff95aa74a5211126aaf4d7e85ed8c8ff19290d591ad4bef988f","impliedFormat":1},{"version":"7da83f6429c6298ebf2be43d296b56ecfc94c9c28f5471b2f23b87545b914cea","impliedFormat":1},{"version":"e4156ddb25aa0e3b5303d372f26957b36778f0f6bbd4326359269873295e3058","affectsGlobalScope":true,"impliedFormat":1},{"version":"cc1b433a84cae05ddc5672d4823170af78606ad21ecef60dbc4570190cbf1357","impliedFormat":1},{"version":"751048d4aa67e20e5ecd2692340ea0d19bae42a20cc651d6f56d095e411ce3ac","impliedFormat":1},{"version":"7f78cfb2b343838612c192cb251746e3a7c62ac7675726a47e130d9b213f6580","impliedFormat":1},{"version":"aed8f3e5c7e53462565eedf34a9bcb700393cb2c1ab0c768602b929c3ed3145d","impliedFormat":1},{"version":"8e2577e7262051fd3c5bd6ca2b2056d358ff8853565720f92455860824c25188","impliedFormat":1},{"version":"7ec8d7d483f7394f9da611b10d3a0e402f76ff5c991261e6ce43a15f81ca4258","impliedFormat":1},{"version":"bb9dbb4b2ad81e3e71ec5ba4314973718555b9d04ba2a17dfbf875efecb8e2c0","impliedFormat":1},{"version":"9021dc5be8f3a87af5cede29221188a6497e2092b6889e0be212ef6b6b7153e9","impliedFormat":1},{"version":"4a8c8fd951d9fd9e0775f0aae8ed1f8b528204e24a2600bea3a1228ea83de52c","impliedFormat":1},{"version":"5b9cc0c724a8ebc7a873ab8e73c20b2416cef04b9e9d7f95ef1fa0fdcd4e0ec8","impliedFormat":1},{"version":"99ab6d0d660ce4d21efb52288a39fd35bb3f556980ec5463b1ae8f304a3bbc85","impliedFormat":1},{"version":"80a4b7023a2cc9f14d3f2e4635d6615ab3eff4b5b3630f62a8e73992fdd8cdb9","impliedFormat":1},{"version":"ec62d16f95636123624a69191a35b5df44b4b0a6428977e856c5739c0a787471","impliedFormat":1},{"version":"afa1c49f8e559e413d57343339db857d2a8159435cf9cf7d4deb41718fff1b88","impliedFormat":1},{"version":"c46f111af647c4134ae869653130610d62da321f90ebf19e186a3ea4bed79350","impliedFormat":1},{"version":"211440ce81e87b3491cdf07155881344b0a61566df6e749acff0be7e8b9d1a07","impliedFormat":1},{"version":"5d9a0b6e6be8dbb259f64037bce02f34692e8c1519f5cd5d467d7fa4490dced4","impliedFormat":1},{"version":"880da0e0f3ebca42f9bd1bc2d3e5e7df33f2619d85f18ee0ed4bd16d1800bc32","impliedFormat":1},{"version":"d181175535fa27fcb90c2b32f39850768e12e0ce07c0eedd687739e984c9ab09","affectsGlobalScope":true,"impliedFormat":1}],"root":[[63,66]],"options":{"allowJs":false,"declaration":true,"declarationDir":"./","declarationMap":false,"emitDeclarationOnly":true,"module":99,"outDir":"./","rootDir":"../src","skipLibCheck":true,"strict":true,"target":7,"tsBuildInfoFile":"./.dts.tsbuildinfo"},"referencedMap":[[59,1],[51,1],[62,2],[61,1],[58,1],[55,1],[56,1],[60,1],[52,3],[54,4],[49,5],[53,6],[50,6],[57,1],[66,7],[64,8],[65,9],[63,10],[197,11],[195,12],[196,5],[198,5],[130,13],[131,13],[132,14],[68,15],[133,16],[134,17],[135,18],[136,19],[137,20],[138,21],[139,22],[140,23],[141,24],[142,24],[143,25],[144,26],[145,5],[146,27],[147,28],[69,5],[67,5],[148,29],[149,30],[150,31],[194,32],[151,33],[152,34],[153,33],[154,35],[155,36],[157,37],[158,38],[159,38],[160,38],[161,39],[162,40],[163,41],[164,42],[165,43],[166,44],[167,44],[168,45],[169,5],[170,5],[171,46],[172,47],[173,48],[174,49],[175,50],[176,51],[177,52],[178,53],[179,54],[180,55],[181,56],[182,57],[183,58],[184,59],[185,60],[186,61],[187,62],[188,63],[189,64],[190,65],[70,33],[71,5],[72,66],[73,67],[74,5],[75,68],[76,5],[121,69],[122,70],[123,71],[124,71],[125,72],[126,5],[127,16],[128,73],[129,70],[191,74],[192,75],[193,76],[156,5],[47,5],[48,5],[8,5],[10,5],[9,5],[2,5],[11,5],[12,5],[13,5],[14,5],[15,5],[16,5],[17,5],[18,5],[3,5],[19,5],[20,5],[4,5],[21,5],[25,5],[22,5],[23,5],[24,5],[26,5],[27,5],[28,5],[5,5],[29,5],[30,5],[31,5],[32,5],[6,5],[36,5],[33,5],[34,5],[35,5],[37,5],[7,5],[38,5],[43,5],[44,5],[39,5],[40,5],[41,5],[42,5],[1,5],[45,5],[46,5],[95,77],[109,78],[92,79],[110,80],[119,81],[83,82],[84,83],[82,84],[118,85],[113,86],[117,87],[86,88],[96,89],[106,90],[85,91],[116,92],[80,93],[81,86],[87,89],[88,5],[94,94],[91,89],[78,95],[120,96],[111,97],[99,98],[98,89],[100,99],[103,100],[97,101],[101,102],[114,85],[89,103],[90,104],[104,105],[79,80],[108,106],[107,89],[93,104],[102,107],[105,108],[112,5],[77,5],[115,109]],"semanticDiagnosticsPerFile":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198],"version":"5.9.3"}
|
package/es/index.d.ts
CHANGED
package/es/index.js
CHANGED
|
@@ -3,4 +3,3 @@ import type { LayoutRenderContext, LayoutRenderHandle } from './runtime';
|
|
|
3
3
|
export type RuntimeMaterialSource = MaterialRegistry | readonly MaterialDefinition[] | undefined;
|
|
4
4
|
export declare function normalizeMaterialSource(source: RuntimeMaterialSource): MaterialRegistry | undefined;
|
|
5
5
|
export declare function renderRuntimeMaterial(context: LayoutRenderContext, materials: MaterialRegistry | undefined): LayoutRenderHandle | undefined;
|
|
6
|
-
//# sourceMappingURL=material-renderer.d.ts.map
|
package/es/material-renderer.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ***********************************
|
|
3
3
|
* @composy/layout-runtime v0.0.1 *
|
|
4
4
|
* Built with rollup *
|
|
5
|
-
* Build time: 2024-
|
|
5
|
+
* Build time: 2024-10-12 17:44:18 *
|
|
6
6
|
* Build mode: production *
|
|
7
7
|
* Minified: No *
|
|
8
8
|
* ***********************************
|
|
@@ -27,17 +27,26 @@ function renderRuntimeMaterial(context, materials) {
|
|
|
27
27
|
placement: context.placement,
|
|
28
28
|
breakpointId: context.breakpointId
|
|
29
29
|
});
|
|
30
|
-
if (rendered
|
|
30
|
+
if (isDomNode(rendered)) node = rendered;
|
|
31
31
|
else if (typeof rendered === "string") {
|
|
32
32
|
const wrapper = host.createElement("div");
|
|
33
|
-
wrapper.innerHTML = sanitizeMarkup(rendered);
|
|
33
|
+
wrapper.innerHTML = sanitizeMarkup(host, rendered);
|
|
34
34
|
node = wrapper;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
if (!node) return void 0;
|
|
38
|
+
const appliedProps = /* @__PURE__ */ new Set();
|
|
38
39
|
const applyProps = (item) => {
|
|
39
|
-
if (!(node
|
|
40
|
-
|
|
40
|
+
if (!isElement(node, host)) return;
|
|
41
|
+
const nextProps = item.props ?? {};
|
|
42
|
+
for (const key of appliedProps) {
|
|
43
|
+
if (key in nextProps) continue;
|
|
44
|
+
node.removeAttribute(key);
|
|
45
|
+
delete node.dataset[`prop${toDataKey(key)}`];
|
|
46
|
+
appliedProps.delete(key);
|
|
47
|
+
}
|
|
48
|
+
for (const [key, value] of Object.entries(nextProps)) {
|
|
49
|
+
appliedProps.add(key);
|
|
41
50
|
try {
|
|
42
51
|
node[key] = value;
|
|
43
52
|
} catch {}
|
|
@@ -60,8 +69,32 @@ function renderRuntimeMaterial(context, materials) {
|
|
|
60
69
|
function toDataKey(value) {
|
|
61
70
|
return value.replace(/[^a-zA-Z0-9]/g, "");
|
|
62
71
|
}
|
|
63
|
-
function
|
|
64
|
-
return value
|
|
72
|
+
function isDomNode(value) {
|
|
73
|
+
return Boolean(value && typeof value === "object" && "nodeType" in value && typeof value.cloneNode === "function");
|
|
74
|
+
}
|
|
75
|
+
function isElement(value, document) {
|
|
76
|
+
if (!value || value.nodeType !== 1) return false;
|
|
77
|
+
const ElementConstructor = document.defaultView?.HTMLElement;
|
|
78
|
+
return ElementConstructor ? value instanceof ElementConstructor : typeof value.setAttribute === "function";
|
|
79
|
+
}
|
|
80
|
+
function sanitizeMarkup(document, value) {
|
|
81
|
+
const template = document.createElement("template");
|
|
82
|
+
template.innerHTML = value;
|
|
83
|
+
template.content.querySelectorAll("script,style,iframe,object,embed,foreignObject").forEach((node) => node.remove());
|
|
84
|
+
template.content.querySelectorAll("*").forEach((element) => {
|
|
85
|
+
for (const attribute of Array.from(element.attributes)) {
|
|
86
|
+
const name = attribute.name.toLowerCase();
|
|
87
|
+
const content = attribute.value.trim().toLowerCase();
|
|
88
|
+
if (name.startsWith("on") || [
|
|
89
|
+
"href",
|
|
90
|
+
"src",
|
|
91
|
+
"xlink:href",
|
|
92
|
+
"formaction",
|
|
93
|
+
"srcdoc"
|
|
94
|
+
].includes(name) && /^(?:javascript:|data:text\/html)/i.test(content)) element.removeAttribute(attribute.name);
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
return template.innerHTML;
|
|
65
98
|
}
|
|
66
99
|
//#endregion
|
|
67
100
|
export { normalizeMaterialSource, renderRuntimeMaterial };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"material-renderer.js","names":[],"sources":["../src/material-renderer.ts"],"sourcesContent":["import {\n createMaterialRegistry,\n type LayoutNode,\n type MaterialDefinition,\n type MaterialRegistry,\n} from '@composy/layout-core'\nimport type { LayoutRenderContext, LayoutRenderHandle } from './runtime'\n\nexport type RuntimeMaterialSource =\n MaterialRegistry | readonly MaterialDefinition[] | undefined\n\nexport function normalizeMaterialSource(\n source: RuntimeMaterialSource\n): MaterialRegistry | undefined {\n if (!source) return undefined\n if (Array.isArray(source)) return createMaterialRegistry(source)\n return source as MaterialRegistry\n}\n\nexport function renderRuntimeMaterial(\n context: LayoutRenderContext,\n materials: MaterialRegistry | undefined\n): LayoutRenderHandle | undefined {\n const material = materials?.get(context.item.type)\n const renderer =\n material?.renderers?.webcomponent ?? material?.renderers?.html\n if (!material || !renderer) return undefined\n\n const host = context.shell.ownerDocument\n let node: Node | undefined\n if (renderer.tagName) {\n node = host.createElement(renderer.tagName)\n } else if (renderer.render) {\n const rendered = renderer.render({\n item: context.item,\n placement: context.placement,\n breakpointId: context.breakpointId,\n })\n if (rendered
|
|
1
|
+
{"version":3,"file":"material-renderer.js","names":[],"sources":["../src/material-renderer.ts"],"sourcesContent":["import {\n createMaterialRegistry,\n type LayoutNode,\n type MaterialDefinition,\n type MaterialRegistry,\n} from '@composy/layout-core'\nimport type { LayoutRenderContext, LayoutRenderHandle } from './runtime'\n\nexport type RuntimeMaterialSource =\n MaterialRegistry | readonly MaterialDefinition[] | undefined\n\nexport function normalizeMaterialSource(\n source: RuntimeMaterialSource\n): MaterialRegistry | undefined {\n if (!source) return undefined\n if (Array.isArray(source)) return createMaterialRegistry(source)\n return source as MaterialRegistry\n}\n\nexport function renderRuntimeMaterial(\n context: LayoutRenderContext,\n materials: MaterialRegistry | undefined\n): LayoutRenderHandle | undefined {\n const material = materials?.get(context.item.type)\n const renderer =\n material?.renderers?.webcomponent ?? material?.renderers?.html\n if (!material || !renderer) return undefined\n\n const host = context.shell.ownerDocument\n let node: Node | undefined\n if (renderer.tagName) {\n node = host.createElement(renderer.tagName)\n } else if (renderer.render) {\n const rendered = renderer.render({\n item: context.item,\n placement: context.placement,\n breakpointId: context.breakpointId,\n })\n if (isDomNode(rendered)) node = rendered\n else if (typeof rendered === 'string') {\n const wrapper = host.createElement('div')\n wrapper.innerHTML = sanitizeMarkup(host, rendered)\n node = wrapper\n }\n }\n if (!node) return undefined\n\n const appliedProps = new Set<string>()\n const applyProps = (item: LayoutNode): void => {\n if (!isElement(node, host)) return\n const nextProps = item.props ?? {}\n for (const key of appliedProps) {\n if (key in nextProps) continue\n node.removeAttribute(key)\n delete node.dataset[`prop${toDataKey(key)}`]\n appliedProps.delete(key)\n }\n for (const [key, value] of Object.entries(nextProps)) {\n appliedProps.add(key)\n try {\n ;(node as unknown as Record<string, unknown>)[key] = value\n } catch {\n // Some custom elements expose readonly properties. The attribute is a\n // useful fallback for string-like values.\n }\n if (\n value === null ||\n value === undefined ||\n typeof value === 'object' ||\n typeof value === 'function'\n ) {\n if (value !== null && value !== undefined)\n node.dataset[`prop${toDataKey(key)}`] = JSON.stringify(value)\n } else node.setAttribute(key, String(value))\n }\n }\n applyProps(context.item)\n context.shell.replaceChildren(node)\n return {\n update(next) {\n applyProps(next.item)\n },\n destroy() {\n if (node?.parentNode === context.shell) context.shell.removeChild(node)\n },\n }\n}\n\nfunction toDataKey(value: string): string {\n return value.replace(/[^a-zA-Z0-9]/g, '')\n}\n\nfunction isDomNode(value: unknown): value is Node {\n return Boolean(\n value &&\n typeof value === 'object' &&\n 'nodeType' in value &&\n typeof (value as { cloneNode?: unknown }).cloneNode === 'function'\n )\n}\n\nfunction isElement(\n value: Node | undefined,\n document: Document\n): value is HTMLElement {\n if (!value || value.nodeType !== 1) return false\n const ElementConstructor = document.defaultView?.HTMLElement\n return ElementConstructor\n ? value instanceof ElementConstructor\n : typeof (value as Element).setAttribute === 'function'\n}\n\nfunction sanitizeMarkup(document: Document, value: string): string {\n const template = document.createElement('template')\n template.innerHTML = value\n template.content\n .querySelectorAll('script,style,iframe,object,embed,foreignObject')\n .forEach(node => node.remove())\n template.content.querySelectorAll<HTMLElement>('*').forEach(element => {\n for (const attribute of Array.from(element.attributes)) {\n const name = attribute.name.toLowerCase()\n const content = attribute.value.trim().toLowerCase()\n if (\n name.startsWith('on') ||\n (['href', 'src', 'xlink:href', 'formaction', 'srcdoc'].includes(name) &&\n /^(?:javascript:|data:text\\/html)/i.test(content))\n )\n element.removeAttribute(attribute.name)\n }\n })\n return template.innerHTML\n}\n"],"mappings":";;;;;;;;;;;AAWO,SAAS,wBACd,QAC8B;CAC9B,IAAI,CAAC,QAAQ,OAAO,KAAA;CACpB,IAAI,MAAM,QAAQ,MAAM,GAAG,OAAO,uBAAuB,MAAM;CAC/D,OAAO;AACT;AAEO,SAAS,sBACd,SACA,WACgC;CAChC,MAAM,WAAW,WAAW,IAAI,QAAQ,KAAK,IA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CAClC,OAAO;EACL,OAAO,MAAM;GACX,WAAW,KAAK,IAAI;EACtB;EACA,UAAU;GACR,IAAI,MAAM,eAAe,QAAQ,OAAO,QAAQ,MAAM,YAAY,IAAI;EACxE;CACF;AACF;AAEA,SAAS,UAAU,OAAuB;CACxC,OAAO,MAAM,QAAQ,iBAAiB,EAAE;AAC1C;AAEA,SAAS,UAAU,OAA+B;CAChD,OAAO,QACL,SACA,OAAO,UAAU,YACjB,cAAc,SACd,OAAQ,MAAkC,cAAc,UAC1D;AACF;AAEA,SAAS,UACP,OACA,UACsB;CACtB,IAAI,CAAC,SAAS,MAAM,aAAa,GAAG,OAAO;CAC3C,MAAM,qBAAqB,SAAS,aAAa;CACjD,OAAO,qBACH,iBAAiB,qBACjB,OAAQ,MAAkB,iBAAiB;AACjD;AAEA,SAAS,eAAe,UAAoB,OAAuB;CACjE,MAAM,WAAW,SAAS,cAAc,UAAU;CAClD,SAAS,YAAY;CACrB,SAAS,QACN,iBAAiB,gDAAgD,CAAA,CACjE,SAAQ,SAAQ,KAAK,OAAO,CAAC;CAChC,SAAS,QAAQ,iBAA8B,GAAG,CAAA,CAAE,SAAQ,YAAW;EACrE,KAAA,MAAW,aAAa,MAAM,KAAK,QAAQ,UAAU,GAAG;GACtD,MAAM,OAAO,UAAU,KAAK,YAAY;GACxC,MAAM,UAAU,UAAU,MAAM,KAAK,CAAA,CAAE,YAAY;GACnD,IACE,KAAK,WAAW,IAAI,KACnB;IAAC;IAAQ;IAAO;IAAc;IAAc;GAAQ,CAAA,CAAE,SAAS,IAAI,KAClE,oCAAoC,KAAK,OAAO,GAElD,QAAQ,gBAAgB,UAAU,IAAI;EAC1C;CACF,CAAC;CACD,OAAO,SAAS;AAClB"}
|
package/es/runtime.d.ts
CHANGED
package/es/runtime.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ***********************************
|
|
3
3
|
* @composy/layout-runtime v0.0.1 *
|
|
4
4
|
* Built with rollup *
|
|
5
|
-
* Build time: 2024-
|
|
5
|
+
* Build time: 2024-10-12 17:44:18 *
|
|
6
6
|
* Build mode: production *
|
|
7
7
|
* Minified: No *
|
|
8
8
|
* ***********************************
|
|
@@ -35,15 +35,11 @@ function createLayoutRuntime(options) {
|
|
|
35
35
|
const currentIds = new Set(document.items.map((item) => item.id));
|
|
36
36
|
for (const [id, handle] of handles) {
|
|
37
37
|
if (currentIds.has(id)) continue;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
if (shell && ownedShells.has(shell)) shell.remove();
|
|
44
|
-
if (shell) ownedShells.delete(shell);
|
|
45
|
-
shells.delete(id);
|
|
46
|
-
}
|
|
38
|
+
disposeHandle(id, handle);
|
|
39
|
+
const shell = shells.get(id);
|
|
40
|
+
if (shell && ownedShells.has(shell)) shell.remove();
|
|
41
|
+
if (shell) ownedShells.delete(shell);
|
|
42
|
+
shells.delete(id);
|
|
47
43
|
}
|
|
48
44
|
for (const item of document.items) {
|
|
49
45
|
const placement = item.layout[breakpointId];
|
|
@@ -61,7 +57,11 @@ function createLayoutRuntime(options) {
|
|
|
61
57
|
shells.set(item.id, shell);
|
|
62
58
|
}
|
|
63
59
|
Object.assign(shell.style, resolveItemStyle(item, breakpointId));
|
|
64
|
-
if (!placement)
|
|
60
|
+
if (!placement) {
|
|
61
|
+
const handle = handles.get(item.id);
|
|
62
|
+
if (handle) disposeHandle(item.id, handle);
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
65
|
const context = {
|
|
66
66
|
shell,
|
|
67
67
|
item,
|
|
@@ -79,6 +79,15 @@ function createLayoutRuntime(options) {
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
+
function disposeHandle(id, handle = handles.get(id)) {
|
|
83
|
+
if (!handle) return;
|
|
84
|
+
handles.delete(id);
|
|
85
|
+
try {
|
|
86
|
+
handle.destroy?.();
|
|
87
|
+
} catch (error) {
|
|
88
|
+
options.onError?.(error);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
82
91
|
function updateBreakpoint(width) {
|
|
83
92
|
if (!document || manualBreakpoint) return;
|
|
84
93
|
const next = resolveBreakpoint(document, width).id;
|
|
@@ -119,6 +128,10 @@ function createLayoutRuntime(options) {
|
|
|
119
128
|
render();
|
|
120
129
|
},
|
|
121
130
|
setBreakpoint(id) {
|
|
131
|
+
if (id && document && !document.breakpoints.some((bp) => bp.id === id)) {
|
|
132
|
+
options.onError?.(/* @__PURE__ */ new Error(`Unknown breakpoint ${id}.`));
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
122
135
|
manualBreakpoint = id;
|
|
123
136
|
if (id) activeBreakpoint = id;
|
|
124
137
|
else updateBreakpointFromContainer();
|
|
@@ -134,7 +147,7 @@ function createLayoutRuntime(options) {
|
|
|
134
147
|
if (!mounted) return;
|
|
135
148
|
observer?.disconnect();
|
|
136
149
|
observer = void 0;
|
|
137
|
-
for (const handle of handles
|
|
150
|
+
for (const [id, handle] of handles) disposeHandle(id, handle);
|
|
138
151
|
handles.clear();
|
|
139
152
|
for (const shell of shells.values()) if (ownedShells.has(shell)) shell.remove();
|
|
140
153
|
shells.clear();
|
|
@@ -146,6 +159,8 @@ function createLayoutRuntime(options) {
|
|
|
146
159
|
options.container.style.removeProperty("direction");
|
|
147
160
|
options.container.style.removeProperty("min-height");
|
|
148
161
|
options.container.style.removeProperty("max-height");
|
|
162
|
+
manualBreakpoint = void 0;
|
|
163
|
+
activeBreakpoint = void 0;
|
|
149
164
|
mounted = false;
|
|
150
165
|
}
|
|
151
166
|
};
|
package/es/runtime.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","names":[],"sources":["../src/runtime.ts"],"sourcesContent":["import type {\n BreakpointId,\n LayoutDocument,\n LayoutNode,\n LayoutPlacement,\n MaterialDefinition,\n MaterialRegistry,\n} from '@composy/layout-core'\nimport { resolveBreakpoint, validateLayoutDocument } from '@composy/layout-core'\nimport { resolveGridStyle, resolveItemStyle } from './styles'\nimport {\n normalizeMaterialSource,\n renderRuntimeMaterial,\n} from './material-renderer'\n\nexport interface LayoutRenderContext {\n shell: HTMLElement\n item: LayoutNode\n placement: LayoutPlacement\n breakpointId: BreakpointId\n}\nexport interface LayoutRenderHandle {\n update?(context: LayoutRenderContext): void\n destroy?(): void\n}\nexport interface LayoutRuntimeOptions {\n container: HTMLElement\n document?: LayoutDocument\n /** Lets a host adapter provide an existing light-DOM item shell. */\n getItemShell?: (item: LayoutNode) => HTMLElement | undefined\n renderItem?: (context: LayoutRenderContext) => LayoutRenderHandle | void\n /** Material registry used by the framework-neutral default renderer. */\n materials?: MaterialRegistry | readonly MaterialDefinition[]\n observeResize?: boolean\n onBreakpointChange?: (id: BreakpointId) => void\n onError?: (error: unknown) => void\n}\n\nexport interface LayoutRuntime {\n mount(): void\n update(document: LayoutDocument): void\n setBreakpoint(id?: BreakpointId): void\n getBreakpoint(): BreakpointId | undefined\n getContainer(): HTMLElement\n destroy(): void\n}\n\nexport function createLayoutRuntime(\n options: LayoutRuntimeOptions\n): LayoutRuntime {\n let document = options.document\n let mounted = false\n let manualBreakpoint: BreakpointId | undefined\n let activeBreakpoint: BreakpointId | undefined\n let observer: ResizeObserver | undefined\n const handles = new Map<string, LayoutRenderHandle>()\n const shells = new Map<string, HTMLElement>()\n const ownedShells = new Set<HTMLElement>()\n const materials = normalizeMaterialSource(options.materials)\n\n function render(): void {\n if (!mounted || !document) return\n const result = validateLayoutDocument(document)\n if (!result.valid) {\n options.onError?.(\n new Error(result.issues[0]?.message ?? 'Invalid layout document')\n )\n return\n }\n const breakpointId =\n manualBreakpoint ?? activeBreakpoint ?? document.defaultBreakpointId\n activeBreakpoint = breakpointId\n const gridStyle = resolveGridStyle(document, breakpointId)\n Object.assign(options.container.style, gridStyle)\n const currentIds = new Set(document.items.map(item => item.id))\n for (const [id, handle] of handles) {\n if (currentIds.has(id)) continue\n try {\n handle.destroy?.()\n } finally {\n handles.delete(id)\n const shell = shells.get(id)\n if (shell && ownedShells.has(shell)) shell.remove()\n if (shell) ownedShells.delete(shell)\n shells.delete(id)\n }\n }\n for (const item of document.items) {\n const placement = item.layout[breakpointId]\n let shell = shells.get(item.id)\n if (!shell) {\n shell = options.getItemShell?.(item)\n if (!shell) {\n shell = options.container.ownerDocument.createElement('div')\n shell.className = 'ldesign-layout-item'\n shell.dataset.layoutItemId = item.id\n shell.dataset.layoutType = item.type\n ownedShells.add(shell)\n options.container.appendChild(shell)\n }\n shells.set(item.id, shell)\n }\n Object.assign(shell.style, resolveItemStyle(item, breakpointId))\n if (!placement) continue\n const context = { shell, item, placement, breakpointId }\n try {\n let handle = handles.get(item.id)\n if (!handle) {\n handle = options.renderItem\n ? (options.renderItem(context) ?? {})\n : (renderRuntimeMaterial(context, materials) ?? {})\n handles.set(item.id, handle)\n } else handle.update?.(context)\n } catch (error) {\n options.onError?.(error)\n }\n }\n }\n\n function updateBreakpoint(width: number): void {\n if (!document || manualBreakpoint) return\n const next = resolveBreakpoint(document, width).id\n if (next !== activeBreakpoint) {\n const previous = activeBreakpoint\n activeBreakpoint = next\n options.onBreakpointChange?.(next)\n if (previous !== next) render()\n }\n }\n\n function updateBreakpointFromContainer(): void {\n if (!document || manualBreakpoint) return\n const width =\n options.container.getBoundingClientRect().width ||\n options.container.clientWidth\n // A hidden or detached container has no measurable width. Keep the\n // document default until the first real resize instead of selecting the\n // smallest breakpoint for width 0.\n if (width > 0) updateBreakpoint(width)\n else if (activeBreakpoint !== document.defaultBreakpointId) {\n const previous = activeBreakpoint\n activeBreakpoint = document.defaultBreakpointId\n if (previous) options.onBreakpointChange?.(activeBreakpoint)\n }\n }\n\n return {\n mount() {\n if (mounted) return\n mounted = true\n if (\n options.observeResize !== false &&\n typeof ResizeObserver !== 'undefined'\n ) {\n observer = new ResizeObserver(entries => {\n const width =\n entries[0]?.contentRect.width ?? options.container.clientWidth\n if (width > 0) updateBreakpoint(width)\n else updateBreakpointFromContainer()\n })\n observer.observe(options.container)\n }\n updateBreakpointFromContainer()\n render()\n },\n update(next) {\n document = next\n render()\n },\n setBreakpoint(id) {\n manualBreakpoint = id\n if (id) activeBreakpoint = id\n else updateBreakpointFromContainer()\n render()\n },\n getBreakpoint() {\n return activeBreakpoint\n },\n getContainer() {\n return options.container\n },\n destroy() {\n if (!mounted) return\n observer?.disconnect()\n observer = undefined\n for (const handle of handles.values()) handle.destroy?.()\n handles.clear()\n for (const shell of shells.values())\n if (ownedShells.has(shell)) shell.remove()\n shells.clear()\n ownedShells.clear()\n options.container.style.removeProperty('display')\n options.container.style.removeProperty('grid-template-columns')\n options.container.style.removeProperty('grid-auto-rows')\n options.container.style.removeProperty('gap')\n options.container.style.removeProperty('direction')\n options.container.style.removeProperty('min-height')\n options.container.style.removeProperty('max-height')\n mounted = false\n },\n }\n}\n\nexport { resolveGridStyle, resolveItemStyle }\n"],"mappings":";;;;;;;;;;;;;AA+CO,SAAS,oBACd,SACe;CACf,IAAI,WAAW,QAAQ;CACvB,IAAI,UAAU;CACd,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,MAAM,0BAAU,IAAI,IAAgC;CACpD,MAAM,yBAAS,IAAI,IAAyB;CAC5C,MAAM,8BAAc,IAAI,IAAiB;CACzC,MAAM,YAAY,wBAAwB,QAAQ,SAAS;CAE3D,SAAS,SAAe;EACtB,IAAI,CAAC,WAAW,CAAC,UAAU;EAC3B,MAAM,SAAS,uBAAuB,QAAQ;EAC9C,IAAI,CAAC,OAAO,OAAO;GACjB,QAAQ,UACN,IAAI,MAAM,OAAO,OAAO,EAAC,EAAG,WAAW,yBAAyB,CAClE;GACA;EACF;EACA,MAAM,eACJ,oBAAoB,oBAAoB,SAAS;EACnD,mBAAmB;EACnB,MAAM,YAAY,iBAAiB,UAAU,YAAY;EACzD,OAAO,OAAO,QAAQ,UAAU,OAAO,SAAS;EAChD,MAAM,aAAa,IAAI,IAAI,SAAS,MAAM,KAAI,SAAQ,KAAK,EAAE,CAAC;EAC9D,KAAA,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Y,MAAM;GAClB,QAAQ,UAAU,MAAM,eAAe,SAAS;GAChD,QAAQ,UAAU,MAAM,eAAe,uBAAuB;GAC9D,QAAQ,UAAU,MAAM,eAAe,gBAAgB;GACvD,QAAQ,UAAU,MAAM,eAAe,KAAK;GAC5C,QAAQ,UAAU,MAAM,eAAe,WAAW;GAClD,QAAQ,UAAU,MAAM,eAAe,YAAY;GACnD,QAAQ,UAAU,MAAM,eAAe,YAAY;GACnD,UAAU;EACZ;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"runtime.js","names":[],"sources":["../src/runtime.ts"],"sourcesContent":["import type {\n BreakpointId,\n LayoutDocument,\n LayoutNode,\n LayoutPlacement,\n MaterialDefinition,\n MaterialRegistry,\n} from '@composy/layout-core'\nimport { resolveBreakpoint, validateLayoutDocument } from '@composy/layout-core'\nimport { resolveGridStyle, resolveItemStyle } from './styles'\nimport {\n normalizeMaterialSource,\n renderRuntimeMaterial,\n} from './material-renderer'\n\nexport interface LayoutRenderContext {\n shell: HTMLElement\n item: LayoutNode\n placement: LayoutPlacement\n breakpointId: BreakpointId\n}\nexport interface LayoutRenderHandle {\n update?(context: LayoutRenderContext): void\n destroy?(): void\n}\nexport interface LayoutRuntimeOptions {\n container: HTMLElement\n document?: LayoutDocument\n /** Lets a host adapter provide an existing light-DOM item shell. */\n getItemShell?: (item: LayoutNode) => HTMLElement | undefined\n renderItem?: (context: LayoutRenderContext) => LayoutRenderHandle | void\n /** Material registry used by the framework-neutral default renderer. */\n materials?: MaterialRegistry | readonly MaterialDefinition[]\n observeResize?: boolean\n onBreakpointChange?: (id: BreakpointId) => void\n onError?: (error: unknown) => void\n}\n\nexport interface LayoutRuntime {\n mount(): void\n update(document: LayoutDocument): void\n setBreakpoint(id?: BreakpointId): void\n getBreakpoint(): BreakpointId | undefined\n getContainer(): HTMLElement\n destroy(): void\n}\n\nexport function createLayoutRuntime(\n options: LayoutRuntimeOptions\n): LayoutRuntime {\n let document = options.document\n let mounted = false\n let manualBreakpoint: BreakpointId | undefined\n let activeBreakpoint: BreakpointId | undefined\n let observer: ResizeObserver | undefined\n const handles = new Map<string, LayoutRenderHandle>()\n const shells = new Map<string, HTMLElement>()\n const ownedShells = new Set<HTMLElement>()\n const materials = normalizeMaterialSource(options.materials)\n\n function render(): void {\n if (!mounted || !document) return\n const result = validateLayoutDocument(document)\n if (!result.valid) {\n options.onError?.(\n new Error(result.issues[0]?.message ?? 'Invalid layout document')\n )\n return\n }\n const breakpointId =\n manualBreakpoint ?? activeBreakpoint ?? document.defaultBreakpointId\n activeBreakpoint = breakpointId\n const gridStyle = resolveGridStyle(document, breakpointId)\n Object.assign(options.container.style, gridStyle)\n const currentIds = new Set(document.items.map(item => item.id))\n for (const [id, handle] of handles) {\n if (currentIds.has(id)) continue\n disposeHandle(id, handle)\n const shell = shells.get(id)\n if (shell && ownedShells.has(shell)) shell.remove()\n if (shell) ownedShells.delete(shell)\n shells.delete(id)\n }\n for (const item of document.items) {\n const placement = item.layout[breakpointId]\n let shell = shells.get(item.id)\n if (!shell) {\n shell = options.getItemShell?.(item)\n if (!shell) {\n shell = options.container.ownerDocument.createElement('div')\n shell.className = 'ldesign-layout-item'\n shell.dataset.layoutItemId = item.id\n shell.dataset.layoutType = item.type\n ownedShells.add(shell)\n options.container.appendChild(shell)\n }\n shells.set(item.id, shell)\n }\n Object.assign(shell.style, resolveItemStyle(item, breakpointId))\n if (!placement) {\n const handle = handles.get(item.id)\n if (handle) disposeHandle(item.id, handle)\n continue\n }\n const context = { shell, item, placement, breakpointId }\n try {\n let handle = handles.get(item.id)\n if (!handle) {\n handle = options.renderItem\n ? (options.renderItem(context) ?? {})\n : (renderRuntimeMaterial(context, materials) ?? {})\n handles.set(item.id, handle)\n } else handle.update?.(context)\n } catch (error) {\n options.onError?.(error)\n }\n }\n }\n\n function disposeHandle(id: string, handle = handles.get(id)): void {\n if (!handle) return\n handles.delete(id)\n try {\n handle.destroy?.()\n } catch (error) {\n options.onError?.(error)\n }\n }\n\n function updateBreakpoint(width: number): void {\n if (!document || manualBreakpoint) return\n const next = resolveBreakpoint(document, width).id\n if (next !== activeBreakpoint) {\n const previous = activeBreakpoint\n activeBreakpoint = next\n options.onBreakpointChange?.(next)\n if (previous !== next) render()\n }\n }\n\n function updateBreakpointFromContainer(): void {\n if (!document || manualBreakpoint) return\n const width =\n options.container.getBoundingClientRect().width ||\n options.container.clientWidth\n // A hidden or detached container has no measurable width. Keep the\n // document default until the first real resize instead of selecting the\n // smallest breakpoint for width 0.\n if (width > 0) updateBreakpoint(width)\n else if (activeBreakpoint !== document.defaultBreakpointId) {\n const previous = activeBreakpoint\n activeBreakpoint = document.defaultBreakpointId\n if (previous) options.onBreakpointChange?.(activeBreakpoint)\n }\n }\n\n return {\n mount() {\n if (mounted) return\n mounted = true\n if (\n options.observeResize !== false &&\n typeof ResizeObserver !== 'undefined'\n ) {\n observer = new ResizeObserver(entries => {\n const width =\n entries[0]?.contentRect.width ?? options.container.clientWidth\n if (width > 0) updateBreakpoint(width)\n else updateBreakpointFromContainer()\n })\n observer.observe(options.container)\n }\n updateBreakpointFromContainer()\n render()\n },\n update(next) {\n document = next\n render()\n },\n setBreakpoint(id) {\n if (id && document && !document.breakpoints.some(bp => bp.id === id)) {\n options.onError?.(new Error(`Unknown breakpoint ${id}.`))\n return\n }\n manualBreakpoint = id\n if (id) activeBreakpoint = id\n else updateBreakpointFromContainer()\n render()\n },\n getBreakpoint() {\n return activeBreakpoint\n },\n getContainer() {\n return options.container\n },\n destroy() {\n if (!mounted) return\n observer?.disconnect()\n observer = undefined\n for (const [id, handle] of handles) disposeHandle(id, handle)\n handles.clear()\n for (const shell of shells.values())\n if (ownedShells.has(shell)) shell.remove()\n shells.clear()\n ownedShells.clear()\n options.container.style.removeProperty('display')\n options.container.style.removeProperty('grid-template-columns')\n options.container.style.removeProperty('grid-auto-rows')\n options.container.style.removeProperty('gap')\n options.container.style.removeProperty('direction')\n options.container.style.removeProperty('min-height')\n options.container.style.removeProperty('max-height')\n manualB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AAe,uBAAuB;GAC9D,QAAQ,UAAU,MAAM,eAAe,gBAAgB;GACvD,QAAQ,UAAU,MAAM,eAAe,KAAK;GAC5C,QAAQ,UAAU,MAAM,eAAe,WAAW;GAClD,QAAQ,UAAU,MAAM,eAAe,YAAY;GACnD,QAAQ,UAAU,MAAM,eAAe,YAAY;GACnD,mBAAmB,KAAA;GACnB,mBAAmB,KAAA;GACnB,UAAU;EACZ;CACF;AACF"}
|
package/es/styles.d.ts
CHANGED
|
@@ -10,4 +10,3 @@ export interface GridStyleResult {
|
|
|
10
10
|
}
|
|
11
11
|
export declare function resolveGridStyle(document: LayoutDocument, breakpointId: BreakpointId): GridStyleResult;
|
|
12
12
|
export declare function resolveItemStyle(node: LayoutNode, breakpointId: BreakpointId): Record<string, string>;
|
|
13
|
-
//# sourceMappingURL=styles.d.ts.map
|
package/es/styles.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ***********************************
|
|
3
3
|
* @composy/layout-runtime v0.0.1 *
|
|
4
4
|
* Built with rollup *
|
|
5
|
-
* Build time: 2024-
|
|
5
|
+
* Build time: 2024-10-12 17:44:18 *
|
|
6
6
|
* Build mode: production *
|
|
7
7
|
* Minified: No *
|
|
8
8
|
* ***********************************
|
|
@@ -19,8 +19,8 @@ function resolveGridStyle(document, breakpointId) {
|
|
|
19
19
|
gap: `${grid.gap}px`,
|
|
20
20
|
direction: grid.direction
|
|
21
21
|
};
|
|
22
|
-
if (document.grid.minRows !== void 0) style.minHeight = `${document.grid.minRows * (grid.rowSize + grid.gap) - grid.gap}px`;
|
|
23
|
-
if (document.grid.maxRows !== void 0) style.maxHeight = `${document.grid.maxRows * (grid.rowSize + grid.gap) - grid.gap}px`;
|
|
22
|
+
if (document.grid.minRows !== void 0) style.minHeight = `${Math.max(0, document.grid.minRows * (grid.rowSize + grid.gap) - grid.gap)}px`;
|
|
23
|
+
if (document.grid.maxRows !== void 0) style.maxHeight = `${Math.max(0, document.grid.maxRows * (grid.rowSize + grid.gap) - grid.gap)}px`;
|
|
24
24
|
if (breakpoint?.canvasWidth) style.gridTemplateColumns = `repeat(${grid.columns}, minmax(0, 1fr))`;
|
|
25
25
|
return style;
|
|
26
26
|
}
|
package/es/styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":[],"sources":["../src/styles.ts"],"sourcesContent":["import type {\n BreakpointId,\n LayoutDocument,\n LayoutNode,\n LayoutPlacement,\n} from '@composy/layout-core'\nimport { getEffectiveGrid, getBreakpoint } from '@composy/layout-core'\n\nexport interface GridStyleResult {\n display: 'grid'\n gridTemplateColumns: string\n gridAutoRows: string\n gap: string\n direction: 'ltr' | 'rtl'\n minHeight?: string\n maxHeight?: string\n}\n\nexport function resolveGridStyle(\n document: LayoutDocument,\n breakpointId: BreakpointId\n): GridStyleResult {\n const grid = getEffectiveGrid(document, breakpointId)\n const breakpoint = getBreakpoint(document, breakpointId)\n const style: GridStyleResult = {\n display: 'grid',\n gridTemplateColumns: `repeat(${grid.columns}, minmax(0, 1fr))`,\n gridAutoRows: `${grid.rowSize}px`,\n gap: `${grid.gap}px`,\n direction: grid.direction,\n }\n if (document.grid.minRows !== undefined)\n style.minHeight = `${document.grid.minRows * (grid.rowSize + grid.gap) - grid.gap}px`\n if (document.grid.maxRows !== undefined)\n style.maxHeight = `${document.grid.maxRows * (grid.rowSize + grid.gap) - grid.gap}px`\n if (breakpoint?.canvasWidth)\n style.gridTemplateColumns = `repeat(${grid.columns}, minmax(0, 1fr))`\n return style\n}\n\nexport function resolveItemStyle(\n node: LayoutNode,\n breakpointId: BreakpointId\n): Record<string, string> {\n const placement = node.layout[breakpointId]\n if (!placement) return { display: 'none' }\n return {\n gridColumn: `${placement.x + 1} / span ${placement.w}`,\n gridRow: `${placement.y + 1} / span ${placement.h}`,\n display: placement.hidden ? 'none' : '',\n }\n}\n"],"mappings":";;;;;;;;;;;AAkBO,SAAS,iBACd,UACA,cACiB;CACjB,MAAM,OAAO,iBAAiB,UAAU,YAAY;CACpD,MAAM,aAAa,cAAc,UAAU,YAAY;CACvD,MAAM,QAAyB;EAC7B,SAAS;EACT,qBAAqB,UAAU,KAAK,QAAO;EAC3C,cAAc,GAAG,KAAK,QAAO;EAC7B,KAAK,GAAG,KAAK,IAAG;EAChB,WAAW,KAAK;CAClB;CACA,IAAI,SAAS,KAAK,YAAY,KAAA,GAC5B,MAAM,YAAY,GAAG,SAAS,KAAK,WAAW,KAAK,UAAU,KAAK,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"styles.js","names":[],"sources":["../src/styles.ts"],"sourcesContent":["import type {\n BreakpointId,\n LayoutDocument,\n LayoutNode,\n LayoutPlacement,\n} from '@composy/layout-core'\nimport { getEffectiveGrid, getBreakpoint } from '@composy/layout-core'\n\nexport interface GridStyleResult {\n display: 'grid'\n gridTemplateColumns: string\n gridAutoRows: string\n gap: string\n direction: 'ltr' | 'rtl'\n minHeight?: string\n maxHeight?: string\n}\n\nexport function resolveGridStyle(\n document: LayoutDocument,\n breakpointId: BreakpointId\n): GridStyleResult {\n const grid = getEffectiveGrid(document, breakpointId)\n const breakpoint = getBreakpoint(document, breakpointId)\n const style: GridStyleResult = {\n display: 'grid',\n gridTemplateColumns: `repeat(${grid.columns}, minmax(0, 1fr))`,\n gridAutoRows: `${grid.rowSize}px`,\n gap: `${grid.gap}px`,\n direction: grid.direction,\n }\n if (document.grid.minRows !== undefined)\n style.minHeight = `${Math.max(\n 0,\n document.grid.minRows * (grid.rowSize + grid.gap) - grid.gap\n )}px`\n if (document.grid.maxRows !== undefined)\n style.maxHeight = `${Math.max(\n 0,\n document.grid.maxRows * (grid.rowSize + grid.gap) - grid.gap\n )}px`\n if (breakpoint?.canvasWidth)\n style.gridTemplateColumns = `repeat(${grid.columns}, minmax(0, 1fr))`\n return style\n}\n\nexport function resolveItemStyle(\n node: LayoutNode,\n breakpointId: BreakpointId\n): Record<string, string> {\n const placement = node.layout[breakpointId]\n if (!placement) return { display: 'none' }\n return {\n gridColumn: `${placement.x + 1} / span ${placement.w}`,\n gridRow: `${placement.y + 1} / span ${placement.h}`,\n display: placement.hidden ? 'none' : '',\n }\n}\n"],"mappings":";;;;;;;;;;;AAkBO,SAAS,iBACd,UACA,cACiB;CACjB,MAAM,OAAO,iBAAiB,UAAU,YAAY;CACpD,MAAM,aAAa,cAAc,UAAU,YAAY;CACvD,MAAM,QAAyB;EAC7B,SAAS;EACT,qBAAqB,UAAU,KAAK,QAAO;EAC3C,cAAc,GAAG,KAAK,QAAO;EAC7B,KAAK,GAAG,KAAK,IAAG;EAChB,WAAW,KAAK;CAClB;CACA,IAAI,SAAS,KAAK,YAAY,KAAA,GAC5B,MAAM,YAAY,GAAG,KAAK,IACxB,GACA,SAAS,KAAK,WAAW,KAAK,UAAU,KAAK,OAAO,KAAK,GAC3D,EAAC;CACH,IAAI,SAAS,KAAK,YAAY,KAAA,GAC5B,MAAM,YAAY,GAAG,KAAK,IACxB,GACA,SAAS,KAAK,WAAW,KAAK,UAAU,KAAK,OAAO,KAAK,GAC3D,EAAC;CACH,IAAI,YAAY,aACd,MAAM,sBAAsB,UAAU,KAAK,QAAO;CACpD,OAAO;AACT;AAEO,SAAS,iBACd,MACA,cACwB;CACxB,MAAM,YAAY,KAAK,OAAO;CAC9B,IAAI,CAAC,WAAW,OAAO,EAAE,SAAS,OAAO;CACzC,OAAO;EACL,YAAY,GAAG,UAAU,IAAI,EAAC,UAAW,UAAU;EACnD,SAAS,GAAG,UAAU,IAAI,EAAC,UAAW,UAAU;EAChD,SAAS,UAAU,SAAS,SAAS;CACvC;AACF"}
|
package/esm/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* ***********************************
|
|
3
|
+
* @composy/layout-runtime v0.0.1 *
|
|
4
|
+
* Built with rollup *
|
|
5
|
+
* Build time: 2024-10-12 17:44:18 *
|
|
6
|
+
* Build mode: production *
|
|
7
|
+
* Minified: No *
|
|
8
|
+
* ***********************************
|
|
9
|
+
*/
|
|
10
|
+
import { resolveGridStyle, resolveItemStyle } from "./styles.js";
|
|
11
|
+
import { createLayoutRuntime } from "./runtime.js";
|
|
12
|
+
export { createLayoutRuntime, resolveGridStyle, resolveItemStyle };
|
|
13
|
+
/*! End of @composy/layout-runtime | Powered by @composy/builder */
|