@stacksjs/stx 0.2.465 → 0.2.467

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 (121) hide show
  1. package/dist/chunk-01jqpwpv.js +2 -0
  2. package/dist/{chunk-nmk9en1n.js → chunk-01zwbzyw.js} +324 -164
  3. package/dist/{chunk-qc7zybaa.js → chunk-02e24cym.js} +1 -1
  4. package/dist/{chunk-gasb5fhy.js → chunk-0gq32mfe.js} +2 -2
  5. package/dist/{chunk-ag1v2tkm.js → chunk-0nnmk0xv.js} +2399 -2398
  6. package/dist/{chunk-sgbgwezf.js → chunk-0v5dpk7r.js} +1 -1
  7. package/dist/{chunk-n003eq8w.js → chunk-1sdtg9np.js} +2 -2
  8. package/dist/{chunk-yc4hf2ea.js → chunk-2cqymwe8.js} +2 -2
  9. package/dist/chunk-2k0x6yc2.js +2 -0
  10. package/dist/{chunk-1byqqwgm.js → chunk-2tn3dkcy.js} +2 -2
  11. package/dist/{chunk-2nvnd83c.js → chunk-3ar8gdyd.js} +1 -1
  12. package/dist/chunk-4ahzhnfw.js +2 -0
  13. package/dist/{chunk-ysptfks9.js → chunk-4r2fg64t.js} +1 -1
  14. package/dist/{chunk-27k24mk0.js → chunk-4rj1y6j2.js} +1 -1
  15. package/dist/chunk-50xcmvad.js +2 -0
  16. package/dist/{chunk-se9qddyx.js → chunk-544e2jvd.js} +4 -4
  17. package/dist/chunk-60935ydz.js +2 -0
  18. package/dist/{chunk-3q3174cn.js → chunk-62ckway4.js} +2 -2
  19. package/dist/chunk-63kwa14j.js +2 -0
  20. package/dist/{chunk-2e4pegf1.js → chunk-6h93aacc.js} +1 -1
  21. package/dist/{chunk-y8h823cb.js → chunk-74j18qk0.js} +28 -28
  22. package/dist/{chunk-azcvytqc.js → chunk-762z26nw.js} +1 -1
  23. package/dist/chunk-7fjatz47.js +2 -0
  24. package/dist/chunk-7j1cpa9d.js +2 -0
  25. package/dist/{chunk-cstvhr0r.js → chunk-7rgds0w1.js} +1099 -1099
  26. package/dist/{chunk-gm6g6gar.js → chunk-8efg91ak.js} +2 -2
  27. package/dist/chunk-9mnfma5c.js +2 -0
  28. package/dist/{chunk-5mmqe3hj.js → chunk-9zx4p42m.js} +1 -1
  29. package/dist/chunk-b772p9d9.js +2 -0
  30. package/dist/{chunk-pxmbee61.js → chunk-c2s3xx78.js} +5 -5
  31. package/dist/{chunk-5e6p2ndj.js → chunk-cfk3skk4.js} +1 -1
  32. package/dist/chunk-cg8hg6cs.js +3 -0
  33. package/dist/{chunk-pw34r8r5.js → chunk-cmej3vrr.js} +1 -1
  34. package/dist/{chunk-gjrbnzap.js → chunk-d2zw2e5m.js} +3 -3
  35. package/dist/chunk-dv4g1506.js +2 -0
  36. package/dist/{chunk-x9a5a282.js → chunk-e15a8txv.js} +2 -2
  37. package/dist/{chunk-en3e0y6m.js → chunk-ee0gqprs.js} +1 -1
  38. package/dist/chunk-ehwzvs2d.js +2 -0
  39. package/dist/{chunk-5zaj400e.js → chunk-fqpd0cfq.js} +1 -1
  40. package/dist/chunk-gp4x34wk.js +2 -0
  41. package/dist/chunk-h4g5m641.js +2 -0
  42. package/dist/{chunk-xt4990k8.js → chunk-hh7r7zpe.js} +1 -1
  43. package/dist/{chunk-n6p2at6g.js → chunk-hpm19gkn.js} +1 -1
  44. package/dist/chunk-jqppdrhr.js +2 -0
  45. package/dist/{chunk-7knc20mz.js → chunk-k9sbgax8.js} +1 -1
  46. package/dist/chunk-kw1p1140.js +2 -0
  47. package/dist/chunk-m08fk6ds.js +12 -0
  48. package/dist/{chunk-nmnbdtsq.js → chunk-m62a5a28.js} +6 -6
  49. package/dist/{chunk-7xckcy9x.js → chunk-n4wfef43.js} +1 -1
  50. package/dist/{chunk-j9y50qt9.js → chunk-ptek61ts.js} +1 -1
  51. package/dist/chunk-pypadz0a.js +2 -0
  52. package/dist/chunk-qyq7j8hp.js +2 -0
  53. package/dist/chunk-r7a26zjz.js +2 -0
  54. package/dist/chunk-rcez4f14.js +2 -0
  55. package/dist/{chunk-32kk8y2r.js → chunk-rgwvqmhh.js} +1 -1
  56. package/dist/chunk-rz7xew70.js +2 -0
  57. package/dist/{chunk-0avd5kkb.js → chunk-s0xpe9cj.js} +20 -20
  58. package/dist/chunk-s6jh1701.js +2 -0
  59. package/dist/{chunk-1bazr47z.js → chunk-sjha9z8e.js} +1 -1
  60. package/dist/{chunk-ktvr45qg.js → chunk-t61vdbje.js} +6 -6
  61. package/dist/{chunk-4xcypfmg.js → chunk-tg39b5t1.js} +1 -1
  62. package/dist/chunk-tmbytj7c.js +2 -0
  63. package/dist/{chunk-4acykd9n.js → chunk-v0vadrje.js} +1 -1
  64. package/dist/{chunk-p7j2g8y2.js → chunk-v83bpj84.js} +4 -4
  65. package/dist/{chunk-z14y48en.js → chunk-vqdqf0cp.js} +3 -3
  66. package/dist/chunk-vxsm8q1c.js +18 -0
  67. package/dist/{chunk-abb9xmdg.js → chunk-w1vvzdp0.js} +1 -1
  68. package/dist/{chunk-jbdqs7t6.js → chunk-w5m8xrs4.js} +1 -1
  69. package/dist/{chunk-769t2y70.js → chunk-xf4s69fr.js} +1 -1
  70. package/dist/chunk-xjb0yzvq.js +2 -0
  71. package/dist/{chunk-gj90pnre.js → chunk-y36av1ac.js} +7 -7
  72. package/dist/chunk-y8923540.js +30 -0
  73. package/dist/{chunk-pfm6cfph.js → chunk-ynvce0q6.js} +2 -2
  74. package/dist/chunk-yq2mckms.js +2 -0
  75. package/dist/{chunk-9g339c7b.js → chunk-z80d9dd2.js} +2 -2
  76. package/dist/{chunk-vvb3wq2p.js → chunk-z990jtmx.js} +1 -1
  77. package/dist/chunk-zak38e27.js +2 -0
  78. package/dist/{chunk-6bwe6vsc.js → chunk-zmcvjkpv.js} +1 -1
  79. package/dist/cli.js +43 -43
  80. package/dist/client-script-bundler.js +1 -1
  81. package/dist/craft-entry.js +2 -2
  82. package/dist/craft.js +2 -2
  83. package/dist/database.js +2 -2
  84. package/dist/pwa.js +3 -3
  85. package/dist/signals.js +318 -158
  86. package/dist/ssg.js +2 -2
  87. package/dist/strip-literals.js +23 -8
  88. package/dist/theme-tokens.d.ts +83 -0
  89. package/dist/theme-tokens.js +57 -0
  90. package/dist/ts-css-config.js +6 -2
  91. package/package.json +5 -5
  92. package/dist/chunk-0880qx3m.js +0 -2
  93. package/dist/chunk-0zf49qxk.js +0 -2
  94. package/dist/chunk-1tsz7v68.js +0 -2
  95. package/dist/chunk-2mv3wh0s.js +0 -2
  96. package/dist/chunk-4wjef6d8.js +0 -18
  97. package/dist/chunk-6ry01675.js +0 -2
  98. package/dist/chunk-97ezbs97.js +0 -2
  99. package/dist/chunk-99qf5fff.js +0 -2
  100. package/dist/chunk-a201b6rx.js +0 -2
  101. package/dist/chunk-aqdkct70.js +0 -2
  102. package/dist/chunk-bb7p822h.js +0 -2
  103. package/dist/chunk-bj31r6sj.js +0 -2
  104. package/dist/chunk-c1gp4xjy.js +0 -2
  105. package/dist/chunk-c8z3fghp.js +0 -2
  106. package/dist/chunk-esc6fahf.js +0 -2
  107. package/dist/chunk-f2rh0zhs.js +0 -2
  108. package/dist/chunk-h5k0c1jp.js +0 -2
  109. package/dist/chunk-hqfgbtsy.js +0 -30
  110. package/dist/chunk-j2pdtq0d.js +0 -2
  111. package/dist/chunk-kewh1a68.js +0 -2
  112. package/dist/chunk-kvfcm30m.js +0 -2
  113. package/dist/chunk-nahzfs7d.js +0 -2
  114. package/dist/chunk-s1075erh.js +0 -2
  115. package/dist/chunk-s2fpethy.js +0 -2
  116. package/dist/chunk-tps20cx5.js +0 -2
  117. package/dist/chunk-ts3jftxq.js +0 -2
  118. package/dist/chunk-wfmy7a0b.js +0 -2
  119. package/dist/chunk-xsdj6k6c.js +0 -2
  120. package/dist/chunk-y3cqh2jv.js +0 -12
  121. package/dist/chunk-yn2d8x8m.js +0 -3
