@absolutejs/absolute 0.19.0-beta.706 → 0.19.0-beta.708

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 (106) hide show
  1. package/dist/angular/browser.js +1 -19
  2. package/dist/angular/browser.js.map +3 -3
  3. package/dist/angular/components/constants.js +78 -0
  4. package/dist/angular/components/core/streamingSlotRegistrar.js +58 -0
  5. package/dist/angular/components/core/streamingSlotRegistry.js +114 -0
  6. package/dist/angular/components/defer-slot-payload.js +6 -0
  7. package/dist/angular/components/defer-slot-templates.directive.js +44 -0
  8. package/dist/angular/components/defer-slot.component.js +149 -0
  9. package/dist/angular/components/image.component.js +202 -0
  10. package/dist/angular/components/index.js +4 -0
  11. package/dist/angular/components/stream-slot.component.js +103 -0
  12. package/dist/angular/index.js +91 -36
  13. package/dist/angular/index.js.map +6 -6
  14. package/dist/angular/server.js +91 -36
  15. package/dist/angular/server.js.map +6 -6
  16. package/dist/build.js +242 -162
  17. package/dist/build.js.map +12 -12
  18. package/dist/cli/index.js +214 -142
  19. package/dist/client/index.js +86 -31
  20. package/dist/client/index.js.map +4 -4
  21. package/dist/core/streamingSlotRegistrar.js +1 -19
  22. package/dist/core/streamingSlotRegistrar.js.map +2 -2
  23. package/dist/core/streamingSlotRegistry.js +1 -19
  24. package/dist/core/streamingSlotRegistry.js.map +2 -2
  25. package/dist/dev/client/constants.ts +26 -0
  26. package/dist/dev/client/cssUtils.ts +307 -0
  27. package/dist/dev/client/domDiff.ts +226 -0
  28. package/dist/dev/client/domState.ts +421 -0
  29. package/dist/dev/client/domTracker.ts +61 -0
  30. package/dist/dev/client/errorOverlay.ts +184 -0
  31. package/dist/dev/client/frameworkDetect.ts +63 -0
  32. package/dist/dev/client/handlers/angular.ts +578 -0
  33. package/dist/dev/client/handlers/angularRuntime.ts +231 -0
  34. package/dist/dev/client/handlers/html.ts +364 -0
  35. package/dist/dev/client/handlers/htmx.ts +278 -0
  36. package/dist/dev/client/handlers/react.ts +108 -0
  37. package/dist/dev/client/handlers/rebuild.ts +153 -0
  38. package/dist/dev/client/handlers/svelte.ts +334 -0
  39. package/dist/dev/client/handlers/vue.ts +292 -0
  40. package/dist/dev/client/headPatch.ts +233 -0
  41. package/dist/dev/client/hmrClient.ts +273 -0
  42. package/dist/dev/client/hmrState.ts +14 -0
  43. package/dist/dev/client/moduleVersions.ts +62 -0
  44. package/dist/dev/client/reactRefreshSetup.ts +31 -0
  45. package/dist/index.js +282 -187
  46. package/dist/index.js.map +15 -15
  47. package/dist/islands/browser.js +1 -19
  48. package/dist/islands/browser.js.map +2 -2
  49. package/dist/islands/index.js +80 -26
  50. package/dist/islands/index.js.map +5 -5
  51. package/dist/react/browser.js +7 -25
  52. package/dist/react/browser.js.map +2 -2
  53. package/dist/react/components/browser/index.js +101 -101
  54. package/dist/react/components/index.js +104 -122
  55. package/dist/react/components/index.js.map +3 -3
  56. package/dist/react/hooks/index.js +1 -19
  57. package/dist/react/hooks/index.js.map +2 -2
  58. package/dist/react/index.js +101 -46
  59. package/dist/react/index.js.map +6 -6
  60. package/dist/react/jsxDevRuntimeCompat.js +1 -19
  61. package/dist/react/jsxDevRuntimeCompat.js.map +2 -2
  62. package/dist/react/server.js +13 -30
  63. package/dist/react/server.js.map +4 -4
  64. package/dist/src/angular/components/constants.d.ts +75 -0
  65. package/dist/src/angular/components/defer-slot-templates.directive.d.ts +7 -0
  66. package/dist/src/angular/components/defer-slot.component.d.ts +5 -2
  67. package/dist/src/angular/components/image.component.d.ts +5 -2
  68. package/dist/src/angular/components/index.d.ts +4 -4
  69. package/dist/src/angular/components/stream-slot.component.d.ts +3 -0
  70. package/dist/src/client/streamSwap.d.ts +0 -10
  71. package/dist/src/constants.d.ts +1 -0
  72. package/dist/src/dev/rebuildTrigger.d.ts +1 -1
  73. package/dist/src/svelte/renderToPipeableStream.d.ts +2 -2
  74. package/dist/src/svelte/renderToReadableStream.d.ts +2 -2
  75. package/dist/src/svelte/renderToString.d.ts +2 -2
  76. package/dist/src/vue/components/Image.d.ts +3 -3
  77. package/dist/svelte/browser.js +1 -19
  78. package/dist/svelte/browser.js.map +2 -2
  79. package/dist/svelte/components/AwaitSlot.svelte +39 -0
  80. package/dist/svelte/components/AwaitSlot.svelte.d.ts +2 -0
  81. package/dist/svelte/components/Head.svelte +144 -0
  82. package/dist/svelte/components/Head.svelte.d.ts +2 -0
  83. package/dist/svelte/components/Image.svelte +164 -0
  84. package/dist/svelte/components/Image.svelte.d.ts +5 -0
  85. package/dist/svelte/components/Island.svelte +71 -0
  86. package/dist/svelte/components/Island.svelte.d.ts +5 -0
  87. package/dist/svelte/components/JsonLd.svelte +21 -0
  88. package/dist/svelte/components/JsonLd.svelte.d.ts +2 -0
  89. package/dist/svelte/components/StreamSlot.svelte +41 -0
  90. package/dist/svelte/components/StreamSlot.svelte.d.ts +2 -0
  91. package/dist/svelte/index.js +93 -37
  92. package/dist/svelte/index.js.map +7 -7
  93. package/dist/svelte/server.js +16 -32
  94. package/dist/svelte/server.js.map +5 -5
  95. package/dist/types/globals.d.ts +130 -0
  96. package/dist/vue/browser.js +1 -19
  97. package/dist/vue/browser.js.map +2 -2
  98. package/dist/vue/components/Image.js +1 -19
  99. package/dist/vue/components/Image.js.map +3 -3
  100. package/dist/vue/components/index.js +1 -19
  101. package/dist/vue/components/index.js.map +3 -3
  102. package/dist/vue/index.js +91 -36
  103. package/dist/vue/index.js.map +7 -7
  104. package/dist/vue/server.js +13 -30
  105. package/dist/vue/server.js.map +4 -4
  106. package/package.json +1 -1
