@absolutejs/absolute 0.20.0-beta.181 → 0.20.0-beta.182

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 (120) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/changelog.json +54 -0
  3. package/dist/angular/browser.js +2 -2
  4. package/dist/angular/browser.js.map +4 -4
  5. package/dist/angular/components/constants.js +4 -0
  6. package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
  7. package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
  8. package/dist/angular/index.js +344 -48
  9. package/dist/angular/index.js.map +10 -10
  10. package/dist/angular/server.js +344 -48
  11. package/dist/angular/server.js.map +10 -10
  12. package/dist/build.js +431 -78
  13. package/dist/build.js.map +15 -15
  14. package/dist/cli/{add-8gw9mk2b.js → add-jft96bp4.js} +9 -9
  15. package/dist/cli/{analyze-e57zz9x8.js → analyze-5w46d1f0.js} +3 -3
  16. package/dist/cli/{androidEmulatorController-vqc5m2rp.js → androidEmulatorController-gbf9r660.js} +6 -6
  17. package/dist/cli/{androidNativeWatcher-s03aczxv.js → androidNativeWatcher-3astrxxz.js} +6 -6
  18. package/dist/cli/{api-8ppxw487.js → api-zmvnvdsf.js} +8 -8
  19. package/dist/cli/{build-fz7qbdn3.js → build-mskrk9zb.js} +3 -3
  20. package/dist/cli/{build-ptx5a72p.js → build-p3qra1nj.js} +64 -6
  21. package/dist/cli/{buildDepVendor-qnwfct22.js → buildDepVendor-36d1aa7c.js} +2 -2
  22. package/dist/cli/{buildReactServerComponents-01s87hnk.js → buildReactServerComponents-vc9hh2rd.js} +5 -5
  23. package/dist/cli/{compile-54rb8szn.js → compile-7mjd739p.js} +10 -6
  24. package/dist/cli/config/server.js +18 -17
  25. package/dist/cli/{db-qbzjw3en.js → db-mpmj37jq.js} +2 -2
  26. package/dist/cli/{dev-6s6g5tnk.js → dev-9d6d7757.js} +14 -14
  27. package/dist/cli/{doctor-m36tmx4d.js → doctor-nng9szw6.js} +3 -3
  28. package/dist/cli/{emulatorDoctor-s1z5tkp7.js → emulatorDoctor-3eszsqs8.js} +5 -5
  29. package/dist/cli/{emulatorInstaller-pgkdswvq.js → emulatorInstaller-1r6cawm0.js} +6 -6
  30. package/dist/cli/{env-5nz1qm8e.js → env-bfa7vs35.js} +3 -3
  31. package/dist/cli/{expoDevController-018anvbm.js → expoDevController-s0msdwbm.js} +6 -6
  32. package/dist/cli/{generate-5vyz1s44.js → generate-xk3a7qnc.js} +8 -8
  33. package/dist/cli/{heapDiff-kncvdtn8.js → heapDiff-3ba8p8wf.js} +3 -3
  34. package/dist/cli/{htmx-26hs6jdm.js → htmx-an2x3gpx.js} +6 -6
  35. package/dist/cli/{index-7854xf0m.js → index-1bszxtdj.js} +1 -1
  36. package/dist/cli/{index-kx2d067c.js → index-3066eqr3.js} +8 -5
  37. package/dist/cli/{index-8khbn8qr.js → index-3a9h87v5.js} +3 -3
  38. package/dist/cli/{index-9djrap79.js → index-3pz5sjaz.js} +1 -1
  39. package/dist/cli/{index-50ag35xg.js → index-3ys9tz53.js} +2 -2
  40. package/dist/cli/{index-6f448d7m.js → index-4ynx0cq6.js} +26 -12
  41. package/dist/cli/{index-btp4fyf1.js → index-785hpa2r.js} +2 -2
  42. package/dist/cli/{index-5w8arh3m.js → index-7zwzyymv.js} +2 -2
  43. package/dist/cli/{index-kes8he5s.js → index-9sqqzeq4.js} +1 -1
  44. package/dist/cli/{index-pr1skxen.js → index-akseq9ps.js} +1 -1
  45. package/dist/cli/{index-23hvdyxf.js → index-c6j2727a.js} +1 -1
  46. package/dist/cli/{index-pkw3jktb.js → index-eh786rj4.js} +2 -2
  47. package/dist/cli/{index-aemhvvwb.js → index-eydgkr7w.js} +1 -1
  48. package/dist/cli/{index-rz56x932.js → index-fbmfpqk8.js} +1 -1
  49. package/dist/cli/{index-c8rcfe5a.js → index-fy4th3n0.js} +1 -1
  50. package/dist/cli/{index-prza6tkp.js → index-gx6pjzzk.js} +3 -3
  51. package/dist/cli/{index-125cfzvn.js → index-hker5fs4.js} +2 -2
  52. package/dist/cli/{index-cgmp9d02.js → index-hqkcxa2p.js} +1 -1
  53. package/dist/cli/{index-jkg2h10c.js → index-mmm6d3k5.js} +3 -3
  54. package/dist/cli/{index-enbw9484.js → index-wpgsermq.js} +1 -1
  55. package/dist/cli/{index-0z5fgb80.js → index-wqpg377f.js} +1 -1
  56. package/dist/cli/{index-3sfcmb49.js → index-x7h6w6td.js} +1 -1
  57. package/dist/cli/{index-a6xx0p9e.js → index-ydaxsftq.js} +1 -1
  58. package/dist/cli/{index-3ewt17wm.js → index-yhkg5by0.js} +1 -1
  59. package/dist/cli/{index-aqe25w4h.js → index-zeeep92g.js} +1 -1
  60. package/dist/cli/index.js +32 -32
  61. package/dist/cli/{info-k124sh7g.js → info-5rwsbhe2.js} +4 -4
  62. package/dist/cli/{inspect-n6pcfvfw.js → inspect-nmwb0q5k.js} +5 -5
  63. package/dist/cli/{iosNativeWatcher-wdq2fvj1.js → iosNativeWatcher-7r9gnk87.js} +7 -7
  64. package/dist/cli/{iosSimulatorController-n97dpa8p.js → iosSimulatorController-w963vv9r.js} +7 -7
  65. package/dist/cli/{islands-17tfx8jf.js → islands-w9xrehpk.js} +3 -3
  66. package/dist/cli/{logs-shg23fbt.js → logs-m793x8a7.js} +3 -3
  67. package/dist/cli/{ls-0wr74w0b.js → ls-k31npd5b.js} +3 -3
  68. package/dist/cli/{mem-16sy1707.js → mem-jm6kw6gr.js} +5 -5
  69. package/dist/cli/{migrate-k91k050s.js → migrate-95bjkqkr.js} +2 -2
  70. package/dist/cli/{mobile-hpqpy61f.js → mobile-cpp8vfn7.js} +13 -13
  71. package/dist/cli/prerender-26pzynh4.js +13 -0
  72. package/dist/cli/{prettier-dh5fh786.js → prettier-0ws9pbc1.js} +1 -1
  73. package/dist/cli/{ps-pk7ncjac.js → ps-fx8mz3e3.js} +6 -6
  74. package/dist/cli/{psTui-50wf0b72.js → psTui-0e9c7an6.js} +7 -7
  75. package/dist/cli/{remoteMacProtocol-g10s408w.js → remoteMacProtocol-y7h79gr8.js} +7 -7
  76. package/dist/cli/{remove-x987pvd3.js → remove-xhvph8bz.js} +8 -8
  77. package/dist/cli/{routes-mc3ymp8t.js → routes-hq9yje5z.js} +3 -3
  78. package/dist/cli/{start-mbn2zgs2.js → start-5mjh9hh2.js} +5 -5
  79. package/dist/cli/{typecheck-ynzw2eep.js → typecheck-yjme4fv1.js} +36 -14
  80. package/dist/cli/{workspace-7sbyyc59.js → workspace-xeb6abxj.js} +5 -5
  81. package/dist/index.js +446 -90
  82. package/dist/index.js.map +17 -17
  83. package/dist/islands/index.js +312 -23
  84. package/dist/islands/index.js.map +5 -5
  85. package/dist/mobile/index.js +2 -2
  86. package/dist/mobile/index.js.map +3 -3
  87. package/dist/react/browser.js +18 -1
  88. package/dist/react/browser.js.map +6 -4
  89. package/dist/react/components/index.js +2 -2
  90. package/dist/react/components/index.js.map +3 -3
  91. package/dist/react/index.js +361 -61
  92. package/dist/react/index.js.map +13 -12
  93. package/dist/react/server.js +42 -35
  94. package/dist/react/server.js.map +9 -9
  95. package/dist/src/angular/components/constants.d.ts +1 -0
  96. package/dist/src/angular/components/defer-slot-payload.d.ts +5 -0
  97. package/dist/src/cli/scripts/manifestKeysEditorHint.d.ts +9 -0
  98. package/dist/src/constants.d.ts +1 -0
  99. package/dist/src/core/prerender.d.ts +10 -0
  100. package/dist/src/react/browser.d.ts +1 -0
  101. package/dist/src/react/index.d.ts +1 -0
  102. package/dist/src/svelte/lowerAwaitSlotSyntax.d.ts +23 -0
  103. package/dist/src/utils/pageCspNonce.d.ts +14 -0
  104. package/dist/svelte/index.js +363 -68
  105. package/dist/svelte/index.js.map +10 -10
  106. package/dist/svelte/server.js +354 -59
  107. package/dist/svelte/server.js.map +10 -10
  108. package/dist/types/manifest.d.ts +3 -2
  109. package/dist/types/svelte.d.ts +3 -0
  110. package/dist/vue/components/Image.js +2 -2
  111. package/dist/vue/components/Image.js.map +3 -3
  112. package/dist/vue/components/index.js +2 -2
  113. package/dist/vue/components/index.js.map +3 -3
  114. package/dist/vue/index.js +355 -60
  115. package/dist/vue/index.js.map +10 -10
  116. package/dist/vue/server.js +45 -39
  117. package/dist/vue/server.js.map +8 -8
  118. package/package.json +1 -1
  119. package/dist/cli/prerender-w65xp6h8.js +0 -11
  120. /package/dist/cli/{index-t8jmj8w1.js → index-fm9x6sjs.js} +0 -0