@@ -32,7 +32,7 @@ function skipTemplate(code, start) {
32
32
  return code.length;
33
33
  }
34
34
  export function findInterpolationEnd(code, start) {
35
- let depth = 1, i = start;
35
+ let depth = 1, i = start, lastSig = "{", lastWord = "";
36
36
  while (i < code.length) {
37
37
  const ch = code[i];
38
38
  if (ch === "\\") {
@@ -41,10 +41,14 @@ export function findInterpolationEnd(code, start) {
41
41
  }
42
42
  if (ch === '"' || ch === "'") {
43
43
  i = skipQuoted(code, i);
44
+ lastSig = LITERAL_END;
45
+ lastWord = "";
44
46
  continue;
45
47
  }
46
48
  if (ch === "`") {
47
49
  i = skipTemplate(code, i);
50
+ lastSig = LITERAL_END;
51
+ lastWord = "";
48
52
  continue;
49
53
  }
50
54
  if (ch === "/" && code[i + 1] === "/") {
@@ -60,17 +64,28 @@ export function findInterpolationEnd(code, start) {
60
64
  i += 2;
61
65
  continue;
62
66
  }
63
- if (ch === "{") {
64
- depth++;
65
- i++;
66
- continue;
67
+ if (ch === "/" && startsRegex(lastSig, lastWord)) {
68
+ const end = regexEnd(code, i);
69
+ if (end !== -1) {
70
+ i = end;
71
+ lastSig = LITERAL_END;
72
+ lastWord = "";
73
+ continue;
74
+ }
67
75
  }
68
- if (ch === "}") {
76
+ if (ch === "{")
77
+ depth++;
78
+ else if (ch === "}") {
69
79
  depth--;
70
80
  if (depth === 0)
71
81
  return i;
72
- i++;
73
- continue;
82
+ }
83
+ if (/[\w$]/.test(ch)) {
84
+ lastWord = /[\w$]/.test(lastSig) ? lastWord + ch : ch;
85
+ lastSig = ch;
86
+ } else if (!/\s/.test(ch)) {
87
+ lastSig = ch;
88
+ lastWord = "";
74
89
  }
75
90
  i++;
76
91
  }
@@ -144,4 +144,87 @@ export declare function shapeRadii(): Record<string, string>;
144
144
  export declare function shapeTokenCSS(): string;
145
145
  /** Every variable a shape role reads, for documentation and tooling. */
146
146
  export declare function shapeTokenNames(): string[];
147
+ /**
148
+ * Density roles — how much room a control or a table cell takes.
149
+ *
150
+ * The last thing an app could not move without a visual change. Colour and
151
+ * corners became roles, but a text field still carried `px-4 py-2 text-base`
152
+ * and a table cell `px-6 py-4 text-sm`, and `className` is no escape hatch for
153
+ * either for the reason it was not one for a colour: `py-2` and `py-1.5` are
154
+ * single-class selectors of equal specificity, so the winner is whichever the
155
+ * engine happened to emit later — not something a call site controls
156
+ * (stacksjs/stx#1993).
157
+ *
158
+ * Each token is a CSS variable whose fallback is the value the library already
159
+ * used, so nothing moves until an app sets one.
160
+ *
161
+ * ## Why `px-control-x` and not `px-control`
162
+ *
163
+ * `px-*` and `py-*` both read `theme.spacing`, so one spacing name can only
164
+ * ever resolve to one value: `px-control` and `py-control` would be the SAME
165
+ * length. Inline and block padding are different decisions (a field is 1rem
166
+ * across and 0.5rem down), so each gets its own spacing name, and the name
167
+ * says which axis it is for.
168
+ *
169
+ * ## Why the line-height is a token too
170
+ *
171
+ * A control's height is its block padding twice plus its line-height — there
172
+ * is no `h-*` to fight (#1993) — so a font-size token without a line-height
173
+ * one could shrink the text and leave the box exactly as tall.
174
+ *
175
+ * ## One inline padding for a whole table
176
+ *
177
+ * Header and body cells share `--stx-cell-px`: a column is aligned only if its
178
+ * header and its cells start at the same inset, so there is nothing for a
179
+ * second inline token to decide except misalignment. The block padding and
180
+ * the type do differ — a header row is `py-3 text-xs`, a body row
181
+ * `py-4 text-sm` — so those have a header token each.
182
+ */
183
+ export declare const DENSITY_TOKENS: Record<string, {
184
+ value: string;
185
+ description: string;
186
+ }>;
187
+ /**
188
+ * The `theme.spacing` names, each backed by one density token.
189
+ *
190
+ * `px-control-x`, `py-control-y`, `px-cell-x`, `py-cell-y`, `py-cell-head-y` —
191
+ * and, because they are ordinary spacing, `pl-control-x` and the rest too.
192
+ */
193
+ export declare const DENSITY_SPACING: Record<string, string>;
194
+ /**
195
+ * The `theme.fontSize` names, each a size token and its line-height token.
196
+ *
197
+ * `text-control`, `text-cell`, `text-cell-head`. A fontSize entry and not a
198
+ * colour, so `text-control` sets the type and leaves the colour to `text-fg`.
199
+ */
200
+ export declare const DENSITY_FONT_SIZES: Record<string, {
201
+ size: string;
202
+ leading: string;
203
+ }>;
204
+ /** The CSS custom property that backs a density role. */
205
+ export declare function densityVariable(name: string): string;
206
+ /**
207
+ * The `theme.spacing` entries to merge in.
208
+ *
209
+ * Same shape as {@link shapeRadii}: new names whose value is the variable with
210
+ * today's value as the fallback, so `px-control-x` is an ordinary utility and
211
+ * an app moves it by setting `--stx-control-px`.
212
+ */
213
+ export declare function densitySpacing(): Record<string, string>;
214
+ /**
215
+ * The `theme.fontSize` entries to merge in, in the engine's own
216
+ * `[size, { lineHeight }]` form so a `text-*` utility sets both.
217
+ */
218
+ export declare function densityFontSizes(): Record<string, [string, {
219
+ lineHeight: string;
220
+ }]>;
221
+ /**
222
+ * The `:root` block for the density roles.
223
+ *
224
+ * No `.dark` counterpart, for the reason the shape roles have none: room does
225
+ * not change with the colour scheme.
226
+ */
227
+ export declare function densityTokenCSS(): string;
228
+ /** Every variable a density role reads, for documentation and tooling. */
229
+ export declare function densityTokenNames(): string[];
147
230
  export {};
@@ -140,3 +140,60 @@ export function shapeTokenCSS() {
140
140
  export function shapeTokenNames() {
141
141
  return Object.keys(SHAPE_TOKENS).map(shapeVariable);
142
142
  }
143
+ export const DENSITY_TOKENS = {
144
+ "control-px": { value: "1rem", description: "Inline padding of a md text control \u2014 px-4" },
145
+ "control-py": { value: "0.5rem", description: "Block padding of a md text control \u2014 py-2" },
146
+ "control-text": { value: "1rem", description: "Font size of a md text control \u2014 text-base" },
147
+ "control-leading": { value: "1.5rem", description: "Line height of a md text control \u2014 text-base" },
148
+ "cell-px": { value: "1.5rem", description: "Inline padding of every table cell, header or body \u2014 px-6" },
149
+ "cell-py": { value: "1rem", description: "Block padding of a body cell \u2014 py-4" },
150
+ "cell-text": { value: "0.875rem", description: "Font size of a body cell \u2014 text-sm" },
151
+ "cell-leading": { value: "1.25rem", description: "Line height of a body cell \u2014 text-sm" },
152
+ "cell-head-py": { value: "0.75rem", description: "Block padding of a header cell \u2014 py-3" },
153
+ "cell-head-text": { value: "0.75rem", description: "Font size of a header cell \u2014 text-xs" },
154
+ "cell-head-leading": { value: "1rem", description: "Line height of a header cell \u2014 text-xs" }
155
+ }, DENSITY_SPACING = {
156
+ "control-x": "control-px",
157
+ "control-y": "control-py",
158
+ "cell-x": "cell-px",
159
+ "cell-y": "cell-py",
160
+ "cell-head-y": "cell-head-py"
161
+ }, DENSITY_FONT_SIZES = {
162
+ control: { size: "control-text", leading: "control-leading" },
163
+ cell: { size: "cell-text", leading: "cell-leading" },
164
+ "cell-head": { size: "cell-head-text", leading: "cell-head-leading" }
165
+ };
166
+ export function densityVariable(name) {
167
+ return `--stx-${name}`;
168
+ }
169
+ function densityValue(token) {
170
+ const entry = DENSITY_TOKENS[token];
171
+ if (!entry)
172
+ throw Error(`[stx] unknown density token "${token}"`);
173
+ return `var(${densityVariable(token)}, ${entry.value})`;
174
+ }
175
+ export function densitySpacing() {
176
+ const spacing = {};
177
+ for (const [name, token] of Object.entries(DENSITY_SPACING))
178
+ spacing[name] = densityValue(token);
179
+ return spacing;
180
+ }
181
+ export function densityFontSizes() {
182
+ const sizes = {};
183
+ for (const [name, { size, leading }] of Object.entries(DENSITY_FONT_SIZES))
184
+ sizes[name] = [densityValue(size), { lineHeight: densityValue(leading) }];
185
+ return sizes;
186
+ }
187
+ export function densityTokenCSS() {
188
+ return [
189
+ "/* stx density tokens \u2014 how much room a control or a table cell takes. */",
190
+ ":root {",
191
+ ...Object.entries(DENSITY_TOKENS).map(([name, token]) => ` ${densityVariable(name)}: ${token.value};`),
192
+ "}",
193
+ ""
194
+ ].join(`
195
+ `);
196
+ }
197
+ export function densityTokenNames() {
198
+ return Object.keys(DENSITY_TOKENS).map(densityVariable);
199
+ }
@@ -1,4 +1,4 @@
1
- import { semanticColors, semanticTokenCSS, shapeRadii, shapeTokenCSS } from "./theme-tokens.js";
1
+ import { densityFontSizes, densitySpacing, densityTokenCSS, semanticColors, semanticTokenCSS, shapeRadii, shapeTokenCSS } from "./theme-tokens.js";
2
2
  function isPlainObject(value) {
3
3
  return typeof value === "object" && value !== null && !Array.isArray(value);
4
4
  }
@@ -20,6 +20,10 @@ export function mergeCssConfig(base = {}, user = {}) {
20
20
  baseThemeKeys.colors = { ...basePalette, ...semanticColors(basePalette) };
21
21
  const baseRadii = baseThemeKeys.borderRadius || {};
22
22
  baseThemeKeys.borderRadius = { ...baseRadii, ...shapeRadii() };
23
+ const baseSpacing = baseThemeKeys.spacing || {};
24
+ baseThemeKeys.spacing = { ...baseSpacing, ...densitySpacing() };
25
+ const baseFontSizes = baseThemeKeys.fontSize || {};
26
+ baseThemeKeys.fontSize = { ...baseFontSizes, ...densityFontSizes() };
23
27
  const theme = deepMergeThemes(baseThemeKeys, userThemeKeys), extend = deepMergeThemes(baseExtend || {}, userExtend || {});
24
28
  if (Object.keys(extend).length > 0)
25
29
  theme.extend = extend;
@@ -48,7 +52,7 @@ export function mergeCssConfig(base = {}, user = {}) {
48
52
  shortcuts,
49
53
  includePreflight: user.preflight !== !1,
50
54
  minify: user.minify === !0,
51
- tokenCSS: semanticTokenCSS(basePalette) + shapeTokenCSS(),
55
+ tokenCSS: semanticTokenCSS(basePalette) + shapeTokenCSS() + densityTokenCSS(),
52
56
  ...fonts ? { fonts } : {}
53
57
  };
54
58
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/stx",
3
3
  "type": "module",
4
- "version": "0.2.465",
4
+ "version": "0.2.467",
5
5
  "description": "A performant UI Framework. Powered by Bun.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",
@@ -122,12 +122,12 @@
122
122
  "dependencies": {
123
123
  "@stacksjs/ts-css": "^0.3.2",
124
124
  "@stacksjs/clapp": "^0.2.16",
125
- "@stacksjs/desktop": "0.2.465",
126
- "@stacksjs/sanitizer": "0.2.465",
125
+ "@stacksjs/desktop": "0.2.467",
126
+ "@stacksjs/sanitizer": "0.2.467",
127
127
  "@stacksjs/ts-i18n": "^0.1.11",
128
- "bun-plugin-stx": "0.2.465",
128
+ "bun-plugin-stx": "0.2.467",
129
129
  "bunfig": "^0.15.19",
130
- "stx-router": "0.2.465",
130
+ "stx-router": "0.2.467",
131
131
  "ts-broadcasting": "^0.0.11",
132
132
  "ts-images": "^0.2.22",
133
133
  "ts-syntax-highlighter": "^0.2.1"
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Jc}from"./chunk-ysptfks9.js";import"./chunk-hqfgbtsy.js";import"./chunk-nmk9en1n.js";import"./chunk-gasb5fhy.js";import"./chunk-ag1v2tkm.js";import"./chunk-gjrbnzap.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-jbdqs7t6.js";import"./chunk-zydg3wgt.js";import"./chunk-gj90pnre.js";import"./chunk-p7j2g8y2.js";import"./chunk-pfm6cfph.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{Jc as buildForProduction};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ui,eo,Wc,Wi,qi,qc,Kc}from"./chunk-xt4990k8.js";import"./chunk-5zaj400e.js";import"./chunk-z14y48en.js";import"./chunk-gasb5fhy.js";import{ze,rc}from"./chunk-ag1v2tkm.js";import"./chunk-gjrbnzap.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-jbdqs7t6.js";import"./chunk-zydg3wgt.js";import"./chunk-gj90pnre.js";import"./chunk-p7j2g8y2.js";import"./chunk-pfm6cfph.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{Ui as buildVirtualSource,ze as extractScriptBlocks,rc as extractTemplateExpressions,Wi as findRuntimeTypeDeclarations,qi as findStxModuleDeclarations,Kc as formatTypecheckDiagnostics,Wc as sourcePathFor,qc as typecheckStxFiles,eo as virtualPathFor};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ct,cc,lc,dc,uc,pc,u,fc,ls,gc,ri,si}from"./chunk-ag1v2tkm.js";import"./chunk-gjrbnzap.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-jbdqs7t6.js";import"./chunk-zydg3wgt.js";import"./chunk-gj90pnre.js";import"./chunk-p7j2g8y2.js";import"./chunk-pfm6cfph.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{Ct as STX_ENGINE_BINDING_NAMES,ls as convertToCommonJS,ri as extractScriptFromTemplate,u as extractVariables,si as hasVariables,fc as isCompleteImport,pc as isMissingBindingFailure,dc as isModuleResolutionFailure,uc as isSyntaxFailure,gc as splitDeclaration,cc as stripTypeScript,lc as withoutStxReferrer};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{So,ko,Co,md}from"./chunk-0avd5kkb.js";import"./chunk-4wjef6d8.js";import"./chunk-ag1v2tkm.js";import"./chunk-gjrbnzap.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-jbdqs7t6.js";import"./chunk-zydg3wgt.js";import"./chunk-gj90pnre.js";import"./chunk-p7j2g8y2.js";import"./chunk-pfm6cfph.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{So as buildNative,md as default,Co as getAvailableFormats,ko as getAvailableTargets};
@@ -1,18 +0,0 @@
1
- // @bun
2
- import{In,Oe,Ne,me,Wo,Ln,Z,K,rn,u,n,I}from"./chunk-ag1v2tkm.js";function h(o){return o.endsWith(".md")||o.endsWith(".markdown")}function _(o){let e=[];g(/<pre\b[^>]*>[\s\S]*?<\/pre>/gi);let r=[...e];g(/<code\b[^>]*>[\s\S]*?<\/code>/gi,r);function g(s,p){let m;while((m=s.exec(o))!==null){let t=m.index,i=t+m[0].length;if(p?.some((l)=>t>=l.start&&i<=l.end))continue;e.push({start:t,end:i})}}if(e.length===0)return o;e.sort((s,p)=>s.start-p.start);let a="",c=0;for(let s of e){if(s.start<c)continue;a+=o.slice(c,s.start),a+=`@raw${o.slice(s.start,s.end)}@endraw`,c=s.end}return a+=o.slice(c),a}async function b(o,e={}){let{data:r,content:g}=In(o),c=await(e.renderer??((s)=>Oe(s)))(g);return{html:_(c),frontmatter:r??{}}}import{dirname as C,resolve as R}from"path";function k(o){let e=o,r=Z(o);if(r)e=r.content.trim();let g=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,a=[],c=[],s=[],p=(i)=>/\b(?:state|derived|effect|batch)\s*(?:<[^<>()]*>)?\s*\(/.test(i),m;while((m=g.exec(o))!==null){let i=m[1],l=m[2],f=m[0],d=i.includes("server");if(p(l))s.push(f);else if(d)c.push(l);else a.push(f)}let t=e;{let i=/<script\b(?![^>]*\b(?:client|type\s*=\s*["']module["']|src\s*=))[^>]*>/gi,l,f=[];while((l=i.exec(t))!==null){let d=l.index+l[0].length,x=t.indexOf("</script>",d);if(x===-1)continue;f.push({start:l.index,end:x+9}),i.lastIndex=x+9}for(let d=f.length-1;d>=0;d--)t=t.substring(0,f[d].start)+t.substring(f[d].end)}for(let i of a)t=t.replace(i,"");return{templateContent:t,serverScripts:c,clientScripts:a,signalsScripts:s}}function v(o,e){return`<!DOCTYPE html>
3
- <html lang="en">
4
- <head>
5
- <meta charset="UTF-8">
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <title>${(e||"stx").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}</title>
8
- </head>
9
- <body>
10
- ${o}
11
- </body>
12
- </html>`}async function _o(o,e={}){let r=R(o),g=Bun.file(r);if(!await g.exists())throw Error(`Template file not found: ${r}`);let a=await g.text(),c=null;if(h(r)){let s=await b(a,{renderer:e.markdownRenderer});a=s.html,c=s.frontmatter}if(c)e={...e,context:{...c,...e.context||{}}};if(e.layout){let s=R(e.layout),p=Bun.file(s);if(!await p.exists())throw Error(`Layout template not found: ${s}`);let{layout:m,injectCSS:t,...i}=e,l={...e.context||{}};rn(l);let f=await S(a,r,{...i,context:{...l,__stx_defer_server_data:!0},injectCSS:!1}),d=await p.text(),x={...l,content:f},w={...i,context:x,injectCSS:t};return S(d,s,w)}return S(a,r,e)}async function S(o,e,r={}){let{templateContent:g,serverScripts:a,clientScripts:c}=k(o),s={...I,...r.options},p={__filename:e,__dirname:C(e),__stx:{},__stx_options:s,__stx_sfc_mode:!0,__stx_inject_css:r.injectCSS===!0,__stxServeContext:void 0,...Ln(r.context??{}),definePageMeta:()=>{},...r.context||{}};for(let i of a)await u(i,p,e);let m=new Set,t=g;if(t=await n(t,p,e,s,m),Wo(p,r.context),r.templateOnly){if(t=t.replace(/<script data-stx-scoped>[\s\S]*?<\/script>\s*/gi,""),t=t.replace(/<!-- stx SEO Tags -->[\s\S]*?(?=<)/i,""),c.length>0)t+=`
13
- ${c.join(`
14
- `)}`}else{if(r.processClientScripts!==!1&&c.length>0){let i=p.__stx_event_bindings||[],l=Ne(p),d=(await Promise.all(c.map(async(w)=>{let y=w.match(/<script\b[^>]*>([\s\S]*?)<\/script>/);if(!y)return w;return await me(y[1],{eventBindings:i,templateContent:t,serverData:l,filePath:e})}))).join(`
15
- `);if(t.match(/(<\/body>)/i))t=t.replace(/(<\/body>)/i,`${d}
16
- $1`);else t+=`
17
- ${d}`}t=await K(t)}if(r.wrapInDocument){if(!t.trim().toLowerCase().startsWith("<!doctype")&&!t.trim().toLowerCase().startsWith("<html"))t=v(t,r.title)}if(r.injectCSS)try{let{injectCss:i}=await import("./chunk-99qf5fff.js");t=await i(t)}catch{}return t}
18
- export{_o};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{kt,ds,oi,mc}from"./chunk-ag1v2tkm.js";import"./chunk-gjrbnzap.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-jbdqs7t6.js";import"./chunk-zydg3wgt.js";import"./chunk-gj90pnre.js";import"./chunk-p7j2g8y2.js";import"./chunk-pfm6cfph.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{mc as declareBareLoopHead,kt as parseLoopBinding,oi as processLoops,ds as reportDeferredLoopWarnings};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{jd,hc,ye,ii,Bd,us,ps,gs}from"./chunk-ag1v2tkm.js";import"./chunk-gjrbnzap.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-jbdqs7t6.js";import"./chunk-zydg3wgt.js";import"./chunk-gj90pnre.js";import"./chunk-p7j2g8y2.js";import"./chunk-pfm6cfph.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{Bd as clearOnceStore,ii as onceStore,ye as partialsCache,us as processIncludes,ps as processStackPushDirectives,gs as processStackReplacements,jd as resetUnscopedSignalWarnings,hc as topLevelElements};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Id,Vo,Dd,Uo,Za,Qa,xt,tn,Od,ec,tc,nc,f}from"./chunk-ag1v2tkm.js";import"./chunk-gjrbnzap.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-jbdqs7t6.js";import"./chunk-zydg3wgt.js";import"./chunk-gj90pnre.js";import"./chunk-p7j2g8y2.js";import"./chunk-pfm6cfph.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{xt as buildCss,ec as extractClassNames,Qa as fingerprintConfig,tc as generateCss,Od as getCachedCSS,Id as getCssServeAsset,f as injectCss,Vo as loadCssEngine,Uo as loadCssEngineConfig,tn as rebuildCss,Dd as resetCssCache,Za as resolveUserCssConfig,nc as withLinkedModuleBundles};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{cl}from"./chunk-2e4pegf1.js";import"./chunk-ag1v2tkm.js";import"./chunk-gjrbnzap.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-jbdqs7t6.js";import"./chunk-zydg3wgt.js";import"./chunk-gj90pnre.js";import"./chunk-p7j2g8y2.js";import"./chunk-pfm6cfph.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{cl as buildApp};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{nn,sc,ss}from"./chunk-ag1v2tkm.js";import"./chunk-gjrbnzap.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-jbdqs7t6.js";import"./chunk-zydg3wgt.js";import"./chunk-gj90pnre.js";import"./chunk-p7j2g8y2.js";import{ve}from"./chunk-pfm6cfph.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{ve as freeIdentifiers,ss as processComponents,sc as processESImports,nn as rendersAsElement};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Me,Ga,$d,Ed,_d,Td,Ja,Ya,Rd,Ad,Ho,Pd,Qt,en,Mn}from"./chunk-ag1v2tkm.js";import"./chunk-gjrbnzap.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-jbdqs7t6.js";import"./chunk-zydg3wgt.js";import"./chunk-gj90pnre.js";import"./chunk-p7j2g8y2.js";import"./chunk-pfm6cfph.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{Td as __setSignalsGeneratorsForTest,Me as cacheEngineFingerprint,en as cacheTemplate,Qt as checkCache,Pd as clearDevCaches,Ya as getCachedRouterScript,Ja as getCachedSignalsRuntime,Rd as getServeClientAsset,Ho as getServeModuleBundle,Mn as hashFilePath,Ed as invalidateFileCache,_d as invalidateFileCacheByDir,$d as readFileCached,Ad as registerServeModuleBundle,Ga as templateCache};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Or,bl,wl}from"./chunk-5zaj400e.js";import"./chunk-z14y48en.js";import"./chunk-gasb5fhy.js";import"./chunk-ag1v2tkm.js";import"./chunk-gjrbnzap.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-jbdqs7t6.js";import"./chunk-zydg3wgt.js";import"./chunk-gj90pnre.js";import"./chunk-p7j2g8y2.js";import"./chunk-pfm6cfph.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{wl as clearComposableCache,bl as getComposableScript,Or as listComposableModules};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ql,Kl}from"./chunk-7xckcy9x.js";import"./chunk-z14y48en.js";import"./chunk-gasb5fhy.js";import"./chunk-ag1v2tkm.js";import"./chunk-gjrbnzap.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-jbdqs7t6.js";import"./chunk-zydg3wgt.js";import"./chunk-gj90pnre.js";import"./chunk-p7j2g8y2.js";import"./chunk-pfm6cfph.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{Kl as clearStoreCache,ql as getStoreScript};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ks,Cs,$s,Es,Yn,Zn,Vd,Ud,Wd,qd,Qn,Kd}from"./chunk-gj90pnre.js";import"./chunk-p7j2g8y2.js";import"./chunk-pfm6cfph.js";export{Kd as generateDefaultRobotsTxt,Qn as generateRobotsTxt,Ud as generateSitemap,Wd as generateSitemapIndex,Es as injectSeoTags,Yn as metaDirective,ks as processMetaDirectives,$s as processSeoDirective,Cs as processStructuredData,Vd as registerSeoDirectives,qd as scanForSitemapEntries,Zn as structuredDataDirective};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Oi,Mi}from"./chunk-cstvhr0r.js";import"./chunk-ery19t9s.js";import"./chunk-yc4hf2ea.js";import"./chunk-xt4990k8.js";import"./chunk-90drf2ag.js";import"./chunk-n6p2at6g.js";import"./chunk-ysptfks9.js";import"./chunk-a8q8m5pp.js";import"./chunk-32kk8y2r.js";import"./chunk-2e4pegf1.js";import"./chunk-en3e0y6m.js";import{no}from"./chunk-hqfgbtsy.js";import"./chunk-7knc20mz.js";import"./chunk-9g339c7b.js";import"./chunk-3q3174cn.js";import"./chunk-1k01h1zb.js";import"./chunk-7h57dt0z.js";import"./chunk-se9qddyx.js";import"./chunk-zasd9166.js";import"./chunk-bddjx2a2.js";import"./chunk-2bdthb37.js";import"./chunk-5zaj400e.js";import"./chunk-9fr19qe4.js";import"./chunk-9pt8fd2n.js";import"./chunk-t1py7rbg.js";import"./chunk-fh1qrp68.js";import"./chunk-pbh4smw3.js";import"./chunk-amd6ey3t.js";import"./chunk-7xckcy9x.js";import"./chunk-nmk9en1n.js";import"./chunk-nmnbdtsq.js";import"./chunk-4wjef6d8.js";import"./chunk-5j5msbks.js";import"./chunk-z14y48en.js";import"./chunk-gasb5fhy.js";import{me,Qt,en,K,u,n,Kn,I,o,ce}from"./chunk-ag1v2tkm.js";import"./chunk-gjrbnzap.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-jbdqs7t6.js";import"./chunk-zydg3wgt.js";import"./chunk-gj90pnre.js";import"./chunk-p7j2g8y2.js";import"./chunk-pfm6cfph.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{Kn as buildWebComponents,en as cacheTemplate,Qt as checkCache,no as classifyAllScripts,Oi as createMiddleware,Mi as createRoute,I as defaultConfig,u as extractVariables,K as injectRouterScript,o as loadStxConfig,me as processClientScript,n as processDirectives,ce as readMarkdownFile};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Yi,ul,Zi,Qi,pl,fl}from"./chunk-3q3174cn.js";import"./chunk-ag1v2tkm.js";import"./chunk-gjrbnzap.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-jbdqs7t6.js";import"./chunk-zydg3wgt.js";import"./chunk-gj90pnre.js";import"./chunk-p7j2g8y2.js";import"./chunk-pfm6cfph.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{fl as applySlots,pl as extractSlotContent,ul as parseSlotElement,Yi as parseSlots,Qi as processSlots,Zi as renderSlot};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Br,$o,Eo,hd}from"./chunk-1byqqwgm.js";export{Br as NATIVE_COMPONENTS,$o as compileToNative,Eo as createHotReloadServer,hd as default};
@@ -1,30 +0,0 @@
1
- // @bun
2
- import{zo,Jr,Y,Le,vt,x,Be,Fe,zn,u,sn}from"./chunk-ag1v2tkm.js";import{O}from"./chunk-58n62bxb.js";var D=/\b(?:state|derived|effect|batch|ref|reactive|computed|watch|watchEffect)\s*(?:<[^>]*>)?\s*\(/;function F(t,n,e){let r={fullTag:e,content:n,attrs:t};if(/\bserver\b/.test(t))return{...r,type:"server"};if(/\bdata-stx-scoped\b/.test(t))return{...r,type:"client"};if(D.test(n))return{...r,type:"signals"};if(/\bclient\b/.test(t)||/\btype\s*=\s*["']module["']/.test(t)||/\bsrc\s*=/.test(t))return{...r,type:"client"};return{...r,type:"server"}}var H=/^<script\b([^>]*)>([\s\S]*)<\/script\s*>$/i;function no(t){let n=[],e=[],r=[],o=0;while(o<t.length){let s=t.indexOf("<",o);if(s===-1)break;let a=Le(t,s);if(a>s){o=a;continue}let i=Y(t,s);if(i>s){let c=t.slice(s,i),f=H.exec(c);if(f){let l=F(f[1],f[2],c);switch(l.type){case"signals":n.push(l);break;case"client":e.push(l);break;case"server":r.push(l);break}}o=i;continue}o=s+(t.startsWith("<!--",s)?4:1)}return{signals:n,client:e,server:r}}var L=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function V(t){let n=[],e=/<!--[\s\S]*?(?:-->|$)|<(script|style|textarea|title|template)\b[^>]*>[\s\S]*?<\/\1\s*>/gi,r;while((r=e.exec(t))!==null)n.push({start:r.index,end:r.index+r[0].length});return n}function P(t,n){return n.some((e)=>t>=e.start&&t<e.end)}function B(t){let n=(t||"").trim();if(!n)return null;if(/[\s>+~,:]/.test(n))return null;let e={},r=n,o=r.match(/^[a-z][\w-]*/i);if(o)e.tag=o[0].toLowerCase(),r=r.slice(o[0].length);while(r.length>0){let s=r.match(/^\[([\w-]+)(?:=(["']?)([^\]"']*)\2)?\]/);if(s){if(e.attr=s[1],s[3]!==void 0&&s[3]!=="")e.attrValue=s[3];r=r.slice(s[0].length);continue}let a=r.match(/^#([\w-]+)/);if(a){e.id=a[1],r=r.slice(a[0].length);continue}let i=r.match(/^\.([\w-]+)/);if(i){e.className=i[1],r=r.slice(i[0].length);continue}return null}if(!e.tag&&!e.attr&&!e.id&&!e.className)return null;return e}function q(t,n){if(n.attr){if(!(n.attrValue===void 0?new RegExp(`\\b${n.attr}(?=[\\s=>/]|$)`,"i"):new RegExp(`\\b${n.attr}\\s*=\\s*(["'])\\s*${n.attrValue}\\s*\\1`,"i")).test(t))return!1}if(n.id){if(!new RegExp(`\\bid\\s*=\\s*(["'])\\s*${n.id}\\s*\\1`,"i").test(t))return!1}if(n.className){let e=t.match(/\bclass\s*=\s*(["'])([\s\S]*?)\1/i);if(!e)return!1;if(!e[2].split(/\s+/).includes(n.className))return!1}return!0}function T(t,n="main"){let e=B(n);if(!e)return null;let r=/<([a-z][\w-]*)\b([^>]*)>/gi,o=V(t),s;while((s=r.exec(t))!==null){if(P(s.index,o))continue;let a=s[1].toLowerCase(),i=s[2]||"";if(i.trimEnd().endsWith("/")||L.has(a))continue;if(e.tag&&e.tag!==a)continue;if(!q(i,e))continue;let c=s[0],f=s.index+c.length,l=new RegExp(`<(/?)${a}\\b([^>]*)>`,"gi");l.lastIndex=f;let g=1,d;while((d=l.exec(t))!==null){if(P(d.index,o))continue;let h=d[1]==="/";if(!h&&(d[2]||"").trimEnd().endsWith("/"))continue;if(g+=h?-1:1,g===0)return{openTag:c,openIndex:s.index,start:f,end:d.index,tagName:a}}return null}return null}var Te="private, no-store";function ro(t){return t.replace(/&#(\d+);/g,(n,e)=>M(Number(e),n)).replace(/&#x([0-9a-f]+);/gi,(n,e)=>M(Number.parseInt(e,16),n)).replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&apos;/g,"'").replace(/&amp;/g,"&")}function M(t,n){if(!Number.isInteger(t)||t<0||t>1114111)return n;try{return String.fromCodePoint(t)}catch{return n}}function ne(t){return t.headers.get("X-STX-Router")==="true"}function z(t,n){if(!t)return n;return t.split(",").some((r)=>r.trim().toLowerCase()===n.toLowerCase())?t:`${t}, ${n}`}function _(t){return{Vary:z(t,"X-STX-Router")}}import v from"path";var G="stx-page-head:",U=/<!--stx-page-head:([A-Za-z0-9+/=]+)-->\n?/,A={dev:null,prod:null};function W(){let t=O()?"dev":"prod",n=A[t];if(n!==null)return n;try{let e=import.meta.require("./chunk-5564cka1.js"),r=t==="dev"&&typeof e.getRouterScriptDev==="function"?e.getRouterScriptDev:e.getRouterScript;A[t]=`<script>${r()}</script>`}catch{A[t]=""}return A[t]}async function so(t,n){if(n===!1)return null;if(n&&typeof n==="string"){let r=v.resolve(t,n);if(await Bun.file(r).exists())return r;return null}let e=v.join(t,"app.stx");if(await Bun.file(e).exists())return e;return null}async function xr(t,n){try{let e=await Bun.file(t).text(),r=e,o=e.match(/<template\b[^>]*>([\s\S]*?)<\/template>/i);if(o)r=o[1].trim();let s=no(e),a=[...s.client.map((m)=>m.fullTag),...s.signals.map((m)=>m.fullTag)],i=[],c=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,f;while((f=c.exec(e))!==null)i.push(f[0]);let l=r;for(let m of s.server)l=l.replace(m.fullTag,"");for(let m of s.client)l=l.replace(m.fullTag,"");l=l.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let g="<!--__STX_PAGE_SLOT__-->";if(l=l.replace(/<slot\s*\/>/gi,g).replace(/<slot\s*>\s*<\/slot>/gi,g),!l.includes(g))return console.warn(`[stx] Shell ${t} has no <slot /> \u2014 pages won't be injected`),null;let{processDirectives:d,extractVariables:h,defaultConfig:S,loadStxConfig:b}=await import("./chunk-esc6fahf.js"),R=await b(),p={__filename:t,__dirname:v.dirname(t)};for(let m of a){let C=m.match(/<script\b[^>]*>([\s\S]*?)<\/script>/i);if(C&&!m.includes("client")&&!m.includes('type="module"'))await h(C[1],p,t)}let y=await d(l,p,t,{...S,...R,...n},new Set),w=y.indexOf(g);if(w===-1)return console.warn("[stx] Shell slot placeholder lost during processing"),null;return{beforeSlot:y.substring(0,w),afterSlot:y.substring(w+g.length),filePath:t,shellScripts:a,shellStyles:i}}catch(e){return console.error(`[stx] Error processing shell ${t}:`,e),null}}function Cn(t,n,e){let r,o="",s=n.match(U);if(s){n=n.replace(s[0],"");try{let l=Buffer.from(s[1],"base64").toString("utf8"),g=l.match(/<title[^>]*>([\s\S]*?)<\/title>/i);if(g)r=g[1].trim();o=l.replace(/<title[^>]*>[\s\S]*?<\/title>/i,"").trim()}catch{}}let a=e||r||"stx App",i=W(),c="<script>window.__stxRouterConfig={container:'[data-stx-content]'};</script>";return`<!DOCTYPE html>
3
- <html lang="en">
4
- <head>
5
- <meta charset="UTF-8">
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <title>${a}</title>
8
- ${o?` ${o}
9
- `:""} ${t.shellStyles.join(`
10
- `)}
11
- </head>
12
- <body>
13
- ${t.beforeSlot}
14
- <div data-stx-content>${n}</div>
15
- ${t.afterSlot}
16
- ${t.shellScripts.filter((l)=>!l.includes("server")).join(`
17
- `)}
18
- ${c}
19
- ${i}
20
- </body>
21
- </html>`}function ge(t,n={}){let e=t.trim();if(!sn(e))return t;let r=[],o=e.match(/<head\b[^>]*>([\s\S]*?)<\/head>/i);if(o){let c=o[1],f=/<style\b[^>]*>[\s\S]*?<\/style>/gi,l;while((l=f.exec(c))!==null)r.push(l[0]);let g=c.match(/<script\b[^>]*data-stx-server-data[^>]*>[\s\S]*?<\/script>/i);if(g)r.push(g[0]);let d=c.match(/<script\b[^>]*data-stx-runtime-config[^>]*>[\s\S]*?<\/script>/i);if(d)r.push(d[0])}if(n.preserveHead&&o){let c=[],f=/<title\b[^>]*>[\s\S]*?<\/title>|<meta\b[^>]*>|<link\b[^>]*>/gi,l;while((l=f.exec(o[1]))!==null){if(/<meta\b[^>]*(?:\bcharset|name="viewport")/i.test(l[0]))continue;c.push(l[0])}if(c.length>0)r.unshift(`<!--${G}${Buffer.from(c.join(`
22
- `),"utf8").toString("base64")}-->`)}let s=e.match(/<body\b[^>]*>/i),a=e.lastIndexOf("</body>");if(s&&a!==-1){let c=s.index+s[0].length,f=e.slice(c,a).trim();if(r.length>0)return r.join(`
23
- `)+`
24
- `+f;return f}let i=e;if(i=i.replace(/<!DOCTYPE\b[^>]*>/i,""),i=i.replace(/<html\b[^>]*>/i,""),i=i.replace(/<\/html\s*>/i,""),o)i=i.replace(/<head\b[^>]*>[\s\S]*?<\/head>/i,r.join(`
25
- `));return i=i.replace(/<body\b[^>]*>/i,""),i=i.replace(/<\/body\s*>/i,""),i.trim()}var N=/^<script\b[^>]*\sdata-stx-(?:owner|instance)(?=[\s=/>])/i;function X(t,n,e,r){if(!N.test(n))return!1;let o=n.slice(0,n.indexOf(">")+1),s=/\sdata-stx-owner="([^"]+)"/i.exec(o)?.[1];if(!s)return!0;let a=`data-stx-scope="${s}"`;for(let i=t.indexOf(a);i!==-1;i=t.indexOf(a,i+a.length))if(i>=e&&i<r)return!1;return!0}function oo(t){return ne(t)}function re(t,n="main"){let e=t.trim(),r=[],o=[],s=e.match(/<head\b[^>]*>([\s\S]*?)<\/head>/i);if(s){let b=s[1],R=/<style\b[^>]*>[\s\S]*?<\/style>/gi,p;while((p=R.exec(b))!==null)r.push(p[0]);let y=/<script\b[^>]*data-stx-(?:route-params|server-data|scoped|component-factories)[^>]*>[\s\S]*?<\/script>/gi;while((p=y.exec(b))!==null){if(N.test(p[0])||p[0].includes("__stx_early_mounts")||/^<script\b[^>]*\bdata-stx-runtime(?=[\s=>])/i.test(p[0]))continue;o.push(p[0])}}let a=T(e,n);if(!a)return ge(t);let{tagName:i,start:c,end:f}=a,l=e.slice(c,f).trim(),g=[],d=e.match(/<body\b[^>]*>/i),h=e.lastIndexOf("</body>");if(d&&d.index!==void 0&&h!==-1){let R=[[d.index+d[0].length,a.openIndex],[f+`</${i}>`.length,h]],p=/<script\b[^>]*>[\s\S]*?<\/script>/gi;for(let[y,w]of R){if(y>=w)continue;let m=e.slice(y,w),C;p.lastIndex=0;while((C=p.exec(m))!==null){if(X(e,C[0],c,f))continue;g.push(C[0])}}}let S=[];if(r.length>0)S.push(r.join(`
26
- `));if(o.length>0)S.push(o.join(`
27
- `));if(g.length>0)S.push(g.join(`
28
- `));return S.push(l),S.join(`
29
- `)}import E from"fs";import I from"path";function io(t,n,e){return{version:1,buildTime:new Date().toISOString(),routes:t,assets:n,outputDir:e}}function ao(t,n){let e=I.join(n,"manifest.json");E.writeFileSync(e,JSON.stringify(t,null,2))}function co(t){let n=I.join(t,"manifest.json");if(!E.existsSync(n))return null;try{let e=E.readFileSync(n,"utf-8"),r=JSON.parse(e);if(r.version!==1)return console.warn(`[stx] Manifest version mismatch: expected 1, got ${r.version}`),null;return r}catch(e){return console.warn("[stx] Failed to load manifest:",e),null}}function k(t,n,e={}){let r=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`;if(e.maxAge!==void 0)r+=`; Max-Age=${e.maxAge}`;if(e.expires)r+=`; Expires=${e.expires.toUTCString()}`;if(e.path)r+=`; Path=${e.path}`;if(e.domain)r+=`; Domain=${e.domain}`;if(e.secure)r+="; Secure";if(e.httpOnly)r+="; HttpOnly";if(e.sameSite)r+=`; SameSite=${e.sameSite}`;return r}async function J(t){let n=t.headers.get("content-type")||"",e={},r=(o,s)=>{let a=e[o];if(a===void 0)e[o]=s;else if(Array.isArray(a))a.push(s);else e[o]=[a,s]};if(n.includes("multipart/form-data")){let o=await t.formData();for(let[s,a]of o.entries())if(typeof a==="string")r(s,a);return e}if(n.includes("application/x-www-form-urlencoded")){for(let[o,s]of new URLSearchParams(await t.text()).entries())r(o,s);return e}return e}function Sr(t){if(!t)return!1;let n=t.toUpperCase();return n!=="GET"&&n!=="HEAD"}async function j(t,n={}){let e=n.request,r=n.method??e?.method;if(!e||!Sr(r))return{ran:!1};if(typeof t.action!=="function")return{ran:!1};let o={};try{o=await J(e)}catch{}let s=await t.action({request:e,form:o,params:n.params??{},query:t.query??{},cookies:n.cookies??{}});if(s&&typeof s==="object"){let a=s,i=K(a.cookies),c=a.redirect;if(typeof c==="string"&&c)return{redirect:c,ran:!0,...i.length>0?{cookies:i}:{}};let{cookies:f,redirect:l,...g}=a;if(Object.assign(t,g),i.length>0)return{ran:!0,cookies:i}}return{ran:!0}}function K(t){if(!t||typeof t!=="object"||Array.isArray(t))return[];let n=[];for(let[e,r]of Object.entries(t)){if(!e)continue;if(typeof r==="string"){n.push(k(e,r));continue}if(r&&typeof r==="object"){let o=r;if(typeof o.value!=="string")continue;n.push(k(e,o.value,o))}}return n}function lo(t,n=[],e){let r=new Headers({Location:t,"Cache-Control":"no-store"});for(let o of n)r.append("Set-Cookie",o);for(let[o,s]of Object.entries(e??{}))if(o.toLowerCase()!=="location")r.set(o,s);return new Response(null,{status:303,headers:r})}async function It(t,n={}){let{html:e,context:r,redirect:o,cookies:s}=await Z(t,n),a=Be(r),i=Fe(r);if(o)return{html:e,redirect:o,cookies:s,status:a,headers:i};let{extractStreamBoundaries:c}=await import("./chunk-kvfcm30m.js"),f=c(r),l=t.streamTemplates;if(l&&Object.keys(l).length>0){let{processDirectives:g}=await import("./chunk-s2fpethy.js"),{defaultConfig:d}=await import("./chunk-kewh1a68.js"),h=r.streamBoundaries||{},S={...d,autoShell:!1},b=Object.keys(l).map((p)=>({id:p,render:async()=>{let y=typeof h[p]==="function"?await h[p]():void 0;return g(l[p],{...r,$boundary:y},t.sourceFile,S,new Set)}})),R=new Set(b.map((p)=>p.id));f=[...(f||[]).filter((p)=>!R.has(p.id)),...b]}return{html:e,boundaries:f&&f.length>0?f:void 0,cookies:s,status:a,headers:i}}async function Z(t,n){let e={__filename:t.sourceFile,__dirname:t.sourceFile.replace(/[/\\][^/\\]+$/,""),...n};if(!t.hasServerScripts&&!Jr(t.html))return{html:t.html,context:e};for(let a of t.serverScriptContent)try{await u(a,e,t.sourceFile)}catch(i){if(n.__stx_strict_hydration)throw i;console.warn(`[stx] Server script error in ${t.sourceFile}:`,i)}let r=await j(e,{request:n.request,method:n.method,params:n.params??{},cookies:n.cookies??{}}),o=(a)=>{let i=a.replace(/<script\b[^>]*\bdata-stx-server-data\b[^>]*>[\s\S]*?<\/script>/gi,""),c=zn(e);if(!c)return i;let f=i.indexOf("</head>");return f<0?c+i:i.slice(0,f)+c+i.slice(f)};if(r.redirect)return{html:t.html,context:e,redirect:r.redirect,cookies:r.cookies};if(!Jr(t.html))return{html:o(t.html),context:e,cookies:r.cookies};let s=new Map;for(let[a,i]of Object.entries(t.placeholders))if(i.expression)try{let c=x(i.expression,e);if(i.type==="raw")s.set(a,c!==void 0&&c!==null?String(c):"");else s.set(a,c!==void 0&&c!==null?vt(String(c)):"")}catch(c){if(n.__stx_strict_hydration)throw c;s.set(a,"")}return{html:o(zo(t.html,s)),context:e,cookies:r.cookies}}
30
- export{no,Te,ro,ne,_,so,xr,Cn,ge,oo,re,io,ao,co,Sr,lo,It};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ts,Xd,Gd,vi,pe,Tc,nr,Jd,Yd,Zd,Qd,eu,tu,nu,ru,su}from"./chunk-p7j2g8y2.js";import"./chunk-pfm6cfph.js";export{tu as applyHead,Jd as definePageMeta,Ts as getHead,Xd as getPageMeta,pe as mergeHeadConfigs,nu as processHeadDirective,su as processMetaDirective,ru as processTitleDirective,eu as renderBodyAttrs,Zd as renderHead,Qd as renderHtmlAttrs,Gd as resetHead,nr as seoMetaToHeadConfig,vi as useHead,Yd as usePageTitle,Tc as useSeoMeta,Yd as useTitle};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{I,Ec,o,R,zd,Hd}from"./chunk-ag1v2tkm.js";import"./chunk-gjrbnzap.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-jbdqs7t6.js";import"./chunk-zydg3wgt.js";import"./chunk-gj90pnre.js";import"./chunk-p7j2g8y2.js";import"./chunk-pfm6cfph.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{R as config,I as defaultConfig,zd as defineStxConfig,o as loadStxConfig,Ec as resolveStxDirectories,Hd as validateConfig};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ql,yo,_a,ed,td,nd,rd,sd,Ta,Ra,od,id,ad,cd}from"./chunk-nmnbdtsq.js";import"./chunk-ag1v2tkm.js";import"./chunk-gjrbnzap.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-jbdqs7t6.js";import"./chunk-zydg3wgt.js";import"./chunk-gj90pnre.js";import"./chunk-p7j2g8y2.js";import"./chunk-pfm6cfph.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{_a as SUSPENSE_RESOLVER_RUNTIME,yo as buildSuspenseResolveScript,sd as createStreamRenderer,nd as extractStreamBoundaries,cd as generateHydrationRuntime,Ra as islandDirective,id as processSectionDirectives,td as processStreamDirectives,od as registerStreamingDirectives,ed as renderStreamingPage,Ql as streamTemplate,rd as streamTemplateSimple,ad as streamToResponse,Ta as streamingSuspenseDirective};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Zr,Qr,es,Md,jn,Nd}from"./chunk-ag1v2tkm.js";export{jn as clearImageDeliveryCatalog,Md as deliveredImage,es as efficientDeliverySources,Zr as getImageDelivery,Qr as isTransparentImage,Nd as prepareImageDelivery};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Dn,Va,vd,Ua,xd,Wa,On,b,vt,he,qa,Yr,Ka,Sd,q,Xa,kd,x,Cd}from"./chunk-ag1v2tkm.js";import"./chunk-gjrbnzap.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-jbdqs7t6.js";import"./chunk-zydg3wgt.js";import"./chunk-gj90pnre.js";import"./chunk-p7j2g8y2.js";import"./chunk-pfm6cfph.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{Xa as applyFilters,xd as clearCustomFilters,qa as clientLoopScopes,Dn as defaultFilters,b as escapeHtml,vt as escapeHtmlValue,x as evaluateExpression,Wa as findMustacheEnd,Ua as getAllFilters,Ka as interpolateScriptAttributes,Yr as interpolateScriptExpressions,Sd as interpolateScriptsInTemplate,q as processExpressions,Va as registerFilter,vd as registerFilters,On as replaceInterpolations,kd as resetRejectedExpressionWarnings,Cd as unescapeHtml,he as usesSignalsInScript};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{K,hs,ys,bs,n}from"./chunk-ag1v2tkm.js";import"./chunk-gjrbnzap.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-jbdqs7t6.js";import"./chunk-zydg3wgt.js";import"./chunk-gj90pnre.js";import"./chunk-p7j2g8y2.js";import"./chunk-pfm6cfph.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{K as injectRouterScript,n as processDirectives,hs as processJsonDirective,ys as processOnceDirective,bs as validateClientScript};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ll}from"./chunk-en3e0y6m.js";import"./chunk-hqfgbtsy.js";import"./chunk-gasb5fhy.js";import"./chunk-ag1v2tkm.js";import"./chunk-gjrbnzap.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-jbdqs7t6.js";import"./chunk-zydg3wgt.js";import"./chunk-gj90pnre.js";import"./chunk-p7j2g8y2.js";import"./chunk-pfm6cfph.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{ll as startProductionServer};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Gc}from"./chunk-n6p2at6g.js";import"./chunk-ag1v2tkm.js";import"./chunk-gjrbnzap.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-jbdqs7t6.js";import"./chunk-zydg3wgt.js";import"./chunk-gj90pnre.js";import"./chunk-p7j2g8y2.js";import"./chunk-pfm6cfph.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{Gc as startInteractive};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{uo,dl}from"./chunk-7knc20mz.js";export{uo as definePlugin,dl as pluginManager};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{W,qr,Kr,Ha,wt,Lo,Xr,jo,wd,Ne,Gr,me}from"./chunk-ag1v2tkm.js";import"./chunk-gjrbnzap.js";import"./chunk-2n5pjbw9.js";import{mi,s}from"./chunk-y3cqh2jv.js";import"./chunk-0trfbqa7.js";import"./chunk-jbdqs7t6.js";import"./chunk-zydg3wgt.js";import"./chunk-gj90pnre.js";import"./chunk-p7j2g8y2.js";import"./chunk-pfm6cfph.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{W as BROWSER_CORE_IMPORTS,Ha as STX_AUTO_IMPORTS,qr as extractAndStripCssImports,Ne as extractBridgeData,mi as findInterpolationEnd,jo as generateAutoImportDestructuring,wd as generateBrowserAutoImportDestructuring,Gr as generateServerDataBridge,wt as injectBrowserCoreAutoImports,me as processClientScript,Xr as referencesName,Kr as renderVendorStyleTags,s as stripCommentsAndLiterals,Lo as transformAutoImports};
@@ -1,12 +0,0 @@
1
- // @bun
2
- function a(t,e){let n=t[e],i=e+1;while(i<t.length){if(t[i]==="\\"){i+=2;continue}if(t[i]===n)return i+1;i++}return t.length}function w(t,e){let n=e+1;while(n<t.length){if(t[n]==="\\"){n+=2;continue}if(t[n]==="`")return n+1;if(t[n]==="$"&&t[n+1]==="{"){if(n=mi(t,n+2),n<t.length)n++;continue}n++}return t.length}function mi(t,e){let n=1,i=e;while(i<t.length){let l=t[i];if(l==="\\"){i+=2;continue}if(l==='"'||l==="'"){i=a(t,i);continue}if(l==="`"){i=w(t,i);continue}if(l==="/"&&t[i+1]==="/"){while(i<t.length&&t[i]!==`
3
- `)i++;continue}if(l==="/"&&t[i+1]==="*"){i+=2;while(i<t.length&&t.slice(i,i+2)!=="*/")i++;i+=2;continue}if(l==="{"){n++,i++;continue}if(l==="}"){if(n--,n===0)return i;i++;continue}i++}return t.length}var o=new Set(["return","typeof","instanceof","in","of","new","delete","void","throw","case","do","else","yield","await"]);function b(t,e){if(e)return o.has(e);return!(t===")"||t==="]"||t===h)}var h="\x00";function m(t,e){let n=e+1,i=!1;while(n<t.length){let l=t[n];if(l===`
4
- `)return-1;if(l==="\\"){n+=2;continue}if(l==="[")i=!0;else if(l==="]")i=!1;else if(l==="/"&&!i){n++;while(n<t.length&&/[a-z]/i.test(t[n]))n++;return n}n++}return-1}function s(t){let e="",n=0,i="",l="";while(n<t.length){let u=t.slice(n,n+2);if(u==="//"){while(n<t.length&&t[n]!==`
5
- `)e+=" ",n++;continue}if(u==="/*"){while(n<t.length&&t.slice(n,n+2)!=="*/")e+=t[n]===`
6
- `?`
7
- `:" ",n++;e+=" ",n+=2;continue}let r=t[n];if(r==='"'||r==="'"){let f=r;e+=" ",n++;while(n<t.length&&t[n]!==f){if(t[n]==="\\"){e+=" ",n+=2;continue}e+=t[n]===`
8
- `?`
9
- `:" ",n++}e+=" ",n++,i=h,l="";continue}if(r==="/"&&b(i,l)){let f=m(t,n);if(f!==-1){e+=`/${" ".repeat(f-n-2)}/`,n=f,i=h,l="";continue}}if(r==="`"){e+=" ",n++;while(n<t.length&&t[n]!=="`"){if(t[n]==="\\"){e+=" ",n+=2;continue}if(t[n]==="$"&&t[n+1]==="{"){let f=n+2,g=mi(t,f);if(e+=" ",e+=s(t.slice(f,g)),g<t.length)e+=" ";n=g+1;continue}e+=t[n]===`
10
- `?`
11
- `:" ",n++}e+=" ",n++,i=h,l="";continue}if(e+=r,n++,/[\w$]/.test(r))l=/[\w$]/.test(i)?l+r:r,i=r;else if(!/\s/.test(r))i=r,l=""}return e}function be(t){let e=new Uint16Array(t.length),n=0,i=!0;for(let l=0;l<t.length;l++){let u=t[l];if(u===")"||u==="]"||u==="}")if(n===0)i=!1;else n--;if(e[l]=n,u==="("||u==="["||u==="{")n++}return{depths:e,balanced:i&&n===0}}
12
- export{mi,s,be};
@@ -1,3 +0,0 @@
1
- // @bun
2
- var d=import.meta.require;
3
- export{d};