what-core 0.14.0 → 0.15.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/LICENSE +21 -0
- package/README.md +64 -38
- package/a11y.d.ts +128 -0
- package/data.d.ts +294 -0
- package/dist/a11y.js +510 -0
- package/dist/a11y.min.js +413 -0
- package/dist/actions.js +158 -0
- package/dist/actions.min.js +112 -0
- package/dist/animation.js +481 -0
- package/dist/animation.min.js +295 -0
- package/dist/async.js +180 -0
- package/dist/async.min.js +134 -0
- package/dist/components.js +577 -0
- package/dist/components.min.js +413 -0
- package/dist/data.js +1212 -0
- package/dist/data.min.js +918 -0
- package/dist/diagnostics.js +187 -0
- package/dist/diagnostics.min.js +134 -0
- package/dist/dom.js +796 -0
- package/dist/dom.min.js +603 -0
- package/dist/entries/a11y.js +43 -0
- package/dist/entries/a11y.min.js +43 -0
- package/dist/entries/data.js +29 -0
- package/dist/entries/data.min.js +29 -0
- package/dist/entries/dom.js +45 -0
- package/dist/entries/dom.min.js +45 -0
- package/dist/entries/form.js +31 -0
- package/dist/entries/form.min.js +31 -0
- package/dist/entries/internal.js +123 -0
- package/dist/entries/internal.min.js +123 -0
- package/dist/entries/motion.js +23 -0
- package/dist/entries/motion.min.js +23 -0
- package/dist/entries/ui.js +25 -0
- package/dist/entries/ui.min.js +25 -0
- package/dist/env.js +5 -0
- package/dist/env.min.js +5 -0
- package/dist/errors.js +1518 -0
- package/dist/errors.min.js +548 -0
- package/dist/form.js +936 -0
- package/dist/form.min.js +703 -0
- package/dist/guardrails.js +84 -0
- package/dist/guardrails.min.js +55 -0
- package/dist/h.js +232 -0
- package/dist/h.min.js +171 -0
- package/dist/head.js +241 -0
- package/dist/head.min.js +207 -0
- package/dist/helpers.js +126 -0
- package/dist/helpers.min.js +98 -0
- package/dist/hooks.js +255 -0
- package/dist/hooks.min.js +153 -0
- package/dist/hot.js +215 -0
- package/dist/hot.min.js +24 -0
- package/dist/hydration-data.js +495 -0
- package/dist/hydration-data.min.js +371 -0
- package/dist/import-changes.js +273 -0
- package/dist/import-changes.min.js +272 -0
- package/dist/index.js +95 -0
- package/dist/index.min.js +95 -227
- package/dist/jsx-dev-runtime.js +10 -0
- package/dist/jsx-dev-runtime.min.js +10 -1
- package/dist/jsx-runtime.js +27 -0
- package/dist/jsx-runtime.min.js +15 -1
- package/dist/live.js +54 -0
- package/dist/live.min.js +49 -0
- package/dist/markup-rules.js +250 -0
- package/dist/markup-rules.min.js +213 -0
- package/dist/reactive.js +3334 -0
- package/dist/reactive.min.js +2033 -0
- package/dist/render.js +4746 -0
- package/dist/render.min.js +2797 -1
- package/dist/scheduler.js +225 -0
- package/dist/scheduler.min.js +162 -0
- package/dist/selector.js +11 -0
- package/dist/selector.min.js +10 -0
- package/dist/server-context.js +148 -0
- package/dist/server-context.min.js +121 -0
- package/dist/skeleton.js +342 -0
- package/dist/skeleton.min.js +310 -0
- package/dist/store.js +72 -0
- package/dist/store.min.js +50 -0
- package/dist/testing.js +720 -0
- package/dist/testing.min.js +458 -1
- package/dist/vnode-adoption.js +19 -0
- package/dist/vnode-adoption.min.js +19 -0
- package/dist/vnode-renderer.js +61 -0
- package/dist/vnode-renderer.min.js +47 -0
- package/dom.d.ts +44 -0
- package/form.d.ts +218 -0
- package/hot.d.ts +35 -0
- package/index.d.ts +421 -736
- package/internal.d.ts +284 -0
- package/jsx-runtime.d.ts +160 -137
- package/markup-rules.d.ts +83 -0
- package/motion.d.ts +156 -0
- package/package.json +117 -3
- package/render.d.ts +278 -29
- package/src/a11y.js +64 -59
- package/src/actions.js +226 -0
- package/src/animation.js +105 -57
- package/src/async.js +259 -0
- package/src/components.js +495 -144
- package/src/data.js +1410 -1159
- package/src/diagnostics.js +263 -0
- package/src/dom.js +1159 -872
- package/src/entries/a11y.js +24 -0
- package/src/entries/data.js +17 -0
- package/src/entries/dom.js +29 -0
- package/src/entries/form.js +16 -0
- package/src/entries/internal.js +63 -0
- package/src/entries/motion.js +13 -0
- package/src/entries/ui.js +13 -0
- package/src/env-development.js +12 -0
- package/src/env.js +33 -0
- package/src/errors.js +1144 -168
- package/src/form.js +723 -225
- package/src/guardrails.js +38 -126
- package/src/h.js +227 -152
- package/src/head.js +189 -19
- package/src/helpers.js +47 -75
- package/src/hooks.js +233 -248
- package/src/hot.js +316 -0
- package/src/hydration-data.js +859 -16
- package/src/import-changes.js +156 -0
- package/src/index.js +38 -188
- package/src/jsx-dev-runtime.js +7 -14
- package/src/jsx-runtime.js +25 -9
- package/src/live.js +80 -0
- package/src/markup-rules.js +387 -0
- package/src/reactive.js +4400 -862
- package/src/render.js +6502 -2570
- package/src/scheduler.js +56 -21
- package/src/selector.js +31 -0
- package/src/server-context.js +252 -22
- package/src/skeleton.js +22 -12
- package/src/store.js +17 -31
- package/src/testing.js +389 -63
- package/src/vnode-adoption.js +48 -0
- package/src/vnode-renderer.js +114 -0
- package/testing.d.ts +81 -1
- package/ui.d.ts +20 -0
- package/dist/chunk-6YOUZ6T4.min.js +0 -1
- package/dist/chunk-FN6HXME3.min.js +0 -11
- package/dist/chunk-VKZY7JPN.min.js +0 -1
- package/src/agent-context.js +0 -127
- package/src/warnings.js +0 -193
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
// src/import-changes.js
|
|
2
|
+
var i = /* @__PURE__ */ a([
|
|
3
|
+
// Names that meant something else in React.
|
|
4
|
+
{ name: "useTransition", to: "what-framework/motion", as: "useTween", onRoot: !0, note: "The animation helper formerly named useTransition is useTween. useTransition and startTransition on the root entry are React's transition API: const [isPending, start] = useTransition(), where isPending is an accessor, read as isPending()." },
|
|
5
|
+
{ name: "transition", to: "what-framework/motion", as: "transitionClass", note: "The enter/leave class helper is transitionClass(name, active)." },
|
|
6
|
+
{ name: "on", to: "what-framework/render", note: "on(el, event, handler) is a fine-grained rendering primitive; in components write onClick={...} in JSX." },
|
|
7
|
+
// Deleted: duplicates of names that stay.
|
|
8
|
+
{ name: "each", to: null, note: "Render lists with .map() and a key prop, or <For>." },
|
|
9
|
+
{ name: "atom", to: null, note: "Use signal(initial)." },
|
|
10
|
+
{ name: "storeComputed", to: null, note: "Use derived(fn) in the store definition." },
|
|
11
|
+
{ name: "onRootCleanup", to: null, note: "Use onCleanup(fn): it attaches to the component being rendered, or else to the reactive owner (createRoot, a list row)." },
|
|
12
|
+
{ name: "signalMemo", to: null, note: "Use computed(fn), which recomputes only when read and skips readers when the value is unchanged." },
|
|
13
|
+
{ name: "getLoaderData", to: null, note: "Use useLoaderData(), which reads the same payload on the client and the render context on the server." },
|
|
14
|
+
{ name: "_template", to: null, note: "Use template() from what-framework/render; compiled output imports _$template from there." },
|
|
15
|
+
{ name: "getResource", to: null, note: "Use createResource(fetcher, { key }), which reads the hydrated value for its key." },
|
|
16
|
+
// One island component: the server's. What the compiler lowers client:*
|
|
17
|
+
// directives to is a compiler target.
|
|
18
|
+
{ name: "Island", to: "what-framework/server", note: "The island component is what-framework/server's Island({ name, props, mode }), which the client hydrates through the island registry (island(), hydrateIslands()). A JSX client:* directive (<Counter client:idle />) compiles to _$Island from what-framework/render, an island that hydrates itself; code written with h() calls that the same way: h(_$Island, { component: Counter, mode: 'idle' })." },
|
|
19
|
+
// The error collector: the diagnostics channel replaced it.
|
|
20
|
+
{ name: "collectError", to: null, note: "Nothing collects errors by hand: the runtime reports its coded diagnostics on one channel (getDiagnostics(), subscribeDiagnostics()), and what-devtools records thrown errors (getErrors()). Both are development-only: a production build reports nothing." },
|
|
21
|
+
{ name: "getCollectedErrors", to: null, note: "Use getDiagnostics({ since }) for the coded diagnostics (since is the seq the previous call returned, not a timestamp), or getErrors() from what-devtools for thrown errors; both are development-only." },
|
|
22
|
+
{ name: "clearCollectedErrors", to: null, note: "Use clearDiagnostics()." },
|
|
23
|
+
// The agent context (window.__WHAT_AGENT__): what-devtools and
|
|
24
|
+
// what-devtools-mcp replaced it.
|
|
25
|
+
{ name: "installAgentContext", to: null, note: "Use installDevTools() from what-devtools, which what-devtools-mcp's Vite plugin calls in development: it exposes the app's state as window.__WHAT_DEVTOOLS__, which the what_* MCP tools read." },
|
|
26
|
+
{ to: null, names: ["registerComponent", "unregisterComponent"], note: "Delete the call: with what-devtools installed, every component is registered as it mounts and dropped as it unmounts." },
|
|
27
|
+
{ to: null, names: ["registerSignal", "unregisterSignal"], note: "Delete the call: with what-devtools installed, every signal is registered as it is created, and nothing has to unregister it." },
|
|
28
|
+
{ name: "getMountedComponents", to: null, note: "Use getSnapshot().components from what-devtools (development only), or the what_components MCP tool." },
|
|
29
|
+
{ name: "getActiveSignals", to: null, note: "Use getSnapshot().signals from what-devtools (development only), or the what_signals MCP tool." },
|
|
30
|
+
{ name: "getHealth", to: null, note: "Use the what_diagnose MCP tool (diagnostic codes, errors, hot effects, unread signals), or getDiagnostics() for the coded diagnostics alone." },
|
|
31
|
+
// Domain kits on subpaths.
|
|
32
|
+
{ to: "what-framework/a11y", names: [
|
|
33
|
+
"useFocus",
|
|
34
|
+
"useFocusRestore",
|
|
35
|
+
"useFocusTrap",
|
|
36
|
+
"FocusTrap",
|
|
37
|
+
"announce",
|
|
38
|
+
"announceAssertive",
|
|
39
|
+
"SkipLink",
|
|
40
|
+
"useAriaExpanded",
|
|
41
|
+
"useAriaSelected",
|
|
42
|
+
"useAriaChecked",
|
|
43
|
+
"useRovingTabIndex",
|
|
44
|
+
"VisuallyHidden",
|
|
45
|
+
"LiveRegion",
|
|
46
|
+
"useIds",
|
|
47
|
+
"useDescribedBy",
|
|
48
|
+
"useLabelledBy",
|
|
49
|
+
"Keys",
|
|
50
|
+
"onKey",
|
|
51
|
+
"onKeys"
|
|
52
|
+
], note: "Accessibility helpers live in what-framework/a11y." },
|
|
53
|
+
{ to: "what-framework/ui", names: [
|
|
54
|
+
"Skeleton",
|
|
55
|
+
"SkeletonText",
|
|
56
|
+
"SkeletonAvatar",
|
|
57
|
+
"SkeletonCard",
|
|
58
|
+
"SkeletonTable",
|
|
59
|
+
"IslandSkeleton",
|
|
60
|
+
"useSkeleton",
|
|
61
|
+
"Placeholder",
|
|
62
|
+
"LoadingDots",
|
|
63
|
+
"Spinner"
|
|
64
|
+
], note: "Skeletons and loading placeholders live in what-framework/ui." },
|
|
65
|
+
{ to: "what-framework/motion", names: [
|
|
66
|
+
"spring",
|
|
67
|
+
"tween",
|
|
68
|
+
"easings",
|
|
69
|
+
"useGesture",
|
|
70
|
+
"useAnimatedValue",
|
|
71
|
+
"createTransitionClasses",
|
|
72
|
+
"cssTransition"
|
|
73
|
+
], note: "Animation lives in what-framework/motion." },
|
|
74
|
+
{ to: "what-framework/dom", names: [
|
|
75
|
+
"scheduleRead",
|
|
76
|
+
"scheduleWrite",
|
|
77
|
+
"flushScheduler",
|
|
78
|
+
"measure",
|
|
79
|
+
"mutate",
|
|
80
|
+
"useScheduledEffect",
|
|
81
|
+
"nextFrame",
|
|
82
|
+
"raf",
|
|
83
|
+
"onResize",
|
|
84
|
+
"onIntersect",
|
|
85
|
+
"smoothScrollTo"
|
|
86
|
+
], note: "The DOM read/write scheduler lives in what-framework/dom." },
|
|
87
|
+
{ to: "what-framework/dom", names: [
|
|
88
|
+
"cls",
|
|
89
|
+
"style",
|
|
90
|
+
"debounce",
|
|
91
|
+
"throttle",
|
|
92
|
+
"useMediaQuery",
|
|
93
|
+
"useLocalStorage",
|
|
94
|
+
"useClickOutside",
|
|
95
|
+
"clearHead"
|
|
96
|
+
], note: "DOM utilities live in what-framework/dom." },
|
|
97
|
+
{ to: "what-framework/form", names: [
|
|
98
|
+
"useForm",
|
|
99
|
+
"useField",
|
|
100
|
+
"rules",
|
|
101
|
+
"simpleResolver",
|
|
102
|
+
"zodResolver",
|
|
103
|
+
"yupResolver",
|
|
104
|
+
"Input",
|
|
105
|
+
"Textarea",
|
|
106
|
+
"Select",
|
|
107
|
+
"Checkbox",
|
|
108
|
+
"Radio",
|
|
109
|
+
"ErrorMessage"
|
|
110
|
+
], note: "Forms live in what-framework/form." },
|
|
111
|
+
{ to: "what-framework/data", names: [
|
|
112
|
+
"useFetch",
|
|
113
|
+
"useSWR",
|
|
114
|
+
"useQuery",
|
|
115
|
+
"useInfiniteQuery",
|
|
116
|
+
"invalidateQueries",
|
|
117
|
+
"prefetchQuery",
|
|
118
|
+
"setQueryData",
|
|
119
|
+
"getQueryData",
|
|
120
|
+
"clearCache"
|
|
121
|
+
], note: "The query, SWR and fetch hooks live in what-framework/data." },
|
|
122
|
+
// Fine-grained rendering primitives: the compiler's runtime, for code
|
|
123
|
+
// written without JSX.
|
|
124
|
+
{ to: "what-framework/render", names: [
|
|
125
|
+
"template",
|
|
126
|
+
"svgTemplate",
|
|
127
|
+
"insert",
|
|
128
|
+
"mapArray",
|
|
129
|
+
"spread",
|
|
130
|
+
"setProp",
|
|
131
|
+
"delegateEvents",
|
|
132
|
+
"classList",
|
|
133
|
+
"isHydrating",
|
|
134
|
+
"_$template",
|
|
135
|
+
"_$createComponent"
|
|
136
|
+
], note: "Fine-grained rendering primitives live in what-framework/render, beside the rest of the compiled-JSX runtime." },
|
|
137
|
+
{ name: "_setTextInsertHook", to: "what-core/render", note: "Text engines register their insert hook through what-core/render." },
|
|
138
|
+
// The contract between what-core and its sibling packages and tools.
|
|
139
|
+
{ to: "what-core/internal", names: [
|
|
140
|
+
"__setDevToolsHooks",
|
|
141
|
+
"__drainPreinstallBuffer",
|
|
142
|
+
"__getCacheSnapshot",
|
|
143
|
+
"configureGuardrails",
|
|
144
|
+
"getGuardrailConfig",
|
|
145
|
+
"validateImports",
|
|
146
|
+
"ERROR_CODES",
|
|
147
|
+
"createWhatError",
|
|
148
|
+
"classifyError"
|
|
149
|
+
], note: "Devtools hooks, guardrails and the error catalogue are tool interfaces in what-core/internal." },
|
|
150
|
+
{ name: "checkComponentName", to: null, note: "Removed: a function that reaches the runtime is already being called as a component, so its name cannot reveal the lowercase JSX tag (rendered as an unknown element) the check was meant to catch. Name components in PascalCase." },
|
|
151
|
+
{ name: "installSignalReadGuardrail", to: null, note: "Nothing to install: in development every signal and computed reports ERR_MISSING_SIGNAL_READ when it is converted to a string or a number, with or without what-devtools." },
|
|
152
|
+
{ to: "what-core/internal", names: [
|
|
153
|
+
"getServerContext",
|
|
154
|
+
"setServerContext",
|
|
155
|
+
"runWithServerContext",
|
|
156
|
+
"__installServerContextStorage",
|
|
157
|
+
"beginHeadCollection",
|
|
158
|
+
"endHeadCollection",
|
|
159
|
+
"_isAriaAttr",
|
|
160
|
+
"_beginComponentSSR",
|
|
161
|
+
"_endComponentSSR",
|
|
162
|
+
"_mapArrayToArray",
|
|
163
|
+
"__readHydrationData",
|
|
164
|
+
"__resetHydrationData"
|
|
165
|
+
], note: "Server-rendering internals are what-server's interface in what-core/internal; apps use getResponse() and useLoaderData()." },
|
|
166
|
+
// New in 0.15, never on the root entry.
|
|
167
|
+
{ to: "what-core/internal", neverOnRoot: !0, names: [
|
|
168
|
+
"__depsOf",
|
|
169
|
+
"__subsOf",
|
|
170
|
+
"__currentEffect",
|
|
171
|
+
"__ownerOf",
|
|
172
|
+
"__ownerPath",
|
|
173
|
+
"reportDiagnostic",
|
|
174
|
+
"_thrownMessage",
|
|
175
|
+
"IMPORT_CHANGES",
|
|
176
|
+
"SUBPATH_ONLY"
|
|
177
|
+
], note: "Devtools hooks, guardrails and the error catalogue are tool interfaces in what-core/internal." },
|
|
178
|
+
{ to: "what-core/internal", neverOnRoot: !0, names: [
|
|
179
|
+
"_escapeHtml",
|
|
180
|
+
"_runInComponentSSR",
|
|
181
|
+
"_assignOwnerPath",
|
|
182
|
+
"_ownerCounter",
|
|
183
|
+
"_currentOwnerPath",
|
|
184
|
+
"_actionStateKey",
|
|
185
|
+
"_actionKeySalt",
|
|
186
|
+
"_currentRowPath",
|
|
187
|
+
"_enterRow",
|
|
188
|
+
"_installRowKeys",
|
|
189
|
+
"_leaveRow",
|
|
190
|
+
"_renderSalt",
|
|
191
|
+
"_tracksRows",
|
|
192
|
+
"__flushOutsideServerContext",
|
|
193
|
+
"__outsideServerContext",
|
|
194
|
+
"__markServerProcess",
|
|
195
|
+
"_rowKeyDigest",
|
|
196
|
+
"_engine",
|
|
197
|
+
"_runComponentAsync",
|
|
198
|
+
"_runComponentSync",
|
|
199
|
+
"_symbolChild",
|
|
200
|
+
"_loadedQueries"
|
|
201
|
+
], note: "Server-rendering internals are what-server's interface in what-core/internal; apps use getResponse() and useLoaderData()." },
|
|
202
|
+
{ to: "what-core/internal", neverOnRoot: !0, names: [
|
|
203
|
+
"__invalidateFromDevtools",
|
|
204
|
+
"_tagQueries",
|
|
205
|
+
"_formStatus",
|
|
206
|
+
"_formStatusContext",
|
|
207
|
+
"_resetForm",
|
|
208
|
+
"_formMember",
|
|
209
|
+
"_devAction",
|
|
210
|
+
"__DEV__",
|
|
211
|
+
"_urgent",
|
|
212
|
+
"_currentTransition",
|
|
213
|
+
"_onCommit",
|
|
214
|
+
"_pathLoaded",
|
|
215
|
+
"_contextOf",
|
|
216
|
+
"_provide",
|
|
217
|
+
"_isServerProcess",
|
|
218
|
+
"_devNewContent",
|
|
219
|
+
"_devDropped",
|
|
220
|
+
"_hotKeep"
|
|
221
|
+
], note: "The query cache's devtools and router hooks, the status <Form> provides and its reset, the engine hooks a navigation uses and the development flag are what-devtools', what-router's and what-server's interface in what-core/internal; apps use what-framework/data, useFormStatus(), <Form> and useTransition()." },
|
|
222
|
+
{ name: "isVNode", to: "what-core/internal", neverOnRoot: !0, note: "Whether a value is a vnode, by the brand only what-core's producers (h(), the JSX runtime, the boundaries) give: for libraries that make or inspect elements, such as what-react. Apps make elements with h() or JSX." },
|
|
223
|
+
{ name: "_signalKeyed", to: "what-core/internal", neverOnRoot: !0, note: "A vnode whose key is a signal, as the reactive child that builds it again when the key's value changes: what-server renders it with it. Apps write the key (`h(Editor, { key: id })`)." },
|
|
224
|
+
{ to: "what-core/internal", neverOnRoot: !0, names: ["_claimRegion", "_afterWalk", "_devHoldsState"], note: "Hooks for what-react's islands: an island takes the server's HTML for it whole and renders after the walk, and in development says it holds state (ERR_REBUILT_COMPONENT). Apps use hydrate()." },
|
|
225
|
+
{ to: "what-core/internal", neverOnRoot: !0, names: ["_errorSource", "_errorFromRecord"], note: "Whether an error is what a read of a failed async value threw, and the Error a hydrating client makes of a server error record: what-server shows an <ErrorBoundary>'s fallback for a value that failed as the client does. Apps use <ErrorBoundary>." },
|
|
226
|
+
{ name: "_mountPortal", to: "what-core/internal", neverOnRoot: !0, note: "The client renderer a portal's vnode carries: what-react's createPortal attaches it, so its portal also renders where it reaches a native What tree. Apps use <Portal>." },
|
|
227
|
+
{ to: "what-core/internal", neverOnRoot: !0, names: ["_placedNamespace", "_svgOnlyTag"], note: "What a React tree native code places is created in, for what-react's mixed mode: the namespace compiled JSX placed the native code in, and the tags only SVG has. Apps write the <svg>." }
|
|
228
|
+
]), l = /* @__PURE__ */ a([
|
|
229
|
+
{ to: "what-framework/router", names: [
|
|
230
|
+
"Router",
|
|
231
|
+
"FileRouter",
|
|
232
|
+
"Link",
|
|
233
|
+
"NavLink",
|
|
234
|
+
"Outlet",
|
|
235
|
+
"Redirect",
|
|
236
|
+
"navigate",
|
|
237
|
+
"redirect",
|
|
238
|
+
"route",
|
|
239
|
+
"useRoute",
|
|
240
|
+
"useParams",
|
|
241
|
+
"useSearch",
|
|
242
|
+
"useNavigate",
|
|
243
|
+
"defineRoutes",
|
|
244
|
+
"nestedRoutes",
|
|
245
|
+
"routeGroup",
|
|
246
|
+
"matchRoute",
|
|
247
|
+
"compilePath",
|
|
248
|
+
"parseQuery",
|
|
249
|
+
"isSafeUrl",
|
|
250
|
+
"setBase",
|
|
251
|
+
"guard",
|
|
252
|
+
"asyncGuard",
|
|
253
|
+
"beforeNavigate",
|
|
254
|
+
"afterNavigate",
|
|
255
|
+
"prefetch",
|
|
256
|
+
"prefetchRoute",
|
|
257
|
+
"enableScrollRestoration",
|
|
258
|
+
"setViewTransition",
|
|
259
|
+
"viewTransitionName"
|
|
260
|
+
], note: "The router lives in what-framework/router." }
|
|
261
|
+
]);
|
|
262
|
+
function a(o) {
|
|
263
|
+
let r = o.flatMap(({ names: e, ...t }) => e ? e.map((n) => ({ name: n, ...t })) : [t]);
|
|
264
|
+
return Object.freeze(r.map((e) => Object.freeze({ ...e, answer: s(e) })));
|
|
265
|
+
}
|
|
266
|
+
function s({ name: o, to: r, as: e, note: t }) {
|
|
267
|
+
return r ? `${t} Import it with: import { ${e || o} } from '${r}'.` : `It was removed in 0.15. ${t}`;
|
|
268
|
+
}
|
|
269
|
+
export {
|
|
270
|
+
i as IMPORT_CHANGES,
|
|
271
|
+
l as SUBPATH_ONLY
|
|
272
|
+
};
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
// src/index.js
|
|
2
|
+
import { signal, effect, batch, untrack, flushSync, createRoot, getOwner, runWithOwner } from "./reactive.js";
|
|
3
|
+
import { computed, refresh, isPending, startTransition, useTransition, useOptimistic, use, settled } from "./async.js";
|
|
4
|
+
import { useActionState, useFormStatus } from "./actions.js";
|
|
5
|
+
import { createSelector } from "./selector.js";
|
|
6
|
+
import { live } from "./live.js";
|
|
7
|
+
import { h, Fragment, html } from "./h.js";
|
|
8
|
+
import { mount } from "./dom.js";
|
|
9
|
+
import { hydrate } from "./render.js";
|
|
10
|
+
import { applyStreamedBoundaries } from "./hydration-data.js";
|
|
11
|
+
import {
|
|
12
|
+
useState,
|
|
13
|
+
useSignal,
|
|
14
|
+
useComputed,
|
|
15
|
+
useEffect,
|
|
16
|
+
useMemo,
|
|
17
|
+
useCallback,
|
|
18
|
+
useRef,
|
|
19
|
+
useReducer,
|
|
20
|
+
createContext,
|
|
21
|
+
useContext,
|
|
22
|
+
onMount,
|
|
23
|
+
onCleanup,
|
|
24
|
+
createResource,
|
|
25
|
+
useLoaderData
|
|
26
|
+
} from "./hooks.js";
|
|
27
|
+
import { useId } from "./a11y.js";
|
|
28
|
+
import { memo, lazy, Suspense, ErrorBoundary, Show, For, Switch, Match } from "./components.js";
|
|
29
|
+
import { Portal } from "./helpers.js";
|
|
30
|
+
import { createStore, derived } from "./store.js";
|
|
31
|
+
import { Head } from "./head.js";
|
|
32
|
+
import { getResponse } from "./server-context.js";
|
|
33
|
+
import { getDiagnostics, subscribe, clearDiagnostics } from "./diagnostics.js";
|
|
34
|
+
import { getErrorDefinition, WhatError } from "./errors.js";
|
|
35
|
+
export {
|
|
36
|
+
ErrorBoundary,
|
|
37
|
+
For,
|
|
38
|
+
Fragment,
|
|
39
|
+
Head,
|
|
40
|
+
Match,
|
|
41
|
+
Portal,
|
|
42
|
+
Show,
|
|
43
|
+
Suspense,
|
|
44
|
+
Switch,
|
|
45
|
+
WhatError,
|
|
46
|
+
applyStreamedBoundaries,
|
|
47
|
+
batch,
|
|
48
|
+
clearDiagnostics,
|
|
49
|
+
computed,
|
|
50
|
+
createContext,
|
|
51
|
+
createResource,
|
|
52
|
+
createRoot,
|
|
53
|
+
createSelector,
|
|
54
|
+
createStore,
|
|
55
|
+
derived,
|
|
56
|
+
effect,
|
|
57
|
+
flushSync,
|
|
58
|
+
getDiagnostics,
|
|
59
|
+
getErrorDefinition,
|
|
60
|
+
getOwner,
|
|
61
|
+
getResponse,
|
|
62
|
+
h,
|
|
63
|
+
html,
|
|
64
|
+
hydrate,
|
|
65
|
+
isPending,
|
|
66
|
+
lazy,
|
|
67
|
+
live,
|
|
68
|
+
memo,
|
|
69
|
+
mount,
|
|
70
|
+
onCleanup,
|
|
71
|
+
onMount,
|
|
72
|
+
refresh,
|
|
73
|
+
runWithOwner,
|
|
74
|
+
settled,
|
|
75
|
+
signal,
|
|
76
|
+
startTransition,
|
|
77
|
+
subscribe as subscribeDiagnostics,
|
|
78
|
+
untrack,
|
|
79
|
+
use,
|
|
80
|
+
useActionState,
|
|
81
|
+
useCallback,
|
|
82
|
+
useComputed,
|
|
83
|
+
useContext,
|
|
84
|
+
useEffect,
|
|
85
|
+
useFormStatus,
|
|
86
|
+
useId,
|
|
87
|
+
useLoaderData,
|
|
88
|
+
useMemo,
|
|
89
|
+
useOptimistic,
|
|
90
|
+
useReducer,
|
|
91
|
+
useRef,
|
|
92
|
+
useSignal,
|
|
93
|
+
useState,
|
|
94
|
+
useTransition
|
|
95
|
+
};
|