@askrjs/askr 0.0.35 → 0.0.37

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.
Files changed (202) hide show
  1. package/README.md +17 -9
  2. package/dist/bench/components/benchmark-row.js.map +1 -1
  3. package/dist/bench/components/benchmark-table.js +1 -1
  4. package/dist/bench/components/benchmark-table.js.map +1 -1
  5. package/dist/benchmark.js +3 -3
  6. package/dist/benchmark.js.map +1 -1
  7. package/dist/bin/askr-ssg.js.map +1 -1
  8. package/dist/boot/index.d.ts +1 -7
  9. package/dist/boot/index.d.ts.map +1 -1
  10. package/dist/boot/index.js +31 -42
  11. package/dist/boot/index.js.map +1 -1
  12. package/dist/common/control.js.map +1 -1
  13. package/dist/common/env.js.map +1 -1
  14. package/dist/common/ssr-errors.js.map +1 -1
  15. package/dist/common/vnode.js.map +1 -1
  16. package/dist/components/error-boundary.js.map +1 -1
  17. package/dist/components/index.d.ts +2 -0
  18. package/dist/components/index.js +2 -0
  19. package/dist/components/link.d.ts +4 -5
  20. package/dist/components/link.d.ts.map +1 -1
  21. package/dist/components/link.js +2 -1
  22. package/dist/components/link.js.map +1 -1
  23. package/dist/control/case.js.map +1 -1
  24. package/dist/control/for.js.map +1 -1
  25. package/dist/control/shared.js.map +1 -1
  26. package/dist/control/show.js.map +1 -1
  27. package/dist/data/index.d.ts.map +1 -1
  28. package/dist/data/index.js +165 -23
  29. package/dist/data/index.js.map +1 -1
  30. package/dist/dev/invariant.js.map +1 -1
  31. package/dist/dev/logger.js.map +1 -1
  32. package/dist/foundations/icon/icon.d.ts.map +1 -1
  33. package/dist/foundations/icon/icon.js.map +1 -1
  34. package/dist/foundations/icon/icon.types.d.ts +2 -1
  35. package/dist/foundations/icon/icon.types.d.ts.map +1 -1
  36. package/dist/foundations/icon/index.d.ts +3 -0
  37. package/dist/foundations/icon/index.js +2 -0
  38. package/dist/foundations/index.d.ts +1 -18
  39. package/dist/foundations/index.js +2 -18
  40. package/dist/foundations/interactions/dismissable.js.map +1 -1
  41. package/dist/foundations/interactions/focusable.js.map +1 -1
  42. package/dist/foundations/interactions/hoverable.js.map +1 -1
  43. package/dist/foundations/interactions/index.d.ts +7 -0
  44. package/dist/foundations/interactions/index.js +7 -0
  45. package/dist/foundations/interactions/interaction-policy.js +2 -2
  46. package/dist/foundations/interactions/interaction-policy.js.map +1 -1
  47. package/dist/foundations/interactions/pressable.js.map +1 -1
  48. package/dist/foundations/interactions/roving-focus.js.map +1 -1
  49. package/dist/foundations/state/controllable.js.map +1 -1
  50. package/dist/foundations/state/index.d.ts +2 -0
  51. package/dist/foundations/state/index.js +2 -0
  52. package/dist/foundations/structures/collection.js.map +1 -1
  53. package/dist/foundations/structures/index.d.ts +8 -0
  54. package/dist/foundations/structures/index.js +7 -0
  55. package/dist/foundations/structures/layer.js.map +1 -1
  56. package/dist/foundations/structures/layout.js.map +1 -1
  57. package/dist/foundations/structures/portal.js.map +1 -1
  58. package/dist/foundations/structures/presence.js.map +1 -1
  59. package/dist/foundations/structures/slot.js.map +1 -1
  60. package/dist/foundations/utilities/aria.js.map +1 -1
  61. package/dist/foundations/utilities/compose-handlers.js.map +1 -1
  62. package/dist/foundations/utilities/compose-ref.js.map +1 -1
  63. package/dist/foundations/utilities/index.d.ts +7 -0
  64. package/dist/foundations/utilities/index.js +6 -0
  65. package/dist/foundations/utilities/merge-props.js.map +1 -1
  66. package/dist/foundations/utilities/use-id.js.map +1 -1
  67. package/dist/fx/fx.js.map +1 -1
  68. package/dist/fx/timing.js.map +1 -1
  69. package/dist/index.d.ts +2 -16
  70. package/dist/index.js +1 -17
  71. package/dist/index.js.map +1 -1
  72. package/dist/jsx/utils.js.map +1 -1
  73. package/dist/jsx-dev-runtime.d.ts +1 -1
  74. package/dist/jsx-dev-runtime.js.map +1 -1
  75. package/dist/jsx-runtime.d.ts +1 -1
  76. package/dist/jsx-runtime.js.map +1 -1
  77. package/dist/renderer/children.js.map +1 -1
  78. package/dist/renderer/cleanup.js.map +1 -1
  79. package/dist/renderer/dom.js +92 -357
  80. package/dist/renderer/dom.js.map +1 -1
  81. package/dist/renderer/evaluate.js +7 -0
  82. package/dist/renderer/evaluate.js.map +1 -1
  83. package/dist/renderer/fastpath.js +20 -18
  84. package/dist/renderer/fastpath.js.map +1 -1
  85. package/dist/renderer/for-commit.js +486 -0
  86. package/dist/renderer/for-commit.js.map +1 -0
  87. package/dist/renderer/index.js.map +1 -1
  88. package/dist/renderer/keyed.js +84 -23
  89. package/dist/renderer/keyed.js.map +1 -1
  90. package/dist/renderer/reconcile.js +11 -18
  91. package/dist/renderer/reconcile.js.map +1 -1
  92. package/dist/renderer/utils.js +5 -1
  93. package/dist/renderer/utils.js.map +1 -1
  94. package/dist/resources/index.d.ts +1 -2
  95. package/dist/resources/index.js +1 -2
  96. package/dist/router/index.d.ts +2 -2
  97. package/dist/router/index.js +2 -2
  98. package/dist/router/match.js.map +1 -1
  99. package/dist/router/navigate.d.ts.map +1 -1
  100. package/dist/router/navigate.js +4 -2
  101. package/dist/router/navigate.js.map +1 -1
  102. package/dist/router/policy.js.map +1 -1
  103. package/dist/router/route-context.js.map +1 -1
  104. package/dist/router/route.d.ts +1 -1
  105. package/dist/router/route.d.ts.map +1 -1
  106. package/dist/router/route.js +2 -33
  107. package/dist/router/route.js.map +1 -1
  108. package/dist/runtime/child-scope.d.ts +1 -0
  109. package/dist/runtime/child-scope.d.ts.map +1 -1
  110. package/dist/runtime/child-scope.js +2 -0
  111. package/dist/runtime/child-scope.js.map +1 -1
  112. package/dist/runtime/component.js +1 -1
  113. package/dist/runtime/component.js.map +1 -1
  114. package/dist/runtime/context.js.map +1 -1
  115. package/dist/runtime/control.js.map +1 -1
  116. package/dist/runtime/derive.d.ts +2 -1
  117. package/dist/runtime/derive.d.ts.map +1 -1
  118. package/dist/runtime/derive.js +15 -10
  119. package/dist/runtime/derive.js.map +1 -1
  120. package/dist/runtime/dev-namespace.js.map +1 -1
  121. package/dist/runtime/effect.d.ts.map +1 -1
  122. package/dist/runtime/effect.js +34 -9
  123. package/dist/runtime/effect.js.map +1 -1
  124. package/dist/runtime/events.js.map +1 -1
  125. package/dist/runtime/execution-model.js.map +1 -1
  126. package/dist/runtime/fastlane.js.map +1 -1
  127. package/dist/runtime/for-bench.d.ts +1 -1
  128. package/dist/runtime/for-bench.d.ts.map +1 -1
  129. package/dist/runtime/for-bench.js +15 -14
  130. package/dist/runtime/for-bench.js.map +1 -1
  131. package/dist/runtime/for.d.ts +1 -0
  132. package/dist/runtime/for.d.ts.map +1 -1
  133. package/dist/runtime/for.js +90 -31
  134. package/dist/runtime/for.js.map +1 -1
  135. package/dist/runtime/operations.d.ts.map +1 -1
  136. package/dist/runtime/operations.js +10 -8
  137. package/dist/runtime/operations.js.map +1 -1
  138. package/dist/runtime/perf-metrics.js +8 -2
  139. package/dist/runtime/perf-metrics.js.map +1 -1
  140. package/dist/runtime/readable.js.map +1 -1
  141. package/dist/runtime/resource-cell.js +3 -2
  142. package/dist/runtime/resource-cell.js.map +1 -1
  143. package/dist/runtime/scheduler.d.ts +0 -1
  144. package/dist/runtime/scheduler.d.ts.map +1 -1
  145. package/dist/runtime/scheduler.js +6 -19
  146. package/dist/runtime/scheduler.js.map +1 -1
  147. package/dist/runtime/selector.d.ts.map +1 -1
  148. package/dist/runtime/selector.js +182 -103
  149. package/dist/runtime/selector.js.map +1 -1
  150. package/dist/runtime/snapshot-source.d.ts +10 -0
  151. package/dist/runtime/snapshot-source.d.ts.map +1 -0
  152. package/dist/runtime/snapshot-source.js +17 -0
  153. package/dist/runtime/snapshot-source.js.map +1 -0
  154. package/dist/runtime/ssr-bridge.js.map +1 -1
  155. package/dist/runtime/state.d.ts.map +1 -1
  156. package/dist/runtime/state.js +1 -5
  157. package/dist/runtime/state.js.map +1 -1
  158. package/dist/ssg/batch-render.js.map +1 -1
  159. package/dist/ssg/create-static-gen.js.map +1 -1
  160. package/dist/ssg/generate-metadata.js.map +1 -1
  161. package/dist/ssg/incremental-manifest.js.map +1 -1
  162. package/dist/ssg/index.d.ts +1 -6
  163. package/dist/ssg/index.js +1 -6
  164. package/dist/ssg/resolve-ssg-data.js.map +1 -1
  165. package/dist/ssg/route-utils.js.map +1 -1
  166. package/dist/ssg/write-static-files.js.map +1 -1
  167. package/dist/ssr/attrs.js.map +1 -1
  168. package/dist/ssr/context.d.ts +3 -1
  169. package/dist/ssr/context.d.ts.map +1 -1
  170. package/dist/ssr/context.js +31 -11
  171. package/dist/ssr/context.js.map +1 -1
  172. package/dist/ssr/escape.js +56 -16
  173. package/dist/ssr/escape.js.map +1 -1
  174. package/dist/ssr/index.d.ts +2 -31
  175. package/dist/ssr/index.d.ts.map +1 -1
  176. package/dist/ssr/index.js +19 -49
  177. package/dist/ssr/index.js.map +1 -1
  178. package/dist/ssr/render-keys.js +1 -12
  179. package/dist/ssr/render-keys.js.map +1 -1
  180. package/dist/ssr/sink.js.map +1 -1
  181. package/dist/ssr/verify-hydration.js +25 -0
  182. package/dist/ssr/verify-hydration.js.map +1 -0
  183. package/package.json +44 -19
  184. package/dist/_virtual/_rolldown/runtime.js +0 -7
  185. package/dist/foundations/core.d.ts +0 -15
  186. package/dist/foundations/core.js +0 -13
  187. package/dist/foundations/structures.d.ts +0 -7
  188. package/dist/foundations/structures.js +0 -6
  189. package/dist/ssg/batch-render.d.ts +0 -16
  190. package/dist/ssg/batch-render.d.ts.map +0 -1
  191. package/dist/ssg/generate-metadata.d.ts +0 -24
  192. package/dist/ssg/generate-metadata.d.ts.map +0 -1
  193. package/dist/ssg/resolve-ssg-data.d.ts +0 -23
  194. package/dist/ssg/resolve-ssg-data.d.ts.map +0 -1
  195. package/dist/ssg/route-utils.d.ts +0 -16
  196. package/dist/ssg/route-utils.d.ts.map +0 -1
  197. package/dist/ssg/write-static-files.d.ts +0 -15
  198. package/dist/ssg/write-static-files.d.ts.map +0 -1
  199. package/dist/ssr/render-keys.d.ts +0 -37
  200. package/dist/ssr/render-keys.d.ts.map +0 -1
  201. package/dist/ssr/stream-render.js +0 -76
  202. package/dist/ssr/stream-render.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askrjs/askr",
