sygnal 5.3.7 → 6.0.0
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 +646 -0
- package/README.md +77 -47
- package/dist/astro/client.cjs.js +33 -8114
- package/dist/astro/client.cjs.js.map +1 -0
- package/dist/astro/client.mjs +33 -8114
- package/dist/astro/client.mjs.map +1 -0
- package/dist/astro/index.cjs.js +1039 -9
- package/dist/astro/index.cjs.js.map +1 -0
- package/dist/astro/index.mjs +1038 -9
- package/dist/astro/index.mjs.map +1 -0
- package/dist/astro/server.cjs.js +3400 -166
- package/dist/astro/server.cjs.js.map +1 -0
- package/dist/astro/server.mjs +3400 -166
- package/dist/astro/server.mjs.map +1 -0
- package/dist/devtools.cjs.js +1431 -0
- package/dist/devtools.cjs.js.map +1 -0
- package/dist/devtools.esm.js +1419 -0
- package/dist/devtools.esm.js.map +1 -0
- package/dist/diagnostics.cjs.js +4033 -0
- package/dist/diagnostics.cjs.js.map +1 -0
- package/dist/diagnostics.esm.js +4003 -0
- package/dist/diagnostics.esm.js.map +1 -0
- package/dist/element.cjs.js +230 -0
- package/dist/element.cjs.js.map +1 -0
- package/dist/element.esm.js +228 -0
- package/dist/element.esm.js.map +1 -0
- package/dist/guide/accessibility.md +257 -0
- package/dist/guide/adapters.md +221 -0
- package/dist/guide/behaviors.md +312 -0
- package/dist/guide/browser-sources.md +203 -0
- package/dist/guide/drag-and-drop.md +342 -0
- package/dist/guide/element-commands.md +306 -0
- package/dist/guide/error-boundaries.md +169 -0
- package/dist/guide/forms-reference.md +381 -0
- package/dist/guide/forms.md +250 -0
- package/dist/guide/http.md +299 -0
- package/dist/guide/inputs.md +173 -0
- package/dist/guide/persistence.md +245 -0
- package/dist/guide/recipes/carousel.md +155 -0
- package/dist/guide/recipes/charts.md +177 -0
- package/dist/guide/recipes/code-editor.md +135 -0
- package/dist/guide/recipes/data-grid.md +155 -0
- package/dist/guide/recipes/data-table.md +196 -0
- package/dist/guide/recipes/i18n.md +222 -0
- package/dist/guide/recipes/icons.md +115 -0
- package/dist/guide/recipes/overview.md +33 -0
- package/dist/guide/recipes/rich-text.md +154 -0
- package/dist/guide/resources.md +471 -0
- package/dist/guide/ssr.md +255 -0
- package/dist/guide/timers.md +178 -0
- package/dist/guide/ui/accordion.md +93 -0
- package/dist/guide/ui/combobox.md +144 -0
- package/dist/guide/ui/dialog.md +124 -0
- package/dist/guide/ui/disclosure.md +60 -0
- package/dist/guide/ui/menu.md +125 -0
- package/dist/guide/ui/overview.md +166 -0
- package/dist/guide/ui/popover.md +101 -0
- package/dist/guide/ui/select.md +114 -0
- package/dist/guide/ui/tabs.md +161 -0
- package/dist/guide/ui/toaster.md +152 -0
- package/dist/guide/ui/tooltip.md +103 -0
- package/dist/guide/undo.md +178 -0
- package/dist/guide/virtual-collections.md +183 -0
- package/dist/guide/web-components.md +179 -0
- package/dist/guide/widgets.md +217 -0
- package/dist/index.cjs.js +15283 -6279
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +3739 -370
- package/dist/index.esm.js +15230 -6274
- package/dist/index.esm.js.map +1 -0
- package/dist/jsx-dev-runtime.cjs.js +27 -329
- package/dist/jsx-dev-runtime.cjs.js.map +1 -0
- package/dist/jsx-dev-runtime.esm.js +20 -322
- package/dist/jsx-dev-runtime.esm.js.map +1 -0
- package/dist/jsx-runtime.cjs.js +27 -329
- package/dist/jsx-runtime.cjs.js.map +1 -0
- package/dist/jsx-runtime.esm.js +20 -322
- package/dist/jsx-runtime.esm.js.map +1 -0
- package/dist/jsx.cjs.js +11 -309
- package/dist/jsx.cjs.js.map +1 -0
- package/dist/jsx.esm.js +9 -310
- package/dist/jsx.esm.js.map +1 -0
- package/dist/react.cjs.js +117 -0
- package/dist/react.cjs.js.map +1 -0
- package/dist/react.esm.js +115 -0
- package/dist/react.esm.js.map +1 -0
- package/dist/shims/globalthis.cjs +20 -0
- package/dist/sygnal.min.js +2 -1
- package/dist/sygnal.min.js.map +1 -0
- package/dist/ui-combobox.cjs.js +169 -0
- package/dist/ui-combobox.cjs.js.map +1 -0
- package/dist/ui-combobox.esm.js +148 -0
- package/dist/ui-combobox.esm.js.map +1 -0
- package/dist/ui-menu.cjs.js +87 -0
- package/dist/ui-menu.cjs.js.map +1 -0
- package/dist/ui-menu.esm.js +66 -0
- package/dist/ui-menu.esm.js.map +1 -0
- package/dist/ui-select.cjs.js +104 -0
- package/dist/ui-select.cjs.js.map +1 -0
- package/dist/ui-select.esm.js +83 -0
- package/dist/ui-select.esm.js.map +1 -0
- package/dist/ui.cjs.js +738 -0
- package/dist/ui.cjs.js.map +1 -0
- package/dist/ui.esm.js +727 -0
- package/dist/ui.esm.js.map +1 -0
- package/dist/vike/ClientOnly.cjs.js +5 -14
- package/dist/vike/ClientOnly.cjs.js.map +1 -0
- package/dist/vike/ClientOnly.mjs +5 -14
- package/dist/vike/ClientOnly.mjs.map +1 -0
- package/dist/vike/{+config.js → config/+config.js} +10 -1
- package/dist/vike/config/+config.js.map +1 -0
- package/dist/vike/config/package.json +6 -0
- package/dist/vike/onRenderClient.cjs.js +166 -95
- package/dist/vike/onRenderClient.cjs.js.map +1 -0
- package/dist/vike/onRenderClient.mjs +166 -95
- package/dist/vike/onRenderClient.mjs.map +1 -0
- package/dist/vike/onRenderHtml.cjs.js +60 -24
- package/dist/vike/onRenderHtml.cjs.js.map +1 -0
- package/dist/vike/onRenderHtml.mjs +61 -25
- package/dist/vike/onRenderHtml.mjs.map +1 -0
- package/dist/vite/plugin.cjs.js +926 -65
- package/dist/vite/plugin.cjs.js.map +1 -0
- package/dist/vite/plugin.mjs +925 -65
- package/dist/vite/plugin.mjs.map +1 -0
- package/dist/zag.cjs.js +408 -0
- package/dist/zag.cjs.js.map +1 -0
- package/dist/zag.esm.js +405 -0
- package/dist/zag.esm.js.map +1 -0
- package/llms.txt +313 -0
- package/package.json +109 -16
- package/src/astro/client.ts +40 -18
- package/src/astro/index.d.ts +48 -1
- package/src/astro/index.ts +106 -9
- package/src/astro/server.ts +11 -3
- package/src/collection.ts +6 -90
- package/src/core/actions.ts +134 -0
- package/src/core/cell.ts +202 -0
- package/src/core/debug.ts +23 -0
- package/src/core/define.ts +242 -0
- package/src/core/hooks.ts +314 -0
- package/src/core/hosts/collection.ts +325 -0
- package/src/core/hosts/switchable.ts +146 -0
- package/src/core/instance.ts +592 -0
- package/src/core/markers/clientonly.ts +13 -0
- package/src/core/markers/lazy.ts +40 -0
- package/src/core/markers/portal.ts +96 -0
- package/src/core/markers/suspense.ts +41 -0
- package/src/core/markers/transition.ts +70 -0
- package/src/core/registry.ts +25 -0
- package/src/core/runtime.ts +573 -0
- package/src/core/statics.ts +104 -0
- package/src/core/teardown.ts +60 -0
- package/src/core/view.ts +37 -0
- package/src/cycle/dom/DocumentDOMSource.ts +13 -8
- package/src/cycle/dom/ElementFinder.ts +7 -9
- package/src/cycle/dom/EventDelegator.ts +174 -223
- package/src/cycle/dom/IsolateModule.ts +65 -35
- package/src/cycle/dom/MainDOMSource.ts +13 -2
- package/src/cycle/dom/PriorityQueue.ts +4 -2
- package/src/cycle/dom/SymbolTree.ts +18 -47
- package/src/cycle/dom/classNameModule.ts +76 -0
- package/src/cycle/dom/controlledInputModule.ts +50 -0
- package/src/cycle/dom/enrichEventStream.ts +29 -45
- package/src/cycle/dom/fragment.ts +7 -0
- package/src/cycle/dom/isolate.ts +30 -27
- package/src/cycle/dom/makeDOMDriver.ts +115 -57
- package/src/cycle/dom/mockDOMSource.ts +83 -9
- package/src/cycle/dom/modules.ts +21 -4
- package/src/cycle/dom/propsModule.ts +65 -0
- package/src/cycle/dom/selectModule.ts +22 -17
- package/src/cycle/dom/snabbdom.ts +1 -6
- package/src/cycle/dom/thunk.ts +3 -0
- package/src/cycle/dom/utils.ts +98 -0
- package/src/cycle/dom/viewTransition.ts +43 -0
- package/src/cycle/state/StateSource.ts +20 -4
- package/src/cycle/state/objIsEqual.ts +50 -0
- package/src/cycle/state/types.ts +0 -10
- package/src/defineComponent.ts +34 -0
- package/src/devtools.d.ts +151 -0
- package/src/devtools.ts +34 -0
- package/src/element.d.ts +59 -0
- package/src/element.ts +235 -0
- package/src/extra/backoff.ts +9 -0
- package/src/extra/behaviors.ts +169 -0
- package/src/extra/browserSignals.ts +23 -0
- package/src/extra/browserSources.ts +326 -0
- package/src/extra/command.ts +3 -3
- package/src/extra/controls.ts +47 -0
- package/src/extra/copyAsTest.ts +286 -0
- package/src/extra/devtools.ts +109 -31
- package/src/extra/devtoolsActions.ts +379 -0
- package/src/extra/devtoolsHook.ts +9 -0
- package/src/extra/devtoolsNext.ts +83 -0
- package/src/extra/diagnostics/checks/actionLog.ts +108 -0
- package/src/extra/diagnostics/checks/behaviors.ts +49 -0
- package/src/extra/diagnostics/checks/browserSources.ts +96 -0
- package/src/extra/diagnostics/checks/collections.ts +67 -0
- package/src/extra/diagnostics/checks/controls.ts +148 -0
- package/src/extra/diagnostics/checks/dataset.ts +57 -0
- package/src/extra/diagnostics/checks/dom.ts +250 -0
- package/src/extra/diagnostics/checks/elementCommands.ts +175 -0
- package/src/extra/diagnostics/checks/events.ts +83 -0
- package/src/extra/diagnostics/checks/fetch.ts +135 -0
- package/src/extra/diagnostics/checks/forms.ts +163 -0
- package/src/extra/diagnostics/checks/index.ts +202 -0
- package/src/extra/diagnostics/checks/inspect.ts +427 -0
- package/src/extra/diagnostics/checks/next.ts +417 -0
- package/src/extra/diagnostics/checks/persist.ts +54 -0
- package/src/extra/diagnostics/checks/props.ts +56 -0
- package/src/extra/diagnostics/checks/public.d.ts +302 -0
- package/src/extra/diagnostics/checks/replies.ts +128 -0
- package/src/extra/diagnostics/checks/router.ts +100 -0
- package/src/extra/diagnostics/checks/rxjsHints.ts +88 -0
- package/src/extra/diagnostics/checks/shared.ts +203 -0
- package/src/extra/diagnostics/checks/shorthand.ts +115 -0
- package/src/extra/diagnostics/checks/sortable.ts +129 -0
- package/src/extra/diagnostics/checks/state.ts +148 -0
- package/src/extra/diagnostics/checks/statics.ts +48 -0
- package/src/extra/diagnostics/checks/strict.ts +55 -0
- package/src/extra/diagnostics/checks/timers.ts +80 -0
- package/src/extra/diagnostics/checks/viewTransitions.ts +47 -0
- package/src/extra/diagnostics/checks/virtual.ts +73 -0
- package/src/extra/diagnostics/checks/widgets.ts +109 -0
- package/src/extra/diagnostics/checks/wiring.ts +121 -0
- package/src/extra/diagnostics/codes.ts +477 -0
- package/src/extra/diagnostics/index.ts +353 -0
- package/src/extra/diagnostics/legacy.ts +76 -0
- package/src/extra/driverFactories.ts +172 -60
- package/src/extra/elementCommands.ts +53 -0
- package/src/extra/eventDriver.ts +4 -0
- package/src/extra/fetchDriver.ts +519 -0
- package/src/extra/flatten.ts +75 -0
- package/src/extra/focusWithin.ts +27 -0
- package/src/extra/form.ts +268 -0
- package/src/extra/formHelpers.ts +139 -0
- package/src/extra/head.ts +106 -0
- package/src/extra/hmr.ts +2 -3
- package/src/extra/owned.ts +24 -0
- package/src/extra/pager.ts +50 -0
- package/src/extra/persist.ts +133 -0
- package/src/extra/pwa.ts +1 -1
- package/src/extra/queryCache.ts +107 -0
- package/src/extra/reducers.ts +13 -6
- package/src/extra/reduxDevtools.ts +92 -0
- package/src/extra/replies.ts +54 -0
- package/src/extra/router.ts +323 -0
- package/src/extra/run.ts +94 -210
- package/src/extra/selection.ts +76 -0
- package/src/extra/socketDriver.ts +265 -0
- package/src/extra/sortable.ts +377 -0
- package/src/extra/ssr.ts +427 -160
- package/src/extra/standardSchema.ts +27 -0
- package/src/extra/testing.ts +3158 -190
- package/src/extra/timers.ts +95 -0
- package/src/extra/undo.ts +261 -0
- package/src/extra/viewTransitions.ts +38 -0
- package/src/extra/virtual.ts +513 -0
- package/src/extra/widget.ts +201 -0
- package/src/extra/xstreamExtras.ts +269 -0
- package/src/index.d.ts +3012 -87
- package/src/index.ts +32 -10
- package/src/jsx-runtime.ts +15 -1
- package/src/jsx.ts +2 -1
- package/src/lazy.ts +50 -7
- package/src/portal.ts +3 -1
- package/src/pragma/index.ts +262 -134
- package/src/react-peers.d.ts +5 -0
- package/src/react.d.ts +43 -0
- package/src/react.ts +110 -0
- package/src/shared.ts +48 -0
- package/src/slot.ts +1 -1
- package/src/suspense.ts +3 -1
- package/src/switchable.ts +6 -119
- package/src/transition.ts +3 -1
- package/src/ui/accordion.ts +64 -0
- package/src/ui/dialog.ts +129 -0
- package/src/ui/disclosure.ts +35 -0
- package/src/ui/popover.ts +45 -0
- package/src/ui/shared.ts +94 -0
- package/src/ui/tabs.ts +82 -0
- package/src/ui/toaster.ts +198 -0
- package/src/ui/tooltip.ts +70 -0
- package/src/ui/zag/combobox.ts +115 -0
- package/src/ui/zag/menu.ts +40 -0
- package/src/ui/zag/select.ts +54 -0
- package/src/ui/zag/shared.ts +43 -0
- package/src/ui-combobox.d.ts +20 -0
- package/src/ui-combobox.ts +6 -0
- package/src/ui-menu.d.ts +30 -0
- package/src/ui-menu.ts +6 -0
- package/src/ui-select.d.ts +17 -0
- package/src/ui-select.ts +6 -0
- package/src/ui-zag-types.d.ts +42 -0
- package/src/ui.d.ts +208 -0
- package/src/ui.ts +15 -0
- package/src/vike/+config.ts +9 -1
- package/src/vike/ClientOnly.ts +1 -1
- package/src/vike/onRenderClient.ts +144 -96
- package/src/vike/onRenderHtml.ts +69 -26
- package/src/vike/types.ts +27 -4
- package/src/vite/globalthis-shim.ts +18 -0
- package/src/vite/globalthis.ts +56 -0
- package/src/vite/plugin.d.ts +114 -2
- package/src/vite/plugin.ts +920 -56
- package/src/zag.d.ts +64 -0
- package/src/zag.ts +238 -0
- package/dist/astro/astro/client.d.ts +0 -5
- package/dist/astro/astro/index.d.ts +0 -16
- package/dist/astro/astro/server.d.ts +0 -12
- package/dist/astro/client.d.ts +0 -5
- package/dist/astro/client.esm.js +0 -4665
- package/dist/astro/collection.d.ts +0 -12
- package/dist/astro/component.d.ts +0 -22
- package/dist/astro/cycle/dom/BodyDOMSource.d.ts +0 -10
- package/dist/astro/cycle/dom/DOMSource.d.ts +0 -11
- package/dist/astro/cycle/dom/DocumentDOMSource.d.ts +0 -12
- package/dist/astro/cycle/dom/ElementFinder.d.ts +0 -8
- package/dist/astro/cycle/dom/EventDelegator.d.ts +0 -34
- package/dist/astro/cycle/dom/IsolateModule.d.ts +0 -23
- package/dist/astro/cycle/dom/MainDOMSource.d.ts +0 -32
- package/dist/astro/cycle/dom/PriorityQueue.d.ts +0 -7
- package/dist/astro/cycle/dom/ScopeChecker.d.ts +0 -9
- package/dist/astro/cycle/dom/SymbolTree.d.ts +0 -9
- package/dist/astro/cycle/dom/VNodeWrapper.d.ts +0 -8
- package/dist/astro/cycle/dom/enrichEventStream.d.ts +0 -24
- package/dist/astro/cycle/dom/fromEvent.d.ts +0 -6
- package/dist/astro/cycle/dom/index.d.ts +0 -8
- package/dist/astro/cycle/dom/isolate.d.ts +0 -9
- package/dist/astro/cycle/dom/makeDOMDriver.d.ts +0 -11
- package/dist/astro/cycle/dom/mockDOMSource.d.ts +0 -17
- package/dist/astro/cycle/dom/modules.d.ts +0 -5
- package/dist/astro/cycle/dom/snabbdom.d.ts +0 -22
- package/dist/astro/cycle/dom/styleModule.d.ts +0 -13
- package/dist/astro/cycle/dom/thunk.d.ts +0 -11
- package/dist/astro/cycle/dom/utils.d.ts +0 -8
- package/dist/astro/cycle/isolate/index.d.ts +0 -42
- package/dist/astro/cycle/run/adapt.d.ts +0 -6
- package/dist/astro/cycle/run/index.d.ts +0 -36
- package/dist/astro/cycle/run/internals.d.ts +0 -8
- package/dist/astro/cycle/run/types.d.ts +0 -49
- package/dist/astro/cycle/state/Collection.d.ts +0 -29
- package/dist/astro/cycle/state/StateSource.d.ts +0 -20
- package/dist/astro/cycle/state/index.d.ts +0 -5
- package/dist/astro/cycle/state/pickCombine.d.ts +0 -3
- package/dist/astro/cycle/state/pickMerge.d.ts +0 -3
- package/dist/astro/cycle/state/types.d.ts +0 -18
- package/dist/astro/cycle/state/withState.d.ts +0 -17
- package/dist/astro/extra/classes.d.ts +0 -7
- package/dist/astro/extra/devtools.d.ts +0 -78
- package/dist/astro/extra/dragDriver.d.ts +0 -20
- package/dist/astro/extra/driverFactories.d.ts +0 -12
- package/dist/astro/extra/eventDriver.d.ts +0 -9
- package/dist/astro/extra/exactState.d.ts +0 -1
- package/dist/astro/extra/hmr.d.ts +0 -17
- package/dist/astro/extra/logDriver.d.ts +0 -2
- package/dist/astro/extra/processDrag.d.ts +0 -19
- package/dist/astro/extra/processForm.d.ts +0 -15
- package/dist/astro/extra/run.d.ts +0 -13
- package/dist/astro/extra/xstreamCompat.d.ts +0 -5
- package/dist/astro/index.d.ts +0 -19
- package/dist/astro/index.esm.js +0 -27
- package/dist/astro/jsx-dev-runtime.d.ts +0 -1
- package/dist/astro/jsx-runtime.d.ts +0 -4
- package/dist/astro/jsx.d.ts +0 -2
- package/dist/astro/pragma/fn.d.ts +0 -7
- package/dist/astro/pragma/index.d.ts +0 -7
- package/dist/astro/pragma/is.d.ts +0 -10
- package/dist/astro/server.d.ts +0 -12
- package/dist/astro/server.esm.js +0 -25
- package/dist/astro/switchable.d.ts +0 -7
- package/dist/collection.d.ts +0 -12
- package/dist/component.d.ts +0 -22
- package/dist/cycle/dom/BodyDOMSource.d.ts +0 -10
- package/dist/cycle/dom/DOMSource.d.ts +0 -11
- package/dist/cycle/dom/DocumentDOMSource.d.ts +0 -12
- package/dist/cycle/dom/ElementFinder.d.ts +0 -8
- package/dist/cycle/dom/EventDelegator.d.ts +0 -34
- package/dist/cycle/dom/IsolateModule.d.ts +0 -23
- package/dist/cycle/dom/MainDOMSource.d.ts +0 -32
- package/dist/cycle/dom/PriorityQueue.d.ts +0 -7
- package/dist/cycle/dom/ScopeChecker.d.ts +0 -9
- package/dist/cycle/dom/SymbolTree.d.ts +0 -9
- package/dist/cycle/dom/VNodeWrapper.d.ts +0 -8
- package/dist/cycle/dom/enrichEventStream.d.ts +0 -24
- package/dist/cycle/dom/fromEvent.d.ts +0 -6
- package/dist/cycle/dom/index.d.ts +0 -8
- package/dist/cycle/dom/isolate.d.ts +0 -9
- package/dist/cycle/dom/makeDOMDriver.d.ts +0 -11
- package/dist/cycle/dom/mockDOMSource.d.ts +0 -17
- package/dist/cycle/dom/modules.d.ts +0 -5
- package/dist/cycle/dom/snabbdom.d.ts +0 -22
- package/dist/cycle/dom/styleModule.d.ts +0 -13
- package/dist/cycle/dom/thunk.d.ts +0 -11
- package/dist/cycle/dom/utils.d.ts +0 -8
- package/dist/cycle/isolate/index.d.ts +0 -42
- package/dist/cycle/run/adapt.d.ts +0 -6
- package/dist/cycle/run/index.d.ts +0 -36
- package/dist/cycle/run/internals.d.ts +0 -8
- package/dist/cycle/run/types.d.ts +0 -49
- package/dist/cycle/state/Collection.d.ts +0 -29
- package/dist/cycle/state/StateSource.d.ts +0 -20
- package/dist/cycle/state/index.d.ts +0 -5
- package/dist/cycle/state/pickCombine.d.ts +0 -3
- package/dist/cycle/state/pickMerge.d.ts +0 -3
- package/dist/cycle/state/types.d.ts +0 -18
- package/dist/cycle/state/withState.d.ts +0 -17
- package/dist/extra/classes.d.ts +0 -7
- package/dist/extra/devtools.d.ts +0 -78
- package/dist/extra/dragDriver.d.ts +0 -20
- package/dist/extra/driverFactories.d.ts +0 -12
- package/dist/extra/eventDriver.d.ts +0 -9
- package/dist/extra/exactState.d.ts +0 -1
- package/dist/extra/hmr.d.ts +0 -17
- package/dist/extra/logDriver.d.ts +0 -2
- package/dist/extra/processDrag.d.ts +0 -19
- package/dist/extra/processForm.d.ts +0 -15
- package/dist/extra/run.d.ts +0 -13
- package/dist/extra/xstreamCompat.d.ts +0 -5
- package/dist/jsx-dev-runtime.d.ts +0 -1
- package/dist/jsx-dev-runtime.js +0 -224
- package/dist/jsx-runtime.d.ts +0 -4
- package/dist/jsx-runtime.js +0 -224
- package/dist/jsx.d.ts +0 -2
- package/dist/pragma/fn.d.ts +0 -7
- package/dist/pragma/index.d.ts +0 -7
- package/dist/pragma/is.d.ts +0 -10
- package/dist/switchable.d.ts +0 -7
- package/dist/vike/+config.cjs.js +0 -65
- package/src/component.ts +0 -2256
- package/src/cycle/isolate/index.ts +0 -196
- package/src/cycle/run/index.ts +0 -151
- package/src/cycle/run/internals.ts +0 -143
- package/src/cycle/state/Collection.ts +0 -174
- package/src/cycle/state/index.ts +0 -5
- package/src/cycle/state/pickCombine.ts +0 -167
- package/src/cycle/state/pickMerge.ts +0 -122
- package/src/cycle/state/withState.ts +0 -47
- package/src/pragma/fn.ts +0 -55
|
@@ -0,0 +1,477 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sygnal diagnostic code registry.
|
|
3
|
+
*
|
|
4
|
+
* Every diagnostic Sygnal reports has a stable code (`SYG123`), a default
|
|
5
|
+
* severity, a short title, and a docs anchor (`docsSlug`) on
|
|
6
|
+
* https://sygnal.js.org/reference/errors (base URL = the `site` field of
|
|
7
|
+
* docs/astro.config.mjs).
|
|
8
|
+
*
|
|
9
|
+
* The registry is stored as two parallel tables so the published bundle only
|
|
10
|
+
* carries what the runtime needs:
|
|
11
|
+
* - CODE_SEVERITY: code → default severity (used by report(); in the bundle)
|
|
12
|
+
* - CODE_TITLES: code → title (docs/inspect/static-checker metadata; pure
|
|
13
|
+
* object literal, tree-shaken unless something imports it)
|
|
14
|
+
* getCodeInfo(code) / listCodes() assemble the full
|
|
15
|
+
* { code, severity, title, docsSlug } records. To add a code, add it to BOTH
|
|
16
|
+
* tables below (inside your reserved range), or call registerCodes() from a
|
|
17
|
+
* workstream's own module. docsSlug is always the lower-cased code
|
|
18
|
+
* ('SYG101' → https://sygnal.js.org/reference/errors#syg101).
|
|
19
|
+
*
|
|
20
|
+
* (Comments are attached to type-only declarations so the TypeScript emit
|
|
21
|
+
* drops them — keeps them out of the published bundle and the size gate.)
|
|
22
|
+
*
|
|
23
|
+
* Severity (PLAN-2 1-B, G-044):
|
|
24
|
+
* - 'error' — the operation failed: thrown at the call site, or caught there
|
|
25
|
+
* (reducer, EFFECT, view, sub-component) and logged with
|
|
26
|
+
* console.error while the app keeps running
|
|
27
|
+
* - 'warn' — likely mistake, behaviour continues: console + collected
|
|
28
|
+
* (when diagnostics mode is 'warn')
|
|
29
|
+
* - 'info' — collected only; surfaced through inspect / test helpers
|
|
30
|
+
* A call site may report a lower severity than the default (SYG405 for
|
|
31
|
+
* Collection/Switchable children, SYG406 handled by onError: 'warn').
|
|
32
|
+
* Every code surfaces under its own code: an error thrown by fail() and
|
|
33
|
+
* caught by a reducer/EFFECT/instantiation handler is reported under the
|
|
34
|
+
* thrown code (legacy.caught), not the handler's.
|
|
35
|
+
*
|
|
36
|
+
* Ranges (see dev-plans/PLAN-1.md §2):
|
|
37
|
+
* SYG1xx Wiring: intent <-> model <-> view <-> events
|
|
38
|
+
* SYG2xx State & reducers
|
|
39
|
+
* SYG3xx Streams & intent construction (incl. xstream hints)
|
|
40
|
+
* SYG4xx Collections, Switchable, sub-components, context
|
|
41
|
+
* SYG5xx Strict mode / canonical-form violations
|
|
42
|
+
* SYG6xx Drivers & run configuration
|
|
43
|
+
* SYG7xx Accessibility (a11y; static only, sygnal-check, PLAN-4 GS-3)
|
|
44
|
+
* SYG9xx Internal invariants
|
|
45
|
+
*
|
|
46
|
+
* ---------------------------------------------------------------------------
|
|
47
|
+
* RESERVED RANGES (PLAN-1 workstream allocation — add entries only inside the
|
|
48
|
+
* range your workstream owns; changes outside go through the coordinator):
|
|
49
|
+
*
|
|
50
|
+
* 0B (diagnostics core) SYG900 (check-failure invariant)
|
|
51
|
+
* 1A (runtime checks) SYG101-105, SYG110, SYG201, SYG202, SYG301,
|
|
52
|
+
* SYG401 (pre-seeded below), plus SYG106-199
|
|
53
|
+
* and SYG302-399 for new checks
|
|
54
|
+
* 1E (message retrofit) SYG206-299, SYG402-499, SYG601-699, SYG901-999
|
|
55
|
+
* 2A (strict mode) SYG500-599
|
|
56
|
+
* unallocated SYG100, SYG200, SYG203-205, SYG300, SYG400,
|
|
57
|
+
* SYG600 (coordinator assigns on request)
|
|
58
|
+
* ---------------------------------------------------------------------------
|
|
59
|
+
*/
|
|
60
|
+
export type DiagnosticSeverity = 'error' | 'warn' | 'info'
|
|
61
|
+
|
|
62
|
+
export interface DiagnosticCodeInfo {
|
|
63
|
+
code: string
|
|
64
|
+
severity: DiagnosticSeverity
|
|
65
|
+
title: string
|
|
66
|
+
// anchor on the errors reference page, e.g. 'syg101' → /reference/errors#syg101
|
|
67
|
+
docsSlug: string
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export const DOCS_BASE_URL = 'https://sygnal.js.org'
|
|
71
|
+
|
|
72
|
+
export const CODE_SEVERITY: Record<string, DiagnosticSeverity> = {
|
|
73
|
+
SYG101: 'warn',
|
|
74
|
+
SYG102: 'info',
|
|
75
|
+
SYG103: 'info',
|
|
76
|
+
SYG104: 'warn',
|
|
77
|
+
SYG105: 'info',
|
|
78
|
+
SYG106: 'warn',
|
|
79
|
+
SYG110: 'warn',
|
|
80
|
+
SYG111: 'warn',
|
|
81
|
+
SYG201: 'warn',
|
|
82
|
+
SYG202: 'warn',
|
|
83
|
+
SYG301: 'error',
|
|
84
|
+
SYG401: 'warn',
|
|
85
|
+
SYG900: 'warn',
|
|
86
|
+
// ---- 1E retrofit codes (SYG206-299, 402-499, 601-699, 901-999) ----
|
|
87
|
+
SYG206: 'error',
|
|
88
|
+
SYG207: 'warn',
|
|
89
|
+
SYG208: 'warn',
|
|
90
|
+
SYG209: 'error',
|
|
91
|
+
SYG210: 'warn',
|
|
92
|
+
SYG211: 'error',
|
|
93
|
+
SYG212: 'error',
|
|
94
|
+
SYG213: 'warn',
|
|
95
|
+
SYG214: 'error',
|
|
96
|
+
SYG215: 'error',
|
|
97
|
+
SYG216: 'error',
|
|
98
|
+
SYG217: 'warn',
|
|
99
|
+
SYG218: 'error',
|
|
100
|
+
SYG219: 'warn',
|
|
101
|
+
SYG220: 'warn',
|
|
102
|
+
SYG402: 'error',
|
|
103
|
+
SYG403: 'error',
|
|
104
|
+
SYG404: 'error',
|
|
105
|
+
SYG405: 'error',
|
|
106
|
+
SYG406: 'error',
|
|
107
|
+
SYG407: 'error',
|
|
108
|
+
SYG408: 'error',
|
|
109
|
+
SYG409: 'warn',
|
|
110
|
+
SYG410: 'error',
|
|
111
|
+
SYG411: 'error',
|
|
112
|
+
SYG412: 'error',
|
|
113
|
+
SYG413: 'error',
|
|
114
|
+
SYG414: 'error',
|
|
115
|
+
SYG415: 'error',
|
|
116
|
+
SYG416: 'error',
|
|
117
|
+
SYG417: 'warn',
|
|
118
|
+
SYG418: 'error',
|
|
119
|
+
SYG419: 'error',
|
|
120
|
+
SYG420: 'error',
|
|
121
|
+
SYG601: 'error',
|
|
122
|
+
SYG602: 'error',
|
|
123
|
+
SYG603: 'error',
|
|
124
|
+
SYG604: 'error',
|
|
125
|
+
SYG605: 'error',
|
|
126
|
+
SYG606: 'error',
|
|
127
|
+
SYG607: 'error',
|
|
128
|
+
SYG608: 'warn',
|
|
129
|
+
SYG609: 'warn',
|
|
130
|
+
SYG610: 'error',
|
|
131
|
+
SYG901: 'error',
|
|
132
|
+
SYG902: 'error',
|
|
133
|
+
SYG903: 'error',
|
|
134
|
+
// ---- end 1E retrofit codes ----
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export const CODE_TITLES: Record<string, string> = {
|
|
138
|
+
// SYG1xx wiring (1A)
|
|
139
|
+
SYG101: 'Intent action has no model entry',
|
|
140
|
+
SYG102: 'Model entry is unreachable',
|
|
141
|
+
SYG103: 'Intent selector matched no rendered element',
|
|
142
|
+
SYG104: 'Intent selector crosses an isolation boundary',
|
|
143
|
+
SYG105: 'EVENTS type selected but never emitted, or emitted but never selected',
|
|
144
|
+
SYG106: 'Parent prop is overwritten by a reserved view argument',
|
|
145
|
+
SYG110: 'Intent selector not present in the component view',
|
|
146
|
+
SYG111: 'Controlled input has no input listener',
|
|
147
|
+
SYG115: 'Unknown DOM event shorthand',
|
|
148
|
+
SYG116: 'EVENTS value has no string type',
|
|
149
|
+
SYG124: 'Component used as a control or selector',
|
|
150
|
+
SYG125: 'Control given .intent, .model or .initialState',
|
|
151
|
+
SYG126: 'Control rendered but never listened to',
|
|
152
|
+
SYG127: 'Behavior collision or unresolvable uses entry',
|
|
153
|
+
SYG128: 'Duplicate control key',
|
|
154
|
+
SYG129: "CHILD.select() of a component this one doesn't render",
|
|
155
|
+
SYG112: 'Reply action has no model entry',
|
|
156
|
+
SYG130: 'href() names no route or leaves out a param',
|
|
157
|
+
SYG131: 'Route params the pattern does not use',
|
|
158
|
+
SYG132: 'Declaration static that is never sent',
|
|
159
|
+
SYG133: 'SPA router inside a Vike app',
|
|
160
|
+
// PLAN-5 W-1: widgets (defineWidget; checks/widgets.ts, checks/elementCommands.ts; SYG141 static only)
|
|
161
|
+
SYG140: 'Widget dispatched an undeclared event',
|
|
162
|
+
SYG141: 'Listener for an event the widget does not declare',
|
|
163
|
+
SYG142: 'Widget command not declared',
|
|
164
|
+
SYG143: 'Widget tag used as a selector',
|
|
165
|
+
SYG144: 'Widget event the host element also fires natively',
|
|
166
|
+
// PLAN-5 B-1 (3-D): the sortable behavior (checks/sortable.ts; sortable.ts calls the bridge's sortable hook)
|
|
167
|
+
SYG145: 'Sortable item without its id attribute',
|
|
168
|
+
SYG146: 'Sortable item or handle selector matches nothing',
|
|
169
|
+
SYG147: 'Sortable list key is not an array in the host state',
|
|
170
|
+
// PLAN-5 3-F G-419: a Collection's viewTransitionName (checks/next.ts)
|
|
171
|
+
SYG148: 'Collection viewTransitionName is not a CSS identifier',
|
|
172
|
+
SYG149: 'Two items with the same view-transition name',
|
|
173
|
+
// PLAN-5 V-1: VirtualCollection (checks/virtual.ts)
|
|
174
|
+
SYG430: 'VirtualCollection has no bounded height',
|
|
175
|
+
SYG431: 'VirtualCollection items without ids',
|
|
176
|
+
SYG432: 'VirtualCollection item does not render one element',
|
|
177
|
+
SYG433: 'VirtualCollection scroll target not in the list',
|
|
178
|
+
SYG434: 'Invalid VirtualCollection estimateSize or overscan',
|
|
179
|
+
// PLAN-5 3-H (G-449): sortable over a list shown in another order (checks/sortable.ts)
|
|
180
|
+
SYG435: 'Sortable list shown filtered or in another order',
|
|
181
|
+
// SYG2xx state & reducers (1A)
|
|
182
|
+
SYG201: 'STATE reducer dropped keys from the previous state',
|
|
183
|
+
SYG202: 'STATE reducer returned undefined',
|
|
184
|
+
// SYG3xx streams & intent construction (1A)
|
|
185
|
+
SYG301: 'RxJS operator used on an xstream stream',
|
|
186
|
+
// SYG4xx collections / switchable / sub-components / context (1A)
|
|
187
|
+
SYG401: "Collection 'from' field is missing or not an array",
|
|
188
|
+
// SYG5xx strict mode / canonical forms (2A; dev-plans/PLAN-1-canonical-forms.md)
|
|
189
|
+
SYG501: "Removed in 6.0: view with positional arguments",
|
|
190
|
+
SYG502: 'Retired in 6.0: STATE reducer signals no change without ABORT',
|
|
191
|
+
SYG503: 'Side effect in a STATE reducer that returns ABORT',
|
|
192
|
+
SYG504: "Removed in 6.0: 'ACTION | SINK' model key",
|
|
193
|
+
SYG505: 'Non-canonical EVENTS emit',
|
|
194
|
+
SYG506: "Removed in 6.0: CHILD.select() with a component name",
|
|
195
|
+
SYG507: 'Prop drilled through more than 2 component levels',
|
|
196
|
+
SYG508: 'select()/errors() round trip where reply actions would do',
|
|
197
|
+
// SYG9xx internal (0B)
|
|
198
|
+
SYG900: 'A diagnostics check threw',
|
|
199
|
+
// ---- 1E retrofit codes (SYG206-299, 402-499, 601-699, 901-999) ----
|
|
200
|
+
SYG206: 'Invalid calculated field definition',
|
|
201
|
+
SYG207: 'Calculated field shadows an initialState key',
|
|
202
|
+
SYG208: 'Calculated field depends on an unknown key',
|
|
203
|
+
SYG209: 'Circular calculated field dependency',
|
|
204
|
+
SYG210: 'INITIALIZE used with a sink other than STATE',
|
|
205
|
+
SYG211: "Retired in 6.0: Invalid model shorthand entry",
|
|
206
|
+
SYG212: 'Model entry is not a function or an object of sinks',
|
|
207
|
+
SYG213: "Retired in 6.0: Duplicate model entry for the same action and sink",
|
|
208
|
+
SYG214: 'EFFECT handler threw',
|
|
209
|
+
SYG215: 'next() delay is not a number',
|
|
210
|
+
SYG216: 'Reducer threw',
|
|
211
|
+
SYG217: 'Driver-sink reducer returned undefined',
|
|
212
|
+
SYG218: 'Reducer returned an unsupported type',
|
|
213
|
+
SYG219: 'EFFECT handler returned a value',
|
|
214
|
+
SYG220: 'Calculated field threw',
|
|
215
|
+
SYG221: 'set() called with a string',
|
|
216
|
+
SYG222: 'STATE reducer returned the same object after it was mutated in place',
|
|
217
|
+
SYG223: 'persist pick or omit names a key that is not in initialState',
|
|
218
|
+
SYG224: 'persist on a component that is not the root',
|
|
219
|
+
SYG226: 'Undo track, resetOn or coalesce names an unknown action',
|
|
220
|
+
// PLAN-5 F-1: the form behavior (checks/forms.ts)
|
|
221
|
+
SYG230: 'Form field name not in values',
|
|
222
|
+
SYG231: 'form() schema is not a Standard Schema',
|
|
223
|
+
SYG232: 'Form submit dropped while one is in progress',
|
|
224
|
+
SYG233: 'Form value missing from the schema output',
|
|
225
|
+
SYG234: 'Form submit action has no model entry',
|
|
226
|
+
SYG235: 'Form check names an unknown field or sets reply fields',
|
|
227
|
+
SYG236: 'Form array rows without an id',
|
|
228
|
+
SYG237: 'Two forms in one component listen on the same form selector',
|
|
229
|
+
// PLAN-5 2-R (G-393; checks/state.ts; dev entry)
|
|
230
|
+
SYG238: 'Root component with a model but no initial state',
|
|
231
|
+
SYG402: 'Context is not an object',
|
|
232
|
+
SYG403: 'Invalid context entry',
|
|
233
|
+
SYG404: 'Context stream errored',
|
|
234
|
+
SYG405: 'Sub-component has initialState without isolatedState',
|
|
235
|
+
SYG406: 'View threw',
|
|
236
|
+
SYG407: 'onError handler threw',
|
|
237
|
+
SYG408: 'Sub-component failed to instantiate',
|
|
238
|
+
SYG409: 'Child tried to update a calculated field',
|
|
239
|
+
SYG410: "Invalid sub-component 'state' prop",
|
|
240
|
+
SYG411: "Collection 'of' is missing or not a component",
|
|
241
|
+
SYG412: "Invalid Collection 'from' prop",
|
|
242
|
+
SYG413: "Retired in 6.0: Unnamed component factory not found",
|
|
243
|
+
SYG414: "Retired in 6.0: Component not found",
|
|
244
|
+
SYG415: "Switchable 'of' is missing or invalid",
|
|
245
|
+
SYG416: "Switchable 'current' is missing or invalid",
|
|
246
|
+
SYG417: 'Portal target not found',
|
|
247
|
+
SYG418: 'Invalid Collection sort prop',
|
|
248
|
+
SYG419: "Retired in 6.0: Invalid switchable() 'name$' parameter",
|
|
249
|
+
SYG420: 'JSX tag is undefined',
|
|
250
|
+
SYG421: 'Invalid data (dataset) key',
|
|
251
|
+
SYG422: 'Invalid timer spec',
|
|
252
|
+
// PLAN-4.6 R4: the core's dev checks (checks/next.ts; dev entry)
|
|
253
|
+
SYG423: 'Context change skipped a view whose output it changes',
|
|
254
|
+
SYG424: 'Duplicate Collection item id',
|
|
255
|
+
SYG425: 'isolatedState slice lacks initialState keys',
|
|
256
|
+
SYG601: "Retired in 6.0: Missing or invalid sources",
|
|
257
|
+
SYG602: 'Intent is not a function',
|
|
258
|
+
SYG603: 'Intent returned an invalid value',
|
|
259
|
+
SYG604: "Retired in 6.0: Invalid hmrActions",
|
|
260
|
+
SYG605: "Retired in 6.0: Intent action name contains '|'",
|
|
261
|
+
SYG606: 'calculated is not an object',
|
|
262
|
+
SYG607: "Retired in 6.0: State source not found",
|
|
263
|
+
SYG608: 'Strict mode requested without the diagnostics entry',
|
|
264
|
+
SYG609: 'Sink or source has no driver',
|
|
265
|
+
SYG610: "Request has a 'then' or 'catch' key",
|
|
266
|
+
SYG611: 'Socket message not sent or connection not opened',
|
|
267
|
+
// PLAN-4.6 R4 (D173): a form 6.0 removed, met at runtime (checks/next.ts; dev entry)
|
|
268
|
+
SYG612: 'Removed in 6.0',
|
|
269
|
+
SYG620: 'Router command not performed',
|
|
270
|
+
// PLAN-3 5-3: makeFetchDriver's cache, invalidation and validation (dev entry; SYG634 static only)
|
|
271
|
+
SYG630: 'Cached request is not idempotent',
|
|
272
|
+
SYG631: 'validate is not a Standard Schema',
|
|
273
|
+
SYG632: 'invalidate matched nothing',
|
|
274
|
+
SYG633: 'abort names a lane the requests do not use',
|
|
275
|
+
SYG634: 'latest: true with a computed key',
|
|
276
|
+
// PLAN-3 5-5 (D88)
|
|
277
|
+
SYG635: 'Caching asked for without a queryCache',
|
|
278
|
+
// PLAN-4 GS-2: element commands (reported by the dev entry, checks/elementCommands.ts)
|
|
279
|
+
SYG640: 'Element command target not found',
|
|
280
|
+
SYG641: 'Unknown element command',
|
|
281
|
+
// PLAN-4 GS-5: persist() (src/extra/persist.ts reports SYG642 with an explicit severity, like SYG611)
|
|
282
|
+
SYG642: 'Persisted state could not be restored or saved',
|
|
283
|
+
// PLAN-4 GS-7: timers (checks/timers.ts; dev entry)
|
|
284
|
+
SYG643: 'Declaration static with no driver to take it',
|
|
285
|
+
// PLAN-4 D131: sygnal/element (reported through the core bridge when diagnostics are on)
|
|
286
|
+
SYG644: 'Custom element prop hides an HTMLElement member',
|
|
287
|
+
// PLAN-4 GS-12 (D129): View Transitions (checks/viewTransitions.ts; dev entry)
|
|
288
|
+
SYG645: "viewTransitions that can't run",
|
|
289
|
+
// PLAN-5 W-1: a widget's mount / update / unmount threw (checks/widgets.ts; dev entry)
|
|
290
|
+
SYG660: 'Widget mount threw',
|
|
291
|
+
SYG661: 'Widget update threw or reported an error',
|
|
292
|
+
SYG662: 'Widget unmount threw',
|
|
293
|
+
// PLAN-5 B-3: browser sources (makeBrowserDriver; checks/browserSources.ts; dev entry)
|
|
294
|
+
SYG663: 'Invalid browser-source spec or command',
|
|
295
|
+
SYG664: 'Browser source not in the driver',
|
|
296
|
+
SYG665: 'Browser source failed with no error action',
|
|
297
|
+
// PLAN-5 W-2 (D203): the adapter entries (sygnal/react, sygnal/zag, sygnal/ui/menu|select|combobox): SYG666 from
|
|
298
|
+
// sygnal/vite (an entry imported without its optional peer dependencies), SYG667 thrown by
|
|
299
|
+
// fromZag / fromReact
|
|
300
|
+
SYG666: 'Adapter peer dependency missing',
|
|
301
|
+
SYG667: 'Invalid adapter argument',
|
|
302
|
+
// PLAN-5 2-R (G-383, G-387)
|
|
303
|
+
SYG668: 'Browser source has no element to observe',
|
|
304
|
+
// PLAN-5 2-T (G-410): Sygnal components / widget tags / special JSX inside a fromZag render
|
|
305
|
+
SYG669: 'Sygnal component inside a fromZag render',
|
|
306
|
+
// PLAN-4 GS-3: a11y lane (static only, sygnal-check)
|
|
307
|
+
SYG701: 'Click listener on a non-interactive element',
|
|
308
|
+
SYG702: 'Form field without an accessible label',
|
|
309
|
+
SYG703: 'Image without alt text',
|
|
310
|
+
SYG704: 'Link without href used as a button',
|
|
311
|
+
SYG705: 'Button without an accessible name',
|
|
312
|
+
SYG706: 'Positive tabIndex',
|
|
313
|
+
SYG707: 'Unknown ARIA attribute or invalid role',
|
|
314
|
+
SYG708: 'Label or ARIA reference to an id that is not rendered',
|
|
315
|
+
// PLAN-5 2-T (D211): Zag UI parts (sygnal-check rules/a11y/syg722-ui-name.js)
|
|
316
|
+
SYG722: 'Menu, Select or Combobox without an accessible name',
|
|
317
|
+
// PLAN-5 B-1 (3-D): static only (sygnal-check)
|
|
318
|
+
SYG724: 'Sortable handle not keyboard-accessible, or no live region',
|
|
319
|
+
SYG901: "Retired in 6.0: Sub-component sink stream errored",
|
|
320
|
+
SYG902: "Retired in 6.0: EFFECT stream errored",
|
|
321
|
+
SYG903: "Retired in 6.0: Component factory returned invalid sinks",
|
|
322
|
+
// ---- end 1E retrofit codes ----
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
// 2A: strict-mode (SYG5xx) default severities. Kept OUT of CODE_SEVERITY so the
|
|
326
|
+
// main bundle doesn't carry them (D29: zero bytes); the 'sygnal/diagnostics'
|
|
327
|
+
// entry registers them (registerCodes) and its reports pass the severity
|
|
328
|
+
// explicitly. sygnal-check keeps the same table in sygnal-check/src/codes.js.
|
|
329
|
+
export const STRICT_CODE_SEVERITY: Record<string, DiagnosticSeverity> = {
|
|
330
|
+
SYG501: 'error',
|
|
331
|
+
SYG502: 'warn',
|
|
332
|
+
SYG503: 'warn',
|
|
333
|
+
SYG504: 'error',
|
|
334
|
+
SYG505: 'warn',
|
|
335
|
+
SYG506: 'error',
|
|
336
|
+
SYG507: 'info',
|
|
337
|
+
SYG508: 'warn',
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
// PLAN-3 1-G (G-143): codes only the 'sygnal/diagnostics' dev entry reports. Like the strict
|
|
341
|
+
// table, kept OUT of CODE_SEVERITY (zero bytes in the main bundle); the entry registers them
|
|
342
|
+
// and passes the severity explicitly.
|
|
343
|
+
// PLAN-3 1-D: SYG112 (a reply action has no model entry) too.
|
|
344
|
+
// PLAN-3 2-A: SYG611 too, though makeSocketDriver reports it (legacy error(), severity passed
|
|
345
|
+
// explicitly): kept out of CODE_SEVERITY so the core bundle doesn't pay for an opt-in driver.
|
|
346
|
+
export const DEV_CODE_SEVERITY: Record<string, DiagnosticSeverity> = {
|
|
347
|
+
SYG112: 'error',
|
|
348
|
+
SYG115: 'warn',
|
|
349
|
+
SYG116: 'error',
|
|
350
|
+
// PLAN-4 1-D: controls, static (sygnal-check)
|
|
351
|
+
SYG124: 'error',
|
|
352
|
+
SYG125: 'error',
|
|
353
|
+
SYG126: 'info',
|
|
354
|
+
// PLAN-4 GS-1: behaviors (checks/behaviors.ts)
|
|
355
|
+
SYG127: 'error',
|
|
356
|
+
SYG128: 'error',
|
|
357
|
+
// PLAN-4 4-G2: static only (sygnal-check); listed so the entry knows its title
|
|
358
|
+
SYG129: 'warn',
|
|
359
|
+
SYG221: 'error',
|
|
360
|
+
// PLAN-4 GS-4 (state.ts)
|
|
361
|
+
SYG222: 'warn',
|
|
362
|
+
// PLAN-4 GS-5 (checks/persist.ts; sygnal-check statically)
|
|
363
|
+
SYG223: 'warn',
|
|
364
|
+
SYG224: 'error',
|
|
365
|
+
// PLAN-4 GS-8 (undo.ts reports it when diagnostics are on; sygnal-check statically)
|
|
366
|
+
SYG226: 'warn',
|
|
367
|
+
// PLAN-5 F-1: the form behavior (checks/forms.ts; form.ts calls the bridge's form hook)
|
|
368
|
+
SYG230: 'warn',
|
|
369
|
+
SYG231: 'error',
|
|
370
|
+
SYG232: 'info',
|
|
371
|
+
SYG233: 'warn',
|
|
372
|
+
SYG234: 'warn',
|
|
373
|
+
SYG235: 'warn',
|
|
374
|
+
SYG236: 'warn',
|
|
375
|
+
SYG237: 'warn',
|
|
376
|
+
SYG238: 'warn',
|
|
377
|
+
SYG421: 'error',
|
|
378
|
+
SYG611: 'error',
|
|
379
|
+
// PLAN-3 5-4b: router (SYG620 is reported by the router itself, like SYG611) and G-167
|
|
380
|
+
SYG130: 'error',
|
|
381
|
+
SYG131: 'warn',
|
|
382
|
+
SYG132: 'warn',
|
|
383
|
+
SYG133: 'warn',
|
|
384
|
+
SYG620: 'error',
|
|
385
|
+
// PLAN-3 5-3 (fetch.ts)
|
|
386
|
+
SYG630: 'warn',
|
|
387
|
+
SYG631: 'error',
|
|
388
|
+
SYG632: 'info',
|
|
389
|
+
SYG633: 'warn',
|
|
390
|
+
// static only (sygnal-check); listed so the entry knows its title
|
|
391
|
+
SYG634: 'info',
|
|
392
|
+
// PLAN-3 5-5 (fetch.ts)
|
|
393
|
+
SYG635: 'warn',
|
|
394
|
+
// PLAN-4 GS-2 (checks/elementCommands.ts, through the core bridge; renderComponent too)
|
|
395
|
+
SYG640: 'warn',
|
|
396
|
+
SYG641: 'error',
|
|
397
|
+
// PLAN-4 GS-5 (persist.ts, through legacy warn(): printed in production too)
|
|
398
|
+
SYG642: 'warn',
|
|
399
|
+
// PLAN-4 GS-7 (timers.ts): an invalid timer spec (not started); timers / connections /
|
|
400
|
+
// resources declared with no driver registered
|
|
401
|
+
SYG422: 'error',
|
|
402
|
+
SYG643: 'warn',
|
|
403
|
+
// PLAN-4.6 R4 (checks/next.ts): D168 context-tracking safety net, D169 duplicate ids, D174 kept
|
|
404
|
+
// slice, D173 removed forms
|
|
405
|
+
SYG423: 'warn',
|
|
406
|
+
SYG424: 'warn',
|
|
407
|
+
SYG425: 'warn',
|
|
408
|
+
SYG612: 'error',
|
|
409
|
+
// PLAN-4 D131 (element.ts, through the core bridge; a console warning in dev with diagnostics off)
|
|
410
|
+
SYG644: 'warn',
|
|
411
|
+
// PLAN-4 GS-12 (viewTransitions.ts): the static set, but the app's DOM driver isn't makeViewTransitionDOMDriver()
|
|
412
|
+
SYG645: 'warn',
|
|
413
|
+
// PLAN-5 W-1: widgets (checks/widgets.ts, checks/elementCommands.ts; SYG141 static only, listed
|
|
414
|
+
// so the entry knows its title)
|
|
415
|
+
SYG140: 'warn',
|
|
416
|
+
SYG141: 'warn',
|
|
417
|
+
SYG142: 'error',
|
|
418
|
+
SYG143: 'warn',
|
|
419
|
+
SYG144: 'info',
|
|
420
|
+
// PLAN-5 B-1 (3-D): the sortable behavior (checks/sortable.ts)
|
|
421
|
+
SYG145: 'warn',
|
|
422
|
+
SYG146: 'warn',
|
|
423
|
+
SYG147: 'warn',
|
|
424
|
+
// PLAN-5 3-F G-419 (checks/next.ts: onHostProps, onPatch)
|
|
425
|
+
SYG148: 'warn',
|
|
426
|
+
SYG149: 'warn',
|
|
427
|
+
SYG660: 'error',
|
|
428
|
+
SYG661: 'error',
|
|
429
|
+
SYG662: 'error',
|
|
430
|
+
SYG663: 'error',
|
|
431
|
+
SYG664: 'error',
|
|
432
|
+
SYG665: 'warn',
|
|
433
|
+
SYG666: 'error',
|
|
434
|
+
SYG667: 'error',
|
|
435
|
+
SYG668: 'warn',
|
|
436
|
+
SYG669: 'warn',
|
|
437
|
+
// PLAN-5 V-1: VirtualCollection (checks/virtual.ts, through the core bridge)
|
|
438
|
+
SYG430: 'warn',
|
|
439
|
+
SYG431: 'warn',
|
|
440
|
+
SYG432: 'warn',
|
|
441
|
+
SYG433: 'warn',
|
|
442
|
+
SYG434: 'warn',
|
|
443
|
+
// PLAN-5 3-H (G-449): sortable (checks/sortable.ts)
|
|
444
|
+
SYG435: 'warn',
|
|
445
|
+
// PLAN-4 GS-3: a11y lane, static only (sygnal-check; warn, also under --strict; error with --a11y=error, D144); listed so the entry knows its title
|
|
446
|
+
SYG701: 'warn',
|
|
447
|
+
SYG702: 'warn',
|
|
448
|
+
SYG703: 'warn',
|
|
449
|
+
SYG704: 'warn',
|
|
450
|
+
SYG705: 'warn',
|
|
451
|
+
SYG706: 'warn',
|
|
452
|
+
SYG707: 'warn',
|
|
453
|
+
SYG708: 'warn',
|
|
454
|
+
SYG722: 'warn',
|
|
455
|
+
// PLAN-5 B-1 (3-D): static only (sygnal-check)
|
|
456
|
+
SYG724: 'warn',
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
export function getCodeInfo(code: string): DiagnosticCodeInfo | undefined {
|
|
460
|
+
const severity = CODE_SEVERITY[code]
|
|
461
|
+
return severity && { code, severity, title: CODE_TITLES[code] || '', docsSlug: code.toLowerCase() }
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
export function listCodes(): DiagnosticCodeInfo[] {
|
|
465
|
+
return Object.keys(CODE_SEVERITY).map(c => getCodeInfo(c)!)
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
export function registerCodes(entries: Array<[string, DiagnosticSeverity, string]>): void {
|
|
469
|
+
for (const [code, severity, title] of entries) {
|
|
470
|
+
CODE_SEVERITY[code] = severity
|
|
471
|
+
CODE_TITLES[code] = title
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
export function docsUrlFor(code: string): string {
|
|
476
|
+
return `${DOCS_BASE_URL}/reference/errors#${code.toLowerCase()}`
|
|
477
|
+
}
|