@@ -72,6 +72,26 @@ var __esm = (fn, res, err) => () => {
72
72
  };
73
73
  var __require = import.meta.require;
74
74
 
75
+ // src/constants.ts
76
+ var ANGULAR_INIT_TIMEOUT_MS = 500, ANSI_ESCAPE_CODE = 27, ANSI_ESCAPE_LENGTH = 3, ASCII_SPACE = 32, BASE_36_RADIX = 36, BUN_BUILD_WARNING_SUPPRESSION = "wildcard sideEffects are not supported yet", TAILWIND_BUN_CSS_WARNING_PATTERN, BODY_SLICE_LENGTH = 2000, BYTES_PER_KILOBYTE = 1024, CLI_ARGS_OFFSET = 3, CSS_ERROR_RESOLVE_DELAY_MS = 50, CSS_MAX_CHECK_ATTEMPTS = 10, CSS_MAX_PARSE_TIMEOUT_MS = 500, CSS_RELOAD_BACKOFF_BASE_MS = 1000, CSS_RELOAD_BACKOFF_MAX_MS = 60000, CSS_SHEET_READY_TIMEOUT_MS = 100, DEFAULT_CHUNK_SIZE = 16384, DEFAULT_DEBOUNCE_MS = 15, DEFAULT_PORT = 3000, DEV_SERVER_RESTART_DEBOUNCE_MS = 100, DOM_UPDATE_DELAY_MS = 50, FILE_PROTOCOL_PREFIX_LENGTH = 7, FOCUS_ID_PREFIX_LENGTH = 3, FOCUS_IDX_PREFIX_LENGTH = 4, FOCUS_NAME_PREFIX_LENGTH = 5, ESLINT_STUDIO_DEFAULT_HOST = "eslint.absolute.localhost", ESLINT_STUDIO_DEFAULT_PORT = 4099, CONFIG_DEFAULT_HOST = "config.absolute.localhost", CONFIG_DEFAULT_PORT = 4099, HMR_UPDATE_TIMEOUT_MS = 2000, HOOK_SIGNATURE_LENGTH = 12, EXCLUDE_LAST_OFFSET = -1, HTML_CONTENT_TYPE = "text/html; charset=utf-8", HTTP_STATUS_OK = 200, HTTP_STATUS_BAD_REQUEST = 400, HTTP_STATUS_NOT_FOUND = 404, HTTP_STATUS_GONE = 410, HTTP_STATUS_INTERNAL_SERVER_ERROR = 500, HOURS_IN_DAY = 24, HOURS_IN_HALF_DAY = 12, IMAGE_DEFAULT_DEVICE_SIZES, IMAGE_DEFAULT_IMAGE_SIZES, IMAGE_DEFAULT_QUALITY = 75, IMAGE_GLOB_SUFFIX_LENGTH = 2, INSTANCE_PROBE_TIMEOUT_MS = 250, MAX_ERROR_LENGTH = 200, MAX_RECONNECT_ATTEMPTS = 60, MILLISECONDS_IN_A_SECOND = 1000, MINUTES_IN_AN_HOUR = 60, SECONDS_IN_A_MINUTE = 60, MILLISECONDS_IN_A_MINUTE, MILLISECONDS_IN_A_DAY, OVERLAY_FADE_DURATION_MS = 150, PING_INTERVAL_MS = 30000, LIST_LOG_TAIL_MAX_BYTES = 65536, LIST_TUI_COLUMN_GAP = 2, LIST_TUI_DEFAULT_HEIGHT = 28, LIST_TUI_DEFAULT_WIDTH = 100, LIST_TUI_ESCAPE_SEQUENCE_TIMEOUT_MS = 30, LIST_TUI_FOOTER_LINE_COUNT = 2, LIST_TUI_MARKER_WIDTH = 2, LIST_TUI_MIN_LOG_HEIGHT = 3, LIST_TUI_MIN_URL_WIDTH = 16, LIST_TUI_RENDER_DEBOUNCE_MS = 16, LIST_TUI_STATUS_MESSAGE_TIMEOUT_MS = 4000, LIST_WATCH_REFRESH_MS = 1000, RAF_BATCH_COUNT = 3, RANDOM_ID_END_INDEX = 11, REBUILD_BATCH_DELAY_MS = 10, REBUILD_RELOAD_DELAY_MS = 200, RECONNECT_INITIAL_DELAY_MS = 500, RECONNECT_POLL_INTERVAL_MS = 300, REACT_STREAM_SLOT_FAST_DELAY_MS = 5, REACT_STREAM_SLOT_SLOW_DELAY_MS = 20, SIGINT_EXIT_CODE = 130, SIGTERM_EXIT_CODE = 143, SVELTE_CSS_LOAD_TIMEOUT_MS = 500, TIME_PRECISION = 2, TWO_THIRDS, UNFOUND_INDEX = -1, WEBSOCKET_NORMAL_CLOSURE = 1000, DEFAULT_WEBSOCKET_IDLE_TIMEOUT_SECONDS = 240, DEFAULT_HTTP_IDLE_TIMEOUT_SECONDS = 240, MAX_HTTP_IDLE_TIMEOUT_SECONDS = 255, WORKSPACE_COMMAND_ARGS_OFFSET = 3, WORKSPACE_FAILURE_LOG_PRINT_LIMIT = 30, WORKSPACE_FAILURE_RECENT_LOG_LIMIT = 60, WORKSPACE_READY_ATTEMPT_TIMEOUT_MS = 5000, WORKSPACE_READY_PROBE_INTERVAL_MS = 250, WORKSPACE_READY_TIMEOUT_MS = 30000, WORKSPACE_SHUTDOWN_TIMEOUT_MS = 1e4, WORKSPACE_TUI_DEFAULT_HEIGHT = 28, WORKSPACE_TUI_DEFAULT_WIDTH = 100, WORKSPACE_TUI_ESCAPE_SEQUENCE_TIMEOUT_MS = 30, WORKSPACE_TUI_FOOTER_LINE_COUNT = 3, WORKSPACE_TUI_MIN_LOG_HEIGHT = 3, WORKSPACE_TUI_MIN_SERVICE_NAME_WIDTH = 7, WORKSPACE_TUI_MIN_TARGET_WIDTH = 8, WORKSPACE_TUI_MIN_WRAP_WIDTH = 12, WORKSPACE_TUI_PROMPT_CURSOR_OFFSET = 3, WORKSPACE_TUI_RECENT_LOG_LIMIT = 40, WORKSPACE_TUI_RENDER_DEBOUNCE_MS = 16, WORKSPACE_TUI_STATUS_WIDTH = 10, WORKSPACE_TUI_TARGET_PADDING_WIDTH = 6, WORKSPACE_TUI_VISIBILITY_WIDTH = 8;
77
+ var init_constants = __esm(() => {
78
+ TAILWIND_BUN_CSS_WARNING_PATTERN = /invalid @ rule encountered: '@(theme|tailwind|source|utility|variant|custom-variant|apply|reference|plugin|config)'/;
79
+ IMAGE_DEFAULT_DEVICE_SIZES = [
80
+ 640,
81
+ 750,
82
+ 828,
83
+ 1080,
84
+ 1200,
85
+ 1920,
86
+ 2048,
87
+ 3840
88
+ ];
89
+ IMAGE_DEFAULT_IMAGE_SIZES = [16, 32, 48, 64, 96, 128, 256, 384];
90
+ MILLISECONDS_IN_A_MINUTE = MILLISECONDS_IN_A_SECOND * SECONDS_IN_A_MINUTE;
91
+ MILLISECONDS_IN_A_DAY = MILLISECONDS_IN_A_SECOND * SECONDS_IN_A_MINUTE * MINUTES_IN_AN_HOUR * HOURS_IN_DAY;
92
+ TWO_THIRDS = 2 / 3;
93
+ });
94
+
75
95
  // src/utils/cspNonceRef.ts
