solid-js 2.0.0-beta.7 → 2.0.0-beta.9
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/CHEATSHEET.md +562 -0
- package/README.md +44 -188
- package/dist/dev.cjs +21 -41
- package/dist/dev.js +21 -41
- package/dist/server.cjs +122 -37
- package/dist/server.js +122 -37
- package/dist/solid.cjs +21 -41
- package/dist/solid.js +21 -41
- package/package.json +7 -5
- package/types/client/component.d.ts +50 -0
- package/types/client/core.d.ts +98 -21
- package/types/client/flow.d.ts +97 -24
- package/types/client/hydration.d.ts +409 -22
- package/types/index.d.ts +1 -1
- package/types/jsx-properties.d.ts +2 -5
- package/types/jsx.d.ts +108 -77
- package/types/server/core.d.ts +14 -9
- package/types/server/flow.d.ts +40 -7
- package/types/server/hydration.d.ts +18 -1
- package/types/server/index.d.ts +1 -1
- package/types/server/signals.d.ts +30 -10
- package/types-cjs/client/component.d.cts +50 -0
- package/types-cjs/client/core.d.cts +98 -21
- package/types-cjs/client/flow.d.cts +97 -24
- package/types-cjs/client/hydration.d.cts +409 -22
- package/types-cjs/index.d.cts +1 -1
- package/types-cjs/jsx-properties.d.cts +2 -5
- package/types-cjs/jsx.d.cts +108 -77
- package/types-cjs/server/core.d.cts +14 -9
- package/types-cjs/server/flow.d.cts +40 -7
- package/types-cjs/server/hydration.d.cts +18 -1
- package/types-cjs/server/index.d.cts +1 -1
- package/types-cjs/server/signals.d.cts +30 -10
package/types/jsx.d.ts
CHANGED
|
@@ -176,8 +176,7 @@ export namespace JSX {
|
|
|
176
176
|
> = EHandler | BoundEventHandler<T, E, EHandler>;
|
|
177
177
|
|
|
178
178
|
interface EventHandlerWithOptions<T, E extends Event, EHandler = EventHandler<T, E>>
|
|
179
|
-
extends AddEventListenerOptions,
|
|
180
|
-
EventListenerOptions {
|
|
179
|
+
extends AddEventListenerOptions, EventListenerOptions {
|
|
181
180
|
handleEvent: EHandler;
|
|
182
181
|
}
|
|
183
182
|
|
|
@@ -1022,15 +1021,15 @@ export namespace JSX {
|
|
|
1022
1021
|
? K extends `on:${infer T}`
|
|
1023
1022
|
? T
|
|
1024
1023
|
: K extends `on${infer T}`
|
|
1025
|
-
|
|
1026
|
-
|
|
1024
|
+
? Lowercase<T>
|
|
1025
|
+
: never
|
|
1027
1026
|
: never)
|
|
1028
1027
|
| (keyof EventHandlersElement<any> extends infer K
|
|
1029
1028
|
? K extends `on:${infer T}`
|
|
1030
1029
|
? T
|
|
1031
1030
|
: K extends `on${infer T}`
|
|
1032
|
-
|
|
1033
|
-
|
|
1031
|
+
? Lowercase<T>
|
|
1032
|
+
: never
|
|
1034
1033
|
: never)
|
|
1035
1034
|
| (string & {});
|
|
1036
1035
|
|
|
@@ -1054,7 +1053,8 @@ export namespace JSX {
|
|
|
1054
1053
|
* 2. Includes `keys` defined by `Element` and `Node` interfaces.
|
|
1055
1054
|
*/
|
|
1056
1055
|
interface ElementAttributes<T>
|
|
1057
|
-
extends
|
|
1056
|
+
extends
|
|
1057
|
+
CustomAttributes<T>,
|
|
1058
1058
|
PropAttributes,
|
|
1059
1059
|
OnAttributes<T>,
|
|
1060
1060
|
EventHandlersElement<T>,
|
|
@@ -2317,9 +2317,7 @@ export namespace JSX {
|
|
|
2317
2317
|
visibility?: "visible" | "hidden" | "collapse" | "inherit" | RemoveAttribute;
|
|
2318
2318
|
}
|
|
2319
2319
|
interface AnimationElementSVGAttributes<T>
|
|
2320
|
-
extends SVGAttributes<T>,
|
|
2321
|
-
ExternalResourceSVGAttributes,
|
|
2322
|
-
ConditionalProcessingSVGAttributes {
|
|
2320
|
+
extends SVGAttributes<T>, ExternalResourceSVGAttributes, ConditionalProcessingSVGAttributes {
|
|
2323
2321
|
onBegin?: EventHandlerUnion<T, TimeEvent> | undefined;
|
|
2324
2322
|
"on:begin"?: EventHandlerWithOptionsUnion<T, TimeEvent> | undefined;
|
|
2325
2323
|
|
|
@@ -2330,7 +2328,8 @@ export namespace JSX {
|
|
|
2330
2328
|
"on:repeat"?: EventHandlerWithOptionsUnion<T, TimeEvent> | undefined;
|
|
2331
2329
|
}
|
|
2332
2330
|
interface ContainerElementSVGAttributes<T>
|
|
2333
|
-
extends
|
|
2331
|
+
extends
|
|
2332
|
+
SVGAttributes<T>,
|
|
2334
2333
|
ShapeElementSVGAttributes<T>,
|
|
2335
2334
|
Pick<
|
|
2336
2335
|
PresentationSVGAttributes,
|
|
@@ -2344,8 +2343,7 @@ export namespace JSX {
|
|
|
2344
2343
|
| "color-rendering"
|
|
2345
2344
|
> {}
|
|
2346
2345
|
interface FilterPrimitiveElementSVGAttributes<T>
|
|
2347
|
-
extends SVGAttributes<T>,
|
|
2348
|
-
Pick<PresentationSVGAttributes, "color-interpolation-filters"> {
|
|
2346
|
+
extends SVGAttributes<T>, Pick<PresentationSVGAttributes, "color-interpolation-filters"> {
|
|
2349
2347
|
height?: number | string | RemoveAttribute;
|
|
2350
2348
|
result?: string | RemoveAttribute;
|
|
2351
2349
|
width?: number | string | RemoveAttribute;
|
|
@@ -2364,16 +2362,15 @@ export namespace JSX {
|
|
|
2364
2362
|
viewBox?: string | RemoveAttribute;
|
|
2365
2363
|
}
|
|
2366
2364
|
interface GradientElementSVGAttributes<T>
|
|
2367
|
-
extends SVGAttributes<T>,
|
|
2368
|
-
ExternalResourceSVGAttributes,
|
|
2369
|
-
StylableSVGAttributes {
|
|
2365
|
+
extends SVGAttributes<T>, ExternalResourceSVGAttributes, StylableSVGAttributes {
|
|
2370
2366
|
gradientTransform?: string | RemoveAttribute;
|
|
2371
2367
|
gradientUnits?: SVGUnits | RemoveAttribute;
|
|
2372
2368
|
href?: string | RemoveAttribute;
|
|
2373
2369
|
spreadMethod?: "pad" | "reflect" | "repeat" | RemoveAttribute;
|
|
2374
2370
|
}
|
|
2375
2371
|
interface GraphicsElementSVGAttributes<T>
|
|
2376
|
-
extends
|
|
2372
|
+
extends
|
|
2373
|
+
SVGAttributes<T>,
|
|
2377
2374
|
Pick<
|
|
2378
2375
|
PresentationSVGAttributes,
|
|
2379
2376
|
| "clip-rule"
|
|
@@ -2389,12 +2386,12 @@ export namespace JSX {
|
|
|
2389
2386
|
> {}
|
|
2390
2387
|
interface LightSourceElementSVGAttributes<T> extends SVGAttributes<T> {}
|
|
2391
2388
|
interface NewViewportSVGAttributes<T>
|
|
2392
|
-
extends SVGAttributes<T>,
|
|
2393
|
-
Pick<PresentationSVGAttributes, "overflow" | "clip"> {
|
|
2389
|
+
extends SVGAttributes<T>, Pick<PresentationSVGAttributes, "overflow" | "clip"> {
|
|
2394
2390
|
viewBox?: string | RemoveAttribute;
|
|
2395
2391
|
}
|
|
2396
2392
|
interface ShapeElementSVGAttributes<T>
|
|
2397
|
-
extends
|
|
2393
|
+
extends
|
|
2394
|
+
SVGAttributes<T>,
|
|
2398
2395
|
Pick<
|
|
2399
2396
|
PresentationSVGAttributes,
|
|
2400
2397
|
| "color"
|
|
@@ -2413,7 +2410,8 @@ export namespace JSX {
|
|
|
2413
2410
|
| "pathLength"
|
|
2414
2411
|
> {}
|
|
2415
2412
|
interface TextContentElementSVGAttributes<T>
|
|
2416
|
-
extends
|
|
2413
|
+
extends
|
|
2414
|
+
SVGAttributes<T>,
|
|
2417
2415
|
Pick<
|
|
2418
2416
|
PresentationSVGAttributes,
|
|
2419
2417
|
| "font-family"
|
|
@@ -2454,14 +2452,16 @@ export namespace JSX {
|
|
|
2454
2452
|
zoomAndPan?: "disable" | "magnify" | RemoveAttribute;
|
|
2455
2453
|
}
|
|
2456
2454
|
interface AnimateSVGAttributes<T>
|
|
2457
|
-
extends
|
|
2455
|
+
extends
|
|
2456
|
+
AnimationElementSVGAttributes<T>,
|
|
2458
2457
|
AnimationAttributeTargetSVGAttributes,
|
|
2459
2458
|
AnimationTimingSVGAttributes,
|
|
2460
2459
|
AnimationValueSVGAttributes,
|
|
2461
2460
|
AnimationAdditionSVGAttributes,
|
|
2462
2461
|
Pick<PresentationSVGAttributes, "color-interpolation" | "color-rendering"> {}
|
|
2463
2462
|
interface AnimateMotionSVGAttributes<T>
|
|
2464
|
-
extends
|
|
2463
|
+
extends
|
|
2464
|
+
AnimationElementSVGAttributes<T>,
|
|
2465
2465
|
AnimationTimingSVGAttributes,
|
|
2466
2466
|
AnimationValueSVGAttributes,
|
|
2467
2467
|
AnimationAdditionSVGAttributes {
|
|
@@ -2471,7 +2471,8 @@ export namespace JSX {
|
|
|
2471
2471
|
rotate?: number | string | "auto" | "auto-reverse" | RemoveAttribute;
|
|
2472
2472
|
}
|
|
2473
2473
|
interface AnimateTransformSVGAttributes<T>
|
|
2474
|
-
extends
|
|
2474
|
+
extends
|
|
2475
|
+
AnimationElementSVGAttributes<T>,
|
|
2475
2476
|
AnimationAttributeTargetSVGAttributes,
|
|
2476
2477
|
AnimationTimingSVGAttributes,
|
|
2477
2478
|
AnimationValueSVGAttributes,
|
|
@@ -2479,7 +2480,8 @@ export namespace JSX {
|
|
|
2479
2480
|
type?: "translate" | "scale" | "rotate" | "skewX" | "skewY" | RemoveAttribute;
|
|
2480
2481
|
}
|
|
2481
2482
|
interface CircleSVGAttributes<T>
|
|
2482
|
-
extends
|
|
2483
|
+
extends
|
|
2484
|
+
GraphicsElementSVGAttributes<T>,
|
|
2483
2485
|
ShapeElementSVGAttributes<T>,
|
|
2484
2486
|
ConditionalProcessingSVGAttributes,
|
|
2485
2487
|
StylableSVGAttributes,
|
|
@@ -2490,7 +2492,8 @@ export namespace JSX {
|
|
|
2490
2492
|
r?: number | string | RemoveAttribute;
|
|
2491
2493
|
}
|
|
2492
2494
|
interface ClipPathSVGAttributes<T>
|
|
2493
|
-
extends
|
|
2495
|
+
extends
|
|
2496
|
+
SVGAttributes<T>,
|
|
2494
2497
|
ConditionalProcessingSVGAttributes,
|
|
2495
2498
|
ExternalResourceSVGAttributes,
|
|
2496
2499
|
StylableSVGAttributes,
|
|
@@ -2499,14 +2502,16 @@ export namespace JSX {
|
|
|
2499
2502
|
clipPathUnits?: SVGUnits | RemoveAttribute;
|
|
2500
2503
|
}
|
|
2501
2504
|
interface DefsSVGAttributes<T>
|
|
2502
|
-
extends
|
|
2505
|
+
extends
|
|
2506
|
+
ContainerElementSVGAttributes<T>,
|
|
2503
2507
|
ConditionalProcessingSVGAttributes,
|
|
2504
2508
|
ExternalResourceSVGAttributes,
|
|
2505
2509
|
StylableSVGAttributes,
|
|
2506
2510
|
TransformableSVGAttributes {}
|
|
2507
2511
|
interface DescSVGAttributes<T> extends SVGAttributes<T>, StylableSVGAttributes {}
|
|
2508
2512
|
interface EllipseSVGAttributes<T>
|
|
2509
|
-
extends
|
|
2513
|
+
extends
|
|
2514
|
+
GraphicsElementSVGAttributes<T>,
|
|
2510
2515
|
ShapeElementSVGAttributes<T>,
|
|
2511
2516
|
ConditionalProcessingSVGAttributes,
|
|
2512
2517
|
ExternalResourceSVGAttributes,
|
|
@@ -2519,24 +2524,28 @@ export namespace JSX {
|
|
|
2519
2524
|
ry?: number | string | RemoveAttribute;
|
|
2520
2525
|
}
|
|
2521
2526
|
interface FeBlendSVGAttributes<T>
|
|
2522
|
-
extends
|
|
2527
|
+
extends
|
|
2528
|
+
FilterPrimitiveElementSVGAttributes<T>,
|
|
2523
2529
|
DoubleInputFilterSVGAttributes,
|
|
2524
2530
|
StylableSVGAttributes {
|
|
2525
2531
|
mode?: "normal" | "multiply" | "screen" | "darken" | "lighten" | RemoveAttribute;
|
|
2526
2532
|
}
|
|
2527
2533
|
interface FeColorMatrixSVGAttributes<T>
|
|
2528
|
-
extends
|
|
2534
|
+
extends
|
|
2535
|
+
FilterPrimitiveElementSVGAttributes<T>,
|
|
2529
2536
|
SingleInputFilterSVGAttributes,
|
|
2530
2537
|
StylableSVGAttributes {
|
|
2531
2538
|
type?: "matrix" | "saturate" | "hueRotate" | "luminanceToAlpha" | RemoveAttribute;
|
|
2532
2539
|
values?: string | RemoveAttribute;
|
|
2533
2540
|
}
|
|
2534
2541
|
interface FeComponentTransferSVGAttributes<T>
|
|
2535
|
-
extends
|
|
2542
|
+
extends
|
|
2543
|
+
FilterPrimitiveElementSVGAttributes<T>,
|
|
2536
2544
|
SingleInputFilterSVGAttributes,
|
|
2537
2545
|
StylableSVGAttributes {}
|
|
2538
2546
|
interface FeCompositeSVGAttributes<T>
|
|
2539
|
-
extends
|
|
2547
|
+
extends
|
|
2548
|
+
FilterPrimitiveElementSVGAttributes<T>,
|
|
2540
2549
|
DoubleInputFilterSVGAttributes,
|
|
2541
2550
|
StylableSVGAttributes {
|
|
2542
2551
|
k1?: number | string | RemoveAttribute;
|
|
@@ -2546,7 +2555,8 @@ export namespace JSX {
|
|
|
2546
2555
|
operator?: "over" | "in" | "out" | "atop" | "xor" | "arithmetic" | RemoveAttribute;
|
|
2547
2556
|
}
|
|
2548
2557
|
interface FeConvolveMatrixSVGAttributes<T>
|
|
2549
|
-
extends
|
|
2558
|
+
extends
|
|
2559
|
+
FilterPrimitiveElementSVGAttributes<T>,
|
|
2550
2560
|
SingleInputFilterSVGAttributes,
|
|
2551
2561
|
StylableSVGAttributes {
|
|
2552
2562
|
bias?: number | string | RemoveAttribute;
|
|
@@ -2560,7 +2570,8 @@ export namespace JSX {
|
|
|
2560
2570
|
targetY?: number | string | RemoveAttribute;
|
|
2561
2571
|
}
|
|
2562
2572
|
interface FeDiffuseLightingSVGAttributes<T>
|
|
2563
|
-
extends
|
|
2573
|
+
extends
|
|
2574
|
+
FilterPrimitiveElementSVGAttributes<T>,
|
|
2564
2575
|
SingleInputFilterSVGAttributes,
|
|
2565
2576
|
StylableSVGAttributes,
|
|
2566
2577
|
Pick<PresentationSVGAttributes, "color" | "lighting-color"> {
|
|
@@ -2569,7 +2580,8 @@ export namespace JSX {
|
|
|
2569
2580
|
surfaceScale?: number | string | RemoveAttribute;
|
|
2570
2581
|
}
|
|
2571
2582
|
interface FeDisplacementMapSVGAttributes<T>
|
|
2572
|
-
extends
|
|
2583
|
+
extends
|
|
2584
|
+
FilterPrimitiveElementSVGAttributes<T>,
|
|
2573
2585
|
DoubleInputFilterSVGAttributes,
|
|
2574
2586
|
StylableSVGAttributes {
|
|
2575
2587
|
scale?: number | string | RemoveAttribute;
|
|
@@ -2581,7 +2593,8 @@ export namespace JSX {
|
|
|
2581
2593
|
elevation?: number | string | RemoveAttribute;
|
|
2582
2594
|
}
|
|
2583
2595
|
interface FeDropShadowSVGAttributes<T>
|
|
2584
|
-
extends
|
|
2596
|
+
extends
|
|
2597
|
+
SVGAttributes<T>,
|
|
2585
2598
|
FilterPrimitiveElementSVGAttributes<T>,
|
|
2586
2599
|
StylableSVGAttributes,
|
|
2587
2600
|
Pick<PresentationSVGAttributes, "color" | "flood-color" | "flood-opacity"> {
|
|
@@ -2590,7 +2603,8 @@ export namespace JSX {
|
|
|
2590
2603
|
stdDeviation?: number | string | RemoveAttribute;
|
|
2591
2604
|
}
|
|
2592
2605
|
interface FeFloodSVGAttributes<T>
|
|
2593
|
-
extends
|
|
2606
|
+
extends
|
|
2607
|
+
FilterPrimitiveElementSVGAttributes<T>,
|
|
2594
2608
|
StylableSVGAttributes,
|
|
2595
2609
|
Pick<PresentationSVGAttributes, "color" | "flood-color" | "flood-opacity"> {}
|
|
2596
2610
|
interface FeFuncSVGAttributes<T> extends SVGAttributes<T> {
|
|
@@ -2603,31 +2617,34 @@ export namespace JSX {
|
|
|
2603
2617
|
type?: "identity" | "table" | "discrete" | "linear" | "gamma" | RemoveAttribute;
|
|
2604
2618
|
}
|
|
2605
2619
|
interface FeGaussianBlurSVGAttributes<T>
|
|
2606
|
-
extends
|
|
2620
|
+
extends
|
|
2621
|
+
FilterPrimitiveElementSVGAttributes<T>,
|
|
2607
2622
|
SingleInputFilterSVGAttributes,
|
|
2608
2623
|
StylableSVGAttributes {
|
|
2609
2624
|
stdDeviation?: number | string | RemoveAttribute;
|
|
2610
2625
|
}
|
|
2611
2626
|
interface FeImageSVGAttributes<T>
|
|
2612
|
-
extends
|
|
2627
|
+
extends
|
|
2628
|
+
FilterPrimitiveElementSVGAttributes<T>,
|
|
2613
2629
|
ExternalResourceSVGAttributes,
|
|
2614
2630
|
StylableSVGAttributes {
|
|
2615
2631
|
href?: string | RemoveAttribute;
|
|
2616
2632
|
preserveAspectRatio?: SVGPreserveAspectRatio | RemoveAttribute;
|
|
2617
2633
|
}
|
|
2618
2634
|
interface FeMergeSVGAttributes<T>
|
|
2619
|
-
extends FilterPrimitiveElementSVGAttributes<T>,
|
|
2620
|
-
StylableSVGAttributes {}
|
|
2635
|
+
extends FilterPrimitiveElementSVGAttributes<T>, StylableSVGAttributes {}
|
|
2621
2636
|
interface FeMergeNodeSVGAttributes<T> extends SVGAttributes<T>, SingleInputFilterSVGAttributes {}
|
|
2622
2637
|
interface FeMorphologySVGAttributes<T>
|
|
2623
|
-
extends
|
|
2638
|
+
extends
|
|
2639
|
+
FilterPrimitiveElementSVGAttributes<T>,
|
|
2624
2640
|
SingleInputFilterSVGAttributes,
|
|
2625
2641
|
StylableSVGAttributes {
|
|
2626
2642
|
operator?: "erode" | "dilate" | RemoveAttribute;
|
|
2627
2643
|
radius?: number | string | RemoveAttribute;
|
|
2628
2644
|
}
|
|
2629
2645
|
interface FeOffsetSVGAttributes<T>
|
|
2630
|
-
extends
|
|
2646
|
+
extends
|
|
2647
|
+
FilterPrimitiveElementSVGAttributes<T>,
|
|
2631
2648
|
SingleInputFilterSVGAttributes,
|
|
2632
2649
|
StylableSVGAttributes {
|
|
2633
2650
|
dx?: number | string | RemoveAttribute;
|
|
@@ -2639,7 +2656,8 @@ export namespace JSX {
|
|
|
2639
2656
|
z?: number | string | RemoveAttribute;
|
|
2640
2657
|
}
|
|
2641
2658
|
interface FeSpecularLightingSVGAttributes<T>
|
|
2642
|
-
extends
|
|
2659
|
+
extends
|
|
2660
|
+
FilterPrimitiveElementSVGAttributes<T>,
|
|
2643
2661
|
SingleInputFilterSVGAttributes,
|
|
2644
2662
|
StylableSVGAttributes,
|
|
2645
2663
|
Pick<PresentationSVGAttributes, "color" | "lighting-color"> {
|
|
@@ -2659,12 +2677,12 @@ export namespace JSX {
|
|
|
2659
2677
|
z?: number | string | RemoveAttribute;
|
|
2660
2678
|
}
|
|
2661
2679
|
interface FeTileSVGAttributes<T>
|
|
2662
|
-
extends
|
|
2680
|
+
extends
|
|
2681
|
+
FilterPrimitiveElementSVGAttributes<T>,
|
|
2663
2682
|
SingleInputFilterSVGAttributes,
|
|
2664
2683
|
StylableSVGAttributes {}
|
|
2665
2684
|
interface FeTurbulanceSVGAttributes<T>
|
|
2666
|
-
extends FilterPrimitiveElementSVGAttributes<T>,
|
|
2667
|
-
StylableSVGAttributes {
|
|
2685
|
+
extends FilterPrimitiveElementSVGAttributes<T>, StylableSVGAttributes {
|
|
2668
2686
|
baseFrequency?: number | string | RemoveAttribute;
|
|
2669
2687
|
numOctaves?: number | string | RemoveAttribute;
|
|
2670
2688
|
seed?: number | string | RemoveAttribute;
|
|
@@ -2672,9 +2690,7 @@ export namespace JSX {
|
|
|
2672
2690
|
type?: "fractalNoise" | "turbulence" | RemoveAttribute;
|
|
2673
2691
|
}
|
|
2674
2692
|
interface FilterSVGAttributes<T>
|
|
2675
|
-
extends SVGAttributes<T>,
|
|
2676
|
-
ExternalResourceSVGAttributes,
|
|
2677
|
-
StylableSVGAttributes {
|
|
2693
|
+
extends SVGAttributes<T>, ExternalResourceSVGAttributes, StylableSVGAttributes {
|
|
2678
2694
|
filterRes?: number | string | RemoveAttribute;
|
|
2679
2695
|
filterUnits?: SVGUnits | RemoveAttribute;
|
|
2680
2696
|
height?: number | string | RemoveAttribute;
|
|
@@ -2684,7 +2700,8 @@ export namespace JSX {
|
|
|
2684
2700
|
y?: number | string | RemoveAttribute;
|
|
2685
2701
|
}
|
|
2686
2702
|
interface ForeignObjectSVGAttributes<T>
|
|
2687
|
-
extends
|
|
2703
|
+
extends
|
|
2704
|
+
NewViewportSVGAttributes<T>,
|
|
2688
2705
|
ConditionalProcessingSVGAttributes,
|
|
2689
2706
|
ExternalResourceSVGAttributes,
|
|
2690
2707
|
StylableSVGAttributes,
|
|
@@ -2696,14 +2713,16 @@ export namespace JSX {
|
|
|
2696
2713
|
y?: number | string | RemoveAttribute;
|
|
2697
2714
|
}
|
|
2698
2715
|
interface GSVGAttributes<T>
|
|
2699
|
-
extends
|
|
2716
|
+
extends
|
|
2717
|
+
ContainerElementSVGAttributes<T>,
|
|
2700
2718
|
ConditionalProcessingSVGAttributes,
|
|
2701
2719
|
ExternalResourceSVGAttributes,
|
|
2702
2720
|
StylableSVGAttributes,
|
|
2703
2721
|
TransformableSVGAttributes,
|
|
2704
2722
|
Pick<PresentationSVGAttributes, "clip-path" | "display" | "visibility"> {}
|
|
2705
2723
|
interface ImageSVGAttributes<T>
|
|
2706
|
-
extends
|
|
2724
|
+
extends
|
|
2725
|
+
NewViewportSVGAttributes<T>,
|
|
2707
2726
|
GraphicsElementSVGAttributes<T>,
|
|
2708
2727
|
ConditionalProcessingSVGAttributes,
|
|
2709
2728
|
StylableSVGAttributes,
|
|
@@ -2717,7 +2736,8 @@ export namespace JSX {
|
|
|
2717
2736
|
y?: number | string | RemoveAttribute;
|
|
2718
2737
|
}
|
|
2719
2738
|
interface LineSVGAttributes<T>
|
|
2720
|
-
extends
|
|
2739
|
+
extends
|
|
2740
|
+
GraphicsElementSVGAttributes<T>,
|
|
2721
2741
|
ShapeElementSVGAttributes<T>,
|
|
2722
2742
|
ConditionalProcessingSVGAttributes,
|
|
2723
2743
|
ExternalResourceSVGAttributes,
|
|
@@ -2736,7 +2756,8 @@ export namespace JSX {
|
|
|
2736
2756
|
y2?: number | string | RemoveAttribute;
|
|
2737
2757
|
}
|
|
2738
2758
|
interface MarkerSVGAttributes<T>
|
|
2739
|
-
extends
|
|
2759
|
+
extends
|
|
2760
|
+
ContainerElementSVGAttributes<T>,
|
|
2740
2761
|
ExternalResourceSVGAttributes,
|
|
2741
2762
|
StylableSVGAttributes,
|
|
2742
2763
|
FitToViewBoxSVGAttributes,
|
|
@@ -2749,7 +2770,8 @@ export namespace JSX {
|
|
|
2749
2770
|
refY?: number | string | RemoveAttribute;
|
|
2750
2771
|
}
|
|
2751
2772
|
interface MaskSVGAttributes<T>
|
|
2752
|
-
extends
|
|
2773
|
+
extends
|
|
2774
|
+
Omit<ContainerElementSVGAttributes<T>, "opacity" | "filter">,
|
|
2753
2775
|
ConditionalProcessingSVGAttributes,
|
|
2754
2776
|
ExternalResourceSVGAttributes,
|
|
2755
2777
|
StylableSVGAttributes,
|
|
@@ -2764,7 +2786,8 @@ export namespace JSX {
|
|
|
2764
2786
|
interface MetadataSVGAttributes<T> extends SVGAttributes<T> {}
|
|
2765
2787
|
interface MPathSVGAttributes<T> extends SVGAttributes<T> {}
|
|
2766
2788
|
interface PathSVGAttributes<T>
|
|
2767
|
-
extends
|
|
2789
|
+
extends
|
|
2790
|
+
GraphicsElementSVGAttributes<T>,
|
|
2768
2791
|
ShapeElementSVGAttributes<T>,
|
|
2769
2792
|
ConditionalProcessingSVGAttributes,
|
|
2770
2793
|
ExternalResourceSVGAttributes,
|
|
@@ -2775,7 +2798,8 @@ export namespace JSX {
|
|
|
2775
2798
|
pathLength?: number | string | RemoveAttribute;
|
|
2776
2799
|
}
|
|
2777
2800
|
interface PatternSVGAttributes<T>
|
|
2778
|
-
extends
|
|
2801
|
+
extends
|
|
2802
|
+
ContainerElementSVGAttributes<T>,
|
|
2779
2803
|
ConditionalProcessingSVGAttributes,
|
|
2780
2804
|
ExternalResourceSVGAttributes,
|
|
2781
2805
|
StylableSVGAttributes,
|
|
@@ -2791,7 +2815,8 @@ export namespace JSX {
|
|
|
2791
2815
|
y?: number | string | RemoveAttribute;
|
|
2792
2816
|
}
|
|
2793
2817
|
interface PolygonSVGAttributes<T>
|
|
2794
|
-
extends
|
|
2818
|
+
extends
|
|
2819
|
+
GraphicsElementSVGAttributes<T>,
|
|
2795
2820
|
ShapeElementSVGAttributes<T>,
|
|
2796
2821
|
ConditionalProcessingSVGAttributes,
|
|
2797
2822
|
ExternalResourceSVGAttributes,
|
|
@@ -2801,7 +2826,8 @@ export namespace JSX {
|
|
|
2801
2826
|
points?: string | RemoveAttribute;
|
|
2802
2827
|
}
|
|
2803
2828
|
interface PolylineSVGAttributes<T>
|
|
2804
|
-
extends
|
|
2829
|
+
extends
|
|
2830
|
+
GraphicsElementSVGAttributes<T>,
|
|
2805
2831
|
ShapeElementSVGAttributes<T>,
|
|
2806
2832
|
ConditionalProcessingSVGAttributes,
|
|
2807
2833
|
ExternalResourceSVGAttributes,
|
|
@@ -2818,7 +2844,8 @@ export namespace JSX {
|
|
|
2818
2844
|
r?: number | string | RemoveAttribute;
|
|
2819
2845
|
}
|
|
2820
2846
|
interface RectSVGAttributes<T>
|
|
2821
|
-
extends
|
|
2847
|
+
extends
|
|
2848
|
+
GraphicsElementSVGAttributes<T>,
|
|
2822
2849
|
ShapeElementSVGAttributes<T>,
|
|
2823
2850
|
ConditionalProcessingSVGAttributes,
|
|
2824
2851
|
ExternalResourceSVGAttributes,
|
|
@@ -2833,17 +2860,17 @@ export namespace JSX {
|
|
|
2833
2860
|
y?: number | string | RemoveAttribute;
|
|
2834
2861
|
}
|
|
2835
2862
|
interface SetSVGAttributes<T>
|
|
2836
|
-
extends AnimationElementSVGAttributes<T>,
|
|
2837
|
-
StylableSVGAttributes,
|
|
2838
|
-
AnimationTimingSVGAttributes {}
|
|
2863
|
+
extends AnimationElementSVGAttributes<T>, StylableSVGAttributes, AnimationTimingSVGAttributes {}
|
|
2839
2864
|
interface StopSVGAttributes<T>
|
|
2840
|
-
extends
|
|
2865
|
+
extends
|
|
2866
|
+
SVGAttributes<T>,
|
|
2841
2867
|
StylableSVGAttributes,
|
|
2842
2868
|
Pick<PresentationSVGAttributes, "color" | "stop-color" | "stop-opacity"> {
|
|
2843
2869
|
offset?: number | string | RemoveAttribute;
|
|
2844
2870
|
}
|
|
2845
2871
|
interface SvgSVGAttributes<T>
|
|
2846
|
-
extends
|
|
2872
|
+
extends
|
|
2873
|
+
ContainerElementSVGAttributes<T>,
|
|
2847
2874
|
NewViewportSVGAttributes<T>,
|
|
2848
2875
|
ConditionalProcessingSVGAttributes,
|
|
2849
2876
|
ExternalResourceSVGAttributes,
|
|
@@ -2866,14 +2893,16 @@ export namespace JSX {
|
|
|
2866
2893
|
version?: string | RemoveAttribute;
|
|
2867
2894
|
}
|
|
2868
2895
|
interface SwitchSVGAttributes<T>
|
|
2869
|
-
extends
|
|
2896
|
+
extends
|
|
2897
|
+
ContainerElementSVGAttributes<T>,
|
|
2870
2898
|
ConditionalProcessingSVGAttributes,
|
|
2871
2899
|
ExternalResourceSVGAttributes,
|
|
2872
2900
|
StylableSVGAttributes,
|
|
2873
2901
|
TransformableSVGAttributes,
|
|
2874
2902
|
Pick<PresentationSVGAttributes, "display" | "visibility"> {}
|
|
2875
2903
|
interface SymbolSVGAttributes<T>
|
|
2876
|
-
extends
|
|
2904
|
+
extends
|
|
2905
|
+
ContainerElementSVGAttributes<T>,
|
|
2877
2906
|
NewViewportSVGAttributes<T>,
|
|
2878
2907
|
ExternalResourceSVGAttributes,
|
|
2879
2908
|
StylableSVGAttributes,
|
|
@@ -2889,7 +2918,8 @@ export namespace JSX {
|
|
|
2889
2918
|
y?: number | string | RemoveAttribute;
|
|
2890
2919
|
}
|
|
2891
2920
|
interface TextSVGAttributes<T>
|
|
2892
|
-
extends
|
|
2921
|
+
extends
|
|
2922
|
+
TextContentElementSVGAttributes<T>,
|
|
2893
2923
|
GraphicsElementSVGAttributes<T>,
|
|
2894
2924
|
ConditionalProcessingSVGAttributes,
|
|
2895
2925
|
ExternalResourceSVGAttributes,
|
|
@@ -2905,7 +2935,8 @@ export namespace JSX {
|
|
|
2905
2935
|
y?: number | string | RemoveAttribute;
|
|
2906
2936
|
}
|
|
2907
2937
|
interface TextPathSVGAttributes<T>
|
|
2908
|
-
extends
|
|
2938
|
+
extends
|
|
2939
|
+
TextContentElementSVGAttributes<T>,
|
|
2909
2940
|
ConditionalProcessingSVGAttributes,
|
|
2910
2941
|
ExternalResourceSVGAttributes,
|
|
2911
2942
|
StylableSVGAttributes,
|
|
@@ -2919,7 +2950,8 @@ export namespace JSX {
|
|
|
2919
2950
|
startOffset?: number | string | RemoveAttribute;
|
|
2920
2951
|
}
|
|
2921
2952
|
interface TSpanSVGAttributes<T>
|
|
2922
|
-
extends
|
|
2953
|
+
extends
|
|
2954
|
+
TextContentElementSVGAttributes<T>,
|
|
2923
2955
|
ConditionalProcessingSVGAttributes,
|
|
2924
2956
|
ExternalResourceSVGAttributes,
|
|
2925
2957
|
StylableSVGAttributes,
|
|
@@ -2937,7 +2969,8 @@ export namespace JSX {
|
|
|
2937
2969
|
}
|
|
2938
2970
|
/** @see https://developer.mozilla.org/en-US/docs/Web/SVG/Element/use */
|
|
2939
2971
|
interface UseSVGAttributes<T>
|
|
2940
|
-
extends
|
|
2972
|
+
extends
|
|
2973
|
+
SVGAttributes<T>,
|
|
2941
2974
|
StylableSVGAttributes,
|
|
2942
2975
|
ConditionalProcessingSVGAttributes,
|
|
2943
2976
|
GraphicsElementSVGAttributes<T>,
|
|
@@ -2951,7 +2984,8 @@ export namespace JSX {
|
|
|
2951
2984
|
y?: number | string | RemoveAttribute;
|
|
2952
2985
|
}
|
|
2953
2986
|
interface ViewSVGAttributes<T>
|
|
2954
|
-
extends
|
|
2987
|
+
extends
|
|
2988
|
+
SVGAttributes<T>,
|
|
2955
2989
|
ExternalResourceSVGAttributes,
|
|
2956
2990
|
FitToViewBoxSVGAttributes,
|
|
2957
2991
|
ZoomAndPanSVGAttributes {
|
|
@@ -4256,8 +4290,5 @@ export namespace JSX {
|
|
|
4256
4290
|
}
|
|
4257
4291
|
|
|
4258
4292
|
interface IntrinsicElements
|
|
4259
|
-
extends HTMLElementTags,
|
|
4260
|
-
HTMLElementDeprecatedTags,
|
|
4261
|
-
SVGElementTags,
|
|
4262
|
-
MathMLElementTags {}
|
|
4293
|
+
extends HTMLElementTags, HTMLElementDeprecatedTags, SVGElementTags, MathMLElementTags {}
|
|
4263
4294
|
}
|
package/types/server/core.d.ts
CHANGED
|
@@ -8,20 +8,25 @@ export type ContextProviderComponent<T> = FlowComponent<{
|
|
|
8
8
|
}>;
|
|
9
9
|
export interface Context<T> extends ContextProviderComponent<T> {
|
|
10
10
|
id: symbol;
|
|
11
|
-
defaultValue: T;
|
|
11
|
+
defaultValue: T | undefined;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
* Creates a Context to
|
|
15
|
-
*
|
|
14
|
+
* Creates a Context to share state with descendants of a Provider.
|
|
15
|
+
*
|
|
16
|
+
* - `createContext<T>()` — default-less. `useContext` throws
|
|
17
|
+
* `ContextNotFoundError` outside any Provider. Use this for any context
|
|
18
|
+
* carrying reactive state.
|
|
19
|
+
* - `createContext<T>(defaultValue)` — default form. `useContext` falls back
|
|
20
|
+
* to `defaultValue` outside a Provider. Reserved for primitive fallbacks
|
|
21
|
+
* (theme, locale, frozen config).
|
|
22
|
+
*
|
|
23
|
+
* @param defaultValue optional default; only meaningful for primitive fallbacks
|
|
16
24
|
* @param options allows to set a name in dev mode for debugging purposes
|
|
17
|
-
* @returns The context that contains the Provider Component and that can be used with `useContext`
|
|
18
25
|
*/
|
|
19
|
-
export declare function createContext<T>(defaultValue?:
|
|
20
|
-
export declare function createContext<T>(defaultValue: T, options?: EffectOptions): Context<T>;
|
|
26
|
+
export declare function createContext<T>(defaultValue?: T, options?: EffectOptions): Context<T>;
|
|
21
27
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* @returns the current or `defaultValue`, if present
|
|
28
|
+
* Reads the current value of a context. Throws `ContextNotFoundError` if no
|
|
29
|
+
* Provider is mounted and the context was created without a default.
|
|
25
30
|
*/
|
|
26
31
|
export declare function useContext<T>(context: Context<T>): T;
|
|
27
32
|
export type ResolvedJSXElement = Exclude<JSX.Element, JSX.ArrayElement>;
|
package/types/server/flow.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { Accessor } from "./signals.js";
|
|
1
|
+
import type { Accessor, RevealOrder } from "./signals.js";
|
|
2
2
|
import type { JSX } from "../jsx.js";
|
|
3
|
+
export type { RevealOrder };
|
|
3
4
|
type NonZeroParams<T extends (...args: any[]) => any> = Parameters<T>["length"] extends 0 ? never : T;
|
|
4
5
|
type ConditionalRenderCallback<T> = (item: Accessor<NonNullable<T>>) => JSX.Element;
|
|
5
6
|
type ConditionalRenderChildren<T, F extends ConditionalRenderCallback<T> = ConditionalRenderCallback<T>> = JSX.Element | NonZeroParams<F>;
|
|
@@ -70,13 +71,45 @@ export declare function Loading(props: {
|
|
|
70
71
|
on?: any;
|
|
71
72
|
children: JSX.Element;
|
|
72
73
|
}): JSX.Element;
|
|
74
|
+
export type RevealProps = {
|
|
75
|
+
order?: RevealOrder;
|
|
76
|
+
collapsed?: boolean;
|
|
77
|
+
children: JSX.Element;
|
|
78
|
+
};
|
|
73
79
|
/**
|
|
74
80
|
* Coordinates the reveal timing of sibling `<Loading>` boundaries during SSR.
|
|
81
|
+
*
|
|
82
|
+
* The `order` prop picks the reveal policy:
|
|
83
|
+
* - `"sequential"` (default) — boundaries reveal in streamed order; out-of-order
|
|
84
|
+
* resolutions have their fragment HTML streamed into templates as data arrives,
|
|
85
|
+
* but the swap from fallback to content waits until the frontier reaches them.
|
|
86
|
+
* - `"together"` — every direct slot holds its fallback until the whole group is
|
|
87
|
+
* "minimally ready" (every direct slot has its own first visible content
|
|
88
|
+
* available), then the whole group releases in a single activation.
|
|
89
|
+
* - `"natural"` — each boundary's swap is triggered as its own data resolves. At
|
|
90
|
+
* the top level this is equivalent to omitting `<Reveal>`; the mode exists for
|
|
91
|
+
* nesting, where the group registers as a single composite slot in an enclosing
|
|
92
|
+
* `<Reveal>`.
|
|
93
|
+
*
|
|
94
|
+
* The `collapsed` prop is only consulted when `order="sequential"` (the default);
|
|
95
|
+
* it is ignored under `"together"` and `"natural"`.
|
|
96
|
+
*
|
|
97
|
+
* Nesting: a nested `<Reveal>` is held on its fallbacks until its parent releases
|
|
98
|
+
* the slot it occupies. HTML for resolved fragments still streams through normally;
|
|
99
|
+
* only the `revealFragments` swap calls are deferred. Once released, the inner
|
|
100
|
+
* group runs its own `order` locally over whatever is still pending. There is no
|
|
101
|
+
* escape hatch.
|
|
102
|
+
*
|
|
103
|
+
* Engine support:
|
|
104
|
+
* - `renderToString` fully supports `order="sequential"` (without `collapsed`) and
|
|
105
|
+
* `order="natural"` because neither requires streamed activation.
|
|
106
|
+
* - `order="together"` and `collapsed` rely on streamed activation and require
|
|
107
|
+
* `renderToStream` / `renderToStringAsync`. Using them inside a nested `<Reveal>`
|
|
108
|
+
* under `renderToString` logs a warning.
|
|
109
|
+
*
|
|
110
|
+
* See `documentation/solid-2.0/03-control-flow.md` for the full outer/inner
|
|
111
|
+
* nesting matrix and the "minimally ready" definition per order.
|
|
112
|
+
*
|
|
75
113
|
* @description https://docs.solidjs.com/reference/components/reveal
|
|
76
114
|
*/
|
|
77
|
-
export declare function Reveal(props:
|
|
78
|
-
together?: boolean;
|
|
79
|
-
collapsed?: boolean;
|
|
80
|
-
children: JSX.Element;
|
|
81
|
-
}): JSX.Element;
|
|
82
|
-
export {};
|
|
115
|
+
export declare function Reveal(props: RevealProps): JSX.Element;
|
|
@@ -4,10 +4,27 @@ export { sharedConfig, NoHydrateContext } from "./shared.js";
|
|
|
4
4
|
export type { HydrationContext, SSRTemplateObject } from "./shared.js";
|
|
5
5
|
export type ServerRevealGroup = {
|
|
6
6
|
id: string;
|
|
7
|
+
/**
|
|
8
|
+
* Register a child fragment (Loading) or composite child (inner Reveal).
|
|
9
|
+
* Returns `collapseFallback` (hide fallback visually, used for collapsed-sequential
|
|
10
|
+
* tail) and `held` (stash `revealFragments` swaps until the parent releases us).
|
|
11
|
+
* `held` only applies when the caller is a nested Reveal — Loadings ignore it.
|
|
12
|
+
*/
|
|
7
13
|
register(key: string, options?: {
|
|
8
14
|
onActivate?: () => void;
|
|
9
|
-
}):
|
|
15
|
+
}): {
|
|
16
|
+
collapseFallback: boolean;
|
|
17
|
+
held: boolean;
|
|
18
|
+
};
|
|
19
|
+
/** Called by a child when its subtree is fully resolved. */
|
|
10
20
|
onResolved(key: string): void;
|
|
21
|
+
/**
|
|
22
|
+
* Called by a nested Reveal when it becomes "minimally resolved" under its own
|
|
23
|
+
* order (together: fully resolved; sequential: first registered fragment resolved;
|
|
24
|
+
* natural: any fragment resolved). Loadings don't fire this — their `onResolved`
|
|
25
|
+
* implies minimal readiness at the same time.
|
|
26
|
+
*/
|
|
27
|
+
onMinimallyResolved?(key: string): void;
|
|
11
28
|
};
|
|
12
29
|
export declare const RevealGroupContext: Context<ServerRevealGroup | null>;
|
|
13
30
|
/**
|
package/types/server/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { $PROXY, $REFRESH, $TRACK, action, createEffect, createMemo, createOptimistic, createOptimisticStore, createErrorBoundary, createOwner, createProjection, createReaction, createRenderEffect, createRevealOrder, createRoot, createSignal, createStore, createTrackedEffect, deep, flatten, flush, getNextChildId, getObserver, getOwner, isDisposed, isEqual, isRefreshing, isPending, isWrappable, mapArray, merge, omit, onCleanup, onSettled, latest, reconcile, refresh, repeat, resolve, NotReadyError, runWithOwner, snapshot, storePath, createDeepProxy, enableExternalSource, enforceLoadingBoundary, untrack } from "./signals.js";
|
|
2
|
-
export type { Accessor, ComputeFunction, EffectFunction, EffectOptions, ExternalSource, ExternalSourceConfig, ExternalSourceFactory, Merge, NoInfer, NotWrappable, Omit, Owner, Signal, SignalOptions, Setter, Store, SolidStore, StoreNode, StoreSetter, StorePathRange, ArrayFilterFn, CustomPartial, Part, PathSetter, PatchOp } from "./signals.js";
|
|
2
|
+
export type { Accessor, ComputeFunction, EffectFunction, EffectOptions, ExternalSource, ExternalSourceConfig, ExternalSourceFactory, Merge, NoInfer, NotWrappable, Omit, Owner, Refreshable, Signal, SignalOptions, Setter, Store, SolidStore, StoreNode, StoreSetter, StorePathRange, ArrayFilterFn, CustomPartial, Part, PathSetter, PatchOp } from "./signals.js";
|
|
3
3
|
export { $DEVCOMP, children, createContext, useContext, ssrRunInScope } from "./core.js";
|
|
4
4
|
export type { ChildrenReturn, Context, ContextProviderComponent, ResolvedChildren, ResolvedJSXElement } from "./core.js";
|
|
5
5
|
export * from "./component.js";
|