@avento-space/ts-ui 1.1.1 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-42QSY3LJ.js +4855 -0
- package/dist/chunk-42QSY3LJ.js.map +1 -0
- package/dist/chunk-7GJXOXOW.js +108 -0
- package/dist/chunk-7GJXOXOW.js.map +1 -0
- package/dist/chunk-DO3PEBDS.js +79 -0
- package/dist/chunk-DO3PEBDS.js.map +1 -0
- package/dist/chunk-MFONNOJU.js +3 -0
- package/dist/chunk-MFONNOJU.js.map +1 -0
- package/dist/chunk-NJAZMTMT.js +5645 -0
- package/dist/chunk-NJAZMTMT.js.map +1 -0
- package/dist/chunk-PRZASPFU.js +1730 -0
- package/dist/chunk-PRZASPFU.js.map +1 -0
- package/dist/chunk-Q5RCPPCF.js +406 -0
- package/dist/chunk-Q5RCPPCF.js.map +1 -0
- package/dist/chunk-RAWESWNC.js +3 -0
- package/dist/chunk-RAWESWNC.js.map +1 -0
- package/dist/chunk-U4WYCYL6.js +116 -0
- package/dist/chunk-U4WYCYL6.js.map +1 -0
- package/dist/components/index.d.ts +13 -11
- package/dist/components/index.js +5 -5
- package/dist/components/index.js.map +1 -1
- package/dist/define.d.ts +2 -2
- package/dist/define.js +8 -1
- package/dist/define.js.map +1 -1
- package/dist/{core/element.d.ts → element-DHtonJNX.d.ts} +3 -2
- package/dist/form.wc-CwjVsdUu.d.ts +1518 -0
- package/dist/icons/index.d.ts +33 -5
- package/dist/icons/index.js +5 -3
- package/dist/icons/index.js.map +1 -1
- package/dist/index.d.ts +35 -10
- package/dist/index.js +44 -9
- package/dist/index.js.map +1 -1
- package/dist/jsx-dev-runtime.d.ts +1 -2
- package/dist/jsx-dev-runtime.js +3 -1
- package/dist/jsx-dev-runtime.js.map +1 -1
- package/dist/jsx-runtime.d.ts +644 -7
- package/dist/jsx-runtime.js +3 -120
- package/dist/jsx-runtime.js.map +1 -1
- package/dist/plugins/index.d.ts +21 -3
- package/dist/plugins/index.js +85 -1
- package/dist/plugins/index.js.map +1 -1
- package/dist/react/index.d.ts +1260 -15
- package/dist/react/index.js +1428 -15
- package/dist/react/index.js.map +1 -1
- package/dist/{core/types.d.ts → types-DWglFa91.d.ts} +8 -7
- package/package.json +32 -8
- package/dist/components/box.wc.d.ts +0 -24
- package/dist/components/box.wc.d.ts.map +0 -1
- package/dist/components/box.wc.js +0 -52
- package/dist/components/box.wc.js.map +0 -1
- package/dist/components/button.wc.d.ts +0 -32
- package/dist/components/button.wc.d.ts.map +0 -1
- package/dist/components/button.wc.js +0 -91
- package/dist/components/button.wc.js.map +0 -1
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/input.wc.d.ts +0 -45
- package/dist/components/input.wc.d.ts.map +0 -1
- package/dist/components/input.wc.js +0 -130
- package/dist/components/input.wc.js.map +0 -1
- package/dist/components/list.wc.d.ts +0 -49
- package/dist/components/list.wc.d.ts.map +0 -1
- package/dist/components/list.wc.js +0 -120
- package/dist/components/list.wc.js.map +0 -1
- package/dist/components/portal.wc.d.ts +0 -18
- package/dist/components/portal.wc.d.ts.map +0 -1
- package/dist/components/portal.wc.js +0 -78
- package/dist/components/portal.wc.js.map +0 -1
- package/dist/components/styles.d.ts +0 -7
- package/dist/components/styles.d.ts.map +0 -1
- package/dist/components/styles.js +0 -134
- package/dist/components/styles.js.map +0 -1
- package/dist/core/define.d.ts +0 -5
- package/dist/core/define.d.ts.map +0 -1
- package/dist/core/define.js +0 -26
- package/dist/core/define.js.map +0 -1
- package/dist/core/element.d.ts.map +0 -1
- package/dist/core/element.js +0 -30
- package/dist/core/element.js.map +0 -1
- package/dist/core/index.d.ts +0 -7
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js +0 -5
- package/dist/core/index.js.map +0 -1
- package/dist/core/plugin.d.ts +0 -17
- package/dist/core/plugin.d.ts.map +0 -1
- package/dist/core/plugin.js +0 -117
- package/dist/core/plugin.js.map +0 -1
- package/dist/core/reactive-context.d.ts +0 -12
- package/dist/core/reactive-context.d.ts.map +0 -1
- package/dist/core/reactive-context.js +0 -34
- package/dist/core/reactive-context.js.map +0 -1
- package/dist/core/scheduler.d.ts +0 -13
- package/dist/core/scheduler.d.ts.map +0 -1
- package/dist/core/scheduler.js +0 -80
- package/dist/core/scheduler.js.map +0 -1
- package/dist/core/signal.d.ts +0 -14
- package/dist/core/signal.d.ts.map +0 -1
- package/dist/core/signal.js +0 -391
- package/dist/core/signal.js.map +0 -1
- package/dist/core/store.d.ts +0 -6
- package/dist/core/store.d.ts.map +0 -1
- package/dist/core/store.js +0 -35
- package/dist/core/store.js.map +0 -1
- package/dist/core/types.d.ts.map +0 -1
- package/dist/core/types.js +0 -2
- package/dist/core/types.js.map +0 -1
- package/dist/define.d.ts.map +0 -1
- package/dist/icons/icon-element.d.ts +0 -25
- package/dist/icons/icon-element.d.ts.map +0 -1
- package/dist/icons/icon-element.js +0 -63
- package/dist/icons/icon-element.js.map +0 -1
- package/dist/icons/index.d.ts.map +0 -1
- package/dist/icons/registry.d.ts +0 -6
- package/dist/icons/registry.d.ts.map +0 -1
- package/dist/icons/registry.js +0 -4775
- package/dist/icons/registry.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/jsx-dev-runtime.d.ts.map +0 -1
- package/dist/jsx-runtime.d.ts.map +0 -1
- package/dist/jsx-types.d.ts +0 -651
- package/dist/jsx-types.d.ts.map +0 -1
- package/dist/jsx-types.js +0 -3
- package/dist/jsx-types.js.map +0 -1
- package/dist/plugins/index.d.ts.map +0 -1
- package/dist/plugins/router.d.ts +0 -4
- package/dist/plugins/router.d.ts.map +0 -1
- package/dist/plugins/router.js +0 -90
- package/dist/plugins/router.js.map +0 -1
- package/dist/plugins/types.d.ts +0 -16
- package/dist/plugins/types.d.ts.map +0 -1
- package/dist/plugins/types.js +0 -2
- package/dist/plugins/types.js.map +0 -1
- package/dist/react/icon.d.ts +0 -8
- package/dist/react/icon.d.ts.map +0 -1
- package/dist/react/icon.js +0 -7
- package/dist/react/icon.js.map +0 -1
- package/dist/react/icons.d.ts +0 -1194
- package/dist/react/icons.d.ts.map +0 -1
- package/dist/react/icons.js +0 -1196
- package/dist/react/icons.js.map +0 -1
- package/dist/react/index.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/element.ts","../src/components/styles/button.ts","../src/components/styles/input.ts","../src/components/styles/box.ts","../src/components/styles/list.ts","../src/components/styles/icon.ts","../src/components/styles/text.ts","../src/components/styles/stack.ts","../src/components/styles/grid.ts","../src/components/styles/overlay.ts","../src/components/styles/field.ts","../src/components/styles/checkbox.ts","../src/components/styles/select.ts","../src/components/styles/link.ts","../src/components/styles/container.ts","../src/components/styles/dialog.ts","../src/components/styles/tooltip.ts","../src/components/styles/textarea.ts","../src/components/styles/radio.ts","../src/components/styles/switch.ts","../src/components/styles/label.ts","../src/components/styles/tree.ts","../src/components/styles/table.ts","../src/components/styles/breadcrumb.ts","../src/components/styles/tabs.ts","../src/components/styles/visually-hidden.ts","../src/components/styles/presence.ts","../src/components/styles/animate.ts","../src/components/styles/modal.ts","../src/components/styles/drawer.ts","../src/components/styles/popover.ts","../src/components/styles/dropdown.ts","../src/components/styles/accordion.ts","../src/components/styles/calendar.ts","../src/components/styles/data-table.ts","../src/components/styles/command-palette.ts","../src/components/styles/combobox.ts","../src/components/styles/toast.ts","../src/components/styles/context-menu.ts","../src/components/styles/sortable.ts","../src/components/styles/form.ts"],"names":[],"mappings":";;;AAEA,IAAI,MAAA,GAAS,CAAA;AAEN,IAAe,QAAA,GAAf,cAAgC,WAAA,CAAY;AAAA,EAKjD,WAAA,GAAc;AACZ,IAAA,KAAA,EAAM;AALR,IAAA,IAAA,CAAQ,YAA4B,EAAC;AAErC,IAAA,IAAA,CAAU,MAAM,EAAE,MAAA;AAIhB,IAAA,IAAA,CAAK,QAAQ,IAAA,CAAK,YAAA,CAAa,EAAE,IAAA,EAAM,QAAQ,CAAA;AAAA,EACjD;A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;AAAA;AAAA;AAAA;AAAA","file":"chunk-PRZASPFU.js","sourcesContent":["import { effect } from './signal.js';\r\n\r\nlet nextId = 0;\r\n\r\nexport abstract class UElement extends HTMLElement {\r\n private _cleanups: (() => void)[] = [];\r\n protected _root: ShadowRoot;\r\n protected _id = ++nextId;\r\n\r\n constructor() {\r\n super();\r\n this._root = this.attachShadow({ mode: 'open' });\r\n }\r\n\r\n connectedCallback(): void {\r\n this._mount();\r\n }\r\n\r\n disconnectedCallback(): void {\r\n for (const fn of this._cleanups) {\r\n try {\r\n fn();\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n }\r\n this._cleanups = [];\r\n }\r\n\r\n protected adoptEffect(fn: () => (() => void) | void): () => void {\r\n const dispose = effect(fn);\r\n this._cleanups.push(dispose);\r\n return dispose;\r\n }\r\n\r\n protected abstract _mount(): void;\r\n}\r\n","export const buttonStyles = `\r\n:host {\r\n display: inline-block;\r\n}\r\nbutton {\r\n font-family: inherit;\r\n font-size: 14px;\r\n line-height: 1;\r\n border: 1px solid transparent;\r\n border-radius: 6px;\r\n cursor: pointer;\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n gap: 6px;\r\n transition: background-color .15s, opacity .15s;\r\n outline: none;\r\n}\r\nbutton:focus-visible {\r\n box-shadow: 0 0 0 2px rgba(59,130,246,.5);\r\n}\r\nbutton:disabled {\r\n opacity: .5;\r\n cursor: not-allowed;\r\n}\r\n.btn-primary {\r\n background: #3b82f6;\r\n color: #fff;\r\n border-color: #3b82f6;\r\n}\r\n.btn-primary:hover:not(:disabled) {\r\n background: #2563eb;\r\n}\r\n.btn-secondary {\r\n background: #f3f4f6;\r\n color: #374151;\r\n border-color: #d1d5db;\r\n}\r\n.btn-secondary:hover:not(:disabled) {\r\n background: #e5e7eb;\r\n}\r\n.btn-ghost {\r\n background: transparent;\r\n color: #374151;\r\n border-color: transparent;\r\n}\r\n.btn-ghost:hover:not(:disabled) {\r\n background: #f3f4f6;\r\n}\r\n.btn-danger {\r\n background: #ef4444;\r\n color: #fff;\r\n border-color: #ef4444;\r\n}\r\n.btn-danger:hover:not(:disabled) {\r\n background: #dc2626;\r\n}\r\n.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }\r\n.btn-md { height: 40px; padding: 0 16px; font-size: 14px; }\r\n.btn-lg { height: 48px; padding: 0 24px; font-size: 16px; }\r\n.btn-link {\r\n background: transparent;\r\n color: #3b82f6;\r\n border-color: transparent;\r\n padding: 0;\r\n height: auto;\r\n font-size: inherit;\r\n font-weight: inherit;\r\n text-decoration: none;\r\n border-radius: 2px;\r\n}\r\n.btn-link:hover:not(:disabled) {\r\n background: transparent;\r\n text-decoration: underline;\r\n color: #2563eb;\r\n}\r\n.btn-link:disabled {\r\n opacity: .5;\r\n cursor: not-allowed;\r\n}\r\n`;\r\n","export const inputStyles = `\r\n:host {\r\n display: inline-block;\r\n}\r\n.input-wrapper {\r\n position: relative;\r\n display: flex;\r\n align-items: center;\r\n}\r\ninput {\r\n font-family: inherit;\r\n font-size: 14px;\r\n line-height: 1.5;\r\n padding: 8px 12px;\r\n border: 1px solid #d1d5db;\r\n border-radius: 6px;\r\n outline: none;\r\n width: 100%;\r\n box-sizing: border-box;\r\n background: #fff;\r\n color: #111827;\r\n transition: border-color .15s;\r\n}\r\ninput::placeholder { color: #9ca3af; }\r\ninput:focus {\r\n border-color: #3b82f6;\r\n box-shadow: 0 0 0 2px rgba(59,130,246,.25);\r\n}\r\ninput:disabled {\r\n background: #f9fafb;\r\n color: #9ca3af;\r\n cursor: not-allowed;\r\n}\r\n`;\r\n","export const boxStyles = `\r\n:host {\r\n display: block;\r\n}\r\n`;\r\n","export const listStyles = `\r\n:host {\r\n display: block;\r\n}\r\nul, ol {\r\n margin: 0;\r\n padding: 0;\r\n list-style: none;\r\n}\r\n.list-empty {\r\n padding: 24px;\r\n text-align: center;\r\n color: #6b7280;\r\n}\r\n`;\r\n","export const iconStyles = `\r\n:host {\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n}\r\nsvg {\r\n fill: none;\r\n stroke: currentColor;\r\n stroke-linecap: round;\r\n stroke-linejoin: round;\r\n}\r\n`;\r\n","export const textStyles = `\r\n:host {\r\n display: inline;\r\n}\r\n[part=\"text\"] {\r\n margin: 0;\r\n font-family: inherit;\r\n line-height: 1.5;\r\n}\r\n.text-xs { font-size: 0.75rem; }\r\n.text-sm { font-size: 0.875rem; }\r\n.text-md { font-size: 1rem; }\r\n.text-lg { font-size: 1.125rem; }\r\n.text-xl { font-size: 1.25rem; }\r\n.text-2xl { font-size: 1.5rem; }\r\n.text-3xl { font-size: 1.875rem; }\r\n.text-normal { font-weight: 400; }\r\n.text-medium { font-weight: 500; }\r\n.text-semibold { font-weight: 600; }\r\n.text-bold { font-weight: 700; }\r\n.text-default { color: inherit; }\r\n.text-muted { color: #6b7280; }\r\n.text-accent { color: #3b82f6; }\r\n.text-danger { color: #ef4444; }\r\n.text-success { color: #22c55e; }\r\n.text-left { text-align: left; }\r\n.text-center { text-align: center; }\r\n.text-right { text-align: right; }\r\n.text-truncate {\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n`;\r\n","export const stackStyles = `\r\n:host {\r\n display: flex;\r\n}\r\n[part=\"stack\"] {\r\n display: flex;\r\n width: 100%;\r\n}\r\n.stack-v {\r\n flex-direction: column;\r\n}\r\n.stack-h {\r\n flex-direction: row;\r\n}\r\n`;\r\n","export const gridStyles = `\r\n:host {\r\n display: block;\r\n}\r\n[part=\"grid\"] {\r\n display: grid;\r\n}\r\n`;\r\n","export const overlayStyles = `\r\n:host {\r\n position: fixed;\r\n inset: 0;\r\n z-index: 9999;\r\n}\r\n[part=\"overlay\"] {\r\n position: fixed;\r\n inset: 0;\r\n background: rgba(0,0,0,0.5);\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n}\r\n.overlay-blur {\r\n backdrop-filter: blur(4px);\r\n}\r\n[hidden] {\r\n display: none !important;\r\n}\r\n`;\r\n","export const fieldStyles = `\r\n:host {\r\n display: block;\r\n}\r\n[part=\"field\"] {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 4px;\r\n}\r\n.field-label {\r\n font-size: 0.875rem;\r\n font-weight: 500;\r\n color: #374151;\r\n}\r\n.field-label-required::after {\r\n content: ' *';\r\n color: #ef4444;\r\n}\r\n.field-content {\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n.field-hint {\r\n font-size: 0.75rem;\r\n color: #6b7280;\r\n}\r\n.field-error {\r\n font-size: 0.75rem;\r\n color: #ef4444;\r\n}\r\n.hidden {\r\n display: none;\r\n}\r\n`;\r\n","export const checkboxStyles = `\r\n:host {\r\n display: inline-flex;\r\n align-items: center;\r\n}\r\n[part=\"checkbox\"] {\r\n display: inline-flex;\r\n align-items: center;\r\n gap: 8px;\r\n cursor: pointer;\r\n}\r\ninput {\r\n position: absolute;\r\n opacity: 0;\r\n width: 0;\r\n height: 0;\r\n pointer-events: none;\r\n}\r\n.checkbox-indicator {\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: 18px;\r\n height: 18px;\r\n border: 2px solid #d1d5db;\r\n border-radius: 4px;\r\n transition: all .15s;\r\n flex-shrink: 0;\r\n box-sizing: border-box;\r\n}\r\n.checkbox-indicator.checked {\r\n background: #3b82f6;\r\n border-color: #3b82f6;\r\n color: #fff;\r\n}\r\n.checkbox-indicator svg {\r\n opacity: 0;\r\n transition: opacity .15s;\r\n}\r\n.checkbox-indicator.checked svg {\r\n opacity: 1;\r\n}\r\n.checkbox-label {\r\n font-size: 0.875rem;\r\n color: #374151;\r\n}\r\n:host([disabled]) [part=\"checkbox\"] {\r\n opacity: 0.5;\r\n cursor: not-allowed;\r\n}\r\n`;\r\n","export const selectStyles = `\r\n:host {\r\n display: inline-block;\r\n position: relative;\r\n}\r\n.select-wrapper {\r\n position: relative;\r\n display: flex;\r\n align-items: center;\r\n}\r\n.select {\r\n font-family: inherit;\r\n font-size: 14px;\r\n line-height: 1.5;\r\n padding: 8px 32px 8px 12px;\r\n border: 1px solid #d1d5db;\r\n border-radius: 6px;\r\n outline: none;\r\n width: 100%;\r\n box-sizing: border-box;\r\n background: #fff;\r\n color: #111827;\r\n transition: border-color .15s;\r\n appearance: none;\r\n -webkit-appearance: none;\r\n cursor: pointer;\r\n}\r\n.select:focus {\r\n border-color: #3b82f6;\r\n box-shadow: 0 0 0 2px rgba(59,130,246,.25);\r\n}\r\n.select:disabled {\r\n background: #f9fafb;\r\n color: #9ca3af;\r\n cursor: not-allowed;\r\n}\r\n.select-arrow {\r\n position: absolute;\r\n right: 8px;\r\n pointer-events: none;\r\n color: #6b7280;\r\n display: flex;\r\n align-items: center;\r\n}\r\n`;\r\n","export const linkStyles = `\r\n:host {\r\n display: inline;\r\n}\r\n[part=\"link\"] {\r\n font-family: inherit;\r\n font-size: inherit;\r\n line-height: inherit;\r\n cursor: pointer;\r\n transition: color .15s;\r\n text-decoration: none;\r\n border-radius: 2px;\r\n}\r\n[part=\"link\"]:focus-visible {\r\n outline: 2px solid #3b82f6;\r\n outline-offset: 2px;\r\n}\r\n.link-default { color: #3b82f6; }\r\n.link-default:hover { color: #2563eb; text-decoration: underline; }\r\n.link-accent { color: #374151; font-weight: 500; }\r\n.link-accent:hover { color: #111827; text-decoration: underline; }\r\n.link-muted { color: #6b7280; }\r\n.link-muted:hover { color: #374151; text-decoration: underline; }\r\n.link-danger { color: #ef4444; }\r\n.link-danger:hover { color: #dc2626; text-decoration: underline; }\r\n.link-underline-always { text-decoration: underline; }\r\n.link-underline-none:hover { text-decoration: none; }\r\n.link-disabled {\r\n color: #9ca3af !important;\r\n cursor: not-allowed;\r\n pointer-events: none;\r\n text-decoration: none !important;\r\n}\r\n`;\r\n","export const containerStyles = `\r\n:host {\r\n display: block;\r\n width: 100%;\r\n}\r\n[part=\"container\"] {\r\n margin: 0 auto;\r\n width: 100%;\r\n box-sizing: border-box;\r\n}\r\n`;\r\n","export const dialogStyles = `\r\n:host {\r\n display: contents;\r\n}\r\n[part=\"dialog-root\"] {\r\n display: contents;\r\n}\r\n`;\r\n","export const tooltipStyles = `\r\n:host {\r\n position: relative;\r\n display: inline-flex;\r\n}\r\n[part=\"tooltip\"] {\r\n position: fixed;\r\n z-index: 99999;\r\n background: #1f2937;\r\n color: #fff;\r\n font-size: 0.75rem;\r\n padding: 6px 10px;\r\n border-radius: 6px;\r\n pointer-events: none;\r\n line-height: 1.4;\r\n max-width: 200px;\r\n box-shadow: 0 4px 12px rgba(0,0,0,.25);\r\n animation: u-tooltip-in .12s ease;\r\n}\r\n@keyframes u-tooltip-in {\r\n from { opacity: 0; transform: translateY(3px); }\r\n to { opacity: 1; transform: translateY(0); }\r\n}\r\n.tooltip-arrow {\r\n position: absolute;\r\n width: 6px;\r\n height: 6px;\r\n background: #1f2937;\r\n transform: rotate(45deg);\r\n}\r\n.arrow-top { bottom: -3px; left: calc(50% - 3px); }\r\n.arrow-bottom { top: -3px; left: calc(50% - 3px); }\r\n.arrow-left { right: -3px; top: calc(50% - 3px); }\r\n.arrow-right { left: -3px; top: calc(50% - 3px); }\r\n`;\r\n","export const textareaStyles = `\r\n:host {\r\n display: inline-block;\r\n}\r\n.textarea-wrapper {\r\n position: relative;\r\n display: flex;\r\n}\r\ntextarea {\r\n font-family: inherit;\r\n font-size: 14px;\r\n line-height: 1.5;\r\n padding: 8px 12px;\r\n border: 1px solid #d1d5db;\r\n border-radius: 6px;\r\n outline: none;\r\n width: 100%;\r\n box-sizing: border-box;\r\n background: #fff;\r\n color: #111827;\r\n transition: border-color .15s;\r\n resize: vertical;\r\n min-height: 60px;\r\n}\r\ntextarea::placeholder { color: #9ca3af; }\r\ntextarea:focus {\r\n border-color: #3b82f6;\r\n box-shadow: 0 0 0 2px rgba(59,130,246,.25);\r\n}\r\ntextarea:disabled {\r\n background: #f9fafb;\r\n color: #9ca3af;\r\n cursor: not-allowed;\r\n}\r\n`;\r\n","export const radioStyles = `\r\n:host {\r\n display: block;\r\n}\r\n[part=\"group\"] {\r\n display: flex;\r\n}\r\n[part=\"radio\"] {\r\n display: inline-flex;\r\n align-items: center;\r\n gap: 8px;\r\n cursor: pointer;\r\n font-size: 0.875rem;\r\n color: #374151;\r\n}\r\ninput[type=\"radio\"] {\r\n position: absolute;\r\n opacity: 0;\r\n width: 0;\r\n height: 0;\r\n pointer-events: none;\r\n}\r\n.radio-circle {\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: 18px;\r\n height: 18px;\r\n border: 2px solid #d1d5db;\r\n border-radius: 50%;\r\n transition: all .15s;\r\n flex-shrink: 0;\r\n box-sizing: border-box;\r\n}\r\n.radio-circle.checked {\r\n border-color: #3b82f6;\r\n background: #3b82f6;\r\n box-shadow: inset 0 0 0 3px #fff;\r\n}\r\n:host([disabled]) [part=\"radio\"] {\r\n opacity: 0.5;\r\n cursor: not-allowed;\r\n}\r\n`;\r\n","export const switchStyles = `\r\n:host {\r\n display: inline-flex;\r\n}\r\n[part=\"switch\"] {\r\n display: inline-flex;\r\n cursor: pointer;\r\n}\r\ninput {\r\n position: absolute;\r\n opacity: 0;\r\n width: 0;\r\n height: 0;\r\n pointer-events: none;\r\n}\r\n.switch-track {\r\n width: 40px;\r\n height: 22px;\r\n background: #d1d5db;\r\n border-radius: 11px;\r\n position: relative;\r\n transition: background .2s;\r\n}\r\n.switch-track.checked {\r\n background: #3b82f6;\r\n}\r\n.switch-thumb {\r\n position: absolute;\r\n top: 2px;\r\n left: 2px;\r\n width: 18px;\r\n height: 18px;\r\n background: #fff;\r\n border-radius: 50%;\r\n transition: transform .2s;\r\n box-shadow: 0 1px 2px rgba(0,0,0,.15);\r\n}\r\n.switch-track.checked .switch-thumb {\r\n transform: translateX(18px);\r\n}\r\n:host([disabled]) [part=\"switch\"] {\r\n opacity: 0.5;\r\n cursor: not-allowed;\r\n}\r\n`;\r\n","export const labelStyles = `\r\n:host {\r\n display: inline;\r\n}\r\n[part=\"label\"] {\r\n font-size: 0.875rem;\r\n font-weight: 500;\r\n color: #374151;\r\n cursor: default;\r\n}\r\n.label-required::after {\r\n content: ' *';\r\n color: #ef4444;\r\n}\r\n`;\r\n","export const treeStyles = `\r\n:host {\r\n display: block;\r\n}\r\n[part=\"tree\"] {\r\n list-style: none;\r\n margin: 0;\r\n padding: 0;\r\n font-size: 0.875rem;\r\n}\r\n.tree-node {\r\n list-style: none;\r\n}\r\n.tree-row {\r\n display: flex;\r\n align-items: center;\r\n gap: 4px;\r\n padding: 4px 8px;\r\n cursor: pointer;\r\n border-radius: 4px;\r\n}\r\n.tree-row:hover {\r\n background: #f3f4f6;\r\n}\r\n.tree-toggle {\r\n width: 16px;\r\n flex-shrink: 0;\r\n text-align: center;\r\n font-size: 10px;\r\n color: #6b7280;\r\n}\r\n.tree-toggle-spacer {\r\n width: 16px;\r\n flex-shrink: 0;\r\n}\r\n.tree-label {\r\n color: #374151;\r\n}\r\n.tree-children {\r\n list-style: none;\r\n margin: 0;\r\n padding: 0;\r\n}\r\n`;\r\n","export const tableStyles = `\r\n:host {\r\n display: block;\r\n overflow-x: auto;\r\n}\r\n.table-wrapper {\r\n width: 100%;\r\n}\r\n.table {\r\n width: 100%;\r\n border-collapse: collapse;\r\n font-size: 0.875rem;\r\n}\r\n.table th {\r\n text-align: left;\r\n padding: 10px 12px;\r\n border-bottom: 2px solid #e5e7eb;\r\n font-weight: 600;\r\n color: #374151;\r\n white-space: nowrap;\r\n background: #f9fafb;\r\n}\r\n.table th.sortable {\r\n cursor: pointer;\r\n user-select: none;\r\n}\r\n.table th.sortable:hover {\r\n background: #f3f4f6;\r\n}\r\n.table td {\r\n padding: 10px 12px;\r\n border-bottom: 1px solid #f3f4f6;\r\n color: #6b7280;\r\n}\r\n.table tr:hover td {\r\n background: #f9fafb;\r\n}\r\n`;\r\n","export const breadcrumbStyles = `\r\n:host {\r\n display: block;\r\n}\r\n[part=\"breadcrumb\"] {\r\n font-size: 0.875rem;\r\n}\r\n[part=\"list\"] {\r\n display: flex;\r\n align-items: center;\r\n gap: 4px;\r\n list-style: none;\r\n margin: 0;\r\n padding: 0;\r\n}\r\n.breadcrumb-item {\r\n display: flex;\r\n align-items: center;\r\n gap: 4px;\r\n color: #6b7280;\r\n}\r\n.breadcrumb-item a {\r\n color: #3b82f6;\r\n text-decoration: none;\r\n}\r\n.breadcrumb-item a:hover {\r\n text-decoration: underline;\r\n}\r\n.breadcrumb-item[aria-current=\"page\"] {\r\n color: #111827;\r\n font-weight: 500;\r\n}\r\n.breadcrumb-separator {\r\n color: #d1d5db;\r\n margin: 0 2px;\r\n}\r\n`;\r\n","export const tabsStyles = `\r\n:host {\r\n display: block;\r\n}\r\n[part=\"tabs\"] {\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n[part=\"tablist\"] {\r\n display: flex;\r\n gap: 0;\r\n border-bottom: 1px solid #e5e7eb;\r\n}\r\n.tab-trigger {\r\n font-family: inherit;\r\n font-size: 0.875rem;\r\n padding: 10px 16px;\r\n border: none;\r\n border-bottom: 2px solid transparent;\r\n background: none;\r\n cursor: pointer;\r\n color: #6b7280;\r\n transition: all .15s;\r\n outline: none;\r\n}\r\n.tab-trigger:hover {\r\n color: #374151;\r\n}\r\n.tab-trigger.active {\r\n color: #3b82f6;\r\n border-bottom-color: #3b82f6;\r\n font-weight: 500;\r\n}\r\n.tab-trigger:focus-visible {\r\n outline: 2px solid #3b82f6;\r\n outline-offset: -2px;\r\n}\r\n[part=\"tabpanels\"] {\r\n padding: 16px 0;\r\n}\r\n.tab-panel {\r\n outline: none;\r\n}\r\n`;\r\n","export const visuallyHiddenStyles = `\r\n:host {\r\n display: inline;\r\n}\r\n[part=\"hidden\"] {\r\n position: absolute;\r\n width: 1px;\r\n height: 1px;\r\n padding: 0;\r\n margin: -1px;\r\n overflow: hidden;\r\n clip: rect(0,0,0,0);\r\n white-space: nowrap;\r\n border: 0;\r\n}\r\n`;\r\n","export const presenceStyles = `\r\n[part=\"presence\"] {\r\n animation-fill-mode: both;\r\n}\r\n.presence-enter {\r\n opacity: 0;\r\n}\r\n.presence-enter-active {\r\n opacity: 1;\r\n transition: opacity var(--duration, 200ms) ease;\r\n}\r\n.presence-leave {\r\n opacity: 1;\r\n}\r\n.presence-leave-active {\r\n opacity: 0;\r\n transition: opacity var(--duration, 200ms) ease;\r\n}\r\n`;\r\n","export const animateKeyframes = `\r\n@keyframes u-fade-in {\r\n from { opacity: 0; }\r\n to { opacity: 1; }\r\n}\r\n@keyframes u-fade-out {\r\n from { opacity: 1; }\r\n to { opacity: 0; }\r\n}\r\n@keyframes u-slide-in-up {\r\n from { opacity: 0; transform: translateY(20px); }\r\n to { opacity: 1; transform: translateY(0); }\r\n}\r\n@keyframes u-slide-in-down {\r\n from { opacity: 0; transform: translateY(-20px); }\r\n to { opacity: 1; transform: translateY(0); }\r\n}\r\n@keyframes u-slide-in-left {\r\n from { opacity: 0; transform: translateX(20px); }\r\n to { opacity: 1; transform: translateX(0); }\r\n}\r\n@keyframes u-slide-in-right {\r\n from { opacity: 0; transform: translateX(-20px); }\r\n to { opacity: 1; transform: translateX(0); }\r\n}\r\n@keyframes u-slide-out-up {\r\n from { opacity: 1; transform: translateY(0); }\r\n to { opacity: 0; transform: translateY(-20px); }\r\n}\r\n@keyframes u-slide-out-down {\r\n from { opacity: 1; transform: translateY(0); }\r\n to { opacity: 0; transform: translateY(20px); }\r\n}\r\n@keyframes u-scale-in {\r\n from { opacity: 0; transform: scale(0.95); }\r\n to { opacity: 1; transform: scale(1); }\r\n}\r\n@keyframes u-scale-out {\r\n from { opacity: 1; transform: scale(1); }\r\n to { opacity: 0; transform: scale(0.95); }\r\n}\r\n@keyframes u-bounce-in {\r\n 0% { opacity: 0; transform: scale(0.3); }\r\n 50% { transform: scale(1.05); }\r\n 70% { transform: scale(0.9); }\r\n 100% { opacity: 1; transform: scale(1); }\r\n}\r\n`;\r\n","export const modalStyles = `\r\n:host {\r\n display: contents;\r\n}\r\n.modal-backdrop {\r\n position: fixed;\r\n inset: 0;\r\n background: rgba(0,0,0,0.5);\r\n z-index: 9998;\r\n}\r\n.modal {\r\n position: fixed;\r\n inset: 0;\r\n z-index: 9999;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 16px;\r\n}\r\n.modal-wrapper {\r\n background: #fff;\r\n border-radius: 12px;\r\n box-shadow: 0 20px 60px rgba(0,0,0,.15);\r\n display: flex;\r\n flex-direction: column;\r\n max-height: 85vh;\r\n width: 100%;\r\n animation: u-scale-in .2s ease;\r\n}\r\n.modal-sm { max-width: 400px; }\r\n.modal-md { max-width: 500px; }\r\n.modal-lg { max-width: 640px; }\r\n.modal-xl { max-width: 800px; }\r\n.modal-full { max-width: calc(100vw - 32px); }\r\n.modal-header {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n padding: 16px 20px;\r\n border-bottom: 1px solid #f3f4f6;\r\n font-weight: 600;\r\n font-size: 1.125rem;\r\n}\r\n.modal-close {\r\n background: none;\r\n border: none;\r\n font-size: 1.5rem;\r\n cursor: pointer;\r\n color: #9ca3af;\r\n padding: 0;\r\n line-height: 1;\r\n}\r\n.modal-close:hover { color: #374151; }\r\n.modal-content {\r\n padding: 20px;\r\n overflow-y: auto;\r\n flex: 1;\r\n color: #6b7280;\r\n font-size: 0.875rem;\r\n}\r\n.modal-footer {\r\n display: flex;\r\n align-items: center;\r\n justify-content: flex-end;\r\n gap: 8px;\r\n padding: 12px 20px;\r\n border-top: 1px solid #f3f4f6;\r\n}\r\n`;\r\n","export const drawerStyles = `\r\n:host {\r\n display: contents;\r\n}\r\n.drawer-backdrop {\r\n position: fixed;\r\n inset: 0;\r\n background: rgba(0,0,0,0.5);\r\n z-index: 9998;\r\n}\r\n.drawer {\r\n position: fixed;\r\n z-index: 9999;\r\n}\r\n.drawer-right { top: 0; right: 0; height: 100%; }\r\n.drawer-left { top: 0; left: 0; height: 100%; }\r\n.drawer-top { top: 0; left: 0; width: 100%; }\r\n.drawer-bottom { bottom: 0; left: 0; width: 100%; }\r\n.drawer-content {\r\n background: #fff;\r\n display: flex;\r\n flex-direction: column;\r\n box-shadow: 0 0 40px rgba(0,0,0,.1);\r\n}\r\n.drawer-right .drawer-content { height: 100%; transform: translateX(100%); transition: transform .25s ease; border-radius: 12px 0 0 12px; }\r\n.drawer-left .drawer-content { height: 100%; transform: translateX(-100%); transition: transform .25s ease; border-radius: 0 12px 12px 0; }\r\n.drawer-top .drawer-content { width: 100%; transform: translateY(-100%); transition: transform .25s ease; border-radius: 0 0 12px 12px; }\r\n.drawer-bottom .drawer-content { width: 100%; transform: translateY(100%); transition: transform .25s ease; border-radius: 12px 12px 0 0; }\r\n.drawer-open .drawer-content { transform: translate(0,0); }\r\n.drawer-header {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n padding: 16px 20px;\r\n border-bottom: 1px solid #f3f4f6;\r\n font-weight: 600;\r\n font-size: 1.125rem;\r\n}\r\n.drawer-close {\r\n background: none;\r\n border: none;\r\n font-size: 1.5rem;\r\n cursor: pointer;\r\n color: #9ca3af;\r\n padding: 0;\r\n line-height: 1;\r\n}\r\n.drawer-close:hover { color: #374151; }\r\n.drawer-body { padding: 20px; overflow-y: auto; flex: 1; color: #6b7280; font-size: 0.875rem; }\r\n.drawer-footer { padding: 12px 20px; border-top: 1px solid #f3f4f6; display: flex; gap: 8px; justify-content: flex-end; }\r\n`;\r\n","export const popoverStyles = `\r\n:host {\r\n position: relative;\r\n display: inline-flex;\r\n}\r\n.popover-trigger {\r\n display: inline-flex;\r\n}\r\n.popover {\r\n position: fixed;\r\n z-index: 99999;\r\n filter: drop-shadow(0 8px 24px rgba(0,0,0,.14));\r\n}\r\n.popover-content {\r\n background: #fff;\r\n border: 1px solid #e5e7eb;\r\n border-radius: 10px;\r\n padding: 8px;\r\n font-size: 0.875rem;\r\n color: #374151;\r\n min-width: 160px;\r\n animation: u-popover-in .15s ease;\r\n}\r\n@keyframes u-popover-in {\r\n from { opacity: 0; transform: scale(.95); }\r\n to { opacity: 1; transform: scale(1); }\r\n}\r\n.popover-arrow {\r\n position: absolute;\r\n width: 10px;\r\n height: 10px;\r\n background: #fff;\r\n border: 1px solid #e5e7eb;\r\n transform: rotate(45deg);\r\n z-index: -1;\r\n}\r\n.arrow-top { bottom: -5px; left: calc(50% - 5px); border-top: none; border-left: none; }\r\n.arrow-bottom { top: -5px; left: calc(50% - 5px); border-bottom: none; border-right: none; }\r\n.arrow-left { right: -5px; top: calc(50% - 5px); border-bottom: none; border-left: none; }\r\n.arrow-right { left: -5px; top: calc(50% - 5px); border-top: none; border-right: none; }\r\n`;\r\n","export const dropdownStyles = `\r\n:host {\r\n position: relative;\r\n display: inline-flex;\r\n}\r\n.dropdown-trigger {\r\n display: inline-flex;\r\n}\r\n.dropdown-menu {\r\n position: fixed;\r\n z-index: 99999;\r\n background: #fff;\r\n border: 1px solid #e5e7eb;\r\n border-radius: 10px;\r\n box-shadow: 0 8px 24px rgba(0,0,0,.14);\r\n padding: 4px;\r\n min-width: 180px;\r\n outline: none;\r\n animation: u-dropdown-in .12s ease;\r\n}\r\n@keyframes u-dropdown-in {\r\n from { opacity: 0; transform: scale(.95); }\r\n to { opacity: 1; transform: scale(1); }\r\n}\r\n.dropdown-items {\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n.dropdown-item {\r\n font-family: inherit;\r\n font-size: 0.875rem;\r\n padding: 8px 12px;\r\n border: none;\r\n background: none;\r\n cursor: pointer;\r\n color: #374151;\r\n text-align: left;\r\n border-radius: 6px;\r\n transition: background .1s;\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n width: 100%;\r\n box-sizing: border-box;\r\n}\r\n.dropdown-item:hover { background: #f3f4f6; }\r\n.dropdown-item:focus-visible { outline: 2px solid #3b82f6; outline-offset: -2px; }\r\n.dropdown-item.selected { color: #3b82f6; font-weight: 500; background: #eff6ff; }\r\n.dropdown-item:disabled { opacity: 0.4; cursor: not-allowed; }\r\n.dropdown-item-active { background: #eff6ff; color: #3b82f6; }\r\n.dropdown-item-icon {\r\n width: 16px;\r\n height: 16px;\r\n flex-shrink: 0;\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n color: #9ca3af;\r\n}\r\n.dropdown-item-icon svg {\r\n width: 16px;\r\n height: 16px;\r\n}\r\n.dropdown-item-text {\r\n flex: 1;\r\n min-width: 0;\r\n}\r\n.dropdown-item-label {\r\n display: block;\r\n line-height: 1.4;\r\n}\r\n.dropdown-item-desc {\r\n display: block;\r\n font-size: 0.75rem;\r\n color: #9ca3af;\r\n line-height: 1.3;\r\n margin-top: 1px;\r\n}\r\n.dropdown-item-shortcut {\r\n font-size: 0.7rem;\r\n color: #9ca3af;\r\n padding: 2px 6px;\r\n background: #f3f4f6;\r\n border-radius: 4px;\r\n font-family: inherit;\r\n flex-shrink: 0;\r\n}\r\n.dropdown-group-label {\r\n font-size: 0.7rem;\r\n font-weight: 600;\r\n color: #9ca3af;\r\n text-transform: uppercase;\r\n letter-spacing: 0.05em;\r\n padding: 8px 12px 4px;\r\n}\r\n.dropdown-divider { height: 1px; background: #f3f4f6; margin: 4px 0; }\r\n`;\r\n","export const accordionStyles = `\r\n:host {\r\n display: block;\r\n}\r\n[part=\"accordion\"] {\r\n border: 1px solid #e5e7eb;\r\n border-radius: 8px;\r\n overflow: hidden;\r\n}\r\n.accordion-item {\r\n border-bottom: 1px solid #f3f4f6;\r\n}\r\n.accordion-item:last-child { border-bottom: none; }\r\n.accordion-header {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n padding: 12px 16px;\r\n cursor: pointer;\r\n font-weight: 500;\r\n font-size: 0.875rem;\r\n color: #374151;\r\n transition: background .15s;\r\n user-select: none;\r\n}\r\n.accordion-header:hover { background: #f9fafb; }\r\n.accordion-icon {\r\n transition: transform .2s;\r\n font-size: 12px;\r\n color: #9ca3af;\r\n}\r\n.accordion-item[open] .accordion-icon { transform: rotate(180deg); }\r\n.accordion-content {\r\n overflow: hidden;\r\n transition: height .25s ease;\r\n}\r\n.accordion-body {\r\n padding: 0 16px 12px;\r\n font-size: 0.875rem;\r\n color: #6b7280;\r\n}\r\n`;\r\n","export const calendarStyles = `\r\n:host {\r\n display: inline-block;\r\n}\r\n.calendar {\r\n font-size: 0.875rem;\r\n width: 280px;\r\n background: #fff;\r\n border-radius: 8px;\r\n box-shadow: 0 4px 20px rgba(0,0,0,.08);\r\n padding: 16px;\r\n}\r\n.cal-header {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n margin-bottom: 12px;\r\n}\r\n.cal-title {\r\n font-weight: 600;\r\n color: #111827;\r\n}\r\n.cal-nav-btn {\r\n background: none;\r\n border: 1px solid #e5e7eb;\r\n border-radius: 6px;\r\n width: 32px;\r\n height: 32px;\r\n cursor: pointer;\r\n font-size: 1.2rem;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n color: #6b7280;\r\n transition: all .15s;\r\n}\r\n.cal-nav-btn:hover {\r\n background: #f3f4f6;\r\n color: #374151;\r\n}\r\n.cal-day-names {\r\n display: grid;\r\n grid-template-columns: repeat(7, 1fr);\r\n text-align: center;\r\n font-size: 0.75rem;\r\n color: #9ca3af;\r\n font-weight: 500;\r\n margin-bottom: 8px;\r\n}\r\n.cal-day-name {\r\n padding: 4px 0;\r\n}\r\n.cal-days-grid {\r\n display: grid;\r\n grid-template-columns: repeat(7, 1fr);\r\n gap: 2px;\r\n}\r\n.cal-day {\r\n background: none;\r\n border: none;\r\n border-radius: 6px;\r\n width: 100%;\r\n aspect-ratio: 1;\r\n cursor: pointer;\r\n font-size: 0.875rem;\r\n color: #374151;\r\n transition: all .1s;\r\n font-family: inherit;\r\n}\r\n.cal-day:hover { background: #f3f4f6; }\r\n.cal-day-empty { pointer-events: none; }\r\n.cal-today { font-weight: 600; color: #3b82f6; }\r\n.cal-selected { background: #3b82f6; color: #fff; font-weight: 600; }\r\n.cal-selected:hover { background: #2563eb; }\r\n.cal-disabled { opacity: 0.3; pointer-events: none; }\r\n`;\r\n","export const dataTableStyles = `\r\n:host {\r\n display: block;\r\n}\r\n.data-table {\r\n font-size: 0.875rem;\r\n border: 1px solid #e5e7eb;\r\n border-radius: 8px;\r\n overflow: hidden;\r\n}\r\n.dt-toolbar {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n padding: 12px 16px;\r\n border-bottom: 1px solid #e5e7eb;\r\n background: #f9fafb;\r\n}\r\n.dt-search-input {\r\n font-family: inherit;\r\n font-size: 0.875rem;\r\n padding: 6px 12px;\r\n border: 1px solid #d1d5db;\r\n border-radius: 6px;\r\n outline: none;\r\n width: 200px;\r\n}\r\n.dt-search-input:focus {\r\n border-color: #3b82f6;\r\n box-shadow: 0 0 0 2px rgba(59,130,246,.25);\r\n}\r\n.dt-page-info { color: #6b7280; font-size: 0.8rem; }\r\n.dt-table-wrapper { overflow-x: auto; }\r\n.dt-table { width: 100%; border-collapse: collapse; }\r\n.dt-table th {\r\n text-align: left;\r\n padding: 10px 12px;\r\n border-bottom: 2px solid #e5e7eb;\r\n font-weight: 600;\r\n color: #374151;\r\n white-space: nowrap;\r\n background: #f9fafb;\r\n}\r\n.dt-table th.dt-sortable { cursor: pointer; user-select: none; }\r\n.dt-table th.dt-sortable:hover { background: #f3f4f6; }\r\n.dt-table td { padding: 10px 12px; border-bottom: 1px solid #f3f4f6; color: #6b7280; }\r\n.dt-table tr:hover td { background: #f9fafb; }\r\n.dt-row-selected td { background: #eff6ff; }\r\n.dt-col-check { width: 40px; }\r\n.dt-empty { text-align: center; color: #9ca3af; padding: 32px; }\r\n.dt-pagination {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n padding: 8px 16px;\r\n border-top: 1px solid #e5e7eb;\r\n background: #f9fafb;\r\n}\r\n.dt-page-btn {\r\n font-family: inherit;\r\n font-size: 0.8rem;\r\n padding: 6px 12px;\r\n border: 1px solid #d1d5db;\r\n border-radius: 6px;\r\n background: #fff;\r\n cursor: pointer;\r\n color: #374151;\r\n}\r\n.dt-page-btn:hover { background: #f3f4f6; }\r\n.dt-page-numbers { display: flex; gap: 4px; }\r\n.dt-page-num {\r\n font-family: inherit;\r\n font-size: 0.8rem;\r\n width: 32px;\r\n height: 32px;\r\n border: 1px solid transparent;\r\n border-radius: 6px;\r\n background: none;\r\n cursor: pointer;\r\n color: #6b7280;\r\n}\r\n.dt-page-num:hover { background: #f3f4f6; }\r\n.dt-page-num.active { background: #3b82f6; color: #fff; font-weight: 600; }\r\n`;\r\n","export const commandPaletteStyles = `\r\n:host {\r\n display: contents;\r\n}\r\n.cp-backdrop {\r\n position: fixed;\r\n inset: 0;\r\n background: rgba(0,0,0,0.4);\r\n z-index: 99999;\r\n}\r\n.cp-dialog {\r\n position: fixed;\r\n top: 20%;\r\n left: 50%;\r\n transform: translateX(-50%);\r\n z-index: 100000;\r\n width: 540px;\r\n max-width: calc(100vw - 32px);\r\n}\r\n.cp-dialog-inner {\r\n background: #fff;\r\n border-radius: 12px;\r\n box-shadow: 0 20px 60px rgba(0,0,0,.2);\r\n overflow: hidden;\r\n}\r\n.cp-search-wrapper {\r\n display: flex;\r\n align-items: center;\r\n padding: 12px 16px;\r\n border-bottom: 1px solid #f3f4f6;\r\n gap: 8px;\r\n}\r\n.cp-search-icon { font-size: 1rem; color: #9ca3af; }\r\n.cp-search-input {\r\n flex: 1;\r\n border: none;\r\n outline: none;\r\n font-family: inherit;\r\n font-size: 1rem;\r\n color: #111827;\r\n background: none;\r\n}\r\n.cp-shortcut-hint {\r\n font-size: 0.7rem;\r\n padding: 2px 6px;\r\n background: #f3f4f6;\r\n border-radius: 4px;\r\n color: #9ca3af;\r\n font-family: inherit;\r\n}\r\n.cp-results {\r\n max-height: 320px;\r\n overflow-y: auto;\r\n padding: 4px;\r\n}\r\n.cp-group-label {\r\n padding: 8px 12px 4px;\r\n font-size: 0.7rem;\r\n font-weight: 600;\r\n color: #9ca3af;\r\n text-transform: uppercase;\r\n letter-spacing: 0.05em;\r\n}\r\n.cp-item {\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n width: 100%;\r\n padding: 10px 12px;\r\n border: none;\r\n background: none;\r\n cursor: pointer;\r\n text-align: left;\r\n border-radius: 6px;\r\n font-family: inherit;\r\n box-sizing: border-box;\r\n}\r\n.cp-item:hover { background: #f3f4f6; }\r\n.cp-item-active { background: #eff6ff; }\r\n.cp-item-label { font-size: 0.875rem; color: #111827; flex: 1; }\r\n.cp-item-desc { font-size: 0.75rem; color: #9ca3af; flex: 1; }\r\n.cp-item-shortcut {\r\n font-size: 0.7rem;\r\n padding: 2px 6px;\r\n background: #f3f4f6;\r\n border-radius: 4px;\r\n color: #9ca3af;\r\n font-family: inherit;\r\n}\r\n.cp-empty { padding: 24px; text-align: center; color: #9ca3af; font-size: 0.875rem; }\r\n.cp-footer {\r\n display: flex;\r\n gap: 16px;\r\n padding: 8px 16px;\r\n border-top: 1px solid #f3f4f6;\r\n font-size: 0.7rem;\r\n color: #9ca3af;\r\n}\r\n`;\r\n","export const comboboxStyles = `\r\n:host {\r\n display: inline-block;\r\n position: relative;\r\n}\r\n.combobox {\r\n position: relative;\r\n}\r\n.combobox-input-wrapper {\r\n display: flex;\r\n align-items: center;\r\n border: 1px solid #d1d5db;\r\n border-radius: 6px;\r\n transition: border-color .15s;\r\n background: #fff;\r\n}\r\n.combobox-input-wrapper:focus-within {\r\n border-color: #3b82f6;\r\n box-shadow: 0 0 0 2px rgba(59,130,246,.25);\r\n}\r\n.combobox-input {\r\n font-family: inherit;\r\n font-size: 14px;\r\n padding: 8px 12px;\r\n border: none;\r\n outline: none;\r\n background: none;\r\n width: 100%;\r\n box-sizing: border-box;\r\n color: #111827;\r\n}\r\n.combobox-toggle {\r\n background: none;\r\n border: none;\r\n padding: 0 8px;\r\n cursor: pointer;\r\n color: #6b7280;\r\n font-size: 12px;\r\n display: flex;\r\n align-items: center;\r\n}\r\n.combobox-listbox {\r\n position: fixed;\r\n z-index: 99999;\r\n background: #fff;\r\n border-radius: 6px;\r\n box-shadow: 0 4px 20px rgba(0,0,0,.1);\r\n max-height: 240px;\r\n overflow-y: auto;\r\n padding: 4px;\r\n}\r\n.combobox-option {\r\n display: block;\r\n width: 100%;\r\n font-family: inherit;\r\n font-size: 0.875rem;\r\n padding: 8px 12px;\r\n border: none;\r\n background: none;\r\n cursor: pointer;\r\n color: #374151;\r\n text-align: left;\r\n border-radius: 4px;\r\n box-sizing: border-box;\r\n}\r\n.combobox-option:hover { background: #f3f4f6; }\r\n.combobox-option.active { color: #3b82f6; font-weight: 500; }\r\n.combobox-option:focus-visible { outline: 2px solid #3b82f6; outline-offset: -2px; }\r\n.combobox-empty { padding: 12px; text-align: center; color: #9ca3af; font-size: 0.875rem; }\r\n`;\r\n","export const toastStyles = `\r\n:host {\r\n display: block;\r\n position: fixed;\r\n z-index: 100000;\r\n pointer-events: none;\r\n}\r\n.toast-container {\r\n position: fixed;\r\n display: flex;\r\n flex-direction: column;\r\n gap: 8px;\r\n padding: 16px;\r\n pointer-events: none;\r\n z-index: 100001;\r\n}\r\n.toast-top-right { top: 0; right: 0; }\r\n.toast-top-left { top: 0; left: 0; }\r\n.toast-top-center { top: 0; left: 50%; transform: translateX(-50%); }\r\n.toast-bottom-right { bottom: 0; right: 0; flex-direction: column-reverse; }\r\n.toast-bottom-left { bottom: 0; left: 0; flex-direction: column-reverse; }\r\n.toast-bottom-center { bottom: 0; left: 50%; transform: translateX(-50%); flex-direction: column-reverse; }\r\n.toast {\r\n pointer-events: auto;\r\n display: flex;\r\n align-items: flex-start;\r\n gap: 12px;\r\n padding: 14px 16px;\r\n border-radius: 8px;\r\n box-shadow: 0 8px 24px rgba(0,0,0,.12);\r\n font-size: 0.875rem;\r\n min-width: 280px;\r\n max-width: 400px;\r\n animation: u-slide-in-right .2s ease;\r\n background: #fff;\r\n border: 1px solid #e5e7eb;\r\n}\r\n.toast-exit {\r\n animation: u-slide-out-right .2s ease forwards;\r\n}\r\n.toast-info { border-left: 4px solid #3b82f6; }\r\n.toast-success { border-left: 4px solid #22c55e; }\r\n.toast-warning { border-left: 4px solid #f59e0b; }\r\n.toast-error { border-left: 4px solid #ef4444; }\r\n.toast-body { flex: 1; }\r\n.toast-title { font-weight: 600; color: #111827; }\r\n.toast-desc { color: #6b7280; margin-top: 4px; font-size: 0.8rem; }\r\n.toast-action {\r\n background: none;\r\n border: none;\r\n color: #3b82f6;\r\n cursor: pointer;\r\n font-weight: 500;\r\n font-family: inherit;\r\n font-size: 0.8rem;\r\n white-space: nowrap;\r\n padding: 0;\r\n margin-top: 4px;\r\n}\r\n.toast-action:hover { color: #2563eb; }\r\n.toast-close {\r\n background: none;\r\n border: none;\r\n cursor: pointer;\r\n color: #9ca3af;\r\n font-size: 1.2rem;\r\n padding: 0;\r\n line-height: 1;\r\n flex-shrink: 0;\r\n}\r\n.toast-close:hover { color: #374151; }\r\n`;\r\n","export const contextMenuStyles = `\r\n:host {\r\n position: relative;\r\n display: inline-flex;\r\n}\r\n.cm-trigger {\r\n display: inline;\r\n}\r\n.cm-menu {\r\n position: fixed;\r\n z-index: 99999;\r\n background: #fff;\r\n border: 1px solid #e5e7eb;\r\n border-radius: 10px;\r\n box-shadow: 0 8px 24px rgba(0,0,0,.14);\r\n padding: 4px;\r\n min-width: 180px;\r\n max-height: 320px;\r\n overflow-y: auto;\r\n animation: u-cm-in .12s ease;\r\n}\r\n@keyframes u-cm-in {\r\n from { opacity: 0; transform: scale(.95); }\r\n to { opacity: 1; transform: scale(1); }\r\n}\r\n.cm-items {\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n.cm-item {\r\n font-family: inherit;\r\n font-size: 0.875rem;\r\n padding: 8px 12px;\r\n border: none;\r\n background: none;\r\n cursor: pointer;\r\n color: #374151;\r\n text-align: left;\r\n border-radius: 6px;\r\n transition: background .1s;\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n width: 100%;\r\n box-sizing: border-box;\r\n}\r\n.cm-item:hover { background: #f3f4f6; }\r\n.cm-item:focus-visible { outline: 2px solid #3b82f6; outline-offset: -2px; }\r\n.cm-item:disabled { opacity: 0.4; cursor: not-allowed; }\r\n.cm-item-icon { width: 16px; text-align: center; font-size: 1rem; flex-shrink: 0; }\r\n.cm-item-label { flex: 1; }\r\n.cm-divider { height: 1px; background: #f3f4f6; margin: 4px 0; }\r\n`;\r\n","export const sortableStyles = `\r\n:host {\r\n display: block;\r\n}\r\n.sortable {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 4px;\r\n}\r\n.sortable-dragging {\r\n opacity: 0.9;\r\n box-shadow: 0 8px 24px rgba(0,0,0,.15);\r\n border-radius: 6px;\r\n cursor: grabbing;\r\n}\r\n.sortable-placeholder {\r\n border: 2px dashed #d1d5db;\r\n border-radius: 6px;\r\n opacity: 0.5;\r\n box-sizing: border-box;\r\n transition: height 0.15s ease, margin 0.15s ease;\r\n}\r\n`;\r\n","export const formStyles = `\r\n:host {\r\n display: block;\r\n}\r\n.form {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 16px;\r\n}\r\n`;\r\n"]}
|
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
// src/core/scheduler.ts
|
|
2
|
+
var batchDepth = 0;
|
|
3
|
+
var pendingEffects = /* @__PURE__ */ new Set();
|
|
4
|
+
var microtaskQueued = { current: false };
|
|
5
|
+
var microtaskQueue = [];
|
|
6
|
+
function batch(fn) {
|
|
7
|
+
batchDepth++;
|
|
8
|
+
try {
|
|
9
|
+
fn();
|
|
10
|
+
} finally {
|
|
11
|
+
batchDepth--;
|
|
12
|
+
if (batchDepth === 0) {
|
|
13
|
+
flushPending();
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function isBatching() {
|
|
18
|
+
return batchDepth > 0;
|
|
19
|
+
}
|
|
20
|
+
function scheduleEffect(fn) {
|
|
21
|
+
if (batchDepth > 0) {
|
|
22
|
+
pendingEffects.add(fn);
|
|
23
|
+
return () => {
|
|
24
|
+
pendingEffects.delete(fn);
|
|
25
|
+
};
|
|
26
|
+
} else {
|
|
27
|
+
fn();
|
|
28
|
+
return () => {
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function flushPending() {
|
|
33
|
+
while (pendingEffects.size > 0) {
|
|
34
|
+
const fns = [...pendingEffects];
|
|
35
|
+
pendingEffects.clear();
|
|
36
|
+
for (const fn of fns) {
|
|
37
|
+
try {
|
|
38
|
+
fn();
|
|
39
|
+
} catch (e) {
|
|
40
|
+
console.error("Effect error during batch flush:", e);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function scheduleMicrotask(fn) {
|
|
46
|
+
microtaskQueue.push(fn);
|
|
47
|
+
if (!microtaskQueued.current) {
|
|
48
|
+
microtaskQueued.current = true;
|
|
49
|
+
queueMicrotask(() => {
|
|
50
|
+
microtaskQueued.current = false;
|
|
51
|
+
const fns = [...microtaskQueue];
|
|
52
|
+
microtaskQueue.length = 0;
|
|
53
|
+
for (const fn2 of fns) {
|
|
54
|
+
try {
|
|
55
|
+
fn2();
|
|
56
|
+
} catch (e) {
|
|
57
|
+
console.error("Microtask error:", e);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// src/core/signal.ts
|
|
65
|
+
var activeNode = null;
|
|
66
|
+
var nextSignalId = 0;
|
|
67
|
+
var signalRegistry = /* @__PURE__ */ new Map();
|
|
68
|
+
function hydrateSignals(data) {
|
|
69
|
+
let signalData = data ?? null;
|
|
70
|
+
if (!signalData) {
|
|
71
|
+
if (typeof document === "undefined") return;
|
|
72
|
+
const el = document.getElementById("__AVENTO_SIGNALS__");
|
|
73
|
+
if (!el) return;
|
|
74
|
+
try {
|
|
75
|
+
signalData = JSON.parse(el.textContent || "{}");
|
|
76
|
+
} catch {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
if (!signalData) return;
|
|
81
|
+
for (const [idStr, value] of Object.entries(signalData)) {
|
|
82
|
+
const id = Number(idStr);
|
|
83
|
+
const setter = signalRegistry.get(id);
|
|
84
|
+
if (setter) {
|
|
85
|
+
setter(value);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
var ReactiveNode = class {
|
|
90
|
+
constructor() {
|
|
91
|
+
this.observers = /* @__PURE__ */ new Set();
|
|
92
|
+
this.sources = /* @__PURE__ */ new Set();
|
|
93
|
+
this.evaluating = false;
|
|
94
|
+
}
|
|
95
|
+
trackSource(node) {
|
|
96
|
+
if (this.sources.has(node)) return;
|
|
97
|
+
this.sources.add(node);
|
|
98
|
+
node.observers.add(this);
|
|
99
|
+
}
|
|
100
|
+
clearSources() {
|
|
101
|
+
for (const src of this.sources) {
|
|
102
|
+
src.observers.delete(this);
|
|
103
|
+
}
|
|
104
|
+
this.sources.clear();
|
|
105
|
+
}
|
|
106
|
+
clearObservers() {
|
|
107
|
+
for (const obs of this.observers) {
|
|
108
|
+
obs.sources.delete(this);
|
|
109
|
+
}
|
|
110
|
+
this.observers.clear();
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
var SignalNode = class extends ReactiveNode {
|
|
114
|
+
constructor(value) {
|
|
115
|
+
super();
|
|
116
|
+
this.externalSubs = /* @__PURE__ */ new Set();
|
|
117
|
+
this.signalId = nextSignalId++;
|
|
118
|
+
this._value = value;
|
|
119
|
+
}
|
|
120
|
+
get() {
|
|
121
|
+
if (activeNode) {
|
|
122
|
+
activeNode.trackSource(this);
|
|
123
|
+
}
|
|
124
|
+
return this._value;
|
|
125
|
+
}
|
|
126
|
+
set(value) {
|
|
127
|
+
if (Object.is(this._value, value)) return;
|
|
128
|
+
this._value = value;
|
|
129
|
+
this.onDependencyChange();
|
|
130
|
+
}
|
|
131
|
+
peek() {
|
|
132
|
+
return this._value;
|
|
133
|
+
}
|
|
134
|
+
onDependencyChange() {
|
|
135
|
+
if (this.evaluating) return;
|
|
136
|
+
const pending = [...this.observers];
|
|
137
|
+
for (const obs of pending) {
|
|
138
|
+
obs.onDependencyChange();
|
|
139
|
+
}
|
|
140
|
+
const subs = [...this.externalSubs];
|
|
141
|
+
for (const fn of subs) {
|
|
142
|
+
fn();
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
subscribe(fn) {
|
|
146
|
+
this.externalSubs.add(fn);
|
|
147
|
+
return () => this.externalSubs.delete(fn);
|
|
148
|
+
}
|
|
149
|
+
destroy() {
|
|
150
|
+
this.externalSubs.clear();
|
|
151
|
+
this.clearObservers();
|
|
152
|
+
this.clearSources();
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
var ComputedNode = class extends ReactiveNode {
|
|
156
|
+
constructor(fn) {
|
|
157
|
+
super();
|
|
158
|
+
this.dirty = true;
|
|
159
|
+
this.externalSubs = /* @__PURE__ */ new Set();
|
|
160
|
+
this.fn = fn;
|
|
161
|
+
}
|
|
162
|
+
get() {
|
|
163
|
+
if (this.dirty) {
|
|
164
|
+
this.evaluate();
|
|
165
|
+
}
|
|
166
|
+
if (activeNode) {
|
|
167
|
+
activeNode.trackSource(this);
|
|
168
|
+
}
|
|
169
|
+
return this._value;
|
|
170
|
+
}
|
|
171
|
+
peek() {
|
|
172
|
+
if (this.dirty) {
|
|
173
|
+
this.evaluate();
|
|
174
|
+
}
|
|
175
|
+
return this._value;
|
|
176
|
+
}
|
|
177
|
+
onDependencyChange() {
|
|
178
|
+
if (this.dirty) return;
|
|
179
|
+
this.dirty = true;
|
|
180
|
+
const pending = [...this.observers];
|
|
181
|
+
for (const obs of pending) {
|
|
182
|
+
obs.onDependencyChange();
|
|
183
|
+
}
|
|
184
|
+
const subs = [...this.externalSubs];
|
|
185
|
+
for (const fn of subs) {
|
|
186
|
+
fn();
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
evaluate() {
|
|
190
|
+
if (this.evaluating) {
|
|
191
|
+
throw new Error(
|
|
192
|
+
"Circular dependency detected in computed(): a computed node re-entered its own evaluation"
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
this.evaluating = true;
|
|
196
|
+
const prevNode = activeNode;
|
|
197
|
+
activeNode = this;
|
|
198
|
+
const oldSources = new Set(this.sources);
|
|
199
|
+
this.clearSources();
|
|
200
|
+
try {
|
|
201
|
+
const newValue = this.fn();
|
|
202
|
+
if (!Object.is(this._value, newValue)) {
|
|
203
|
+
this._value = newValue;
|
|
204
|
+
}
|
|
205
|
+
this.dirty = false;
|
|
206
|
+
} catch (e) {
|
|
207
|
+
for (const src of this.sources) {
|
|
208
|
+
if (!oldSources.has(src)) {
|
|
209
|
+
src.observers.delete(this);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
this.sources.clear();
|
|
213
|
+
for (const src of oldSources) {
|
|
214
|
+
this.sources.add(src);
|
|
215
|
+
if (!src.observers.has(this)) {
|
|
216
|
+
src.observers.add(this);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
throw e;
|
|
220
|
+
} finally {
|
|
221
|
+
activeNode = prevNode;
|
|
222
|
+
this.evaluating = false;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
subscribe(fn) {
|
|
226
|
+
this.externalSubs.add(fn);
|
|
227
|
+
return () => this.externalSubs.delete(fn);
|
|
228
|
+
}
|
|
229
|
+
destroy() {
|
|
230
|
+
this.externalSubs.clear();
|
|
231
|
+
this.clearObservers();
|
|
232
|
+
this.clearSources();
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
var MAX_EFFECT_RUN_DEPTH = 100;
|
|
236
|
+
var EffectNode = class extends ReactiveNode {
|
|
237
|
+
constructor(fn) {
|
|
238
|
+
super();
|
|
239
|
+
this.cleanup = null;
|
|
240
|
+
this.scheduled = false;
|
|
241
|
+
this.disposed = false;
|
|
242
|
+
this.cancelScheduled = null;
|
|
243
|
+
this.pendingDuringEval = false;
|
|
244
|
+
this.runDepth = 0;
|
|
245
|
+
this.fn = fn;
|
|
246
|
+
try {
|
|
247
|
+
this.run();
|
|
248
|
+
} catch (e) {
|
|
249
|
+
this.destroy();
|
|
250
|
+
throw e;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
onDependencyChange() {
|
|
254
|
+
if (this.disposed || this.scheduled) return;
|
|
255
|
+
this.scheduled = true;
|
|
256
|
+
if (this.evaluating) {
|
|
257
|
+
this.pendingDuringEval = true;
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
this.cancelScheduled = scheduleEffect(() => {
|
|
261
|
+
if (this.disposed) return;
|
|
262
|
+
this.scheduled = false;
|
|
263
|
+
this.cancelScheduled = null;
|
|
264
|
+
this.run();
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
run() {
|
|
268
|
+
if (this.disposed) return;
|
|
269
|
+
if (this.evaluating) return;
|
|
270
|
+
if (this.runDepth > MAX_EFFECT_RUN_DEPTH) {
|
|
271
|
+
this.disposed = true;
|
|
272
|
+
this.clearSources();
|
|
273
|
+
const maxDepthCleanup = this.cleanup;
|
|
274
|
+
this.cleanup = null;
|
|
275
|
+
if (maxDepthCleanup) {
|
|
276
|
+
maxDepthCleanup();
|
|
277
|
+
}
|
|
278
|
+
throw new Error(
|
|
279
|
+
"Maximum effect run depth exceeded (100). Possible infinite cycle detected in reactive dependencies."
|
|
280
|
+
);
|
|
281
|
+
}
|
|
282
|
+
this.runDepth++;
|
|
283
|
+
this.evaluating = true;
|
|
284
|
+
this.pendingDuringEval = false;
|
|
285
|
+
const prevNode = activeNode;
|
|
286
|
+
activeNode = this;
|
|
287
|
+
const oldSources = new Set(this.sources);
|
|
288
|
+
this.clearSources();
|
|
289
|
+
try {
|
|
290
|
+
const prevCleanup = this.cleanup;
|
|
291
|
+
this.cleanup = null;
|
|
292
|
+
if (prevCleanup) {
|
|
293
|
+
prevCleanup();
|
|
294
|
+
}
|
|
295
|
+
const result = this.fn();
|
|
296
|
+
if (typeof result === "function") {
|
|
297
|
+
this.cleanup = result;
|
|
298
|
+
}
|
|
299
|
+
} catch (e) {
|
|
300
|
+
for (const src of this.sources) {
|
|
301
|
+
if (!oldSources.has(src)) {
|
|
302
|
+
src.observers.delete(this);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
this.sources.clear();
|
|
306
|
+
for (const src of oldSources) {
|
|
307
|
+
this.sources.add(src);
|
|
308
|
+
if (!src.observers.has(this)) {
|
|
309
|
+
src.observers.add(this);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
throw e;
|
|
313
|
+
} finally {
|
|
314
|
+
activeNode = prevNode;
|
|
315
|
+
this.evaluating = false;
|
|
316
|
+
}
|
|
317
|
+
if (this.pendingDuringEval && !this.disposed) {
|
|
318
|
+
this.pendingDuringEval = false;
|
|
319
|
+
this.scheduled = true;
|
|
320
|
+
this.cancelScheduled = scheduleEffect(() => {
|
|
321
|
+
if (this.disposed) return;
|
|
322
|
+
this.scheduled = false;
|
|
323
|
+
this.cancelScheduled = null;
|
|
324
|
+
this.run();
|
|
325
|
+
});
|
|
326
|
+
} else {
|
|
327
|
+
this.runDepth = 0;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
destroy() {
|
|
331
|
+
if (this.disposed) return;
|
|
332
|
+
this.disposed = true;
|
|
333
|
+
if (this.cancelScheduled) {
|
|
334
|
+
this.cancelScheduled();
|
|
335
|
+
this.cancelScheduled = null;
|
|
336
|
+
}
|
|
337
|
+
this.clearSources();
|
|
338
|
+
const cleanup = this.cleanup;
|
|
339
|
+
this.cleanup = null;
|
|
340
|
+
if (cleanup) {
|
|
341
|
+
cleanup();
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
};
|
|
345
|
+
var cycleSet = /* @__PURE__ */ new Set();
|
|
346
|
+
function signal(initial) {
|
|
347
|
+
const node = new SignalNode(initial);
|
|
348
|
+
signalRegistry.set(node.signalId, (value) => node.set(value));
|
|
349
|
+
const s = {
|
|
350
|
+
get: () => node.get(),
|
|
351
|
+
peek: () => node.peek(),
|
|
352
|
+
set: (value) => node.set(value),
|
|
353
|
+
update: (fn) => node.set(fn(node.peek())),
|
|
354
|
+
subscribe: (fn) => node.subscribe(fn)
|
|
355
|
+
};
|
|
356
|
+
s.__signalId = node.signalId;
|
|
357
|
+
s.__destroy = () => node.destroy();
|
|
358
|
+
return s;
|
|
359
|
+
}
|
|
360
|
+
function destroySignal(s) {
|
|
361
|
+
const id = s.__signalId;
|
|
362
|
+
if (id != null) {
|
|
363
|
+
signalRegistry.delete(id);
|
|
364
|
+
}
|
|
365
|
+
s.__destroy?.();
|
|
366
|
+
}
|
|
367
|
+
function computed(fn) {
|
|
368
|
+
const node = new ComputedNode(fn);
|
|
369
|
+
const c = {
|
|
370
|
+
get: () => {
|
|
371
|
+
if (cycleSet.has(node)) {
|
|
372
|
+
throw new Error("Circular dependency detected in computed()");
|
|
373
|
+
}
|
|
374
|
+
cycleSet.add(node);
|
|
375
|
+
try {
|
|
376
|
+
return node.get();
|
|
377
|
+
} finally {
|
|
378
|
+
cycleSet.delete(node);
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
peek: () => node.peek(),
|
|
382
|
+
subscribe: (fn2) => node.subscribe(fn2)
|
|
383
|
+
};
|
|
384
|
+
c.__destroy = () => node.destroy();
|
|
385
|
+
return c;
|
|
386
|
+
}
|
|
387
|
+
function effect(fn) {
|
|
388
|
+
const node = new EffectNode(fn);
|
|
389
|
+
return () => node.destroy();
|
|
390
|
+
}
|
|
391
|
+
function isSignal(value) {
|
|
392
|
+
return typeof value === "object" && value !== null && "get" in value && "peek" in value && "subscribe" in value;
|
|
393
|
+
}
|
|
394
|
+
function untrack(fn) {
|
|
395
|
+
const prev = activeNode;
|
|
396
|
+
activeNode = null;
|
|
397
|
+
try {
|
|
398
|
+
return fn();
|
|
399
|
+
} finally {
|
|
400
|
+
activeNode = prev;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
export { batch, computed, destroySignal, effect, hydrateSignals, isBatching, isSignal, scheduleMicrotask, signal, untrack };
|
|
405
|
+
//# sourceMappingURL=chunk-Q5RCPPCF.js.map
|
|
406
|
+
//# s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AI,YAAA,CAAa,EAAE,CAAA;AAChC,EAAA,MAAM,CAAA,GAAI;AAAA,IACR,KAAK,MAAM;AACT,MAAA,IAAI,QAAA,CAAS,GAAA,CAAI,IAAI,CAAA,EAAG;AACtB,QAAA,MAAM,IAAI,MAAM,4CAA4C,CAAA;AAAA,MAC9D;AACA,MAAA,QAAA,CAAS,IAAI,IAAI,CAAA;AACjB,MAAA,IAAI;AACF,QAAA,OAAO,KAAK,GAAA,EAAI;AAAA,MAClB,CAAA,SAAE;AACA,QAAA,QAAA,CAAS,OAAO,IAAI,CAAA;AAAA,MACtB;AAAA,IACF,CAAA;AAAA,IACA,IAAA,EAAM,MAAM,IAAA,CAAK,IAAA,EAAK;AAAA,IACtB,SAAA,EAAW,CAACA,GAAAA,KAAmB,IAAA,CAAK,UAAUA,GAAE;AAAA,GAClD;AACA,EAAC,CAAA,CAAU,SAAA,GAAY,MAAM,IAAA,CAAK,OAAA,EAAQ;AAC1C,EAAA,OAAO,CAAA;AACT;AAEO,SAAS,OAAO,EAAA,EAA2C;AAChE,EAAA,MAAM,IAAA,GAAO,IAAI,UAAA,CAAW,EAAE,CAAA;AAC9B,EAAA,OAAO,MAAM,KAAK,OAAA,EAAQ;AAC5B;AAEO,SAAS,SAAS,KAAA,EAAsC;AAC7D,EAAA,OACE,OAAO,UAAU,QAAA,IACjB,KAAA,KAAU,QACV,KAAA,IAAS,KAAA,IACT,MAAA,IAAU,KAAA,IACV,WAAA,IAAe,KAAA;AAEnB;AAEO,SAAS,QAAW,EAAA,EAAgB;AACzC,EAAA,MAAM,IAAA,GAAO,UAAA;AACb,EAAA,UAAA,GAAa,IAAA;AACb,EAAA,IAAI;AACF,IAAA,OAAO,EAAA,EAAG;AAAA,EACZ,CAAA,SAAE;AACA,IAAA,UAAA,GAAa,IAAA;AAAA,EACf;AACF","file":"chunk-Q5RCPPCF.js","sourcesContent":["let batchDepth = 0;\r\nconst pendingEffects = new Set<() => void>();\r\nconst microtaskQueued = { current: false };\r\nconst microtaskQueue: (() => void)[] = [];\r\n\r\nexport interface SchedulerSnapshot {\r\n batchDepth: number;\r\n pendingEffects: Set<() => void>;\r\n microtaskQueued: boolean;\r\n microtaskQueue: (() => void)[];\r\n}\r\n\r\nexport function snapshotSchedulerState(): SchedulerSnapshot {\r\n return {\r\n batchDepth,\r\n pendingEffects: new Set(pendingEffects),\r\n microtaskQueued: microtaskQueued.current,\r\n microtaskQueue: [...microtaskQueue],\r\n };\r\n}\r\n\r\nexport function restoreSchedulerState(snap: SchedulerSnapshot): void {\r\n batchDepth = snap.batchDepth;\r\n pendingEffects.clear();\r\n for (const fn of snap.pendingEffects) pendingEffects.add(fn);\r\n microtaskQueued.current = snap.microtaskQueued;\r\n microtaskQueue.length = 0;\r\n microtaskQueue.push(...snap.microtaskQueue);\r\n}\r\n\r\nexport function batch(fn: () => void): void {\r\n batchDepth++;\r\n try {\r\n fn();\r\n } finally {\r\n batchDepth--;\r\n if (batchDepth === 0) {\r\n flushPending();\r\n }\r\n }\r\n}\r\n\r\nexport function isBatching(): boolean {\r\n return batchDepth > 0;\r\n}\r\n\r\nexport function scheduleEffect(fn: () => void): () => void {\r\n if (batchDepth > 0) {\r\n pendingEffects.add(fn);\r\n return () => {\r\n pendingEffects.delete(fn);\r\n };\r\n } else {\r\n fn();\r\n return () => {};\r\n }\r\n}\r\n\r\nfunction flushPending(): void {\r\n while (pendingEffects.size > 0) {\r\n const fns = [...pendingEffects];\r\n pendingEffects.clear();\r\n for (const fn of fns) {\r\n try {\r\n fn();\r\n } catch (e) {\r\n console.error('Effect error during batch flush:', e);\r\n }\r\n }\r\n }\r\n}\r\n\r\nexport function scheduleMicrotask(fn: () => void): void {\r\n microtaskQueue.push(fn);\r\n if (!microtaskQueued.current) {\r\n microtaskQueued.current = true;\r\n queueMicrotask(() => {\r\n microtaskQueued.current = false;\r\n const fns = [...microtaskQueue];\r\n microtaskQueue.length = 0;\r\n for (const fn of fns) {\r\n try {\r\n fn();\r\n } catch (e) {\r\n console.error('Microtask error:', e);\r\n }\r\n }\r\n });\r\n }\r\n}\r\n","import type { Signal, WritableSignal, ReadonlySignal } from './types.js';\r\nimport { scheduleEffect } from './scheduler.js';\r\n\r\nlet activeNode: ReactiveNode | null = null;\r\nlet nextSignalId = 0;\r\nlet ssrCaptureMap: Map<number, any> | null = null;\r\nconst signalRegistry = new Map<number, (value: any) => void>();\r\n\r\nexport function snapshotActiveNode(): unknown {\r\n return activeNode;\r\n}\r\n\r\nexport function restoreActiveNode(node: unknown): void {\r\n activeNode = node as ReactiveNode | null;\r\n}\r\n\r\nexport function startSSRCapture(): void {\r\n ssrCaptureMap = new Map();\r\n}\r\n\r\nexport function endSSRCapture(): Map<number, any> | null {\r\n const map = ssrCaptureMap;\r\n ssrCaptureMap = null;\r\n return map;\r\n}\r\n\r\nexport function formatSignalScript(signalData: Map<number, any>): string {\r\n if (!signalData || signalData.size === 0) return '';\r\n const obj: Record<string, any> = {};\r\n for (const [id, value] of signalData) {\r\n obj[String(id)] = value;\r\n }\r\n const json = JSON.stringify(obj);\r\n return json === '{}'\r\n ? ''\r\n : `<script id=\"__AVENTO_SIGNALS__\" type=\"application/json\">${json}</script>`;\r\n}\r\n\r\nexport function hydrateSignals(data?: Record<string, any>): void {\r\n let signalData: Record<string, any> | null = data ?? null;\r\n if (!signalData) {\r\n if (typeof document === 'undefined') return;\r\n const el = document.getElementById('__AVENTO_SIGNALS__');\r\n if (!el) return;\r\n try {\r\n signalData = JSON.parse(el.textContent || '{}');\r\n } catch {\r\n return;\r\n }\r\n }\r\n if (!signalData) return;\r\n for (const [idStr, value] of Object.entries(signalData)) {\r\n const id = Number(idStr);\r\n const setter = signalRegistry.get(id);\r\n if (setter) {\r\n setter(value);\r\n }\r\n }\r\n}\r\n\r\nabstract class ReactiveNode {\r\n readonly observers = new Set<ReactiveNode>();\r\n readonly sources = new Set<ReactiveNode>();\r\n evaluating = false;\r\n\r\n abstract onDependencyChange(): void;\r\n\r\n trackSource(node: ReactiveNode): void {\r\n if (this.sources.has(node)) return;\r\n this.sources.add(node);\r\n node.observers.add(this);\r\n }\r\n\r\n clearSources(): void {\r\n for (const src of this.sources) {\r\n src.observers.delete(this);\r\n }\r\n this.sources.clear();\r\n }\r\n\r\n clearObservers(): void {\r\n for (const obs of this.observers) {\r\n obs.sources.delete(this);\r\n }\r\n this.observers.clear();\r\n }\r\n}\r\n\r\nclass SignalNode<T> extends ReactiveNode {\r\n readonly signalId: number;\r\n private _value: T;\r\n private externalSubs = new Set<() => void>();\r\n\r\n constructor(value: T) {\r\n super();\r\n this.signalId = nextSignalId++;\r\n this._value = value;\r\n }\r\n\r\n get(): T {\r\n if (ssrCaptureMap) {\r\n ssrCaptureMap.set(this.signalId, this._value);\r\n }\r\n if (activeNode) {\r\n activeNode.trackSource(this);\r\n }\r\n return this._value;\r\n }\r\n\r\n set(value: T): void {\r\n if (Object.is(this._value, value)) return;\r\n this._value = value;\r\n this.onDependencyChange();\r\n }\r\n\r\n peek(): T {\r\n return this._value;\r\n }\r\n\r\n onDependencyChange(): void {\r\n if (this.evaluating) return;\r\n const pending = [...this.observers];\r\n for (const obs of pending) {\r\n obs.onDependencyChange();\r\n }\r\n const subs = [...this.externalSubs];\r\n for (const fn of subs) {\r\n fn();\r\n }\r\n }\r\n\r\n subscribe(fn: () => void): () => void {\r\n this.externalSubs.add(fn);\r\n return () => this.externalSubs.delete(fn);\r\n }\r\n\r\n destroy(): void {\r\n this.externalSubs.clear();\r\n this.clearObservers();\r\n this.clearSources();\r\n }\r\n}\r\n\r\nclass ComputedNode<T> extends ReactiveNode {\r\n private fn: () => T;\r\n private _value!: T;\r\n private dirty = true;\r\n private externalSubs = new Set<() => void>();\r\n\r\n constructor(fn: () => T) {\r\n super();\r\n this.fn = fn;\r\n }\r\n\r\n get(): T {\r\n if (this.dirty) {\r\n this.evaluate();\r\n }\r\n if (activeNode) {\r\n activeNode.trackSource(this);\r\n }\r\n return this._value;\r\n }\r\n\r\n peek(): T {\r\n if (this.dirty) {\r\n this.evaluate();\r\n }\r\n return this._value;\r\n }\r\n\r\n onDependencyChange(): void {\r\n if (this.dirty) return;\r\n this.dirty = true;\r\n const pending = [...this.observers];\r\n for (const obs of pending) {\r\n obs.onDependencyChange();\r\n }\r\n const subs = [...this.externalSubs];\r\n for (const fn of subs) {\r\n fn();\r\n }\r\n }\r\n\r\n private evaluate(): void {\r\n if (this.evaluating) {\r\n throw new Error(\r\n 'Circular dependency detected in computed(): a computed node re-entered its own evaluation',\r\n );\r\n }\r\n this.evaluating = true;\r\n const prevNode = activeNode;\r\n activeNode = this;\r\n const oldSources = new Set(this.sources);\r\n this.clearSources();\r\n try {\r\n const newValue = this.fn();\r\n if (!Object.is(this._value, newValue)) {\r\n this._value = newValue;\r\n }\r\n this.dirty = false;\r\n } catch (e) {\r\n for (const src of this.sources) {\r\n if (!oldSources.has(src)) {\r\n src.observers.delete(this);\r\n }\r\n }\r\n this.sources.clear();\r\n for (const src of oldSources) {\r\n this.sources.add(src);\r\n if (!src.observers.has(this)) {\r\n src.observers.add(this);\r\n }\r\n }\r\n throw e;\r\n } finally {\r\n activeNode = prevNode;\r\n this.evaluating = false;\r\n }\r\n }\r\n\r\n subscribe(fn: () => void): () => void {\r\n this.externalSubs.add(fn);\r\n return () => this.externalSubs.delete(fn);\r\n }\r\n\r\n destroy(): void {\r\n this.externalSubs.clear();\r\n this.clearObservers();\r\n this.clearSources();\r\n }\r\n}\r\n\r\nconst MAX_EFFECT_RUN_DEPTH = 100;\r\n\r\nclass EffectNode extends ReactiveNode {\r\n private fn: () => (() => void) | void;\r\n private cleanup: (() => void) | null = null;\r\n private scheduled = false;\r\n private disposed = false;\r\n private cancelScheduled: (() => void) | null = null;\r\n private pendingDuringEval = false;\r\n private runDepth = 0;\r\n\r\n constructor(fn: () => (() => void) | void) {\r\n super();\r\n this.fn = fn;\r\n try {\r\n this.run();\r\n } catch (e) {\r\n this.destroy();\r\n throw e;\r\n }\r\n }\r\n\r\n onDependencyChange(): void {\r\n if (this.disposed || this.scheduled) return;\r\n this.scheduled = true;\r\n if (this.evaluating) {\r\n this.pendingDuringEval = true;\r\n return;\r\n }\r\n this.cancelScheduled = scheduleEffect(() => {\r\n if (this.disposed) return;\r\n this.scheduled = false;\r\n this.cancelScheduled = null;\r\n this.run();\r\n });\r\n }\r\n\r\n private run(): void {\r\n if (this.disposed) return;\r\n if (this.evaluating) return;\r\n if (this.runDepth > MAX_EFFECT_RUN_DEPTH) {\r\n this.disposed = true;\r\n this.clearSources();\r\n const maxDepthCleanup = this.cleanup;\r\n this.cleanup = null;\r\n if (maxDepthCleanup) {\r\n maxDepthCleanup();\r\n }\r\n throw new Error(\r\n 'Maximum effect run depth exceeded (100). ' +\r\n 'Possible infinite cycle detected in reactive dependencies.',\r\n );\r\n }\r\n this.runDepth++;\r\n this.evaluating = true;\r\n this.pendingDuringEval = false;\r\n const prevNode = activeNode;\r\n activeNode = this;\r\n const oldSources = new Set(this.sources);\r\n this.clearSources();\r\n try {\r\n const prevCleanup = this.cleanup;\r\n this.cleanup = null;\r\n if (prevCleanup) {\r\n prevCleanup();\r\n }\r\n const result = this.fn();\r\n if (typeof result === 'function') {\r\n this.cleanup = result;\r\n }\r\n } catch (e) {\r\n for (const src of this.sources) {\r\n if (!oldSources.has(src)) {\r\n src.observers.delete(this);\r\n }\r\n }\r\n this.sources.clear();\r\n for (const src of oldSources) {\r\n this.sources.add(src);\r\n if (!src.observers.has(this)) {\r\n src.observers.add(this);\r\n }\r\n }\r\n throw e;\r\n } finally {\r\n activeNode = prevNode;\r\n this.evaluating = false;\r\n }\r\n if (this.pendingDuringEval && !this.disposed) {\r\n this.pendingDuringEval = false;\r\n this.scheduled = true;\r\n this.cancelScheduled = scheduleEffect(() => {\r\n if (this.disposed) return;\r\n this.scheduled = false;\r\n this.cancelScheduled = null;\r\n this.run();\r\n });\r\n } else {\r\n this.runDepth = 0;\r\n }\r\n }\r\n\r\n destroy(): void {\r\n if (this.disposed) return;\r\n this.disposed = true;\r\n if (this.cancelScheduled) {\r\n this.cancelScheduled();\r\n this.cancelScheduled = null;\r\n }\r\n this.clearSources();\r\n const cleanup = this.cleanup;\r\n this.cleanup = null;\r\n if (cleanup) {\r\n cleanup();\r\n }\r\n }\r\n}\r\n\r\nconst cycleSet = new Set<ComputedNode<any>>();\r\n\r\nexport function signal<T>(initial: T): WritableSignal<T> {\r\n const node = new SignalNode(initial);\r\n signalRegistry.set(node.signalId, (value: T) => node.set(value));\r\n const s: WritableSignal<T> = {\r\n get: () => node.get(),\r\n peek: () => node.peek(),\r\n set: (value: T) => node.set(value),\r\n update: (fn: (prev: T) => T) => node.set(fn(node.peek())),\r\n subscribe: (fn: () => void) => node.subscribe(fn),\r\n };\r\n (s as any).__signalId = node.signalId;\r\n (s as any).__destroy = () => node.destroy();\r\n return s;\r\n}\r\n\r\nexport function destroySignal(s: WritableSignal<any>): void {\r\n const id = (s as any).__signalId;\r\n if (id != null) {\r\n signalRegistry.delete(id);\r\n }\r\n (s as any).__destroy?.();\r\n}\r\n\r\nexport function computed<T>(fn: () => T): ReadonlySignal<T> {\r\n const node = new ComputedNode(fn);\r\n const c = {\r\n get: () => {\r\n if (cycleSet.has(node)) {\r\n throw new Error('Circular dependency detected in computed()');\r\n }\r\n cycleSet.add(node);\r\n try {\r\n return node.get();\r\n } finally {\r\n cycleSet.delete(node);\r\n }\r\n },\r\n peek: () => node.peek(),\r\n subscribe: (fn: () => void) => node.subscribe(fn),\r\n };\r\n (c as any).__destroy = () => node.destroy();\r\n return c;\r\n}\r\n\r\nexport function effect(fn: () => (() => void) | void): () => void {\r\n const node = new EffectNode(fn);\r\n return () => node.destroy();\r\n}\r\n\r\nexport function isSignal(value: unknown): value is Signal<any> {\r\n return (\r\n typeof value === 'object' &&\r\n value !== null &&\r\n 'get' in value &&\r\n 'peek' in value &&\r\n 'subscribe' in value\r\n );\r\n}\r\n\r\nexport function untrack<T>(fn: () => T): T {\r\n const prev = activeNode;\r\n activeNode = null;\r\n try {\r\n return fn();\r\n } finally {\r\n activeNode = prev;\r\n }\r\n}\r\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-RAWESWNC.js"}
|