@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.
- package/dist/angular/browser.js +1 -19
- package/dist/angular/browser.js.map +3 -3
- package/dist/angular/components/constants.js +78 -0
- package/dist/angular/components/core/streamingSlotRegistrar.js +58 -0
- package/dist/angular/components/core/streamingSlotRegistry.js +114 -0
- package/dist/angular/components/defer-slot-payload.js +6 -0
- package/dist/angular/components/defer-slot-templates.directive.js +44 -0
- package/dist/angular/components/defer-slot.component.js +149 -0
- package/dist/angular/components/image.component.js +202 -0
- package/dist/angular/components/index.js +4 -0
- package/dist/angular/components/stream-slot.component.js +103 -0
- package/dist/angular/index.js +91 -36
- package/dist/angular/index.js.map +6 -6
- package/dist/angular/server.js +91 -36
- package/dist/angular/server.js.map +6 -6
- package/dist/build.js +242 -162
- package/dist/build.js.map +12 -12
- package/dist/cli/index.js +214 -142
- package/dist/client/index.js +86 -31
- package/dist/client/index.js.map +4 -4
- package/dist/core/streamingSlotRegistrar.js +1 -19
- package/dist/core/streamingSlotRegistrar.js.map +2 -2
- package/dist/core/streamingSlotRegistry.js +1 -19
- package/dist/core/streamingSlotRegistry.js.map +2 -2
- package/dist/dev/client/constants.ts +26 -0
- package/dist/dev/client/cssUtils.ts +307 -0
- package/dist/dev/client/domDiff.ts +226 -0
- package/dist/dev/client/domState.ts +421 -0
- package/dist/dev/client/domTracker.ts +61 -0
- package/dist/dev/client/errorOverlay.ts +184 -0
- package/dist/dev/client/frameworkDetect.ts +63 -0
- package/dist/dev/client/handlers/angular.ts +578 -0
- package/dist/dev/client/handlers/angularRuntime.ts +231 -0
- package/dist/dev/client/handlers/html.ts +364 -0
- package/dist/dev/client/handlers/htmx.ts +278 -0
- package/dist/dev/client/handlers/react.ts +108 -0
- package/dist/dev/client/handlers/rebuild.ts +153 -0
- package/dist/dev/client/handlers/svelte.ts +334 -0
- package/dist/dev/client/handlers/vue.ts +292 -0
- package/dist/dev/client/headPatch.ts +233 -0
- package/dist/dev/client/hmrClient.ts +273 -0
- package/dist/dev/client/hmrState.ts +14 -0
- package/dist/dev/client/moduleVersions.ts +62 -0
- package/dist/dev/client/reactRefreshSetup.ts +31 -0
- package/dist/index.js +282 -187
- package/dist/index.js.map +15 -15
- package/dist/islands/browser.js +1 -19
- package/dist/islands/browser.js.map +2 -2
- package/dist/islands/index.js +80 -26
- package/dist/islands/index.js.map +5 -5
- package/dist/react/browser.js +7 -25
- package/dist/react/browser.js.map +2 -2
- package/dist/react/components/browser/index.js +101 -101
- package/dist/react/components/index.js +104 -122
- package/dist/react/components/index.js.map +3 -3
- package/dist/react/hooks/index.js +1 -19
- package/dist/react/hooks/index.js.map +2 -2
- package/dist/react/index.js +101 -46
- package/dist/react/index.js.map +6 -6
- package/dist/react/jsxDevRuntimeCompat.js +1 -19
- package/dist/react/jsxDevRuntimeCompat.js.map +2 -2
- package/dist/react/server.js +13 -30
- package/dist/react/server.js.map +4 -4
- package/dist/src/angular/components/constants.d.ts +75 -0
- package/dist/src/angular/components/defer-slot-templates.directive.d.ts +7 -0
- package/dist/src/angular/components/defer-slot.component.d.ts +5 -2
- package/dist/src/angular/components/image.component.d.ts +5 -2
- package/dist/src/angular/components/index.d.ts +4 -4
- package/dist/src/angular/components/stream-slot.component.d.ts +3 -0
- package/dist/src/client/streamSwap.d.ts +0 -10
- package/dist/src/constants.d.ts +1 -0
- package/dist/src/dev/rebuildTrigger.d.ts +1 -1
- package/dist/src/svelte/renderToPipeableStream.d.ts +2 -2
- package/dist/src/svelte/renderToReadableStream.d.ts +2 -2
- package/dist/src/svelte/renderToString.d.ts +2 -2
- package/dist/src/vue/components/Image.d.ts +3 -3
- package/dist/svelte/browser.js +1 -19
- package/dist/svelte/browser.js.map +2 -2
- package/dist/svelte/components/AwaitSlot.svelte +39 -0
- package/dist/svelte/components/AwaitSlot.svelte.d.ts +2 -0
- package/dist/svelte/components/Head.svelte +144 -0
- package/dist/svelte/components/Head.svelte.d.ts +2 -0
- package/dist/svelte/components/Image.svelte +164 -0
- package/dist/svelte/components/Image.svelte.d.ts +5 -0
- package/dist/svelte/components/Island.svelte +71 -0
- package/dist/svelte/components/Island.svelte.d.ts +5 -0
- package/dist/svelte/components/JsonLd.svelte +21 -0
- package/dist/svelte/components/JsonLd.svelte.d.ts +2 -0
- package/dist/svelte/components/StreamSlot.svelte +41 -0
- package/dist/svelte/components/StreamSlot.svelte.d.ts +2 -0
- package/dist/svelte/index.js +93 -37
- package/dist/svelte/index.js.map +7 -7
- package/dist/svelte/server.js +16 -32
- package/dist/svelte/server.js.map +5 -5
- package/dist/types/globals.d.ts +130 -0
- package/dist/vue/browser.js +1 -19
- package/dist/vue/browser.js.map +2 -2
- package/dist/vue/components/Image.js +1 -19
- package/dist/vue/components/Image.js.map +3 -3
- package/dist/vue/components/index.js +1 -19
- package/dist/vue/components/index.js.map +3 -3
- package/dist/vue/index.js +91 -36
- package/dist/vue/index.js.map +7 -7
- package/dist/vue/server.js +13 -30
- package/dist/vue/server.js.map +4 -4
- package/package.json +1 -1
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export declare const ANGULAR_INIT_TIMEOUT_MS = 500;
|
|
2
|
+
export declare const ANSI_ESCAPE_CODE = 27;
|
|
3
|
+
export declare const ANSI_ESCAPE_LENGTH = 3;
|
|
4
|
+
export declare const ASCII_SPACE = 32;
|
|
5
|
+
export declare const BASE_36_RADIX = 36;
|
|
6
|
+
export declare const BUN_BUILD_WARNING_SUPPRESSION = "wildcard sideEffects are not supported yet";
|
|
7
|
+
export declare const BODY_SLICE_LENGTH = 2000;
|
|
8
|
+
export declare const BYTES_PER_KILOBYTE = 1024;
|
|
9
|
+
export declare const CLI_ARGS_OFFSET = 3;
|
|
10
|
+
export declare const CSS_ERROR_RESOLVE_DELAY_MS = 50;
|
|
11
|
+
export declare const CSS_MAX_CHECK_ATTEMPTS = 10;
|
|
12
|
+
export declare const CSS_MAX_PARSE_TIMEOUT_MS = 500;
|
|
13
|
+
export declare const CSS_SHEET_READY_TIMEOUT_MS = 100;
|
|
14
|
+
export declare const DEFAULT_CHUNK_SIZE = 16384;
|
|
15
|
+
export declare const DEFAULT_DEBOUNCE_MS = 15;
|
|
16
|
+
export declare const DEFAULT_PORT = 3000;
|
|
17
|
+
export declare const DEV_SERVER_RESTART_DEBOUNCE_MS = 100;
|
|
18
|
+
export declare const DOM_UPDATE_DELAY_MS = 50;
|
|
19
|
+
export declare const FILE_PROTOCOL_PREFIX_LENGTH = 7;
|
|
20
|
+
export declare const FOCUS_ID_PREFIX_LENGTH = 3;
|
|
21
|
+
export declare const FOCUS_IDX_PREFIX_LENGTH = 4;
|
|
22
|
+
export declare const FOCUS_NAME_PREFIX_LENGTH = 5;
|
|
23
|
+
export declare const HMR_UPDATE_TIMEOUT_MS = 2000;
|
|
24
|
+
export declare const HOOK_SIGNATURE_LENGTH = 12;
|
|
25
|
+
export declare const EXCLUDE_LAST_OFFSET = -1;
|
|
26
|
+
export declare const HTTP_STATUS_OK = 200;
|
|
27
|
+
export declare const HTTP_STATUS_BAD_REQUEST = 400;
|
|
28
|
+
export declare const HTTP_STATUS_NOT_FOUND = 404;
|
|
29
|
+
export declare const HOURS_IN_DAY = 24;
|
|
30
|
+
export declare const HOURS_IN_HALF_DAY = 12;
|
|
31
|
+
export declare const MAX_ERROR_LENGTH = 200;
|
|
32
|
+
export declare const MAX_RECONNECT_ATTEMPTS = 60;
|
|
33
|
+
export declare const MILLISECONDS_IN_A_SECOND = 1000;
|
|
34
|
+
export declare const MINUTES_IN_AN_HOUR = 60;
|
|
35
|
+
export declare const SECONDS_IN_A_MINUTE = 60;
|
|
36
|
+
export declare const MILLISECONDS_IN_A_MINUTE: number;
|
|
37
|
+
export declare const MILLISECONDS_IN_A_DAY: number;
|
|
38
|
+
export declare const OVERLAY_FADE_DURATION_MS = 150;
|
|
39
|
+
export declare const PING_INTERVAL_MS = 30000;
|
|
40
|
+
export declare const RAF_BATCH_COUNT = 3;
|
|
41
|
+
export declare const RANDOM_ID_END_INDEX = 11;
|
|
42
|
+
export declare const REBUILD_BATCH_DELAY_MS = 10;
|
|
43
|
+
export declare const REBUILD_RELOAD_DELAY_MS = 200;
|
|
44
|
+
export declare const RECONNECT_INITIAL_DELAY_MS = 500;
|
|
45
|
+
export declare const RECONNECT_POLL_INTERVAL_MS = 300;
|
|
46
|
+
export declare const REACT_STREAM_SLOT_FAST_DELAY_MS = 5;
|
|
47
|
+
export declare const REACT_STREAM_SLOT_SLOW_DELAY_MS = 20;
|
|
48
|
+
export declare const SIGINT_EXIT_CODE = 130;
|
|
49
|
+
export declare const SIGTERM_EXIT_CODE = 143;
|
|
50
|
+
export declare const SVELTE_CSS_LOAD_TIMEOUT_MS = 500;
|
|
51
|
+
export declare const TIME_PRECISION = 2;
|
|
52
|
+
export declare const TWO_THIRDS: number;
|
|
53
|
+
export declare const UNFOUND_INDEX = -1;
|
|
54
|
+
export declare const WEBSOCKET_NORMAL_CLOSURE = 1000;
|
|
55
|
+
export declare const WORKSPACE_COMMAND_ARGS_OFFSET = 3;
|
|
56
|
+
export declare const WORKSPACE_FAILURE_LOG_PRINT_LIMIT = 30;
|
|
57
|
+
export declare const WORKSPACE_FAILURE_RECENT_LOG_LIMIT = 60;
|
|
58
|
+
export declare const WORKSPACE_READY_ATTEMPT_TIMEOUT_MS = 5000;
|
|
59
|
+
export declare const WORKSPACE_READY_PROBE_INTERVAL_MS = 250;
|
|
60
|
+
export declare const WORKSPACE_READY_TIMEOUT_MS = 30000;
|
|
61
|
+
export declare const WORKSPACE_SHUTDOWN_TIMEOUT_MS = 10000;
|
|
62
|
+
export declare const WORKSPACE_TUI_DEFAULT_HEIGHT = 28;
|
|
63
|
+
export declare const WORKSPACE_TUI_DEFAULT_WIDTH = 100;
|
|
64
|
+
export declare const WORKSPACE_TUI_ESCAPE_SEQUENCE_TIMEOUT_MS = 30;
|
|
65
|
+
export declare const WORKSPACE_TUI_FOOTER_LINE_COUNT = 3;
|
|
66
|
+
export declare const WORKSPACE_TUI_MIN_LOG_HEIGHT = 3;
|
|
67
|
+
export declare const WORKSPACE_TUI_MIN_SERVICE_NAME_WIDTH = 7;
|
|
68
|
+
export declare const WORKSPACE_TUI_MIN_TARGET_WIDTH = 8;
|
|
69
|
+
export declare const WORKSPACE_TUI_MIN_WRAP_WIDTH = 12;
|
|
70
|
+
export declare const WORKSPACE_TUI_PROMPT_CURSOR_OFFSET = 3;
|
|
71
|
+
export declare const WORKSPACE_TUI_RECENT_LOG_LIMIT = 40;
|
|
72
|
+
export declare const WORKSPACE_TUI_RENDER_DEBOUNCE_MS = 16;
|
|
73
|
+
export declare const WORKSPACE_TUI_STATUS_WIDTH = 10;
|
|
74
|
+
export declare const WORKSPACE_TUI_TARGET_PADDING_WIDTH = 6;
|
|
75
|
+
export declare const WORKSPACE_TUI_VISIBILITY_WIDTH = 8;
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
2
3
|
export type DeferSlotTemplateContext = {
|
|
3
4
|
$implicit: Record<string, string>;
|
|
4
5
|
slotData: Record<string, string>;
|
|
5
6
|
};
|
|
6
7
|
export declare class DeferErrorTemplateDirective {
|
|
7
8
|
readonly templateRef: TemplateRef<unknown>;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DeferErrorTemplateDirective, never>;
|
|
10
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DeferErrorTemplateDirective, "ng-template[absDeferError]", never, {}, {}, never, never, true, never>;
|
|
8
11
|
}
|
|
9
12
|
export declare class DeferFallbackTemplateDirective {
|
|
10
13
|
readonly templateRef: TemplateRef<unknown>;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DeferFallbackTemplateDirective, never>;
|
|
15
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DeferFallbackTemplateDirective, "ng-template[absDeferFallback]", never, {}, {}, never, never, true, never>;
|
|
11
16
|
}
|
|
12
17
|
export declare class DeferResolvedTemplateDirective {
|
|
13
18
|
readonly templateRef: TemplateRef<DeferSlotTemplateContext>;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DeferResolvedTemplateDirective, never>;
|
|
20
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DeferResolvedTemplateDirective, "ng-template[absDeferResolved]", never, {}, {}, never, never, true, never>;
|
|
14
21
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type AfterViewInit } from '@angular/core';
|
|
2
|
-
import { type AngularDeferSlotPayload } from './defer-slot-payload';
|
|
3
|
-
import { type DeferSlotTemplateContext, DeferErrorTemplateDirective, DeferFallbackTemplateDirective, DeferResolvedTemplateDirective } from './defer-slot-templates.directive';
|
|
2
|
+
import { type AngularDeferSlotPayload } from './defer-slot-payload.js';
|
|
3
|
+
import { type DeferSlotTemplateContext, DeferErrorTemplateDirective, DeferFallbackTemplateDirective, DeferResolvedTemplateDirective } from './defer-slot-templates.directive.js';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
4
5
|
type DeferSlotResolver = () => Promise<AngularDeferSlotPayload>;
|
|
5
6
|
type DeferSlotState = 'error' | 'fallback' | 'resolved';
|
|
6
7
|
export declare class DeferSlotComponent implements AfterViewInit {
|
|
@@ -22,5 +23,7 @@ export declare class DeferSlotComponent implements AfterViewInit {
|
|
|
22
23
|
ngOnDestroy(): void;
|
|
23
24
|
private registerServerSlot;
|
|
24
25
|
private applyPatchPayload;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DeferSlotComponent, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DeferSlotComponent, "abs-defer-slot", never, { "className": { "alias": "className"; "required": false; }; "id": { "alias": "id"; "required": false; }; "resolve": { "alias": "resolve"; "required": false; }; }, {}, ["resolvedTemplate", "fallbackTemplate", "errorTemplate"], never, true, never>;
|
|
25
28
|
}
|
|
26
29
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
1
2
|
export declare class ImageComponent {
|
|
2
3
|
readonly alt: import("@angular/core").InputSignal<string>;
|
|
3
4
|
readonly blurDataURL: import("@angular/core").InputSignal<string | undefined>;
|
|
@@ -26,8 +27,8 @@ export declare class ImageComponent {
|
|
|
26
27
|
readonly width: import("@angular/core").InputSignal<number | undefined>;
|
|
27
28
|
private readonly blurRemoved;
|
|
28
29
|
readonly resolvedSrc: import("@angular/core").Signal<string>;
|
|
29
|
-
readonly srcSet: import("@angular/core").Signal<
|
|
30
|
-
readonly resolvedSrcSet: import("@angular/core").Signal<
|
|
30
|
+
readonly srcSet: import("@angular/core").Signal<any>;
|
|
31
|
+
readonly resolvedSrcSet: import("@angular/core").Signal<any>;
|
|
31
32
|
readonly resolvedSizes: import("@angular/core").Signal<string | null>;
|
|
32
33
|
readonly resolvedCrossOrigin: import("@angular/core").Signal<"" | "anonymous" | "use-credentials" | null>;
|
|
33
34
|
readonly resolvedReferrerPolicy: import("@angular/core").Signal<string | null>;
|
|
@@ -36,4 +37,6 @@ export declare class ImageComponent {
|
|
|
36
37
|
readonly imgStyle: import("@angular/core").Signal<Record<string, string | number>>;
|
|
37
38
|
handleLoad(event: Event): void;
|
|
38
39
|
handleError(event: Event): void;
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ImageComponent, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ImageComponent, "abs-image", never, { "alt": { "alias": "alt"; "required": true; "isSignal": true; }; "blurDataURL": { "alias": "blurDataURL"; "required": false; "isSignal": true; }; "className": { "alias": "className"; "required": false; "isSignal": true; }; "crossOrigin": { "alias": "crossOrigin"; "required": false; "isSignal": true; }; "fetchPriority": { "alias": "fetchPriority"; "required": false; "isSignal": true; }; "fill": { "alias": "fill"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "loader": { "alias": "loader"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "onError": { "alias": "onError"; "required": false; "isSignal": true; }; "onLoad": { "alias": "onLoad"; "required": false; "isSignal": true; }; "overrideSrc": { "alias": "overrideSrc"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "priority": { "alias": "priority"; "required": false; "isSignal": true; }; "quality": { "alias": "quality"; "required": false; "isSignal": true; }; "referrerPolicy": { "alias": "referrerPolicy"; "required": false; "isSignal": true; }; "sizes": { "alias": "sizes"; "required": false; "isSignal": true; }; "src": { "alias": "src"; "required": true; "isSignal": true; }; "style": { "alias": "style"; "required": false; "isSignal": true; }; "unoptimized": { "alias": "unoptimized"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
39
42
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { DeferSlotComponent } from './defer-slot.component';
|
|
2
|
-
export { DeferErrorTemplateDirective, DeferFallbackTemplateDirective, DeferResolvedTemplateDirective } from './defer-slot-templates.directive';
|
|
3
|
-
export { ImageComponent } from './image.component';
|
|
4
|
-
export { StreamSlotComponent } from './stream-slot.component';
|
|
1
|
+
export { DeferSlotComponent } from './defer-slot.component.js';
|
|
2
|
+
export { DeferErrorTemplateDirective, DeferFallbackTemplateDirective, DeferResolvedTemplateDirective } from './defer-slot-templates.directive.js';
|
|
3
|
+
export { ImageComponent } from './image.component.js';
|
|
4
|
+
export { StreamSlotComponent } from './stream-slot.component.js';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type SafeHtml } from '@angular/platform-browser';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
2
3
|
type SlotResolver = () => Promise<string> | string;
|
|
3
4
|
export declare class StreamSlotComponent {
|
|
4
5
|
private readonly cdr;
|
|
@@ -14,5 +15,7 @@ export declare class StreamSlotComponent {
|
|
|
14
15
|
readonly currentHtml: import("@angular/core").WritableSignal<string | SafeHtml>;
|
|
15
16
|
ngOnInit(): void;
|
|
16
17
|
ngOnDestroy(): void;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StreamSlotComponent, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StreamSlotComponent, "abs-stream-slot", never, { "className": { "alias": "className"; "required": false; }; "errorHtml": { "alias": "errorHtml"; "required": false; }; "fallbackHtml": { "alias": "fallbackHtml"; "required": false; }; "id": { "alias": "id"; "required": true; }; "resolve": { "alias": "resolve"; "required": true; }; "timeoutMs": { "alias": "timeoutMs"; "required": false; }; }, {}, never, never, true, never>;
|
|
17
20
|
}
|
|
18
21
|
export {};
|
|
@@ -1,11 +1 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
interface Window {
|
|
3
|
-
__ABS_SLOT_ENQUEUE__?: (id: string, payload: unknown) => void;
|
|
4
|
-
__ABS_SLOT_FLUSH__?: () => void;
|
|
5
|
-
__ABS_SLOT_CONSUMERS__?: Record<string, ((payload: unknown) => boolean | void) | undefined>;
|
|
6
|
-
__ABS_SLOT_HYDRATION_PENDING__?: boolean;
|
|
7
|
-
__ABS_SLOT_PENDING__?: Record<string, unknown>;
|
|
8
|
-
__ABS_SLOT_RUNTIME__?: boolean;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
1
|
export declare const getStreamSwapRuntimeScript: () => string;
|
package/dist/src/constants.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { type HMRState } from './clientManager';
|
|
|
3
3
|
export declare const queueFileChange: (state: HMRState, filePath: string, config: BuildConfig, onRebuildComplete: (result: {
|
|
4
4
|
manifest: Record<string, string>;
|
|
5
5
|
hmrState: HMRState;
|
|
6
|
-
}) => void) => void
|
|
6
|
+
}) => void) => Promise<void>;
|
|
7
7
|
export declare const triggerRebuild: (state: HMRState, config: BuildConfig, onRebuildComplete: (result: {
|
|
8
8
|
manifest: Record<string, string>;
|
|
9
9
|
hmrState: HMRState;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Readable } from 'node:stream';
|
|
2
|
-
import type { Component } from 'svelte';
|
|
2
|
+
import type { Component, ComponentProps } from 'svelte';
|
|
3
3
|
export type RenderPipeableOptions = {
|
|
4
4
|
bootstrapScriptContent?: string;
|
|
5
5
|
bootstrapScripts?: string[];
|
|
@@ -9,4 +9,4 @@ export type RenderPipeableOptions = {
|
|
|
9
9
|
progressiveChunkSize?: number;
|
|
10
10
|
signal?: AbortSignal;
|
|
11
11
|
};
|
|
12
|
-
export declare const renderToPipeableStream: <
|
|
12
|
+
export declare const renderToPipeableStream: <Comp extends Component<Record<string, unknown>>>(component: Comp, props?: ComponentProps<Comp>, { bootstrapScriptContent, bootstrapScripts, bootstrapModules, nonce, onError, progressiveChunkSize, signal }?: RenderPipeableOptions) => Readable;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Component } from 'svelte';
|
|
1
|
+
import type { Component, ComponentProps } from 'svelte';
|
|
2
2
|
export declare const SVELTE_PAGE_ROOT_ID = "__absolute_svelte_root__";
|
|
3
3
|
export type RenderStreamOptions = {
|
|
4
4
|
bootstrapScriptContent?: string;
|
|
@@ -11,4 +11,4 @@ export type RenderStreamOptions = {
|
|
|
11
11
|
headContent?: string;
|
|
12
12
|
bodyContent?: string;
|
|
13
13
|
};
|
|
14
|
-
export declare const renderToReadableStream: <
|
|
14
|
+
export declare const renderToReadableStream: <Comp extends Component<Record<string, unknown>>>(component: Comp, props?: ComponentProps<Comp>, { bootstrapScriptContent, bootstrapScripts, bootstrapModules, nonce, onError, progressiveChunkSize, signal, headContent, bodyContent }?: RenderStreamOptions) => Promise<ReadableStream<Uint8Array<ArrayBufferLike>>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Component } from 'svelte';
|
|
1
|
+
import type { Component, ComponentProps } from 'svelte';
|
|
2
2
|
export type RenderStringOptions = {
|
|
3
3
|
bootstrapScriptContent?: string;
|
|
4
4
|
bootstrapScripts?: string[];
|
|
@@ -6,4 +6,4 @@ export type RenderStringOptions = {
|
|
|
6
6
|
nonce?: string;
|
|
7
7
|
onError?: (error: unknown) => void;
|
|
8
8
|
};
|
|
9
|
-
export declare const renderToString: <
|
|
9
|
+
export declare const renderToString: <Comp extends Component<Record<string, unknown>>>(component: Comp, props?: ComponentProps<Comp>, { bootstrapScriptContent, bootstrapScripts, bootstrapModules, nonce, onError }?: RenderStringOptions) => string;
|
|
@@ -56,13 +56,13 @@ export declare const Image: import("vue").DefineComponent<{
|
|
|
56
56
|
loader: Function;
|
|
57
57
|
loading: string;
|
|
58
58
|
onError: Function;
|
|
59
|
-
|
|
60
|
-
quality: number;
|
|
59
|
+
height: number;
|
|
61
60
|
width: number;
|
|
61
|
+
onLoad: Function;
|
|
62
62
|
sizes: string;
|
|
63
63
|
priority: boolean;
|
|
64
64
|
unoptimized: boolean;
|
|
65
|
-
|
|
65
|
+
quality: number;
|
|
66
66
|
crossOrigin: string;
|
|
67
67
|
overrideSrc: string;
|
|
68
68
|
placeholder: string;
|
package/dist/svelte/browser.js
CHANGED
|
@@ -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) {
|
|
@@ -305,5 +287,5 @@ export {
|
|
|
305
287
|
createTypedIsland
|
|
306
288
|
};
|
|
307
289
|
|
|
308
|
-
//# debugId=
|
|
290
|
+
//# debugId=5801DC3CA876DA0F64756E2164756E21
|
|
309
291
|
//# sourceMappingURL=browser.js.map
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"import type { StoreApi } from 'zustand/vanilla';\nimport {\n\treadIslandStore,\n\tsubscribeIslandStore,\n\ttype IslandStoreState\n} from '../client/islandStore';\n\nexport const useIslandStore = <TState extends IslandStoreState, TSelected>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected\n) => ({\n\tsubscribe(listener: (value: TSelected) => void) {\n\t\tlistener(readIslandStore(store, selector));\n\n\t\treturn subscribeIslandStore(store, selector, listener);\n\t}\n});\n",
|
|
14
14
|
"export { createTypedIsland } from './createIsland.browser';\nexport { resolveIslandHtml } from './resolveIslandHtml.browser';\nexport { useIslandStore } from './islandStore';\n\nexport const renderIsland = async () => {\n\tthrow new Error(\n\t\t'renderIsland is server-only. Use it during SSR, not in the browser.'\n\t);\n};\n"
|
|
15
15
|
],
|
|
16
|
-
"mappings": "
|
|
17
|
-
"debugId": "
|
|
16
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAC,UAAU;AAAA,IACjC,MAAM,gBAAgB,SAAS,KAAK;AAAA,IACpC,IAAI,OAAO,GAAG,eAAe,gBAAgB,GAAG;AAAA,MAC/C;AAAA,IACD;AAAA,IAEA,mBAAmB;AAAA,IACnB,SAAS,aAAa;AAAA,GACtB;AAAA;;;AC3KK,IAAM,iBAAiB,CAC7B,OACA,cACK;AAAA,EACL,SAAS,CAAC,UAAsC;AAAA,IAC/C,SAAS,gBAAgB,OAAO,QAAQ,CAAC;AAAA,IAEzC,OAAO,qBAAqB,OAAO,UAAU,QAAQ;AAAA;AAEvD;;;ACZO,IAAM,eAAe,YAAY;AAAA,EACvC,MAAM,IAAI,MACT,qEACD;AAAA;",
|
|
17
|
+
"debugId": "5801DC3CA876DA0F64756E2164756E21",
|
|
18
18
|
"names": []
|
|
19
19
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import StreamSlot from './StreamSlot.svelte';
|
|
3
|
+
|
|
4
|
+
type Resolver = () => Promise<string> | string;
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
className,
|
|
8
|
+
errorHtml,
|
|
9
|
+
fallbackHtml = '',
|
|
10
|
+
id,
|
|
11
|
+
promise,
|
|
12
|
+
resolve,
|
|
13
|
+
timeoutMs
|
|
14
|
+
}: {
|
|
15
|
+
className?: string;
|
|
16
|
+
errorHtml?: string;
|
|
17
|
+
fallbackHtml?: string;
|
|
18
|
+
id: string;
|
|
19
|
+
promise?: Promise<string>;
|
|
20
|
+
resolve?: Resolver;
|
|
21
|
+
timeoutMs?: number;
|
|
22
|
+
} = $props();
|
|
23
|
+
|
|
24
|
+
const slotResolver = () => {
|
|
25
|
+
if (resolve) return resolve();
|
|
26
|
+
if (promise) return promise;
|
|
27
|
+
|
|
28
|
+
return '';
|
|
29
|
+
};
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<StreamSlot
|
|
33
|
+
{className}
|
|
34
|
+
{errorHtml}
|
|
35
|
+
{fallbackHtml}
|
|
36
|
+
{id}
|
|
37
|
+
resolve={slotResolver}
|
|
38
|
+
{timeoutMs}
|
|
39
|
+
/>
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Metadata, RobotsDirective } from '../../../types/metadata';
|
|
3
|
+
|
|
4
|
+
export let title: Metadata['title'] = 'AbsoluteJS';
|
|
5
|
+
export let description: Metadata['description'] =
|
|
6
|
+
'A page created using AbsoluteJS';
|
|
7
|
+
export let icon: Metadata['icon'] = '/assets/ico/favicon.ico';
|
|
8
|
+
export let font: Metadata['font'] = undefined;
|
|
9
|
+
export let cssPath: Metadata['cssPath'] = undefined;
|
|
10
|
+
export let canonical: Metadata['canonical'] = undefined;
|
|
11
|
+
export let openGraph: Metadata['openGraph'] = undefined;
|
|
12
|
+
export let twitter: Metadata['twitter'] = undefined;
|
|
13
|
+
export let robots: Metadata['robots'] = undefined;
|
|
14
|
+
export let meta: Metadata['meta'] = undefined;
|
|
15
|
+
|
|
16
|
+
const robotsContent = (r: RobotsDirective) => {
|
|
17
|
+
const directives: string[] = [];
|
|
18
|
+
if (r.index === false) directives.push('noindex');
|
|
19
|
+
if (r.index === true) directives.push('index');
|
|
20
|
+
if (r.follow === false) directives.push('nofollow');
|
|
21
|
+
if (r.follow === true) directives.push('follow');
|
|
22
|
+
if (r.noarchive) directives.push('noarchive');
|
|
23
|
+
if (r.nosnippet) directives.push('nosnippet');
|
|
24
|
+
if (r.noimageindex) directives.push('noimageindex');
|
|
25
|
+
if (r.maxSnippet !== undefined)
|
|
26
|
+
directives.push(`max-snippet:${r.maxSnippet}`);
|
|
27
|
+
if (r.maxImagePreview)
|
|
28
|
+
directives.push(`max-image-preview:${r.maxImagePreview}`);
|
|
29
|
+
if (r.maxVideoPreview !== undefined)
|
|
30
|
+
directives.push(`max-video-preview:${r.maxVideoPreview}`);
|
|
31
|
+
return directives.join(', ');
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
$: cssPaths = cssPath ? (Array.isArray(cssPath) ? cssPath : [cssPath]) : [];
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<svelte:head>
|
|
38
|
+
<meta charset="utf-8" />
|
|
39
|
+
<title>{title}</title>
|
|
40
|
+
<meta name="description" content={description} />
|
|
41
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
42
|
+
<link rel="icon" href={icon} />
|
|
43
|
+
|
|
44
|
+
{#if canonical}
|
|
45
|
+
<link rel="canonical" href={canonical} />
|
|
46
|
+
{/if}
|
|
47
|
+
|
|
48
|
+
{#if openGraph}
|
|
49
|
+
<meta property="og:title" content={openGraph.title ?? title} />
|
|
50
|
+
<meta
|
|
51
|
+
property="og:description"
|
|
52
|
+
content={openGraph.description ?? description}
|
|
53
|
+
/>
|
|
54
|
+
{#if openGraph.url}
|
|
55
|
+
<meta property="og:url" content={openGraph.url} />
|
|
56
|
+
{/if}
|
|
57
|
+
{#if openGraph.image}
|
|
58
|
+
<meta property="og:image" content={openGraph.image} />
|
|
59
|
+
{/if}
|
|
60
|
+
{#if openGraph.imageAlt}
|
|
61
|
+
<meta property="og:image:alt" content={openGraph.imageAlt} />
|
|
62
|
+
{/if}
|
|
63
|
+
{#if openGraph.imageWidth}
|
|
64
|
+
<meta
|
|
65
|
+
property="og:image:width"
|
|
66
|
+
content={String(openGraph.imageWidth)}
|
|
67
|
+
/>
|
|
68
|
+
{/if}
|
|
69
|
+
{#if openGraph.imageHeight}
|
|
70
|
+
<meta
|
|
71
|
+
property="og:image:height"
|
|
72
|
+
content={String(openGraph.imageHeight)}
|
|
73
|
+
/>
|
|
74
|
+
{/if}
|
|
75
|
+
{#if openGraph.type}
|
|
76
|
+
<meta property="og:type" content={openGraph.type} />
|
|
77
|
+
{/if}
|
|
78
|
+
{#if openGraph.siteName}
|
|
79
|
+
<meta property="og:site_name" content={openGraph.siteName} />
|
|
80
|
+
{/if}
|
|
81
|
+
{#if openGraph.locale}
|
|
82
|
+
<meta property="og:locale" content={openGraph.locale} />
|
|
83
|
+
{/if}
|
|
84
|
+
{/if}
|
|
85
|
+
|
|
86
|
+
{#if twitter}
|
|
87
|
+
{#if twitter.card}
|
|
88
|
+
<meta name="twitter:card" content={twitter.card} />
|
|
89
|
+
{/if}
|
|
90
|
+
<meta name="twitter:title" content={twitter.title ?? title} />
|
|
91
|
+
<meta
|
|
92
|
+
name="twitter:description"
|
|
93
|
+
content={twitter.description ?? description}
|
|
94
|
+
/>
|
|
95
|
+
{#if twitter.image}
|
|
96
|
+
<meta name="twitter:image" content={twitter.image} />
|
|
97
|
+
{/if}
|
|
98
|
+
{#if twitter.imageAlt}
|
|
99
|
+
<meta name="twitter:image:alt" content={twitter.imageAlt} />
|
|
100
|
+
{/if}
|
|
101
|
+
{#if twitter.site}
|
|
102
|
+
<meta name="twitter:site" content={twitter.site} />
|
|
103
|
+
{/if}
|
|
104
|
+
{#if twitter.creator}
|
|
105
|
+
<meta name="twitter:creator" content={twitter.creator} />
|
|
106
|
+
{/if}
|
|
107
|
+
{/if}
|
|
108
|
+
|
|
109
|
+
{#if robots}
|
|
110
|
+
{@const content = robotsContent(robots)}
|
|
111
|
+
{#if content}
|
|
112
|
+
<meta name="robots" {content} />
|
|
113
|
+
{/if}
|
|
114
|
+
{/if}
|
|
115
|
+
|
|
116
|
+
{#if meta}
|
|
117
|
+
{#each meta as tag}
|
|
118
|
+
{#if tag.property}
|
|
119
|
+
<meta property={tag.property} content={tag.content} />
|
|
120
|
+
{:else if tag.httpEquiv}
|
|
121
|
+
<meta http-equiv={tag.httpEquiv} content={tag.content} />
|
|
122
|
+
{:else if tag.name}
|
|
123
|
+
<meta name={tag.name} content={tag.content} />
|
|
124
|
+
{/if}
|
|
125
|
+
{/each}
|
|
126
|
+
{/if}
|
|
127
|
+
|
|
128
|
+
{#if font}
|
|
129
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
130
|
+
<link
|
|
131
|
+
rel="preconnect"
|
|
132
|
+
href="https://fonts.gstatic.com"
|
|
133
|
+
crossorigin="anonymous"
|
|
134
|
+
/>
|
|
135
|
+
<link
|
|
136
|
+
href={`https://fonts.googleapis.com/css2?family=${font}:wght@100..900&display=swap`}
|
|
137
|
+
rel="stylesheet"
|
|
138
|
+
/>
|
|
139
|
+
{/if}
|
|
140
|
+
|
|
141
|
+
{#each cssPaths as path}
|
|
142
|
+
<link rel="stylesheet" href={path} type="text/css" />
|
|
143
|
+
{/each}
|
|
144
|
+
</svelte:head>
|