3
- "version": "0.0.35",
3
+ "version": "0.0.37",
4
4
  "description": "Actor-backed deterministic UI framework",
5
5
  "keywords": [
6
6
  "askr",
@@ -26,7 +26,9 @@
26
26
  "dist"
27
27
  ],
28
28
  "type": "module",
29
- "sideEffects": [],
29
+ "sideEffects": [
30
+ "./dist/index.js"
31
+ ],
30
32
  "main": "./dist/index.js",
31
33
  "types": "./dist/index.d.ts",
32
34
  "exports": {
@@ -38,6 +40,10 @@
38
40
  "import": "./dist/boot/index.js",
39
41
  "types": "./dist/boot/index.d.ts"
40
42
  },
43
+ "./components": {
44
+ "import": "./dist/components/index.js",
45
+ "types": "./dist/components/index.d.ts"
46
+ },
41
47
  "./control": {
42
48
  "import": "./dist/control/index.js",
43
49
  "types": "./dist/control/index.d.ts"
@@ -46,6 +52,26 @@
46
52
  "import": "./dist/foundations/index.js",
47
53
  "types": "./dist/foundations/index.d.ts"
48
54
  },
55
+ "./foundations/utilities": {
56
+ "import": "./dist/foundations/utilities/index.js",
57
+ "types": "./dist/foundations/utilities/index.d.ts"
58
+ },
59
+ "./foundations/interactions": {
60
+ "import": "./dist/foundations/interactions/index.js",
61
+ "types": "./dist/foundations/interactions/index.d.ts"
62
+ },
63
+ "./foundations/state": {
64
+ "import": "./dist/foundations/state/index.js",
65
+ "types": "./dist/foundations/state/index.d.ts"
66
+ },
67
+ "./foundations/structures": {
68
+ "import": "./dist/foundations/structures/index.js",
69
+ "types": "./dist/foundations/structures/index.d.ts"
70
+ },
71
+ "./foundations/icon": {
72
+ "import": "./dist/foundations/icon/index.js",
73
+ "types": "./dist/foundations/icon/index.d.ts"
74
+ },
49
75
  "./resources": {
50
76
  "import": "./dist/resources/index.js",
51
77
  "types": "./dist/resources/index.d.ts"
@@ -83,32 +109,31 @@
83
109
  "access": "public"
84
110
  },
