solid-js 1.8.16 → 1.8.18

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/h/dist/h.js CHANGED
@@ -12,12 +12,14 @@ function createHyperScript(r) {
12
12
  function h() {
13
13
  let args = [].slice.call(arguments),
14
14
  e,
15
+ classes = [],
15
16
  multiExpression = false;
16
17
  while (Array.isArray(args[0])) args = args[0];
17
18
  if (args[0][$ELEMENT]) args.unshift(h.Fragment);
18
19
  typeof args[0] === "string" && detectMultiExpression(args);
19
20
  const ret = () => {
20
21
  while (args.length) item(args.shift());
22
+ if (e instanceof Element && classes.length) e.classList.add(...classes);
21
23
  return e;
22
24
  };
23
25
  ret[$ELEMENT] = true;
@@ -43,6 +45,18 @@ function createHyperScript(r) {
43
45
  let dynamic = false;
44
46
  const d = Object.getOwnPropertyDescriptors(l);
45
47
  for (const k in d) {
48
+ if (k === "class" && classes.length !== 0) {
49
+ const fixedClasses = classes.join(" "),
50
+ value =
51
+ typeof d["class"].value === "function"
52
+ ? () => fixedClasses + " " + d["class"].value()
53
+ : fixedClasses + " " + l["class"];
54
+ Object.defineProperty(l, "class", {
55
+ ...d[k],
56
+ value
57
+ });
58
+ classes = [];
59
+ }
46
60
  if (k !== "ref" && k.slice(0, 2) !== "on" && typeof d[k].value === "function") {
47
61
  r.dynamicProperty(l, k);
48
62
  dynamic = true;
@@ -97,7 +111,7 @@ function createHyperScript(r) {
97
111
  e = r.SVGElements.has(v)
98
112
  ? document.createElementNS("http://www.w3.org/2000/svg", v)
99
113
  : document.createElement(v);
100
- else if (v[0] === ".") e.classList.add(s);
114
+ else if (v[0] === ".") classes.push(s);
101
115
  else if (v[0] === "#") e.setAttribute("id", s);
102
116
  }
103
117
  }
@@ -155,6 +155,7 @@ export namespace JSX {
155
155
  onAnimationStart?: EventHandlerUnion<T, AnimationEvent>;
156
156
  onAuxClick?: EventHandlerUnion<T, MouseEvent>;
157
157
  onBeforeInput?: EventHandlerUnion<T, InputEvent>;
158
+ onBeforeToggle?: EventHandlerUnion<T, ToggleEvent>;
158
159
  onBlur?: EventHandlerUnion<T, FocusEvent>;
159
160
  onCanPlay?: EventHandlerUnion<T, Event>;
160
161
  onCanPlayThrough?: EventHandlerUnion<T, Event>;
@@ -220,6 +221,7 @@ export namespace JSX {
220
221
  >;
221
222
  onSuspend?: EventHandlerUnion<T, Event>;
222
223
  onTimeUpdate?: EventHandlerUnion<T, Event>;
224
+ onToggle?: EventHandlerUnion<T, ToggleEvent>;
223
225
  onTouchCancel?: EventHandlerUnion<T, TouchEvent>;
224
226
  onTouchEnd?: EventHandlerUnion<T, TouchEvent>;
225
227
  onTouchMove?: EventHandlerUnion<T, TouchEvent>;
@@ -242,6 +244,7 @@ export namespace JSX {
242
244
  onanimationstart?: EventHandlerUnion<T, AnimationEvent>;
243
245
  onauxclick?: EventHandlerUnion<T, MouseEvent>;
244
246
  onbeforeinput?: EventHandlerUnion<T, InputEvent>;
247
+ onbeforetoggle?: EventHandlerUnion<T, ToggleEvent>;
245
248
  onblur?: EventHandlerUnion<T, FocusEvent>;
246
249
  oncanplay?: EventHandlerUnion<T, Event>;
247
250
  oncanplaythrough?: EventHandlerUnion<T, Event>;
@@ -307,6 +310,7 @@ export namespace JSX {
307
310
  >;
308
311
  onsuspend?: EventHandlerUnion<T, Event>;
309
312
  ontimeupdate?: EventHandlerUnion<T, Event>;
313
+ ontoggle?: EventHandlerUnion<T, ToggleEvent>;
310
314
  ontouchcancel?: EventHandlerUnion<T, TouchEvent>;
311
315
  ontouchend?: EventHandlerUnion<T, TouchEvent>;
312
316
  ontouchmove?: EventHandlerUnion<T, TouchEvent>;
@@ -1820,6 +1824,7 @@ export namespace JSX {
1820
1824
  contentScriptType?: FunctionMaybe<string>;
1821
1825
  contentStyleType?: FunctionMaybe<string>;
1822
1826
  xmlns?: FunctionMaybe<string>;
1827
+ "xmlns:xlink"?: FunctionMaybe<string>;
1823
1828
  }
1824
1829
  interface SwitchSVGAttributes<T>
1825
1830
  extends ContainerElementSVGAttributes<T>,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "solid-js",
3
3
  "description": "A declarative JavaScript library for building user interfaces.",
4
- "version": "1.8.16",
4
+ "version": "1.8.18",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",
7
7
  "homepage": "https://solidjs.com",
@@ -243,7 +243,7 @@ export interface SetStoreFunction<T> {
243
243
  /**
244
244
  * Creates a reactive store that can be read through a proxy object and written with a setter function
245
245
  *
246
- * @description https://www.solidjs.com/docs/latest/api#createstore
246
+ * @description https://docs.solidjs.com/reference/store-utilities/create-store
247
247
  */
248
248
  export declare function createStore<T extends object = {}>(
249
249
  ...[store, options]: {} extends T
package/types/jsx.d.ts CHANGED
@@ -221,6 +221,7 @@ export namespace JSX {
221
221
  onAnimationStart?: EventHandlerUnion<T, AnimationEvent>;
222
222
  onAuxClick?: EventHandlerUnion<T, MouseEvent>;
223
223
  onBeforeInput?: InputEventHandlerUnion<T, InputEvent>;
224
+ onBeforeToggle?: EventHandlerUnion<T, ToggleEvent>;
224
225
  onBlur?: FocusEventHandlerUnion<T, FocusEvent>;
225
226
  onCanPlay?: EventHandlerUnion<T, Event>;
226
227
  onCanPlayThrough?: EventHandlerUnion<T, Event>;
@@ -286,6 +287,7 @@ export namespace JSX {
286
287
  >;
287
288
  onSuspend?: EventHandlerUnion<T, Event>;
288
289
  onTimeUpdate?: EventHandlerUnion<T, Event>;
290
+ onToggle?: EventHandlerUnion<T, ToggleEvent>;
289
291
  onTouchCancel?: EventHandlerUnion<T, TouchEvent>;
290
292
  onTouchEnd?: EventHandlerUnion<T, TouchEvent>;
291
293
  onTouchMove?: EventHandlerUnion<T, TouchEvent>;
@@ -308,6 +310,7 @@ export namespace JSX {
308
310
  onanimationstart?: EventHandlerUnion<T, AnimationEvent>;
309
311
  onauxclick?: EventHandlerUnion<T, MouseEvent>;
310
312
  onbeforeinput?: InputEventHandlerUnion<T, InputEvent>;
313
+ onbeforetoggle?: EventHandlerUnion<T, ToggleEvent>;
311
314
  onblur?: FocusEventHandlerUnion<T, FocusEvent>;
312
315
  oncanplay?: EventHandlerUnion<T, Event>;
313
316
  oncanplaythrough?: EventHandlerUnion<T, Event>;
@@ -373,6 +376,7 @@ export namespace JSX {
373
376
  >;
374
377
  onsuspend?: EventHandlerUnion<T, Event>;
375
378
  ontimeupdate?: EventHandlerUnion<T, Event>;
379
+ ontoggle?: EventHandlerUnion<T, ToggleEvent>;
376
380
  ontouchcancel?: EventHandlerUnion<T, TouchEvent>;
377
381
  ontouchend?: EventHandlerUnion<T, TouchEvent>;
378
382
  ontouchmove?: EventHandlerUnion<T, TouchEvent>;
@@ -1897,6 +1901,7 @@ export namespace JSX {
1897
1901
  contentScriptType?: string;
1898
1902
  contentStyleType?: string;
1899
1903
  xmlns?: string;
1904
+ "xmlns:xlink"?: string;
1900
1905
  }
1901
1906
  interface SwitchSVGAttributes<T>
1902
1907
  extends ContainerElementSVGAttributes<T>,
@@ -27,7 +27,7 @@ SOFTWARE.
27
27
  *
28
28
  * similar to `Array.prototype.map`, but gets the index as accessor, transforms only values that changed and returns an accessor and reactively tracks changes to the list.
29
29
  *
30
- * @description https://www.solidjs.com/docs/latest/api#maparray
30
+ * @description https://docs.solidjs.com/reference/reactive-utilities/map-array
31
31
  */
32
32
  export declare function mapArray<T, U>(
33
33
  list: Accessor<readonly T[] | undefined | null | false>,
@@ -41,7 +41,7 @@ export declare function mapArray<T, U>(
41
41
  *
42
42
  * similar to `Array.prototype.map`, but gets the value as an accessor, transforms only changed items of the original arrays anew and returns an accessor.
43
43
  *
44
- * @description https://www.solidjs.com/docs/latest/api#indexarray
44
+ * @description https://docs.solidjs.com/reference/reactive-utilities/index-array
45
45
  */
46
46
  export declare function indexArray<T, U>(
47
47
  list: Accessor<readonly T[] | undefined | null | false>,
@@ -25,7 +25,7 @@ export type ObservableObserver<T> =
25
25
  * const obsv$ = from(observable(s));
26
26
  * obsv$.subscribe((v) => console.log(v));
27
27
  * ```
28
- * description https://www.solidjs.com/docs/latest/api#observable
28
+ * description https://docs.solidjs.com/reference/reactive-utilities/observable
29
29
  */
30
30
  export declare function observable<T>(input: Accessor<T>): Observable<T>;
31
31
  export declare function from<T>(
@@ -96,7 +96,7 @@ export type RootFunction<T> = (dispose: () => void) => T;
96
96
  * @param detachedOwner optional reactive context to bind the root to
97
97
  * @returns the output of `fn`.
98
98
  *
99
- * @description https://www.solidjs.com/docs/latest/api#createroot
99
+ * @description https://docs.solidjs.com/reference/reactive-utilities/create-root
100
100
  */
101
101
  export declare function createRoot<T>(fn: RootFunction<T>, detachedOwner?: typeof Owner): T;
102
102
  export type Accessor<T> = () => T;
@@ -133,7 +133,7 @@ export interface SignalOptions<T> extends MemoOptions<T> {
133
133
  * setCount(count => count + 1);
134
134
  * ```
135
135
  *
136
- * @description https://www.solidjs.com/docs/latest/api#createsignal
136
+ * @description https://docs.solidjs.com/reference/basic-reactivity/create-signal
137
137
  */
138
138
  export declare function createSignal<T>(): Signal<T | undefined>;
139
139
  export declare function createSignal<T>(value: T, options?: SignalOptions<T>): Signal<T>;
@@ -156,7 +156,7 @@ export type EffectFunction<Prev, Next extends Prev = Prev> = (v: Prev) => Next;
156
156
  * @param value an optional initial value for the computation; if set, fn will never receive undefined as first argument
157
157
  * @param options allows to set a name in dev mode for debugging purposes
158
158
  *
159
- * @description https://www.solidjs.com/docs/latest/api#createcomputed
159
+ * @description https://docs.solidjs.com/reference/secondary-primitives/create-computed
160
160
  */
161
161
  export declare function createComputed<Next>(
162
162
  fn: EffectFunction<undefined | NoInfer<Next>, Next>
@@ -179,7 +179,7 @@ export declare function createComputed<Next, Init = Next>(
179
179
  * @param value an optional initial value for the computation; if set, fn will never receive undefined as first argument
180
180
  * @param options allows to set a name in dev mode for debugging purposes
181
181
  *
182
- * @description https://www.solidjs.com/docs/latest/api#createrendereffect
182
+ * @description https://docs.solidjs.com/reference/secondary-primitives/create-render-effect
183
183
  */
184
184
  export declare function createRenderEffect<Next>(
185
185
  fn: EffectFunction<undefined | NoInfer<Next>, Next>
@@ -202,7 +202,7 @@ export declare function createRenderEffect<Next, Init = Next>(
202
202
  * @param value an optional initial value for the computation; if set, fn will never receive undefined as first argument
203
203
  * @param options allows to set a name in dev mode for debugging purposes
204
204
  *
205
- * @description https://www.solidjs.com/docs/latest/api#createeffect
205
+ * @description https://docs.solidjs.com/reference/basic-reactivity/create-effect
206
206
  */
207
207
  export declare function createEffect<Next>(
208
208
  fn: EffectFunction<undefined | NoInfer<Next>, Next>
@@ -225,7 +225,7 @@ export declare function createEffect<Next, Init = Next>(
225
225
  * @param invalidated a function that is called when tracked function is invalidated.
226
226
  * @param options allows to set a name in dev mode for debugging purposes
227
227
  *
228
- * @description https://www.solidjs.com/docs/latest/api#createreaction
228
+ * @description https://docs.solidjs.com/reference/secondary-primitives/create-reaction
229
229
  */
230
230
  export declare function createReaction(
231
231
  onInvalidate: () => void,
@@ -251,7 +251,7 @@ export interface MemoOptions<T> extends EffectOptions {
251
251
  * @param value an optional initial value for the computation; if set, fn will never receive undefined as first argument
252
252
  * @param options allows to set a name in dev mode for debugging purposes and use a custom comparison function in equals
253
253
  *
254
- * @description https://www.solidjs.com/docs/latest/api#creatememo
254
+ * @description https://docs.solidjs.com/reference/basic-reactivity/create-memo
255
255
  */
256
256
  export declare function createMemo<Next extends Prev, Prev = Next>(
257
257
  fn: EffectFunction<undefined | NoInfer<Prev>, Next>
@@ -358,7 +358,7 @@ export type InitializedResourceReturn<T, R = unknown> = [
358
358
  * * `mutate` allows to manually overwrite the resource without calling the fetcher
359
359
  * * `refetch` will re-run the fetcher without changing the source, and if called with a value, that value will be passed to the fetcher via the `refetching` property on the fetcher's second parameter
360
360
  *
361
- * @description https://www.solidjs.com/docs/latest/api#createresource
361
+ * @description https://docs.solidjs.com/reference/basic-reactivity/create-resource
362
362
  */
363
363
  export declare function createResource<T, R = unknown>(
364
364
  fetcher: ResourceFetcher<true, T, R>,
@@ -394,7 +394,7 @@ export interface DeferredOptions<T> {
394
394
  * @param fn a function that receives its previous or the initial value, if set, and returns a new value used to react on a computation
395
395
  * @param options allows to set the timeout in milliseconds, use a custom comparison function and set a name in dev mode for debugging purposes
396
396
  *
397
- * @description https://www.solidjs.com/docs/latest/api#createdeferred
397
+ * @description https://docs.solidjs.com/reference/secondary-primitives/create-deferred
398
398
  */
399
399
  export declare function createDeferred<T>(
400
400
  source: Accessor<T>,
@@ -423,7 +423,7 @@ export type EqualityCheckerFunction<T, U> = (a: U, b: T) => boolean;
423
423
  *
424
424
  * This makes the operation O(2) instead of O(n).
425
425
  *
426
- * @description https://www.solidjs.com/docs/latest/api#createselector
426
+ * @description https://docs.solidjs.com/reference/secondary-primitives/create-selector
427
427
  */
428
428
  export declare function createSelector<T, U = T>(
429
429
  source: Accessor<T>,
@@ -435,7 +435,7 @@ export declare function createSelector<T, U = T>(
435
435
  * @param fn wraps the reactive updates that should be batched
436
436
  * @returns the return value from `fn`
437
437
  *
438
- * @description https://www.solidjs.com/docs/latest/api#batch
438
+ * @description https://docs.solidjs.com/reference/reactive-utilities/batch
439
439
  */
440
440
  export declare function batch<T>(fn: Accessor<T>): T;
441
441
  /**
@@ -443,7 +443,7 @@ export declare function batch<T>(fn: Accessor<T>): T;
443
443
  * @param fn the scope that is out of the tracking context
444
444
  * @returns the return value of `fn`
445
445
  *
446
- * @description https://www.solidjs.com/docs/latest/api#untrack
446
+ * @description https://docs.solidjs.com/reference/reactive-utilities/untrack
447
447
  */
448
448
  export declare function untrack<T>(fn: Accessor<T>): T;
449
449
  /** @deprecated */
@@ -494,7 +494,7 @@ export interface OnOptions {
494
494
  * });
495
495
  * ```
496
496
  *
497
- * @description https://www.solidjs.com/docs/latest/api#on
497
+ * @description https://docs.solidjs.com/reference/jsx-attributes/on_
498
498
  */
499
499
  export declare function on<S, Next extends Prev, Prev = Next>(
500
500
  deps: AccessorArray<S> | Accessor<S>,
@@ -516,7 +516,7 @@ export declare function on<S, Next extends Prev, Prev = Next>(
516
516
  * Runs an effect only after initial render on mount
517
517
  * @param fn an effect that should run only once on mount
518
518
  *
519
- * @description https://www.solidjs.com/docs/latest/api#onmount
519
+ * @description https://docs.solidjs.com/reference/lifecycle/on-mount
520
520
  */
521
521
  export declare function onMount(fn: () => void): void;
522
522
  /**
@@ -525,7 +525,7 @@ export declare function onMount(fn: () => void): void;
525
525
  *
526
526
  * @returns the same {@link fn} function that was passed in
527
527
  *
528
- * @description https://www.solidjs.com/docs/latest/api#oncleanup
528
+ * @description https://docs.solidjs.com/reference/lifecycle/on-cleanup
529
529
  */
530
530
  export declare function onCleanup<T extends () => any>(fn: T): T;
531
531
  /**
@@ -535,7 +535,7 @@ export declare function onCleanup<T extends () => any>(fn: T): T;
535
535
  *
536
536
  * * If the error is thrown again inside the error handler, it will trigger the next available parent handler
537
537
  *
538
- * @description https://www.solidjs.com/docs/latest/api#catcherror
538
+ * @description https://docs.solidjs.com/reference/reactive-utilities/catch-error
539
539
  */
540
540
  export declare function catchError<T>(fn: () => T, handler: (err: Error) => void): T | undefined;
541
541
  export declare function getListener(): Computation<any, any> | null;
@@ -547,7 +547,7 @@ export declare function enableScheduling(scheduler?: typeof requestCallback): vo
547
547
  * export function startTransition(fn: () => void) => Promise<void>
548
548
  * ```
549
549
  *
550
- * @description https://www.solidjs.com/docs/latest/api#usetransition
550
+ * @description https://docs.solidjs.com/reference/reactive-utilities/start-transition
551
551
  */
552
552
  export declare function startTransition(fn: () => unknown): Promise<void>;
553
553
  export type Transition = [Accessor<boolean>, (fn: () => void) => Promise<void>];
@@ -559,7 +559,7 @@ export type Transition = [Accessor<boolean>, (fn: () => void) => Promise<void>];
559
559
  * ];
560
560
  * @returns a tuple; first value is an accessor if the transition is pending and a callback to start the transition
561
561
  *
562
- * @description https://www.solidjs.com/docs/latest/api#usetransition
562
+ * @description https://docs.solidjs.com/reference/reactive-utilities/use-transition
563
563
  */
564
564
  export declare function useTransition(): Transition;
565
565
  export declare function resumeEffects(e: Computation<any>[]): void;
@@ -595,7 +595,7 @@ export interface Context<T> {
595
595
  * @param options allows to set a name in dev mode for debugging purposes
596
596
  * @returns The context that contains the Provider Component and that can be used with `useContext`
597
597
  *
598
- * @description https://www.solidjs.com/docs/latest/api#createcontext
598
+ * @description https://docs.solidjs.com/reference/component-apis/create-context
599
599
  */
600
600
  export declare function createContext<T>(
601
601
  defaultValue?: undefined,
@@ -608,7 +608,7 @@ export declare function createContext<T>(defaultValue: T, options?: EffectOption
608
608
  * @param context Context object made by `createContext`
609
609
  * @returns the current or `defaultValue`, if present
610
610
  *
611
- * @description https://www.solidjs.com/docs/latest/api#usecontext
611
+ * @description https://docs.solidjs.com/reference/component-apis/use-context
612
612
  */
613
613
  export declare function useContext<T>(context: Context<T>): T;
614
614
  export type ResolvedJSXElement = Exclude<JSX.Element, JSX.ArrayElement>;
@@ -622,7 +622,7 @@ export type ChildrenReturn = Accessor<ResolvedChildren> & {
622
622
  * @param fn an accessor for the children
623
623
  * @returns a accessor of the same children, but resolved
624
624
  *
625
- * @description https://www.solidjs.com/docs/latest/api#children
625
+ * @description https://docs.solidjs.com/reference/component-apis/children
626
626
  */
627
627
  export declare function children(fn: Accessor<JSX.Element>): ChildrenReturn;
628
628
  export type SuspenseContextType = {
@@ -656,7 +656,7 @@ export declare function writeSignal(
656
656
  *
657
657
  * * If the error is thrown again inside the error handler, it will trigger the next available parent handler
658
658
  *
659
- * @description https://www.solidjs.com/docs/latest/api#onerror
659
+ * @description https://www.solidjs.com/docs/latest/api#onerror | https://docs.solidjs.com/reference/reactive-utilities/catch-error
660
660
  */
661
661
  export declare function onError(fn: (err: Error) => void): void;
662
662
  export {};
@@ -2,7 +2,7 @@ import type { JSX } from "../jsx.js";
2
2
  /**
3
3
  * **[experimental]** Controls the order in which suspended content is rendered
4
4
  *
5
- * @description https://www.solidjs.com/docs/latest/api#suspenselist-experimental
5
+ * @description https://docs.solidjs.com/reference/components/suspense-list
6
6
  */
7
7
  export declare function SuspenseList(props: {
8
8
  children: JSX.Element;
@@ -18,7 +18,7 @@ export declare function SuspenseList(props: {
18
18
  * <AsyncComponent />
19
19
  * </Suspense>
20
20
  * ```
21
- * @description https://www.solidjs.com/docs/latest/api#suspense
21
+ * @description https://docs.solidjs.com/reference/components/suspense
22
22
  */
23
23
  export declare function Suspense(props: {
24
24
  fallback?: JSX.Element;
@@ -11,7 +11,7 @@ import type { JSX } from "../jsx.js";
11
11
  * ```
12
12
  * If you have a list with fixed indices and changing values, consider using `<Index>` instead.
13
13
  *
14
- * @description https://www.solidjs.com/docs/latest/api#for
14
+ * @description https://docs.solidjs.com/reference/components/for
15
15
  */
16
16
  export declare function For<T extends readonly any[], U extends JSX.Element>(props: {
17
17
  each: T | undefined | null | false;
@@ -29,7 +29,7 @@ export declare function For<T extends readonly any[], U extends JSX.Element>(pro
29
29
  * ```
30
30
  * If you have a list with changing indices, better use `<For>`.
31
31
  *
32
- * @description https://www.solidjs.com/docs/latest/api#index
32
+ * @description https://docs.solidjs.com/reference/components/index
33
33
  */
34
34
  export declare function Index<T extends readonly any[], U extends JSX.Element>(props: {
35
35
  each: T | undefined | null | false;
@@ -39,7 +39,7 @@ export declare function Index<T extends readonly any[], U extends JSX.Element>(p
39
39
  type RequiredParameter<T> = T extends () => unknown ? never : T;
40
40
  /**
41
41
  * Conditionally render its children or an optional fallback component
42
- * @description https://www.solidjs.com/docs/latest/api#show
42
+ * @description https://docs.solidjs.com/reference/components/show
43
43
  */
44
44
  export declare function Show<
45
45
  T,
@@ -71,7 +71,7 @@ export declare function Show<
71
71
  * </Match>
72
72
  * </Switch>
73
73
  * ```
74
- * @description https://www.solidjs.com/docs/latest/api#switchmatch
74
+ * @description https://docs.solidjs.com/reference/components/switch-and-match
75
75
  */
76
76
  export declare function Switch(props: {
77
77
  fallback?: JSX.Element;
@@ -89,7 +89,7 @@ export type MatchProps<T> = {
89
89
  * <Content/>
90
90
  * </Match>
91
91
  * ```
92
- * @description https://www.solidjs.com/docs/latest/api#switchmatch
92
+ * @description https://docs.solidjs.com/reference/components/switch-and-match
93
93
  */
94
94
  export declare function Match<
95
95
  T,
@@ -121,7 +121,7 @@ export declare function resetErrorBoundaries(): void;
121
121
  * ```
122
122
  * Errors thrown from the fallback can be caught by a parent ErrorBoundary
123
123
  *
124
- * @description https://www.solidjs.com/docs/latest/api#errorboundary
124
+ * @description https://docs.solidjs.com/reference/components/error-boundary
125
125
  */
126
126
  export declare function ErrorBoundary(props: {
127
127
  fallback: JSX.Element | ((err: any, reset: () => void) => JSX.Element);
@@ -91,7 +91,7 @@ export declare function Index<T>(props: {
91
91
  }): string | any[] | undefined;
92
92
  /**
93
93
  * Conditionally render its children or an optional fallback component
94
- * @description https://www.solidjs.com/docs/latest/api#show
94
+ * @description https://docs.solidjs.com/reference/components/show
95
95
  */
96
96
  export declare function Show<T>(props: {
97
97
  when: T | undefined | null | false;
package/web/dist/dev.cjs CHANGED
@@ -40,7 +40,7 @@ function getPropAlias(prop, tagName) {
40
40
  }
41
41
  const DelegatedEvents = /*#__PURE__*/new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]);
42
42
  const SVGElements = /*#__PURE__*/new Set([
43
- "altGlyph", "altGlyphDef", "altGlyphItem", "animate", "animateColor", "animateMotion", "animateTransform", "circle", "clipPath", "color-profile", "cursor", "defs", "desc", "ellipse", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "filter", "font", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignObject", "g", "glyph", "glyphRef", "hkern", "image", "line", "linearGradient", "marker", "mask", "metadata", "missing-glyph", "mpath", "path", "pattern", "polygon", "polyline", "radialGradient", "rect",
43
+ "altGlyph", "altGlyphDef", "altGlyphItem", "animate", "animateColor", "animateMotion", "animateTransform", "circle", "clipPath", "color-profile", "cursor", "defs", "desc", "ellipse", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "filter", "font", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignObject", "g", "glyph", "glyphRef", "hkern", "image", "line", "linearGradient", "marker", "mask", "metadata", "missing-glyph", "mpath", "path", "pattern", "polygon", "polyline", "radialGradient", "rect",
44
44
  "set", "stop",
45
45
  "svg", "switch", "symbol", "text", "textPath",
46
46
  "tref", "tspan", "use", "view", "vkern"]);
@@ -222,7 +222,7 @@ function spread(node, props = {}, isSVG, skipChildren) {
222
222
  if (!skipChildren) {
223
223
  solidJs.createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
224
224
  }
225
- solidJs.createRenderEffect(() => props.ref && props.ref(node));
225
+ solidJs.createRenderEffect(() => typeof props.ref === "function" ? use(props.ref, node) : props.ref = node);
226
226
  solidJs.createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));
227
227
  return prevProps;
228
228
  }
@@ -419,7 +419,10 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
419
419
  parent = multi && current[0] && current[0].parentNode || parent;
420
420
  if (t === "string" || t === "number") {
421
421
  if (hydrating) return current;
422
- if (t === "number") value = value.toString();
422
+ if (t === "number") {
423
+ value = value.toString();
424
+ if (value === current) return current;
425
+ }
423
426
  if (multi) {
424
427
  let node = current[0];
425
428
  if (node && node.nodeType === 3) {
package/web/dist/dev.js CHANGED
@@ -153,6 +153,7 @@ const SVGElements = /*#__PURE__*/ new Set([
153
153
  "feDiffuseLighting",
154
154
  "feDisplacementMap",
155
155
  "feDistantLight",
156
+ "feDropShadow",
156
157
  "feFlood",
157
158
  "feFuncA",
158
159
  "feFuncB",
@@ -680,7 +681,9 @@ function spread(node, props = {}, isSVG, skipChildren) {
680
681
  () => (prevProps.children = insertExpression(node, props.children, prevProps.children))
681
682
  );
682
683
  }
683
- createRenderEffect(() => props.ref && props.ref(node));
684
+ createRenderEffect(() =>
685
+ typeof props.ref === "function" ? use(props.ref, node) : (props.ref = node)
686
+ );
684
687
  createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));
685
688
  return prevProps;
686
689
  }
@@ -887,7 +890,10 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
887
890
  parent = (multi && current[0] && current[0].parentNode) || parent;
888
891
  if (t === "string" || t === "number") {
889
892
  if (hydrating) return current;
890
- if (t === "number") value = value.toString();
893
+ if (t === "number") {
894
+ value = value.toString();
895
+ if (value === current) return current;
896
+ }
891
897
  if (multi) {
892
898
  let node = current[0];
893
899
  if (node && node.nodeType === 3) {
@@ -383,7 +383,7 @@ function ssrElement(tag, props, children, needsId) {
383
383
  } else if (value == undefined || prop === "ref" || prop.slice(0, 2) === "on") {
384
384
  continue;
385
385
  } else {
386
- result += `${Aliases[prop] || prop}="${escape(value, true)}"`;
386
+ result += `${Aliases[prop] || escape(prop)}="${escape(value, true)}"`;
387
387
  }
388
388
  if (i !== keys.length - 1) result += " ";
389
389
  }
@@ -598,13 +598,13 @@ function ssrSpread(props, isSVG, skipChildren) {
598
598
  let n;
599
599
  result += `class="${(n = props.class) ? n + " " : ""}${(n = props.className) ? n + " " : ""}${ssrClassList(props.classList)}"`;
600
600
  classResolved = true;
601
- } else if (BooleanAttributes.has(prop)) {
601
+ } else if (prop !== "value" && Properties.has(prop)) {
602
602
  if (value) result += prop;else continue;
603
603
  } else if (value == undefined || prop === "ref" || prop.slice(0, 2) === "on" || prop.slice(0, 5) === "prop:") {
604
604
  continue;
605
605
  } else {
606
606
  if (prop.slice(0, 5) === "attr:") prop = prop.slice(5);
607
- result += `${Aliases[prop] || prop}="${escape(value, true)}"`;
607
+ result += `${Aliases[prop] || escape(prop)}="${escape(value, true)}"`;
608
608
  }
609
609
  if (i !== keys.length - 1) result += " ";
610
610
  }
@@ -447,7 +447,7 @@ function ssrElement(tag, props, children, needsId) {
447
447
  } else if (value == undefined || prop === "ref" || prop.slice(0, 2) === "on") {
448
448
  continue;
449
449
  } else {
450
- result += `${Aliases[prop] || prop}="${escape(value, true)}"`;
450
+ result += `${Aliases[prop] || escape(prop)}="${escape(value, true)}"`;
451
451
  }
452
452
  if (i !== keys.length - 1) result += " ";
453
453
  }
@@ -669,7 +669,7 @@ function ssrSpread(props, isSVG, skipChildren) {
669
669
  (n = props.className) ? n + " " : ""
670
670
  }${ssrClassList(props.classList)}"`;
671
671
  classResolved = true;
672
- } else if (BooleanAttributes.has(prop)) {
672
+ } else if (prop !== "value" && Properties.has(prop)) {
673
673
  if (value) result += prop;
674
674
  else continue;
675
675
  } else if (
@@ -681,7 +681,7 @@ function ssrSpread(props, isSVG, skipChildren) {
681
681
  continue;
682
682
  } else {
683
683
  if (prop.slice(0, 5) === "attr:") prop = prop.slice(5);
684
- result += `${Aliases[prop] || prop}="${escape(value, true)}"`;
684
+ result += `${Aliases[prop] || escape(prop)}="${escape(value, true)}"`;
685
685
  }
686
686
  if (i !== keys.length - 1) result += " ";
687
687
  }
package/web/dist/web.cjs CHANGED
@@ -40,7 +40,7 @@ function getPropAlias(prop, tagName) {
40
40
  }
41
41
  const DelegatedEvents = /*#__PURE__*/new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]);
42
42
  const SVGElements = /*#__PURE__*/new Set([
43
- "altGlyph", "altGlyphDef", "altGlyphItem", "animate", "animateColor", "animateMotion", "animateTransform", "circle", "clipPath", "color-profile", "cursor", "defs", "desc", "ellipse", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "filter", "font", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignObject", "g", "glyph", "glyphRef", "hkern", "image", "line", "linearGradient", "marker", "mask", "metadata", "missing-glyph", "mpath", "path", "pattern", "polygon", "polyline", "radialGradient", "rect",
43
+ "altGlyph", "altGlyphDef", "altGlyphItem", "animate", "animateColor", "animateMotion", "animateTransform", "circle", "clipPath", "color-profile", "cursor", "defs", "desc", "ellipse", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "filter", "font", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignObject", "g", "glyph", "glyphRef", "hkern", "image", "line", "linearGradient", "marker", "mask", "metadata", "missing-glyph", "mpath", "path", "pattern", "polygon", "polyline", "radialGradient", "rect",
44
44
  "set", "stop",
45
45
  "svg", "switch", "symbol", "text", "textPath",
46
46
  "tref", "tspan", "use", "view", "vkern"]);
@@ -218,7 +218,7 @@ function spread(node, props = {}, isSVG, skipChildren) {
218
218
  if (!skipChildren) {
219
219
  solidJs.createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
220
220
  }
221
- solidJs.createRenderEffect(() => props.ref && props.ref(node));
221
+ solidJs.createRenderEffect(() => typeof props.ref === "function" ? use(props.ref, node) : props.ref = node);
222
222
  solidJs.createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));
223
223
  return prevProps;
224
224
  }
@@ -414,7 +414,10 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
414
414
  parent = multi && current[0] && current[0].parentNode || parent;
415
415
  if (t === "string" || t === "number") {
416
416
  if (hydrating) return current;
417
- if (t === "number") value = value.toString();
417
+ if (t === "number") {
418
+ value = value.toString();
419
+ if (value === current) return current;
420
+ }
418
421
  if (multi) {
419
422
  let node = current[0];
420
423
  if (node && node.nodeType === 3) {
package/web/dist/web.js CHANGED
@@ -152,6 +152,7 @@ const SVGElements = /*#__PURE__*/ new Set([
152
152
  "feDiffuseLighting",
153
153
  "feDisplacementMap",
154
154
  "feDistantLight",
155
+ "feDropShadow",
155
156
  "feFlood",
156
157
  "feFuncA",
157
158
  "feFuncB",
@@ -670,7 +671,9 @@ function spread(node, props = {}, isSVG, skipChildren) {
670
671
  () => (prevProps.children = insertExpression(node, props.children, prevProps.children))
671
672
  );
672
673
  }
673
- createRenderEffect(() => props.ref && props.ref(node));
674
+ createRenderEffect(() =>
675
+ typeof props.ref === "function" ? use(props.ref, node) : (props.ref = node)
676
+ );
674
677
  createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));
675
678
  return prevProps;
676
679
  }
@@ -875,7 +878,10 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
875
878
  parent = (multi && current[0] && current[0].parentNode) || parent;
876
879
  if (t === "string" || t === "number") {
877
880
  if (hydrating) return current;
878
- if (t === "number") value = value.toString();
881
+ if (t === "number") {
882
+ value = value.toString();
883
+ if (value === current) return current;
884
+ }
879
885
  if (multi) {
880
886
  let node = current[0];
881
887
  if (node && node.nodeType === 3) {