76
96
  var GETTER_KEY, nonceAttr = (nonce = readCspNonce()) => nonce ? ` nonce="${nonce}"` : "", nonceSvelteHeadStyles = (head, nonce = readCspNonce()) => nonce ? head.replace(/<style(?=\s+id="svelte-[^"]*")(?![^>]*\snonce=)/g, `<style nonce="${nonce}"`) : head, readCspNonce = () => {
77
97
  const getter = Reflect.get(globalThis, GETTER_KEY);
@@ -141,26 +161,6 @@ var resolveExportPath = (entry, conditions) => {
141
161
  };
142
162
  var init_resolvePackageImport = () => {};
143
163
 
144
- // src/constants.ts
145
- var ANGULAR_INIT_TIMEOUT_MS = 500, ANSI_ESCAPE_CODE = 27, ANSI_ESCAPE_LENGTH = 3, ASCII_SPACE = 32, BASE_36_RADIX = 36, BUN_BUILD_WARNING_SUPPRESSION = "wildcard sideEffects are not supported yet", TAILWIND_BUN_CSS_WARNING_PATTERN, BODY_SLICE_LENGTH = 2000, BYTES_PER_KILOBYTE = 1024, CLI_ARGS_OFFSET = 3, CSS_ERROR_RESOLVE_DELAY_MS = 50, CSS_MAX_CHECK_ATTEMPTS = 10, CSS_MAX_PARSE_TIMEOUT_MS = 500, CSS_RELOAD_BACKOFF_BASE_MS = 1000, CSS_RELOAD_BACKOFF_MAX_MS = 60000, CSS_SHEET_READY_TIMEOUT_MS = 100, DEFAULT_CHUNK_SIZE = 16384, DEFAULT_DEBOUNCE_MS = 15, DEFAULT_PORT = 3000, DEV_SERVER_RESTART_DEBOUNCE_MS = 100, DOM_UPDATE_DELAY_MS = 50, FILE_PROTOCOL_PREFIX_LENGTH = 7, FOCUS_ID_PREFIX_LENGTH = 3, FOCUS_IDX_PREFIX_LENGTH = 4, FOCUS_NAME_PREFIX_LENGTH = 5, ESLINT_STUDIO_DEFAULT_HOST = "eslint.absolute.localhost", ESLINT_STUDIO_DEFAULT_PORT = 4099, CONFIG_DEFAULT_HOST = "config.absolute.localhost", CONFIG_DEFAULT_PORT = 4099, HMR_UPDATE_TIMEOUT_MS = 2000, HOOK_SIGNATURE_LENGTH = 12, EXCLUDE_LAST_OFFSET = -1, HTTP_STATUS_OK = 200, HTTP_STATUS_BAD_REQUEST = 400, HTTP_STATUS_NOT_FOUND = 404, HTTP_STATUS_GONE = 410, HTTP_STATUS_INTERNAL_SERVER_ERROR = 500, HOURS_IN_DAY = 24, HOURS_IN_HALF_DAY = 12, IMAGE_DEFAULT_DEVICE_SIZES, IMAGE_DEFAULT_IMAGE_SIZES, IMAGE_DEFAULT_QUALITY = 75, IMAGE_GLOB_SUFFIX_LENGTH = 2, INSTANCE_PROBE_TIMEOUT_MS = 250, MAX_ERROR_LENGTH = 200, MAX_RECONNECT_ATTEMPTS = 60, MILLISECONDS_IN_A_SECOND = 1000, MINUTES_IN_AN_HOUR = 60, SECONDS_IN_A_MINUTE = 60, MILLISECONDS_IN_A_MINUTE, MILLISECONDS_IN_A_DAY, OVERLAY_FADE_DURATION_MS = 150, PING_INTERVAL_MS = 30000, LIST_LOG_TAIL_MAX_BYTES = 65536, LIST_TUI_COLUMN_GAP = 2, LIST_TUI_DEFAULT_HEIGHT = 28, LIST_TUI_DEFAULT_WIDTH = 100, LIST_TUI_ESCAPE_SEQUENCE_TIMEOUT_MS = 30, LIST_TUI_FOOTER_LINE_COUNT = 2, LIST_TUI_MARKER_WIDTH = 2, LIST_TUI_MIN_LOG_HEIGHT = 3, LIST_TUI_MIN_URL_WIDTH = 16, LIST_TUI_RENDER_DEBOUNCE_MS = 16, LIST_TUI_STATUS_MESSAGE_TIMEOUT_MS = 4000, LIST_WATCH_REFRESH_MS = 1000, RAF_BATCH_COUNT = 3, RANDOM_ID_END_INDEX = 11, REBUILD_BATCH_DELAY_MS = 10, REBUILD_RELOAD_DELAY_MS = 200, RECONNECT_INITIAL_DELAY_MS = 500, RECONNECT_POLL_INTERVAL_MS = 300, REACT_STREAM_SLOT_FAST_DELAY_MS = 5, REACT_STREAM_SLOT_SLOW_DELAY_MS = 20, SIGINT_EXIT_CODE = 130, SIGTERM_EXIT_CODE = 143, SVELTE_CSS_LOAD_TIMEOUT_MS = 500, TIME_PRECISION = 2, TWO_THIRDS, UNFOUND_INDEX = -1, WEBSOCKET_NORMAL_CLOSURE = 1000, DEFAULT_WEBSOCKET_IDLE_TIMEOUT_SECONDS = 240, DEFAULT_HTTP_IDLE_TIMEOUT_SECONDS = 240, MAX_HTTP_IDLE_TIMEOUT_SECONDS = 255, WORKSPACE_COMMAND_ARGS_OFFSET = 3, WORKSPACE_FAILURE_LOG_PRINT_LIMIT = 30, WORKSPACE_FAILURE_RECENT_LOG_LIMIT = 60, WORKSPACE_READY_ATTEMPT_TIMEOUT_MS = 5000, WORKSPACE_READY_PROBE_INTERVAL_MS = 250, WORKSPACE_READY_TIMEOUT_MS = 30000, WORKSPACE_SHUTDOWN_TIMEOUT_MS = 1e4, WORKSPACE_TUI_DEFAULT_HEIGHT = 28, WORKSPACE_TUI_DEFAULT_WIDTH = 100, WORKSPACE_TUI_ESCAPE_SEQUENCE_TIMEOUT_MS = 30, WORKSPACE_TUI_FOOTER_LINE_COUNT = 3, WORKSPACE_TUI_MIN_LOG_HEIGHT = 3, WORKSPACE_TUI_MIN_SERVICE_NAME_WIDTH = 7, WORKSPACE_TUI_MIN_TARGET_WIDTH = 8, WORKSPACE_TUI_MIN_WRAP_WIDTH = 12, WORKSPACE_TUI_PROMPT_CURSOR_OFFSET = 3, WORKSPACE_TUI_RECENT_LOG_LIMIT = 40, WORKSPACE_TUI_RENDER_DEBOUNCE_MS = 16, WORKSPACE_TUI_STATUS_WIDTH = 10, WORKSPACE_TUI_TARGET_PADDING_WIDTH = 6, WORKSPACE_TUI_VISIBILITY_WIDTH = 8;
146
- var init_constants = __esm(() => {
147
- TAILWIND_BUN_CSS_WARNING_PATTERN = /invalid @ rule encountered: '@(theme|tailwind|source|utility|variant|custom-variant|apply|reference|plugin|config)'/;
148
- IMAGE_DEFAULT_DEVICE_SIZES = [
149
- 640,
150
- 750,
151
- 828,
152
- 1080,
153
- 1200,
154
- 1920,
155
- 2048,
156
- 3840
157
- ];
158
- IMAGE_DEFAULT_IMAGE_SIZES = [16, 32, 48, 64, 96, 128, 256, 384];
159
- MILLISECONDS_IN_A_MINUTE = MILLISECONDS_IN_A_SECOND * SECONDS_IN_A_MINUTE;
160
- MILLISECONDS_IN_A_DAY = MILLISECONDS_IN_A_SECOND * SECONDS_IN_A_MINUTE * MINUTES_IN_AN_HOUR * HOURS_IN_DAY;
161
- TWO_THIRDS = 2 / 3;
162
- });
163
-
164
164
  // src/svelte/lowerIslandSyntax.ts
165
165
  var ISLAND_TAG_RE, extractBracedExpression = (text, braceStart) => {
166
166
  let depth = 0;
@@ -270,23 +270,247 @@ var AWAIT_STREAM_DIRECTIVE = "<!-- absolute:stream -->", DIRECTIVE_RE, BRANCH_TA
270
270
  index = markup.indexOf("{", end);
271
271
  }
272
272
  return tags;
273
- }, escapeTemplateLiteral = (value) => value.replaceAll("\\", "\\\\").replaceAll("`", "\\`").replaceAll("${", "\\${"), markupToTemplateLiteral = (markup) => {
274
- const parts = topLevelTags(markup.trim());
275
- const trimmed = markup.trim();
276
- let cursor = 0;
277
- let literal = "";
278
- for (const { end, start, text } of parts) {
279
- literal += escapeTemplateLiteral(trimmed.slice(cursor, start));
280
- literal += `\${${text.slice(1, -1).trim()}}`;
281
- cursor = end;
273
+ }, escapeTemplateLiteral = (value) => value.replaceAll("\\", "\\\\").replaceAll("`", "\\`").replaceAll("${", "\\${"), HTML_HELPERS = "__absoluteAwaitHtml", AWAIT_SCOPE_CLASS_PLACEHOLDER = "__absoluteAwaitScopeClass__", AWAIT_HTML_HELPERS_SOURCE, applyAwaitScopeClass = (code, scopeClass) => code.replaceAll(AWAIT_SCOPE_CLASS_PLACEHOLDER, scopeClass), createAwaitScopeClassCapture = () => {
274
+ let scopeClass = "";
275
+ const cssHash = ({ css, filename, hash }) => {
276
+ scopeClass = `svelte-${hash(filename === "(unknown)" ? css : filename ?? css)}`;
277
+ return scopeClass;
278
+ };
279
+ const apply = (code) => applyAwaitScopeClass(code, scopeClass);
280
+ return { apply, cssHash };
281
+ }, BOOLEAN_ATTRIBUTES, DIRECTIVE_ATTRIBUTE_RE, ATTRIBUTE_NAME_END_RE, RAW_TEXT_ELEMENTS, helperCall = (name, ...args) => `\${${HTML_HELPERS}.${name}(${args.join(", ")})}`, SHADOW_VALUE, END_TAG_RE, isShadowAttribute = (name) => !DIRECTIVE_ATTRIBUTE_RE.test(name) && !/^on/i.test(name), pushText = (scan, text) => {
282
+ scan.literal += escapeTemplateLiteral(text);
283
+ }, readExpressionTag = (scan) => {
284
+ const end = findTagEnd(scan.source, scan.index);
285
+ if (end === -1) {
286
+ fail(scan.filePath, `unterminated tag in the ${scan.branch} branch`);
287
+ }
288
+ const inner = scan.source.slice(scan.index + 1, end - 1).trim();
289
+ scan.index = end;
290
+ return inner;
291
+ }, failAttribute = (scan, detail) => fail(scan.filePath, `the ${scan.branch} branch of a streamed {#await} has ${detail}`), atValueEnd = (scan, quote) => {
292
+ const char = scan.source[scan.index] ?? "";
293
+ if (quote)
294
+ return char === quote;
295
+ return /[\s>]/.test(char) || scan.source.startsWith("/>", scan.index);
296
+ }, readValueText = (scan, quote) => {
297
+ const start = scan.index;
298
+ while (scan.index < scan.source.length && scan.source[scan.index] !== "{" && !atValueEnd(scan, quote)) {
299
+ scan.index += 1;
300
+ }
301
+ return scan.source.slice(start, scan.index);
302
+ }, readAttributeValue = (scan) => {
303
+ const { source } = scan;
304
+ const quote = source[scan.index];
305
+ const chunks = [];
306
+ const isQuoted = quote === '"' || quote === "'";
307
+ if (isQuoted)
308
+ scan.index += 1;
309
+ if (!isQuoted && source[scan.index] === "{") {
310
+ chunks.push({ code: readExpressionTag(scan) });
311
+ return chunks;
312
+ }
313
+ const valueQuote = isQuoted ? quote : undefined;
314
+ while (scan.index < source.length && !atValueEnd(scan, valueQuote)) {
315
+ chunks.push({ text: readValueText(scan, valueQuote) });
316
+ if (source[scan.index] === "{")
317
+ chunks.push({ code: readExpressionTag(scan) });
318
+ }
319
+ if (isQuoted)
320
+ scan.index += 1;
321
+ return chunks.filter((chunk) => !("text" in chunk) || chunk.text !== "");
322
+ }, pushDynamicAttribute = (scan, name, chunks) => {
323
+ if (DIRECTIVE_ATTRIBUTE_RE.test(name) || /^on/i.test(name)) {
324
+ failAttribute(scan, `an expression in ${name}= (directives and event handlers need Svelte to run them)`);
325
+ }
326
+ const tag = chunks.find((chunk) => ("code" in chunk) && /^[#:/@]/.test(chunk.code));
327
+ if (tag && "code" in tag) {
328
+ failAttribute(scan, `{${tag.code}} in the ${name}= attribute`);
329
+ }
330
+ if (isShadowAttribute(name))
331
+ scan.shadow += ` ${name}=${SHADOW_VALUE}`;
332
+ const isClass = name === "class";
333
+ if (isClass)
334
+ scan.hasClass = true;
335
+ const [only] = chunks;
336
+ const codes = chunks.flatMap((chunk) => ("code" in chunk) ? [`(${chunk.code})`] : []);
337
+ if (isClass && chunks.length > 1 && codes.length === chunks.length) {
338
+ scan.literal += helperCall("class", `${HTML_HELPERS}.join(${codes.join(", ")})`);
339
+ return;
340
+ }
341
+ if (chunks.length === 1 && only && "code" in only) {
342
+ const value = `(${only.code})`;
343
+ if (name === "class")
344
+ scan.literal += helperCall("class", value);
345
+ else if (name === "style")
346
+ scan.literal += helperCall("style", value);
347
+ else
348
+ scan.literal += helperCall("attr", JSON.stringify(name), value, String(BOOLEAN_ATTRIBUTES.has(name)));
349
+ return;
350
+ }
351
+ pushText(scan, ` ${name}="`);
352
+ for (const chunk of chunks) {
353
+ if ("code" in chunk)
354
+ scan.literal += helperCall("part", `(${chunk.code})`);
355
+ else
356
+ pushText(scan, chunk.text.replaceAll('"', "&quot;"));
357
+ }
358
+ if (isClass)
359
+ scan.literal += helperCall("scoped");
360
+ pushText(scan, '"');
361
+ }, pushStaticAttribute = (scan, whitespace, name, value) => {
362
+ if (isShadowAttribute(name))
363
+ scan.shadow += `${whitespace}${name}=${value}`;
364
+ if (name !== "class") {
365
+ pushText(scan, `${whitespace}${name}=${value}`);
366
+ return;
367
+ }
368
+ scan.hasClass = true;
369
+ const [first = ""] = value;
370
+ const isQuoted = first === '"' || first === "'";
371
+ const quote = isQuoted ? first : '"';
372
+ const classes = isQuoted ? value.slice(1, -1) : value;
373
+ if (classes === "") {
374
+ scan.literal += helperCall("class", "''");
375
+ return;
376
+ }
377
+ pushText(scan, `${whitespace}${name}=${quote}${classes}`);
378
+ scan.literal += helperCall("scoped");
379
+ pushText(scan, quote);
380
+ }, readAttributeName = (scan) => {
381
+ const { source } = scan;
382
+ const start = scan.index;
383
+ while (scan.index < source.length && !ATTRIBUTE_NAME_END_RE.test(source[scan.index] ?? "")) {
384
+ scan.index += 1;
385
+ }
386
+ return source.slice(start, scan.index);
387
+ }, skipWhitespace = (scan) => {
388
+ const start = scan.index;
389
+ while (/\s/.test(scan.source[scan.index] ?? ""))
390
+ scan.index += 1;
391
+ return scan.source.slice(start, scan.index);
392
+ }, pushTagExpression = (scan) => {
393
+ const inner = readExpressionTag(scan);
394
+ if (!/^[A-Za-z_$][\w$]*$/.test(inner)) {
395
+ failAttribute(scan, `{${inner}} in a start tag`);
396
+ }
397
+ pushDynamicAttribute(scan, inner, [{ code: inner }]);
398
+ }, pushAttribute = (scan) => {
399
+ const { source } = scan;
400
+ const whitespace = skipWhitespace(scan);
401
+ const closing = source.startsWith("/>", scan.index) ? "/>" : ">";
402
+ const isEnd = scan.index >= source.length;
403
+ if (isEnd || source.startsWith(closing, scan.index)) {
404
+ if (!scan.hasClass)
405
+ scan.literal += helperCall("scope");
406
+ const tagEnd = isEnd ? "" : closing;
407
+ pushText(scan, whitespace + tagEnd);
408
+ scan.shadow += whitespace + (isEnd ? ">" : closing);
409
+ scan.index += tagEnd.length;
410
+ return false;
411
+ }
412
+ if (source[scan.index] === "{") {
413
+ pushTagExpression(scan);
414
+ return true;
415
+ }
416
+ const name = readAttributeName(scan);
417
+ if (!name) {
418
+ pushText(scan, whitespace + (source[scan.index] ?? ""));
419
+ scan.index += 1;
420
+ return true;
421
+ }
422
+ const beforeEquals = scan.index;
423
+ skipWhitespace(scan);
424
+ if (source[scan.index] !== "=") {
425
+ scan.index = beforeEquals;
426
+ pushText(scan, whitespace + name);
427
+ if (isShadowAttribute(name))
428
+ scan.shadow += whitespace + name;
429
+ return true;
430
+ }
431
+ scan.index += 1;
432
+ skipWhitespace(scan);
433
+ const valueStart = scan.index;
434
+ const chunks = readAttributeValue(scan);
435
+ if (chunks.some((chunk) => ("code" in chunk))) {
436
+ pushDynamicAttribute(scan, name, chunks);
437
+ return true;
282
438
  }
283
- literal += escapeTemplateLiteral(trimmed.slice(cursor));
284
- return `\`${literal}\``;
439
+ pushStaticAttribute(scan, whitespace, name, source.slice(valueStart, scan.index));
440
+ return true;
441
+ }, pushStartTag = (scan) => {
442
+ const { source } = scan;
443
+ const nameMatch = source.slice(scan.index + 1).match(/^[^\s/>{]+/);
444
+ const tagName = nameMatch?.[0] ?? "";
445
+ pushText(scan, `<${tagName}`);
446
+ scan.shadow += `<${tagName}`;
447
+ scan.hasClass = RAW_TEXT_ELEMENTS.has(tagName.toLowerCase());
448
+ scan.index += 1 + tagName.length;
449
+ while (pushAttribute(scan))
450
+ ;
451
+ return tagName.toLowerCase();
452
+ }, pushRawText = (scan, tagName, shadowStart) => {
453
+ const { source } = scan;
454
+ const close = source.toLowerCase().indexOf(`</${tagName}`, scan.index);
455
+ const closeEnd = close === -1 ? -1 : source.indexOf(">", close);
456
+ const end = closeEnd === -1 ? source.length : closeEnd + 1;
457
+ pushText(scan, source.slice(scan.index, end));
458
+ scan.shadow = scan.shadow.slice(0, shadowStart);
459
+ scan.index = end;
460
+ }, pushTextExpression = (scan) => {
461
+ const inner = readExpressionTag(scan);
462
+ const rawHtml = inner.match(/^@html\s([\s\S]*)$/);
463
+ if (rawHtml) {
464
+ scan.literal += helperCall("html", `(${(rawHtml[1] ?? "").trim()})`);
465
+ return;
466
+ }
467
+ scan.literal += helperCall("text", `(${inner})`);
468
+ }, pushComment = (scan) => {
469
+ const close = scan.source.indexOf("-->", scan.index + "<!--".length);
470
+ const end = close === -1 ? scan.source.length : close + "-->".length;
471
+ pushText(scan, scan.source.slice(scan.index, end));
472
+ scan.index = end;
473
+ }, scanTextPosition = (scan) => {
474
+ const { index, source } = scan;
475
+ if (source.startsWith("<!--", index)) {
476
+ pushComment(scan);
477
+ return;
478
+ }
479
+ if (source[index] === "<" && /[A-Za-z]/.test(source[index + 1] ?? "")) {
480
+ const shadowStart = scan.shadow.length;
481
+ const tagName = pushStartTag(scan);
482
+ if (RAW_TEXT_ELEMENTS.has(tagName))
483
+ pushRawText(scan, tagName, shadowStart);
484
+ return;
485
+ }
486
+ if (source[index] === "{") {
487
+ pushTextExpression(scan);
488
+ return;
489
+ }
490
+ const next = source.slice(index + 1).search(/[<{]/);
491
+ const end = next === -1 ? source.length : index + 1 + next;
492
+ const text = source.slice(index, end);
493
+ pushText(scan, text);
494
+ scan.shadow += (text.match(END_TAG_RE) ?? []).join("");
495
+ scan.index = end;
496
+ }, lowerBranch = (markup, branch, filePath) => {
497
+ const scan = {
498
+ branch,
499
+ filePath,
500
+ hasClass: false,
501
+ index: 0,
502
+ literal: "",
503
+ shadow: "",
504
+ source: markup.trim()
505
+ };
506
+ while (scan.index < scan.source.length)
507
+ scanTextPosition(scan);
508
+ return { literal: `\`${scan.literal}\``, shadow: scan.shadow };
285
509
  }, fail = (filePath, message) => {
286
510
  throw new Error(`${filePath ? `${filePath}: ` : ""}${message} (${AWAIT_STREAM_DIRECTIVE} streams plain HTML; remove the directive to let Svelte render the block and hydrate it)`);
287
511
  }, assertPlainHtml = (markup, branch, filePath) => {
288
512
  const withoutExpressions = topLevelTags(markup).reduceRight((text, { end, start }) => text.slice(0, start) + text.slice(end), markup);
289
- const nestedTag = topLevelTags(markup).find(({ text }) => /^\{[#:/@]/.test(text));
513
+ const nestedTag = topLevelTags(markup).find(({ text }) => /^\{(?:[#:/]|@(?!html\s))/.test(text));
290
514
  if (nestedTag || SVELTE_ONLY_MARKUP_RE.test(withoutExpressions)) {
291
515
  fail(filePath, `the ${branch} branch of a streamed {#await} holds Svelte markup (${nestedTag?.text ?? withoutExpressions.match(SVELTE_ONLY_MARKUP_RE)?.[0]}\u2026)`);
292
516
  }
@@ -330,12 +554,16 @@ var AWAIT_STREAM_DIRECTIVE = "<!-- absolute:stream -->", DIRECTIVE_RE, BRANCH_TA
330
554
  thenIdentifier: thenMatch?.[2],
331
555
  thenMarkup
332
556
  };
333
- }, renderSlot = (block, slotId, dynamic) => {
557
+ }, renderSlot = (block, slotId, dynamic, filePath) => {
334
558
  const thenValueIdentifier = block.thenIdentifier ?? "__awaitValue";
335
559
  const catchValueIdentifier = block.catchIdentifier ?? "__awaitError";
336
- const catchBranch = block.catchMarkup === undefined ? "catch (_absoluteAwaitError) { throw _absoluteAwaitError; }" : `catch (${catchValueIdentifier}) { return ${markupToTemplateLiteral(block.catchMarkup)}; }`;
337
- return `<AbsoluteAwaitSlot id="${slotId}"${dynamic ? " dynamic" : ""} fallbackHtml={${markupToTemplateLiteral(block.pendingMarkup)}} resolve={async () => { try { const ${thenValueIdentifier} = await (${block.expression}); return ${markupToTemplateLiteral(block.thenMarkup)}; } ${catchBranch} }} />`;
338
- }, IMPORT_LINE = 'import AbsoluteAwaitSlot from "@absolutejs/absolute/svelte/components/AwaitSlot.svelte";', lowerSvelteAwaitSlotSyntax = (source, filePath) => {
560
+ const pending = lowerBranch(block.pendingMarkup, "pending", filePath);
561
+ const then = lowerBranch(block.thenMarkup, "then", filePath);
562
+ const caught = block.catchMarkup === undefined ? undefined : lowerBranch(block.catchMarkup, "catch", filePath);
563
+ const catchBranch = caught ? `catch (${catchValueIdentifier}) { return ${caught.literal}; }` : "catch (_absoluteAwaitError) { throw _absoluteAwaitError; }";
564
+ const shadows = [pending, then, caught].map((branch) => branch ? `<svelte:element this={'div'} data-absolute-slot="true">${branch.shadow}</svelte:element>` : "").join("");
565
+ return `<AbsoluteAwaitSlot id="${slotId}"${dynamic ? " dynamic" : ""} fallbackHtml={${pending.literal}} resolve={async () => { try { const ${thenValueIdentifier} = await (${block.expression}); return ${then.literal}; } ${catchBranch} }} />{#if ${HTML_HELPERS}.shadow}${shadows}{/if}`;
566
+ }, IMPORT_LINE = 'import AbsoluteAwaitSlot from "@absolutejs/absolute/svelte/components/AwaitSlot.svelte";', INJECTED_SCRIPT, lowerSvelteAwaitSlotSyntax = (source, filePath) => {
339
567
  if (!source.includes("absolute:stream")) {
340
568
  return { code: source, transformed: false };
341
569
  }
@@ -350,7 +578,7 @@ var AWAIT_STREAM_DIRECTIVE = "<!-- absolute:stream -->", DIRECTIVE_RE, BRANCH_TA
350
578
  const slotId = `absolute-svelte-await-${awaitIndex.toString(BASE_36_RADIX)}`;
351
579
  awaitIndex += 1;
352
580
  lowered += source.slice(cursor, directive.index);
353
- lowered += renderSlot(block, slotId, directive[1] !== undefined);
581
+ lowered += renderSlot(block, slotId, directive[1] !== undefined, filePath);
354
582
  cursor = block.end;
355
583
  }
356
584
  if (awaitIndex === 0) {
@@ -360,14 +588,14 @@ var AWAIT_STREAM_DIRECTIVE = "<!-- absolute:stream -->", DIRECTIVE_RE, BRANCH_TA
360
588
  if (lowered.includes("<script")) {
361
589
  return {
362
590
  code: lowered.replace(/<script(\s[^>]*)?>/, (match) => `${match}
363
- ${IMPORT_LINE}
591
+ ${INJECTED_SCRIPT}
364
592
  `),
365
593
  transformed: true
366
594
  };
367
595
  }
368
596
  return {
369
597
  code: `<script lang="ts">
370
- ${IMPORT_LINE}
598
+ ${INJECTED_SCRIPT}
371
599
  </script>
372
600
  ${lowered}`,
373
601
  transformed: true
@@ -379,6 +607,64 @@ var init_lowerAwaitSlotSyntax = __esm(() => {
379
607
  BRANCH_TAG_RE = /^\{:(then|catch)(?:\s+([A-Za-z_$][\w$]*))?\s*\}$/;
380
608
  SVELTE_ONLY_MARKUP_RE = /\{[#:/@]|<[A-Z]|<svelte:/;
381
609
  QUOTES = new Set(['"', "'", "`"]);
610
+ AWAIT_HTML_HELPERS_SOURCE = [
611
+ `const ${HTML_HELPERS} = (() => {`,
612
+ ` const scope = ${JSON.stringify(AWAIT_SCOPE_CLASS_PLACEHOLDER)};`,
613
+ ` const escape = (value, isAttr) => String(value ?? '').replace(isAttr ? /[&"<]/g : /[&<]/g, (char) => char === '&' ? '&amp;' : char === '"' ? '&quot;' : '&lt;');`,
614
+ "\tconst stringify = (value) => typeof value === 'string' ? value : value == null ? '' : value + '';",
615
+ "\tconst classNames = (value) => { if (Array.isArray(value)) return value.filter(Boolean).map(classNames).filter(Boolean).join(' '); if (value && typeof value === 'object') return Object.keys(value).filter((key) => value[key]).join(' '); return typeof value === 'string' || typeof value === 'number' ? String(value) : ''; };",
616
+ "\treturn {",
617
+ ` attr: (name, value, isBoolean) => { const boolean = isBoolean || (name === 'hidden' && value !== 'until-found'); if (value == null || (!value && boolean)) return ''; const normalized = name === 'translate' && typeof value === 'boolean' ? (value ? 'yes' : 'no') : value; return boolean ? ' ' + name + '=""' : ' ' + name + '="' + escape(normalized, true) + '"'; },`,
618
+ ` class: (value) => { const resolved = typeof value === 'object' ? classNames(value) : value ?? ''; let name = '' + resolved; if (scope) name = name ? name + ' ' + scope : scope; return name ? ' class="' + escape(name, true) + '"' : ''; },`,
619
+ "\t\thtml: (value) => String(value ?? ''),",
620
+ "\t\tjoin: (...values) => values.map(stringify).join(''),",
621
+ "\t\tpart: (value) => escape(stringify(value), true),",
622
+ ` scope: () => scope ? ' class="' + scope + '"' : '',`,
623
+ "\t\tscoped: () => scope ? ' ' + scope : '',",
624
+ "\t\tshadow: false,",
625
+ ` style: (value) => { const style = value == null ? '' : String(value); return style ? ' style="' + escape(style, true) + '"' : ''; },`,
626
+ "\t\ttext: (value) => escape(value, false)",
627
+ "\t};",
628
+ "})();"
629
+ ].join(`
630
+ `);
631
+ BOOLEAN_ATTRIBUTES = new Set([
632
+ "allowfullscreen",
633
+ "async",
634
+ "autofocus",
635
+ "autoplay",
636
+ "checked",
637
+ "controls",
638
+ "default",
639
+ "defer",
640
+ "disabled",
641
+ "disablepictureinpicture",
642
+ "disableremoteplayback",
643
+ "formnovalidate",
644
+ "indeterminate",
645
+ "inert",
646
+ "ismap",
647
+ "loop",
648
+ "multiple",
649
+ "muted",
650
+ "nomodule",
651
+ "novalidate",
652
+ "open",
653
+ "playsinline",
654
+ "readonly",
655
+ "required",
656
+ "reversed",
657
+ "seamless",
658
+ "selected",
659
+ "webkitdirectory"
660
+ ]);
661
+ DIRECTIVE_ATTRIBUTE_RE = /^(?:animate|bind|class|in|let|on|out|style|transition|use):/;
662
+ ATTRIBUTE_NAME_END_RE = /[\s=>/{]/;
663
+ RAW_TEXT_ELEMENTS = new Set(["script", "style"]);
664
+ SHADOW_VALUE = `{${HTML_HELPERS}.shadow}`;
665
+ END_TAG_RE = /<\/[A-Za-z][^\s>]*\s*>/g;
666
+ INJECTED_SCRIPT = `${IMPORT_LINE}
667
+ ${AWAIT_HTML_HELPERS_SOURCE}`;
382
668
  });
383
669
 
384
670
  // src/utils/runtimeMode.ts
@@ -1153,15 +1439,18 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, syncIslandGen
1153
1439
  for (const [spec, resolvedModuleImport] of rewrittenModulePaths) {
1154
1440
  transpiled = replaceQuotedSpecifier(transpiled, spec, resolvedModuleImport);
1155
1441
  }
1156
- let compiledCode = compile(transpiled, {
1442
+ const scopeClass = createAwaitScopeClassCapture();
1443
+ const compiledServer = compile(transpiled, {
1157
1444
  css: "injected",
1445
+ cssHash: scopeClass.cssHash,
1158
1446
  experimental: {
1159
1447
  async: loweredAwaitSource.transformed || loweredSource.transformed
1160
1448
  },
1161
1449
  filename: resolutionSourcePath,
1162
1450
  generate: "server",
1163
1451
  hmr: isDevelopmentRuntime()
1164
- }).js.code;
1452
+ });
1453
+ let compiledCode = scopeClass.apply(compiledServer.js.code);
1165
1454
  for (const [spec, compiledChildPath] of childModulePaths) {
1166
1455
  compiledCode = replaceQuotedSpecifier(compiledCode, spec, ensureRelativeImportPath(getCachedModulePath(sourcePath), compiledChildPath));
1167
1456
  }
@@ -2316,14 +2605,14 @@ var init_pageProtocol = __esm(() => {
2316
2605
 
2317
2606
  // src/core/pageResponseCache.ts
2318
2607
  import { createHash } from "crypto";
2319
- var STREAMING_PAGE_HEADER = "x-absolute-stream", HTML_CONTENT_TYPE = "text/html", streamingPageHeaders = (extra) => {
2608
+ var STREAMING_PAGE_HEADER = "x-absolute-stream", HTML_MEDIA_TYPE = "text/html", streamingPageHeaders = (extra) => {
2320
2609
  const headers = new Headers(extra);
2321
2610
  headers.set("content-type", HTML_CONTENT_TYPE);
2322
2611
  headers.set(STREAMING_PAGE_HEADER, "1");
2323
2612
  return headers;
2324
2613
  }, computeEtag = (html) => `W/"${createHash("sha1").update(html).digest("base64url")}"`, withPageCacheHeaders = async (response, request, options) => {
2325
2614
  const contentType = response.headers.get("content-type") ?? "";
2326
- if (!contentType.includes(HTML_CONTENT_TYPE))
2615
+ if (!contentType.includes(HTML_MEDIA_TYPE))
2327
2616
  return response;
2328
2617
  const isStreaming = response.headers.get(STREAMING_PAGE_HEADER) === "1";
2329
2618
  if (isStreaming && !options?.bufferStreamForEtag || !response.body) {
@@ -2349,7 +2638,9 @@ var STREAMING_PAGE_HEADER = "x-absolute-stream", HTML_CONTENT_TYPE = "text/html"
2349
2638
  statusText: response.statusText
2350
2639
  });
2351
2640
  };
2352
- var init_pageResponseCache = () => {};
2641
+ var init_pageResponseCache = __esm(() => {
2642
+ init_constants();
2643
+ });
2353
2644
 
2354
2645
  // src/client/streamSwap.ts
2355
2646
  var streamSwapRuntime = () => {
@@ -2801,9 +3092,9 @@ var SLOT_ID_PREFIX = "abs-slot-", CLOSING_BODY_TAG = "</body>", CLOSING_HEAD_TAG
2801
3092
  tail: ""
2802
3093
  };
2803
3094
  };
2804
- const handleBaseWinner = (controller, winner, baseRead, tail, footer) => {
3095
+ const handleBaseWinner = (controller, winner, baseRead, tail, footer, baseDone) => {
2805
3096
  if (winner.kind !== "base") {
2806
- return { baseDone: false, baseRead, footer, handled: false, tail };
3097
+ return { baseDone, baseRead, footer, handled: false, tail };
2807
3098
  }
2808
3099
  if (winner.done) {
2809
3100
  return finalizeCompletedBaseWinner(controller, tail + decoder.decode(), baseRead);
@@ -2846,7 +3137,7 @@ var SLOT_ID_PREFIX = "abs-slot-", CLOSING_BODY_TAG = "</body>", CLOSING_HEAD_TAG
2846
3137
  return footer;
2847
3138
  }
2848
3139
  const winner = await Promise.race(racers);
2849
- const baseWinnerState = applyBaseWinnerState(handleBaseWinner(controller, winner, baseRead, tail, footer), winner, (slotWinner) => {
3140
+ const baseWinnerState = applyBaseWinnerState(handleBaseWinner(controller, winner, baseRead, tail, footer, baseDone), winner, (slotWinner) => {
2850
3141
  handleResolvedSlot(controller, slotWinner);
2851
3142
  });
2852
3143
  ({ baseDone, baseRead, footer, tail } = baseWinnerState);
@@ -3236,7 +3527,7 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
3236
3527
  nonce: readCspNonce()
3237
3528
  });
3238
3529
  return new Response(stream, {
3239
- headers: { "Content-Type": "text/html" },
3530
+ headers: { "Content-Type": HTML_CONTENT_TYPE },
3240
3531
  status: 500
3241
3532
  });
3242
3533
  }, renderSvelteError = async (conventionPath, errorProps) => {
@@ -3252,7 +3543,7 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
3252
3543
  });
3253
3544
  const html = `<!DOCTYPE html><html><head>${nonceSvelteHeadStyles(head)}</head><body>${body}</body></html>`;
3254
3545
  return new Response(html, {
3255
- headers: { "Content-Type": "text/html" },
3546
+ headers: { "Content-Type": HTML_CONTENT_TYPE },
3256
3547
  status: 500
3257
3548
  });
3258
3549
  }, unescapeVueStyles = (ssrBody) => {
@@ -3276,7 +3567,7 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
3276
3567
  const { styles, body } = unescapeVueStyles(rawBody);
3277
3568
  const html = `<!DOCTYPE html><html><head>${styles}</head><body><div id="root">${body}</div></body></html>`;
3278
3569
  return new Response(html, {
3279
- headers: { "Content-Type": "text/html" },
3570
+ headers: { "Content-Type": HTML_CONTENT_TYPE },
3280
3571
  status: 500
3281
3572
  });
3282
3573
  }, renderAngularError = async (conventionPath, errorProps) => {
@@ -3286,14 +3577,14 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
3286
3577
  return null;
3287
3578
  const html = renderFn(errorProps);
3288
3579
  return new Response(html, {
3289
- headers: { "Content-Type": "text/html" },
3580
+ headers: { "Content-Type": HTML_CONTENT_TYPE },
3290
3581
  status: 500
3291
3582
  });
3292
3583
  }, escapeHtml = (value) => value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), replaceErrorTokens = (template, errorProps) => template.replace(/\{\{\s*name\s*\}\}/g, escapeHtml(errorProps.name)).replace(/\{\{\s*message\s*\}\}/g, escapeHtml(errorProps.message)).replace(/\{\{\s*stack\s*\}\}/g, errorProps.stack ? escapeHtml(errorProps.stack) : ""), renderHtmlError = async (conventionPath, errorProps) => {
3293
3584
  const template = await nonceStaticHtml(await Bun.file(conventionPath).text());
3294
3585
  const html = replaceErrorTokens(template, errorProps);
3295
3586
  return new Response(html, {
3296
- headers: { "Content-Type": "text/html" },
3587
+ headers: { "Content-Type": HTML_CONTENT_TYPE },
3297
3588
  status: 500
3298
3589
  });
3299
3590
  }, logConventionRenderError = (framework, label, renderError) => {
@@ -3372,7 +3663,7 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
3372
3663
  nonce: readCspNonce()
3373
3664
  });
3374
3665
  return new Response(stream, {
3375
- headers: { "Content-Type": "text/html" },
3666
+ headers: { "Content-Type": HTML_CONTENT_TYPE },
3376
3667
  status: 404
3377
3668
  });
3378
3669
  }, renderSvelteNotFound = async (conventionPath) => {
@@ -3385,7 +3676,7 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
3385
3676
  const { head, body } = render(NotFoundComponent, nonce ? { csp: { nonce } } : {});
3386
3677
  const html = `<!DOCTYPE html><html><head>${nonceSvelteHeadStyles(head)}</head><body>${body}</body></html>`;
3387
3678
  return new Response(html, {
3388
- headers: { "Content-Type": "text/html" },
3679
+ headers: { "Content-Type": HTML_CONTENT_TYPE },
3389
3680
  status: 404
3390
3681
  });
3391
3682
  }, renderVueNotFound = async (conventionPath) => {
@@ -3402,7 +3693,7 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
3402
3693
  const { styles, body } = unescapeVueStyles(rawBody);
3403
3694
  const html = `<!DOCTYPE html><html><head>${styles}</head><body><div id="root">${body}</div></body></html>`;
3404
3695
  return new Response(html, {
3405
- headers: { "Content-Type": "text/html" },
3696
+ headers: { "Content-Type": HTML_CONTENT_TYPE },
3406
3697
  status: 404
3407
3698
  });
3408
3699
  }, renderAngularNotFound = async (conventionPath) => {
@@ -3412,13 +3703,13 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
3412
3703
  return null;
3413
3704
  const html = renderFn();
3414
3705
  return new Response(html, {
3415
- headers: { "Content-Type": "text/html" },
3706
+ headers: { "Content-Type": HTML_CONTENT_TYPE },
3416
3707
  status: 404
3417
3708
  });
3418
3709
  }, renderHtmlNotFound = async (conventionPath) => {
3419
3710
  const html = await nonceStaticHtml(await Bun.file(conventionPath).text());
3420
3711
  return new Response(html, {
3421
- headers: { "Content-Type": "text/html" },
3712
+ headers: { "Content-Type": HTML_CONTENT_TYPE },
3422
3713
  status: 404
3423
3714
  });
3424
3715
  }, NOT_FOUND_RENDERERS, renderConventionNotFound = async (framework) => {
@@ -3452,6 +3743,7 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
3452
3743
  return renderNext(options.preferHtmx ? ["htmx", ...NOT_FOUND_PRIORITY.filter((key) => key !== "htmx")] : NOT_FOUND_PRIORITY);
3453
3744
  };
3454
3745
  var init_resolveConvention = __esm(() => {
3746
+ init_constants();
3455
3747
  init_cspNonceRef();
3456
3748
  init_staticHtmlNonce();
3457
3749
  init_ssrErrorPage();
@@ -5157,6 +5449,9 @@ var requireCurrentIslandRegistry = () => {
5157
5449
  globalThis.__absoluteIslandRegistry = registry;
5158
5450
  };
5159
5451
 
5452
+ // src/svelte/pageHandler.ts
5453
+ init_constants();
5454
+
5160
5455
  // src/utils/requestRenderUrl.ts
5161
5456
  var requestRenderUrl = (request) => {
5162
5457
  if (!request)
@@ -5674,7 +5969,7 @@ var handleSveltePageRequest = async (input) => {
5674
5969
  return withPageCacheHeaders(conventionResponse, request);
5675
5970
  }
5676
5971
  return withPageCacheHeaders(new Response(ssrErrorPage("svelte", error), {
5677
- headers: { "Content-Type": "text/html" },
5972
+ headers: { "Content-Type": HTML_CONTENT_TYPE },
5678
5973
  status: 500
5679
5974
  }), request);
5680
5975
  }
@@ -5781,7 +6076,7 @@ var getRelativeTimeFormat = (locale, options) => cached(relativeTimeFormats, cac
5781
6076
  var SYNTAX_CHARS = new Set(["{", "}", "#", "|"]);
5782
6077
  var WHITESPACE = /\s/;
5783
6078
  var isBranchKind = (value) => value === "plural" || value === "select" || value === "selectordinal";
5784
- var skipWhitespace = (cursor) => {
6079
+ var skipWhitespace2 = (cursor) => {
5785
6080
  while (cursor.index < cursor.source.length && WHITESPACE.test(cursor.source.charAt(cursor.index))) {
5786
6081
  cursor.index += 1;
5787
6082
  }
@@ -5795,7 +6090,7 @@ var readToken = (cursor, stops) => {
5795
6090
  return cursor.source.slice(start, cursor.index).trim();
5796
6091
  };
5797
6092
  var expectChar = (cursor, char) => {
5798
- skipWhitespace(cursor);
6093
+ skipWhitespace2(cursor);
5799
6094
  if (cursor.source.charAt(cursor.index) !== char)
5800
6095
  throw syntaxError(cursor, `"${char}"`);
5801
6096
  cursor.index += 1;
@@ -5824,7 +6119,7 @@ var readQuoted = (cursor, inPlural) => {
5824
6119
  cursor.index += 1;
5825
6120
  return text;
5826
6121
  };
5827
- var pushText = (nodes, value) => {
6122
+ var pushText2 = (nodes, value) => {
5828
6123
  const last = nodes[nodes.length - 1];
5829
6124
  if (last?.kind === "text") {
5830
6125
  last.value += value;
@@ -5840,7 +6135,7 @@ var parseBranchOption = (cursor, kind, branches) => {
5840
6135
  const offsetMatch = /^offset:(\d+)$/.exec(selector);
5841
6136
  if (offsetMatch && kind !== "select") {
5842
6137
  branches.offset = Number(offsetMatch[1]);
5843
- skipWhitespace(cursor);
6138
+ skipWhitespace2(cursor);
5844
6139
  return;
5845
6140
  }
5846
6141
  if (selector === "")
@@ -5848,11 +6143,11 @@ var parseBranchOption = (cursor, kind, branches) => {
5848
6143
  expectChar(cursor, "{");
5849
6144
  branches.options[selector] = parseNodes(cursor, kind !== "select");
5850
6145
  expectChar(cursor, "}");
5851
- skipWhitespace(cursor);
6146
+ skipWhitespace2(cursor);
5852
6147
  };
5853
6148
  var parseBranchOptions = (cursor, kind) => {
5854
6149
  const branches = { offset: 0, options: {} };
5855
- skipWhitespace(cursor);
6150
+ skipWhitespace2(cursor);
5856
6151
  while (cursor.source.charAt(cursor.index) !== "}") {
5857
6152
  parseBranchOption(cursor, kind, branches);
5858
6153
  }
@@ -5861,7 +6156,7 @@ var parseBranchOptions = (cursor, kind) => {
5861
6156
  return branches;
5862
6157
  };
5863
6158
  var parseArgument = (cursor) => {
5864
- skipWhitespace(cursor);
6159
+ skipWhitespace2(cursor);
5865
6160
  const name = readToken(cursor, ",}");
5866
6161
  if (name === "")
5867
6162
  throw syntaxError(cursor, "an argument name");
@@ -5898,10 +6193,10 @@ var parseNode = (cursor, inPlural, nodes) => {
5898
6193
  return;
5899
6194
  }
5900
6195
  if (char === "'") {
5901
- pushText(nodes, readQuoted(cursor, inPlural));
6196
+ pushText2(nodes, readQuoted(cursor, inPlural));
5902
6197
  return;
5903
6198
  }
5904
- pushText(nodes, char);
6199
+ pushText2(nodes, char);
5905
6200
  cursor.index += 1;
5906
6201
  };
5907
6202
  var parseNodes = (cursor, inPlural) => {
@@ -6206,5 +6501,5 @@ export {
6206
6501
  useIslandStore
6207
6502
  };
6208
6503
 
6209
- //# debugId=40A5D9C12995A94E64756E2164756E21
6504
+ //# debugId=8C56EC95A873DBCC64756E2164756E21
6210
6505
  //# sourceMappingURL=index.js.map