85
111
  "scripts": {
112
+ "clean": "npx rimraf node_modules dist",
86
113
  "build": "vp pack",
87
114
  "dev": "vp dev",
88
115
  "fmt": "vp fmt .",
89
- "lint": "vp lint src tests test-utils checks benches",
90
- "test": "npm run test:unit && npm run test:jsdom && npm run test:browser && npm run test:a11y && npm run test:browser:smoke",
91
- "test:a11y": "playwright test tests/playwright/a11y --project=chromium-a11y",
92
- "test:browser": "playwright test tests/playwright/e2e --project=chromium",
93
- "test:browser:smoke": "playwright install chromium firefox webkit && playwright test tests/playwright/e2e --project=chromium --project=firefox --project=webkit --grep @smoke",
94
- "test:jsdom": "vp test run -c vitest.jsdom.config.ts",
116
+ "lint": "vp lint src tests test-utils benches",
117
+ "test": "npm run test:unit && npm run test:checks && npm run test:jsdom && npm run test:browser",
118
+ "test:browser": "vp test run -c vitest.test.browser.config.ts tests/browser",
119
+ "test:checks": "vp test run -c vitest.test.checks.config.ts",
120
+ "test:jsdom": "vp test run -c vitest.test.jsdom.config.ts",
95
121
  "test:types": "vp pack && tsd",
96
- "test:unit": "vp test run -c vitest.unit.config.ts",
97
- "bench": "vp test bench -c vitest.bench.micro.config.ts --run && vp test bench -c vitest.bench.dom.config.ts --run && vp test bench -c vitest.bench.ssr.config.ts --run",
98
- "bench:tier1": "vp test bench -c vitest.bench.micro.config.ts benches/micro/tier1/ --run && vp test bench -c vitest.bench.dom.config.ts benches/jsdom/tier1/ --run && vp test bench -c vitest.bench.ssr.config.ts benches/ssr/tier1/ --run",
99
- "bench:tier2": "vp test bench -c vitest.bench.dom.config.ts benches/jsdom/tier2/ --run && vp test bench -c vitest.bench.ssr.config.ts benches/ssr/tier2/ --run",
100
- "bench:tier3": "vp test bench -c vitest.bench.dom.tier3.config.ts --run",
101
- "bench:tier4": "vp test bench -c vitest.bench.dom.tier4.config.ts --run"
122
+ "test:unit": "vp test run -c vitest.test.unit.config.ts",
123
+ "bench": "npm run bench:tier1 && npm run bench:tier2 && npm run bench:tier3 && npm run bench:tier4",
124
+ "bench:tier1": "cross-env NODE_ENV=production vp test bench --run --reporter=default --config vitest.bench.tier1.config.ts",
125
+ "bench:tier2": "cross-env NODE_ENV=production vp test bench --run --reporter=default --config vitest.bench.tier2.config.ts",
126
+ "bench:tier3": "cross-env NODE_ENV=production vp test bench --run --reporter=default --config vitest.bench.tier3.config.ts",
127
+ "bench:tier4": "cross-env NODE_ENV=production vp test bench --run --reporter=default --config vitest.bench.tier4.config.ts"
102
128
  },