@@ -0,0 +1,164 @@
1
+ <script lang="ts">
2
+ import type { ImageProps } from '@absolutejs/absolute/image';
3
+ import {
4
+ DEFAULT_QUALITY,
5
+ buildOptimizedUrl,
6
+ generateBlurSvg,
7
+ generateSrcSet
8
+ } from '@absolutejs/absolute/image';
9
+
10
+ let {
11
+ src,
12
+ alt,
13
+ width,
14
+ height,
15
+ fill,
16
+ quality = DEFAULT_QUALITY,
17
+ sizes,
18
+ loader,
19
+ unoptimized,
20
+ loading,
21
+ priority,
22
+ placeholder,
23
+ blurDataURL,
24
+ className,
25
+ style,
26
+ onLoad,
27
+ onError,
28
+ crossOrigin,
29
+ referrerPolicy,
30
+ fetchPriority,
31
+ overrideSrc
32
+ }: ImageProps = $props();
33
+
34
+ const resolvedSrc = $derived.by(() => {
35
+ if (overrideSrc) return overrideSrc;
36
+ if (unoptimized) return src;
37
+ if (loader) return loader({ src, width: width ?? 0, quality });
38
+ if (!width) return buildOptimizedUrl(src, 0, quality);
39
+ return buildOptimizedUrl(src, width, quality);
40
+ });
41
+
42
+ const srcSet = $derived(
43
+ unoptimized ? undefined : generateSrcSet(src, width, sizes)
44
+ );
45
+
46
+ const resolvedSizes = $derived(sizes ?? (fill ? '100vw' : undefined));
47
+
48
+ const resolvedLoading = $derived(priority ? 'eager' : (loading ?? 'lazy'));
49
+
50
+ const resolvedFetchPriority = $derived(priority ? 'high' : fetchPriority);
51
+
52
+ const hasBlur = $derived(
53
+ placeholder === 'blur' ||
54
+ (typeof placeholder === 'string' &&
55
+ placeholder !== 'empty' &&
56
+ placeholder.startsWith('data:'))
57
+ );
58
+
59
+ const blurBackground = $derived.by(() => {
60
+ if (!hasBlur) return undefined;
61
+ if (
62
+ typeof placeholder === 'string' &&
63
+ placeholder !== 'blur' &&
64
+ placeholder.startsWith('data:')
65
+ ) {
66
+ return generateBlurSvg(placeholder);
67
+ }
68
+ if (blurDataURL) return generateBlurSvg(blurDataURL);
69
+ return undefined;
70
+ });
71
+
72
+ const imgStyle = $derived.by(() => {
73
+ const base: Record<string, string | number> = {
74
+ ...(style ?? {}),
75
+ color: 'transparent'
76
+ };
77
+ if (blurBackground) {
78
+ base.backgroundImage = blurBackground;
79
+ base.backgroundSize = 'cover';
80
+ base.backgroundPosition = 'center';
81
+ base.backgroundRepeat = 'no-repeat';
82
+ }
83
+ if (fill) {
84
+ base.position = 'absolute';
85
+ base.height = '100%';
86
+ base.width = '100%';
87
+ base.inset = 0;
88
+ base.objectFit = 'cover';
89
+ }
90
+ return Object.entries(base)
91
+ .map(
92
+ ([k, v]) =>
93
+ `${k.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`)}:${v}`
94
+ )
95
+ .join(';');
96
+ });
97
+
98
+ const handleLoad = (e: Event) => {
99
+ const target = e.currentTarget;
100
+ if (blurBackground) {
101
+ if (target instanceof HTMLImageElement) {
102
+ target.style.backgroundImage = 'none';
103
+ }
104
+ }
105
+ onLoad?.(e);
106
+ };
107
+
108
+ const handleError = (e: Event) => {
109
+ onError?.(e);
110
+ };
111
+ </script>
112
+
113
+ <svelte:head>
114
+ {#if priority}
115
+ <link
116
+ rel="preload"
117
+ as="image"
118
+ href={resolvedSrc}
119
+ imagesrcset={srcSet}
120
+ imagesizes={resolvedSizes}
121
+ crossorigin={crossOrigin}
122
+ />
123
+ {/if}
124
+ </svelte:head>
125
+
126
+ {#if fill}
127
+ <span
128
+ style="position:relative;overflow:hidden;display:block;width:100%;height:100%"
129
+ >
130
+ <img
131
+ {alt}
132
+ src={resolvedSrc}
133
+ srcset={srcSet}
134
+ sizes={resolvedSizes}
135
+ loading={resolvedLoading}
136
+ class={className}
137
+ style={imgStyle}
138
+ crossorigin={crossOrigin}
139
+ referrerpolicy={referrerPolicy}
140
+ fetchpriority={resolvedFetchPriority}
141
+ decoding="async"
142
+ onload={handleLoad}
143
+ onerror={handleError}
144
+ />
145
+ </span>
146
+ {:else}
147
+ <img
148
+ {alt}
149
+ src={resolvedSrc}
150
+ srcset={srcSet}
151
+ sizes={resolvedSizes}
152
+ {width}
153
+ {height}
154
+ loading={resolvedLoading}
155
+ class={className}
156
+ style={imgStyle}
157
+ crossorigin={crossOrigin}
158
+ referrerpolicy={referrerPolicy}
159
+ fetchpriority={resolvedFetchPriority}
160
+ decoding="async"
161
+ onload={handleLoad}
162
+ onerror={handleError}
163
+ />
164
+ {/if}
@@ -0,0 +1,5 @@
1
+ import type { ImageProps } from '../../types/image';
2
+ import { SvelteComponent } from 'svelte';
3
+ declare const __propDef: { props: ImageProps };
4
+ type Props = typeof __propDef.props;
5
+ export default class Image extends SvelteComponent<Props> {}
@@ -0,0 +1,71 @@
1
+ <script context="module" lang="ts">
2
+ let islandSlotIndex = 0;
3
+
4
+ const createSlotId = () => {
5
+ const current = islandSlotIndex;
6
+ islandSlotIndex += 1;
7
+
8
+ return `absolute-svelte-island-${current.toString(36)}`;
9
+ };
10
+ </script>
11
+
12
+ <script lang="ts">
13
+ import type { RuntimeIslandRenderProps } from '../../../types/island';
14
+
15
+ let {
16
+ component,
17
+ framework,
18
+ hydrate = 'load',
19
+ props
20
+ }: RuntimeIslandRenderProps = $props();
21
+
22
+ const slotId = createSlotId();
23
+
24
+ const escapeHtmlAttribute = (value: string) =>
25
+ value
26
+ .replaceAll('&', '&amp;')
27
+ .replaceAll('"', '&quot;')
28
+ .replaceAll('<', '&lt;')
29
+ .replaceAll('>', '&gt;');
30
+
31
+ const buildFallbackMarkup = (runtimeProps: RuntimeIslandRenderProps) => {
32
+ const attributes = [
33
+ ['data-component', runtimeProps.component],
34
+ ['data-framework', runtimeProps.framework],
35
+ ['data-hydrate', runtimeProps.hydrate ?? 'load'],
36
+ ['data-island', 'true'],
37
+ ['data-props', JSON.stringify(runtimeProps.props ?? {})]
38
+ ];
39
+
40
+ const serialized = attributes
41
+ .map(([name, value]) => `${name}="${escapeHtmlAttribute(value)}"`)
42
+ .join(' ');
43
+
44
+ return `<div ${serialized}></div>`;
45
+ };
46
+
47
+ const html = $derived(
48
+ (() => {
49
+ const runtimeProps = {
50
+ component,
51
+ framework,
52
+ hydrate,
53
+ props
54
+ };
55
+
56
+ if (typeof document === 'undefined') {
57
+ return buildFallbackMarkup(runtimeProps);
58
+ }
59
+
60
+ const slot = document.querySelector<HTMLElement>(
61
+ `[data-absolute-island-slot="${slotId}"]`
62
+ );
63
+
64
+ return slot?.innerHTML ?? buildFallbackMarkup(runtimeProps);
65
+ })()
66
+ );
67
+ </script>
68
+
69
+ <div data-absolute-island-slot={slotId} style="display: contents">
70
+ {@html html}
71
+ </div>
@@ -0,0 +1,5 @@
1
+ import type { RuntimeIslandRenderProps } from '../../types/metadata';
2
+ import { SvelteComponent } from 'svelte';
3
+ declare const __propDef: { props: RuntimeIslandRenderProps };
4
+ type Props = typeof __propDef.props;
5
+ export default class Island extends SvelteComponent<Props> {}
@@ -0,0 +1,21 @@
1
+ <script lang="ts">
2
+ import type { JsonLdSchema, WithContext } from '../../../types/jsonLd';
3
+
4
+ let { schema }: { schema: JsonLdSchema | JsonLdSchema[] } = $props();
5
+ const schemaOrgContext = 'https://schema.org';
6
+
7
+ const data = $derived<
8
+ WithContext<JsonLdSchema> | WithContext<JsonLdSchema>[]
9
+ >(
10
+ Array.isArray(schema)
11
+ ? schema.map((s) => ({
12
+ '@context': schemaOrgContext,
13
+ ...s
14
+ }))
15
+ : { '@context': schemaOrgContext, ...schema }
16
+ );
17
+ </script>
18
+
19
+ <svelte:head>
20
+ {@html `<script type="application/ld+json">${JSON.stringify(data)}</script>`}
21
+ </svelte:head>
@@ -0,0 +1,2 @@
1
+ import { SvelteComponent } from 'svelte';
2
+ export default class JsonLd extends SvelteComponent {}
@@ -0,0 +1,41 @@
1
+ <script lang="ts">
2
+ import {
3
+ isStreamingSlotCollectionActive,
4
+ registerStreamingSlot,
5
+ warnMissingStreamingSlotCollector
6
+ } from '../../core/streamingSlotRegistrar';
7
+
8
+ type Resolver = () => Promise<string> | string;
9
+
10
+ let {
11
+ className,
12
+ errorHtml,
13
+ fallbackHtml = '',
14
+ id,
15
+ resolve,
16
+ timeoutMs
17
+ }: {
18
+ className?: string;
19
+ errorHtml?: string;
20
+ fallbackHtml?: string;
21
+ id: string;
22
+ resolve: Resolver;
23
+ timeoutMs?: number;
24
+ } = $props();
25
+
26
+ if (isStreamingSlotCollectionActive()) {
27
+ registerStreamingSlot({
28
+ errorHtml,
29
+ fallbackHtml,
30
+ id,
31
+ resolve,
32
+ timeoutMs
33
+ });
34
+ } else {
35
+ warnMissingStreamingSlotCollector('StreamSlot');
36
+ }
37
+ </script>
38
+
39
+ <div class={className} data-absolute-slot="true" {id}>
40
+ {@html fallbackHtml}
41
+ </div>
@@ -0,0 +1,2 @@
1
+ import { SvelteComponent } from 'svelte';
2
+ export default class StreamSlot extends SvelteComponent {}
@@ -3,7 +3,6 @@ var __create = Object.create;
3
3
  var __getProtoOf = Object.getPrototypeOf;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
7
  function __accessProp(key) {
9
8
  return this[key];
@@ -30,23 +29,6 @@ var __toESM = (mod, isNodeMode, target) => {
30
29
  cache.set(mod, to);
31
30
  return to;
32
31
  };
33
- var __toCommonJS = (from) => {
34
- var entry = (__moduleCache ??= new WeakMap).get(from), desc;
35
- if (entry)
36
- return entry;
37
- entry = __defProp({}, "__esModule", { value: true });
38
- if (from && typeof from === "object" || typeof from === "function") {
39
- for (var key of __getOwnPropNames(from))
40
- if (!__hasOwnProp.call(entry, key))
41
- __defProp(entry, key, {
42
- get: __accessProp.bind(from, key),
43
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
44
- });
45
- }
46
- __moduleCache.set(from, entry);
47
- return entry;
48
- };
49
- var __moduleCache;
50
32
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
51
33
  var __returnValue = (v) => v;
52
34
  function __exportSetter(name, newValue) {
@@ -134,7 +116,7 @@ var resolveExportPath = (entry, conditions) => {
134
116
  var init_resolvePackageImport = () => {};
135
117
 
136
118
  // src/constants.ts
137
- var ANGULAR_INIT_TIMEOUT_MS = 500, ANSI_ESCAPE_LENGTH = 3, ASCII_SPACE = 32, BASE_36_RADIX = 36, BUN_BUILD_WARNING_SUPPRESSION = "wildcard sideEffects are not supported yet", 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_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, 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, HOURS_IN_DAY = 24, HOURS_IN_HALF_DAY = 12, 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, 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, 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;
119
+ 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", 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_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, 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, HOURS_IN_DAY = 24, HOURS_IN_HALF_DAY = 12, 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, 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, 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;
138
120
  var init_constants = __esm(() => {
139
121
  MILLISECONDS_IN_A_MINUTE = MILLISECONDS_IN_A_SECOND * SECONDS_IN_A_MINUTE;
140
122
  MILLISECONDS_IN_A_DAY = MILLISECONDS_IN_A_SECOND * SECONDS_IN_A_MINUTE * MINUTES_IN_AN_HOUR * HOURS_IN_DAY;
@@ -444,7 +426,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
444
426
  const config = normalizePostcssModule(loaded);
445
427
  const value = typeof config === "function" ? await config({
446
428
  cwd: process.cwd(),
447
- env: "test"
429
+ env: "development"
448
430
  }) : config;
449
431
  return normalizePostcssModule(value) ?? {};
450
432
  }, normalizePostcssPlugins = (plugins) => {
@@ -974,14 +956,15 @@ var init_devRouteRegistrationCallsite = __esm(() => {
974
956
 
975
957
  // src/client/streamSwap.ts
976
958
  var streamSwapRuntime = () => {
959
+ const absoluteWindow = window;
977
960
  const SLOT_PATCH_EVENT = "absolutejs:slot-patch";
978
- if (window.__ABS_SLOT_RUNTIME__ === true)
961
+ if (absoluteWindow.__ABS_SLOT_RUNTIME__ === true)
979
962
  return;
980
- window.__ABS_SLOT_RUNTIME__ = true;
981
- window.__ABS_SLOT_CONSUMERS__ = window.__ABS_SLOT_CONSUMERS__ ?? {};
982
- window.__ABS_SLOT_PENDING__ = window.__ABS_SLOT_PENDING__ ?? {};
983
- const consumers = window.__ABS_SLOT_CONSUMERS__;
984
- const pending = window.__ABS_SLOT_PENDING__;
963
+ absoluteWindow.__ABS_SLOT_RUNTIME__ = true;
964
+ absoluteWindow.__ABS_SLOT_CONSUMERS__ = absoluteWindow.__ABS_SLOT_CONSUMERS__ ?? {};
965
+ absoluteWindow.__ABS_SLOT_PENDING__ = absoluteWindow.__ABS_SLOT_PENDING__ ?? {};
966
+ const consumers = absoluteWindow.__ABS_SLOT_CONSUMERS__;
967
+ const pending = absoluteWindow.__ABS_SLOT_PENDING__;
985
968
  const isObjectRecord4 = (value) => Boolean(value) && typeof value === "object";
986
969
  const isPatchedPendingEntry = (value) => {
987
970
  if (!isObjectRecord4(value))
@@ -989,7 +972,7 @@ var streamSwapRuntime = () => {
989
972
  return value.domPatched === true && "payload" in value;
990
973
  };
991
974
  const unwrapPendingPayload = (value) => isPatchedPendingEntry(value) ? value.payload : value;
992
- const canApplyImmediately = () => window.__ABS_SLOT_HYDRATION_PENDING__ !== true;
975
+ const canApplyImmediately = () => absoluteWindow.__ABS_SLOT_HYDRATION_PENDING__ !== true;
993
976
  const isAngularDeferPayload = (payload) => {
994
977
  if (!isObjectRecord4(payload))
995
978
  return false;
@@ -1059,8 +1042,8 @@ var streamSwapRuntime = () => {
1059
1042
  apply(id, pending[id] ?? "");
1060
1043
  }
1061
1044
  };
1062
- window.__ABS_SLOT_FLUSH__ = flush;
1063
- window.__ABS_SLOT_ENQUEUE__ = (id, payload) => {
1045
+ absoluteWindow.__ABS_SLOT_FLUSH__ = flush;
1046
+ absoluteWindow.__ABS_SLOT_ENQUEUE__ = (id, payload) => {
1064
1047
  apply(id, payload);
1065
1048
  };
1066
1049
  if (typeof MutationObserver === "function") {
@@ -1825,7 +1808,8 @@ var SVELTE_PAGE_ROOT_ID = "__absolute_svelte_root__", renderToReadableStream = a
1825
1808
  } = {}) => {
1826
1809
  try {
1827
1810
  const { render } = await import("svelte/server");
1828
- const rendered = typeof props === "undefined" ? await render(component) : await render(component, { props });
1811
+ const renderComponent = render;
1812
+ const rendered = typeof props === "undefined" ? await renderComponent(component) : await renderComponent(component, { props });
1829
1813
  const { head, body } = rendered;
1830
1814
  const nonceAttr = nonce ? ` nonce="${nonce}"` : "";
1831
1815
  const scripts = (bootstrapScriptContent ? `<script${nonceAttr}>${escapeScriptContent(bootstrapScriptContent)}</script>` : "") + bootstrapScripts.map((src) => `<script${nonceAttr} src="${src}"></script>`).join("") + bootstrapModules.map((src) => `<script${nonceAttr} type="module" src="${src}"></script>`).join("");
@@ -1939,6 +1923,65 @@ var ensureHead = (doc) => {
1939
1923
  }
1940
1924
  const head = doc.createElement("head");
1941
1925
  doc.documentElement.insertBefore(head, doc.documentElement.firstChild);
1926
+ }, SSR_LAYOUT_RECT, layoutPatchApplied = false, patchElementLayout = (doc) => {
1927
+ if (layoutPatchApplied || !doc) {
1928
+ return;
1929
+ }
1930
+ let element;
1931
+ try {
1932
+ element = doc.createElement("div");
1933
+ } catch {
1934
+ return;
1935
+ }
1936
+ const proto = Object.getPrototypeOf(element);
1937
+ if (!proto)
1938
+ return;
1939
+ const define = (name, value) => {
1940
+ if (typeof proto[name] !== "function") {
1941
+ Object.defineProperty(proto, name, {
1942
+ configurable: true,
1943
+ value,
1944
+ writable: true
1945
+ });
1946
+ }
1947
+ };
1948
+ define("getBoundingClientRect", function() {
1949
+ return { ...SSR_LAYOUT_RECT };
1950
+ });
1951
+ define("getClientRects", function() {
1952
+ return [];
1953
+ });
1954
+ define("scrollTo", function() {});
1955
+ define("scrollBy", function() {});
1956
+ define("scrollIntoView", function() {});
1957
+ define("focus", function() {});
1958
+ define("blur", function() {});
1959
+ const numericProps = [
1960
+ "clientWidth",
1961
+ "clientHeight",
1962
+ "clientLeft",
1963
+ "clientTop",
1964
+ "offsetWidth",
1965
+ "offsetHeight",
1966
+ "offsetLeft",
1967
+ "offsetTop",
1968
+ "scrollWidth",
1969
+ "scrollHeight",
1970
+ "scrollLeft",
1971
+ "scrollTop"
1972
+ ];
1973
+ for (const prop of numericProps) {
1974
+ const desc = Object.getOwnPropertyDescriptor(proto, prop);
1975
+ if (desc)
1976
+ continue;
1977
+ Object.defineProperty(proto, prop, {
1978
+ configurable: true,
1979
+ get() {
1980
+ return 0;
1981
+ }
1982
+ });
1983
+ }
1984
+ layoutPatchApplied = true;
1942
1985
  }, applyPatches = async () => {
1943
1986
  const { \u{275}DominoAdapter } = await import(resolveAngularPackage("@angular/platform-server"));
1944
1987
  if (!\u{275}DominoAdapter?.prototype) {
@@ -1957,18 +2000,33 @@ var ensureHead = (doc) => {
1957
2000
  proto.createHtmlDocument = function() {
1958
2001
  const doc = origCreateHtmlDocument.call(this);
1959
2002
  ensureHead(doc);
2003
+ patchElementLayout(doc);
1960
2004
  return doc;
1961
2005
  };
1962
2006
  const origGetDefaultDocument = proto.getDefaultDocument;
1963
2007
  proto.getDefaultDocument = function() {
1964
2008
  const doc = origGetDefaultDocument.call(this);
1965
2009
  ensureHead(doc);
2010
+ patchElementLayout(doc);
1966
2011
  return doc;
1967
2012
  };
1968
2013
  return true;
1969
2014
  };
1970
2015
  var init_angularPatch = __esm(() => {
1971
2016
  init_resolveAngularPackage();
2017
+ SSR_LAYOUT_RECT = Object.freeze({
2018
+ bottom: 0,
2019
+ height: 0,
2020
+ left: 0,
2021
+ right: 0,
2022
+ top: 0,
2023
+ width: 0,
2024
+ x: 0,
2025
+ y: 0,
2026
+ toJSON() {
2027
+ return this;
2028
+ }
2029
+ });
1972
2030
  });
1973
2031
 
1974
2032
  // src/angular/angularDeps.ts
@@ -1990,9 +2048,7 @@ var initDominoAdapter = (platformServer) => {
1990
2048
  import(resolveAngularPackage("@angular/common")),
1991
2049
  import(resolveAngularPackage("@angular/core"))
1992
2050
  ]);
1993
- if (true) {
1994
- core.enableProdMode();
1995
- }
2051
+ if (false) {}
1996
2052
  initDominoAdapter(platformServer);
1997
2053
  return {
1998
2054
  APP_BASE_HREF: common.APP_BASE_HREF,
@@ -2386,9 +2442,9 @@ var renderAngularIslandToHtmlInternal = async (component, props, islandId) => {
2386
2442
  }, renderAngularIslandToHtml2, renderReactIslandToHtml = (component, props) => import("react").then(({ createElement }) => import("react-dom/server").then(({ renderToStaticMarkup }) => renderToStaticMarkup(createElement(component, props)))), renderSvelteIslandToHtml = (component, props) => import("svelte/server").then(({ render }) => {
2387
2443
  const { body } = render(component, { props });
2388
2444
  return body;
2389
- }), renderVueIslandToHtml = (component, props) => import("vue").then(({ createSSRApp, h }) => {
2445
+ }), renderVueIslandToHtml = (component, props) => import("vue").then(({ createSSRApp, h: createVueVNode }) => {
2390
2446
  const app = createSSRApp({
2391
- render: () => h(component, props)
2447
+ render: () => createVueVNode(component, props)
2392
2448
  });
2393
2449
  return import("vue/server-renderer").then(({ renderToString }) => renderToString(app));
2394
2450
  });
@@ -3120,7 +3176,7 @@ var resolveNotFoundConventionPath = (framework) => getMap()[framework]?.defaults
3120
3176
  var setConventions = (map) => {
3121
3177
  Reflect.set(globalThis, CONVENTIONS_KEY, map);
3122
3178
  };
3123
- var isDev = () => false;
3179
+ var isDev = () => true;
3124
3180
  var buildErrorProps = (error) => {
3125
3181
  const message = error instanceof Error ? error.message : String(error);
3126
3182
  const stack = isDev() && error instanceof Error ? error.stack : undefined;
@@ -3562,5 +3618,5 @@ export {
3562
3618
  createTypedIsland
3563
3619
  };
3564
3620
 
3565
- //# debugId=38D00C76C4BB8D5D64756E2164756E21
3621
+ //# debugId=4A8E0F63BB2BAF5964756E2164756E21
3566
3622
  //# sourceMappingURL=index.js.map