103
129
  "devDependencies": {
104
- "@axe-core/playwright": "^4.11.3",
105
- "@playwright/test": "^1.59.1",
106
- "@types/node": "^25.6.2",
130
+ "@types/node": "^25.8.0",
131
+ "cross-env": "^10.1.0",
107
132
  "jsdom": "^29.1.1",
108
- "playwright": "^1.59.1",
133
+ "playwright": "^1.60.0",
109
134
  "tsd": "^0.33.0",
110
135
  "typescript": "^6.0.3",
111
- "vite-plus": "^0.1.20"
136
+ "vite-plus": "^0.1.21"
112
137
  },
113
138
  "engines": {
114
139
  "node": ">=18"
@@ -1,7 +0,0 @@
1
- //#region \0rolldown/runtime.js
2
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require !== "undefined" ? require : a)[b] }) : x)(function(x) {
3
- if (typeof require !== "undefined") return require.apply(this, arguments);
4
- throw Error("Calling `require` for \"" + x + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
5
- });
6
- //#endregion
7
- export { __require };
@@ -1,15 +0,0 @@
1
- import { ComposeHandlersOptions, composeHandlers } from "./utilities/compose-handlers.js";
2
- import { mergeProps } from "./utilities/merge-props.js";
3
- import { ariaDisabled, ariaExpanded, ariaSelected } from "./utilities/aria.js";
4
- import { Ref, composeRefs, setRef } from "./utilities/compose-ref.js";
5
- import { FormatIdOptions, formatId } from "./utilities/use-id.js";
6
- import { DefaultPreventable, FocusLikeEvent, KeyboardLikeEvent, PointerLikeEvent, PropagationStoppable } from "./utilities/event-types.js";
7
- import { PressableOptions, PressableResult, pressable } from "./interactions/pressable.js";
8
- import { DismissableOptions, dismissable } from "./interactions/dismissable.js";
9
- import { FocusableOptions, FocusableResult, focusable } from "./interactions/focusable.js";
10
- import { HoverableOptions, HoverableResult, hoverable } from "./interactions/hoverable.js";
11
- import { Orientation, RovingFocusOptions, RovingFocusResult, rovingFocus } from "./interactions/roving-focus.js";
12
- import { InteractionPolicyInput, applyInteractionPolicy, mergeInteractionProps } from "./interactions/interaction-policy.js";
13
- import { ControllableState, controllableState, isControlled, makeControllable, resolveControllable } from "./state/controllable.js";
14
- import { IconOwnProps, IconProps, IconSizeToken, IconStyleObject } from "./icon/icon.types.js";
15
- import { IconBase, getIconContractProps, isIconSizeToken, joinIconStyle, normalizeIconSizeValue, resolveIconSizeVariable, resolveIconStrokeWidthVariable, serializeIconStyle } from "./icon/icon.js";
@@ -1,13 +0,0 @@
1
- import "./utilities/aria.js";
2
- import "./interactions/pressable.js";
3
- import "./utilities/compose-handlers.js";
4
- import "./utilities/compose-ref.js";
5
- import "./utilities/merge-props.js";
6
- import "./interactions/interaction-policy.js";
7
- import "./utilities/use-id.js";
8
- import "./interactions/dismissable.js";
9
- import "./interactions/focusable.js";
10
- import "./interactions/hoverable.js";
11
- import "./interactions/roving-focus.js";
12
- import "./state/controllable.js";
13
- import "./icon/icon.js";
@@ -1,7 +0,0 @@
1
- import { JSXElement } from "../common/jsx.js";
2
- import { LayoutComponent, layout } from "./structures/layout.js";
3
- import { Slot, SlotProps } from "./structures/slot.js";
4
- import { Presence, PresenceProps } from "./structures/presence.js";
5
- import { DefaultPortal, Portal, PortalProps, definePortal } from "./structures/portal.js";
6
- import { Collection, CollectionItem, createCollection } from "./structures/collection.js";
7
- import { Layer, LayerManager, LayerOptions, createLayer } from "./structures/layer.js";
@@ -1,6 +0,0 @@
1
- import "./structures/portal.js";
2
- import "./structures/layout.js";
3
- import "./structures/slot.js";
4
- import "./structures/presence.js";
5
- import "./structures/collection.js";
6
- import "./structures/layer.js";
@@ -1,16 +0,0 @@
1
- import { RouteConfig, RouteRenderResult } from "./types.js";
2
- import { SSRData } from "../common/ssr.js";
3
-
4
- //#region src/ssg/batch-render.d.ts
5
- interface BatchRenderOptions {
6
- seed?: number;
7
- dataMap?: Record<string, SSRData>;
8
- concurrency?: number;
9
- }
10
- /**
11
- * Render multiple routes in parallel with error handling
12
- */
13
- declare function batchRenderRoutes(routes: RouteConfig[], options?: BatchRenderOptions): Promise<RouteRenderResult[]>;
14
- //#endregion
15
- export { batchRenderRoutes };
16
- //# sourceMappingURL=batch-render.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"batch-render.d.ts","names":[],"sources":["../../src/ssg/batch-render.ts"],"mappings":";;;;UAWU,kBAAA;EACR,IAAA;EACA,OAAA,GAAU,MAAA,SAAe,OAAA;EACzB,WAAA;AAAA;;;;iBAMoB,iBAAA,CACpB,MAAA,EAAQ,WAAA,IACR,OAAA,GAAS,kBAAA,GACR,OAAA,CAAQ,iBAAA"}
@@ -1,24 +0,0 @@
1
- import { RouteRenderResult, SSGMetadata, SSGMode, SSGResult } from "./types.js";
2
-
3
- //#region src/ssg/generate-metadata.d.ts
4
- interface GenerateResultOptions {
5
- mode?: SSGMode;
6
- cacheHits?: number;
7
- invalidatedKeys?: string[];
8
- invalidatedRoutes?: string[];
9
- }
10
- /**
11
- * Generate SSGResult from render results
12
- */
13
- declare function generateSSGResult(results: RouteRenderResult[], options?: GenerateResultOptions): SSGResult;
14
- /**
15
- * Convert SSGResult to metadata for JSON serialization
16
- */
17
- declare function resultToMetadata(result: SSGResult): SSGMetadata;
18
- /**
19
- * Write metadata.json to output directory
20
- */
21
- declare function writeMetadata(metadata: Record<string, unknown>, outputDir: string): Promise<void>;
22
- //#endregion
23
- export { generateSSGResult, resultToMetadata, writeMetadata };
24
- //# sourceMappingURL=generate-metadata.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generate-metadata.d.ts","names":[],"sources":["../../src/ssg/generate-metadata.ts"],"mappings":";;;UAgBU,qBAAA;EACR,IAAA,GAAO,OAAA;EACP,SAAA;EACA,eAAA;EACA,iBAAA;AAAA;;AAMF;;iBAAgB,iBAAA,CACd,OAAA,EAAS,iBAAA,IACT,OAAA,GAAS,qBAAA,GACR,SAAA;;;;iBA6Ca,gBAAA,CAAiB,MAAA,EAAQ,SAAA,GAAY,WAAA;;;;iBAsC/B,aAAA,CACpB,QAAA,EAAU,MAAA,mBACV,SAAA,WACC,OAAA"}
@@ -1,23 +0,0 @@
1
- import { RouteConfig } from "./types.js";
2
- import { SSRData } from "../common/ssr.js";
3
-
4
- //#region src/ssg/resolve-ssg-data.d.ts
5
- interface DataResolutionOptions {
6
- /** User-supplied data overrides per route path */
7
- dataOverrides?: Record<string, unknown>;
8
- }
9
- /**
10
- * Resolve and validate data for SSG routes
11
- * Returns a map of route path -> SSRData
12
- *
13
- * In phase 1: accepts user-supplied dataOverrides
14
- * In phase 2: can be extended to auto-discover resources
15
- */
16
- declare function resolveSsgData(routes: RouteConfig[], options?: DataResolutionOptions): Record<string, SSRData>;
17
- /**
18
- * Validate routes are properly configured
19
- */
20
- declare function validateRoutes(routes: RouteConfig[]): void;
21
- //#endregion
22
- export { resolveSsgData, validateRoutes };
23
- //# sourceMappingURL=resolve-ssg-data.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolve-ssg-data.d.ts","names":[],"sources":["../../src/ssg/resolve-ssg-data.ts"],"mappings":";;;;UAUU,qBAAA;EAYM;EAVd,aAAA,GAAgB,MAAA;AAAA;;;;;;;;iBAUF,cAAA,CACd,MAAA,EAAQ,WAAA,IACR,OAAA,GAAS,qBAAA,GACR,MAAA,SAAe,OAAA;;;;iBAyBF,cAAA,CAAe,MAAA,EAAQ,WAAA"}
@@ -1,16 +0,0 @@
1
- import { RouteConfig } from "./types.js";
2
-
3
- //#region src/ssg/route-utils.d.ts
4
- interface ResolvedRouteDescriptor {
5
- route: RouteConfig;
6
- path: string;
7
- filePath: string;
8
- routeId: string;
9
- invalidationKeys: string[];
10
- }
11
- declare function getOutputFilePath(pathStr: string): string;
12
- declare function interpolateRoutePath(routePath: string, params?: Record<string, string>): string;
13
- declare function resolveRouteDescriptor(route: RouteConfig): ResolvedRouteDescriptor;
14
- //#endregion
15
- export { getOutputFilePath };
16
- //# sourceMappingURL=route-utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"route-utils.d.ts","names":[],"sources":["../../src/ssg/route-utils.ts"],"mappings":";;;UAEiB,uBAAA;EACf,KAAA,EAAO,WAAA;EACP,IAAA;EACA,QAAA;EACA,OAAA;EACA,gBAAA;AAAA;AAAA,iBAGc,iBAAA,CAAkB,OAAA;AAAA,iBAQlB,oBAAA,CACd,SAAA,UACA,MAAA,GAAS,MAAA;AAAA,iBASK,sBAAA,CACd,KAAA,EAAO,WAAA,GACN,uBAAA"}
@@ -1,15 +0,0 @@
1
- import { RouteRenderResult } from "./types.js";
2
- import { getOutputFilePath } from "./route-utils.js";
3
-
4
- //#region src/ssg/write-static-files.d.ts
5
- interface WriteStaticFilesOptions {
6
- concurrency?: number;
7
- }
8
- /**
9
- * Write rendered routes to disk
10
- * Creates outputDir/{route-path}/index.html structure
11
- */
12
- declare function writeStaticFiles(results: RouteRenderResult[], outputDir: string, options?: WriteStaticFilesOptions): Promise<void>;
13
- //#endregion
14
- export { writeStaticFiles };
15
- //# sourceMappingURL=write-static-files.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"write-static-files.d.ts","names":[],"sources":["../../src/ssg/write-static-files.ts"],"mappings":";;;;UAYU,uBAAA;EACR,WAAA;AAAA;;;;;iBAOoB,gBAAA,CACpB,OAAA,EAAS,iBAAA,IACT,SAAA,UACA,OAAA,GAAS,uBAAA,GACR,OAAA"}
@@ -1,37 +0,0 @@
1
- import { SSRRoute } from "./index.js";
2
-
3
- //#region src/ssr/render-keys.d.ts
4
- type ResourceDescriptor = {
5
- key: string;
6
- fn: (opts: {
7
- signal?: AbortSignal;
8
- }) => Promise<unknown> | unknown;
9
- deps: unknown[];
10
- index: number;
11
- };
12
- type ResourcePlan = {
13
- resources: ResourceDescriptor[];
14
- };
15
- declare function getCurrentRenderData(): Record<string, unknown> | null;
16
- declare function resetKeyCounter(): void;
17
- declare function getNextKey(): string;
18
- declare function startRenderPhase(data: Record<string, unknown> | null): void;
19
- declare function stopRenderPhase(): void;
20
- /** @deprecated SSR prepass has been removed */
21
- declare function startCollection(): never;
22
- /** @deprecated SSR prepass has been removed */
23
- declare function stopCollection(): ResourcePlan;
24
- /** @deprecated SSR prepass has been removed */
25
- declare function registerResourceIntent(_fn: ResourceDescriptor['fn'], _deps: unknown[]): string;
26
- /** @deprecated SSR prepass has been removed */
27
- declare function resolvePlan(_plan: ResourcePlan): Promise<Record<string, unknown>>;
28
- /** @deprecated SSR prepass has been removed */
29
- declare function collectResources(_opts: {
30
- url: string;
31
- routes: SSRRoute[];
32
- }): ResourcePlan;
33
- /** @deprecated Alias for resolvePlan */
34
- declare const resolveResources: typeof resolvePlan;
35
- //#endregion
36
- export { ResourcePlan, collectResources, resolvePlan, resolveResources };
37
- //# sourceMappingURL=render-keys.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"render-keys.d.ts","names":[],"sources":["../../src/ssr/render-keys.ts"],"mappings":";;;KAUY,kBAAA;EACV,GAAA;EACA,EAAA,GAAK,IAAA;IAAQ,MAAA,GAAS,WAAA;EAAA,MAAkB,OAAA;EACxC,IAAA;EACA,KAAA;AAAA;AAAA,KAGU,YAAA;EACV,SAAA,EAAW,kBAAA;AAAA;AAAA,iBAGG,oBAAA,CAAA,GAAwB,MAAA;AAAA,iBAKxB,eAAA,CAAA;AAAA,iBAKA,UAAA,CAAA;AAAA,iBAMA,gBAAA,CAAiB,IAAA,EAAM,MAAA;AAAA,iBAQvB,eAAA,CAAA;;iBAcA,eAAA,CAAA;;iBAKA,cAAA,CAAA,GAAkB,YAAA;AAtClC;AAAA,iBA2CgB,sBAAA,CACd,GAAA,EAAK,kBAAA,QACL,KAAA;;iBAQoB,WAAA,CACpB,KAAA,EAAO,YAAA,GACN,OAAA,CAAQ,MAAA;;iBAOK,gBAAA,CAAiB,KAAA;EAC/B,GAAA;EACA,MAAA,EAAQ,QAAA;AAAA,IACN,YAAA;;cAKS,gBAAA,SAAgB,WAAA"}
@@ -1,76 +0,0 @@
1
- import { Fragment } from "../common/jsx.js";
2
- import { throwSSRDataMissing } from "./context.js";
3
- import "../jsx/index.js";
4
- import { VOID_ELEMENTS, escapeText } from "./escape.js";
5
- import { renderAttrsDirect } from "./attrs.js";
6
- //#region src/ssr/stream-render.ts
7
- function isPromiseLike(x) {
8
- if (!x || typeof x !== "object") return false;
9
- return typeof x.then === "function";
10
- }
11
- function executeComponent(type, props, ctx) {
12
- const res = type(props ?? {}, { signal: ctx.signal });
13
- if (isPromiseLike(res)) throwSSRDataMissing();
14
- return res;
15
- }
16
- function renderChildrenDirect(node, sink, ctx) {
17
- let raw = node.children;
18
- if (raw === void 0) raw = node.props?.children;
19
- if (raw === null || raw === void 0 || raw === false) return;
20
- if (Array.isArray(raw)) {
21
- for (let i = 0; i < raw.length; i++) renderNodeToSink(raw[i], sink, ctx);
22
- return;
23
- }
24
- renderNodeToSink(raw, sink, ctx);
25
- }
26
- function renderNodeToSink(node, sink, ctx) {
27
- if (node === null || node === void 0) return;
28
- if (typeof node === "string") {
29
- sink.write(escapeText(node));
30
- return;
31
- }
32
- if (typeof node === "number") {
33
- sink.write(String(node));
34
- return;
35
- }
36
- if (typeof node === "boolean") return;
37
- if (typeof node !== "object") return;
38
- const vnode = node;
39
- const type = vnode.type;
40
- if (type === Fragment) {
41
- renderChildrenDirect(vnode, sink, ctx);
42
- return;
43
- }
44
- if (typeof type === "symbol") {
45
- renderChildrenDirect(vnode, sink, ctx);
46
- return;
47
- }
48
- if (typeof type === "function") {
49
- renderNodeToSink(executeComponent(type, vnode.props, ctx), sink, ctx);
50
- return;
51
- }
52
- const tag = type;
53
- const props = vnode.props;
54
- const dangerous = props?.dangerouslySetInnerHTML;
55
- const dangerousHtml = dangerous && typeof dangerous === "object" && "__html" in dangerous ? String(dangerous.__html) : void 0;
56
- if (VOID_ELEMENTS.has(tag)) {
57
- sink.write("<");
58
- sink.write(tag);
59
- renderAttrsDirect(props, sink);
60
- sink.write(" />");
61
- return;
62
- }
63
- sink.write("<");
64
- sink.write(tag);
65
- renderAttrsDirect(props, sink);
66
- sink.write(">");
67
- if (dangerousHtml !== void 0) sink.write(dangerousHtml);
68
- else renderChildrenDirect(vnode, sink, ctx);
69
- sink.write("</");
70
- sink.write(tag);
71
- sink.write(">");
72
- }
73
- //#endregion
74
- export { renderNodeToSink };
75
-
76
- //# sourceMappingURL=stream-render.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stream-render.js","names":[],"sources":["../../src/ssr/stream-render.ts"],"sourcesContent":["import type { Props } from '../common/props';\nimport type { RenderSink } from './sink';\nimport type { VNode, SSRComponent } from './types';\nimport { Fragment } from '../jsx';\nimport { type RenderContext, throwSSRDataMissing } from './context';\nimport { VOID_ELEMENTS, escapeText } from './escape';\nimport { renderAttrsDirect } from './attrs';\n\n// Re-export for backwards compatibility\nexport type Component = SSRComponent;\n\n// Legacy alias for context type\nexport type SSRContext = RenderContext;\n\nfunction isPromiseLike(x: unknown): x is PromiseLike<unknown> {\n if (!x || typeof x !== 'object') return false;\n return typeof (x as { then?: unknown }).then === 'function';\n}\n\nfunction executeComponent(\n type: Component,\n props: Props | undefined,\n ctx: RenderContext\n): unknown {\n const res = type(props ?? {}, { signal: ctx.signal });\n if (isPromiseLike(res)) {\n throwSSRDataMissing();\n }\n return res;\n}\n\n// Render children directly without allocating wrapper array when possible\nfunction renderChildrenDirect(\n node: Record<string, unknown>,\n sink: RenderSink,\n ctx: RenderContext\n): void {\n // Prefer explicit children; fallback to props.children\n let raw: unknown = node.children;\n if (raw === undefined) {\n raw = (node.props as Record<string, unknown> | undefined)?.children;\n }\n\n if (raw === null || raw === undefined || raw === false) return;\n\n if (Array.isArray(raw)) {\n for (let i = 0; i < raw.length; i++) {\n renderNodeToSink(raw[i], sink, ctx);\n }\n return;\n }\n\n // Single child - no array allocation\n renderNodeToSink(raw, sink, ctx);\n}\n\nexport function renderNodeToSink(\n node: unknown,\n sink: RenderSink,\n ctx: RenderContext\n): void {\n if (node === null || node === undefined) return;\n\n // Fast path: primitive strings\n if (typeof node === 'string') {\n sink.write(escapeText(node));\n return;\n }\n\n // Fast path: numbers\n if (typeof node === 'number') {\n sink.write(String(node));\n return;\n }\n\n // Skip booleans (false is common from conditional rendering)\n if (typeof node === 'boolean') return;\n\n // Must be object at this point\n if (typeof node !== 'object') return;\n\n const vnode = node as VNode;\n const type = vnode.type;\n\n // Fragment: render children directly (canonical check via === is fastest)\n if (type === Fragment) {\n renderChildrenDirect(\n vnode as unknown as Record<string, unknown>,\n sink,\n ctx\n );\n return;\n }\n\n // Symbol type that isn't our Fragment\n if (typeof type === 'symbol') {\n // Unknown symbol - render children as fragment fallback\n renderChildrenDirect(\n vnode as unknown as Record<string, unknown>,\n sink,\n ctx\n );\n return;\n }\n\n // Function component\n if (typeof type === 'function') {\n const out = executeComponent(type as Component, vnode.props, ctx);\n renderNodeToSink(out, sink, ctx);\n return;\n }\n\n // Element node (type is string)\n const tag = type as string;\n const props = vnode.props;\n\n // Check for dangerouslySetInnerHTML\n const dangerous = props?.dangerouslySetInnerHTML as\n | { __html: unknown }\n | undefined;\n const dangerousHtml =\n dangerous && typeof dangerous === 'object' && '__html' in dangerous\n ? String(dangerous.__html)\n : undefined;\n\n // Void element - self-closing\n if (VOID_ELEMENTS.has(tag)) {\n sink.write('<');\n sink.write(tag);\n renderAttrsDirect(props, sink);\n sink.write(' />');\n return;\n }\n\n // Regular element\n sink.write('<');\n sink.write(tag);\n renderAttrsDirect(props, sink);\n sink.write('>');\n\n if (dangerousHtml !== undefined) {\n sink.write(dangerousHtml);\n } else {\n renderChildrenDirect(\n vnode as unknown as Record<string, unknown>,\n sink,\n ctx\n );\n }\n\n sink.write('</');\n sink.write(tag);\n sink.write('>');\n}\n"],"mappings":";;;;;;AAcA,SAAS,cAAc,GAAuC;AAC5D,KAAI,CAAC,KAAK,OAAO,MAAM,SAAU,QAAO;AACxC,QAAO,OAAQ,EAAyB,SAAS;;AAGnD,SAAS,iBACP,MACA,OACA,KACS;CACT,MAAM,MAAM,KAAK,SAAS,EAAE,EAAE,EAAE,QAAQ,IAAI,QAAQ,CAAC;AACrD,KAAI,cAAc,IAAI,CACpB,sBAAqB;AAEvB,QAAO;;AAIT,SAAS,qBACP,MACA,MACA,KACM;CAEN,IAAI,MAAe,KAAK;AACxB,KAAI,QAAQ,OACV,OAAO,KAAK,OAA+C;AAG7D,KAAI,QAAQ,QAAQ,QAAQ,UAAa,QAAQ,MAAO;AAExD,KAAI,MAAM,QAAQ,IAAI,EAAE;AACtB,OAAK,IAAI,IAAI,GAAG,IAAI,IAAI,QAAQ,IAC9B,kBAAiB,IAAI,IAAI,MAAM,IAAI;AAErC;;AAIF,kBAAiB,KAAK,MAAM,IAAI;;AAGlC,SAAgB,iBACd,MACA,MACA,KACM;AACN,KAAI,SAAS,QAAQ,SAAS,OAAW;AAGzC,KAAI,OAAO,SAAS,UAAU;AAC5B,OAAK,MAAM,WAAW,KAAK,CAAC;AAC5B;;AAIF,KAAI,OAAO,SAAS,UAAU;AAC5B,OAAK,MAAM,OAAO,KAAK,CAAC;AACxB;;AAIF,KAAI,OAAO,SAAS,UAAW;AAG/B,KAAI,OAAO,SAAS,SAAU;CAE9B,MAAM,QAAQ;CACd,MAAM,OAAO,MAAM;AAGnB,KAAI,SAAS,UAAU;AACrB,uBACE,OACA,MACA,IACD;AACD;;AAIF,KAAI,OAAO,SAAS,UAAU;AAE5B,uBACE,OACA,MACA,IACD;AACD;;AAIF,KAAI,OAAO,SAAS,YAAY;AAE9B,mBADY,iBAAiB,MAAmB,MAAM,OAAO,IAC5C,EAAK,MAAM,IAAI;AAChC;;CAIF,MAAM,MAAM;CACZ,MAAM,QAAQ,MAAM;CAGpB,MAAM,YAAY,OAAO;CAGzB,MAAM,gBACJ,aAAa,OAAO,cAAc,YAAY,YAAY,YACtD,OAAO,UAAU,OAAO,GACxB;AAGN,KAAI,cAAc,IAAI,IAAI,EAAE;AAC1B,OAAK,MAAM,IAAI;AACf,OAAK,MAAM,IAAI;AACf,oBAAkB,OAAO,KAAK;AAC9B,OAAK,MAAM,MAAM;AACjB;;AAIF,MAAK,MAAM,IAAI;AACf,MAAK,MAAM,IAAI;AACf,mBAAkB,OAAO,KAAK;AAC9B,MAAK,MAAM,IAAI;AAEf,KAAI,kBAAkB,OACpB,MAAK,MAAM,cAAc;KAEzB,sBACE,OACA,MACA,IACD;AAGH,MAAK,MAAM,KAAK;AAChB,MAAK,MAAM,IAAI;AACf,MAAK,MAAM,IAAI"}