@absolutejs/absolute 0.19.0-beta.351 → 0.19.0-beta.352

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.
@@ -2,3 +2,5 @@ export declare const handleVuePageRequest: <Component extends import("vue").Comp
2
2
  export { Island } from './Island';
3
3
  export { createTypedIsland } from './createIsland';
4
4
  export { useIslandStore } from './useIslandStore';
5
+ export { default as Image } from './components/Image.vue';
6
+ export { StreamSlot, SuspenseSlot } from './components';
package/dist/vue/index.js CHANGED
@@ -361,12 +361,12 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
361
361
  });
362
362
  return { body, styles };
363
363
  }, renderVueError = async (conventionPath, errorProps) => {
364
- const { createSSRApp, h } = await import("vue");
364
+ const { createSSRApp, h: h3 } = await import("vue");
365
365
  const { renderToString } = await import("vue/server-renderer");
366
366
  const mod = await import(conventionPath);
367
367
  const ErrorComponent = mod.default;
368
368
  const app = createSSRApp({
369
- render: () => h(ErrorComponent, errorProps)
369
+ render: () => h3(ErrorComponent, errorProps)
370
370
  });
371
371
  const rawBody = await renderToString(app);
372
372
  const { styles, body } = unescapeVueStyles(rawBody);
@@ -429,12 +429,12 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
429
429
  status: 404
430
430
  });
431
431
  }, renderVueNotFound = async (conventionPath) => {
432
- const { createSSRApp, h } = await import("vue");
432
+ const { createSSRApp, h: h3 } = await import("vue");
433
433
  const { renderToString } = await import("vue/server-renderer");
434
434
  const mod = await import(conventionPath);
435
435
  const NotFoundComponent = mod.default;
436
436
  const app = createSSRApp({
437
- render: () => h(NotFoundComponent)
437
+ render: () => h3(NotFoundComponent)
438
438
  });
439
439
  const rawBody = await renderToString(app);
440
440
  const { styles, body } = unescapeVueStyles(rawBody);
@@ -553,10 +553,10 @@ var ssrDirty = false, isRecord = (value) => typeof value === "object" && value !
553
553
  };
554
554
  };
555
555
  const resolvedPage = await resolvePageComponent();
556
- const { createSSRApp, h } = await import("vue");
556
+ const { createSSRApp, h: h3 } = await import("vue");
557
557
  const { renderToWebStream } = await import("vue/server-renderer");
558
558
  const app = createSSRApp({
559
- render: () => h(resolvedPage.component, maybeProps ?? null)
559
+ render: () => h3(resolvedPage.component, maybeProps ?? null)
560
560
  });
561
561
  const bodyStream = renderToWebStream(app);
562
562
  const head = `<!DOCTYPE html><html>${headTag}<body><div id="root">`;
@@ -1681,7 +1681,7 @@ function sha1(str) {
1681
1681
  words32[len >> 5] |= 128 << 24 - len % 32;
1682
1682
  words32[(len + 64 >> 9 << 4) + 15] = len;
1683
1683
  for (let i = 0;i < words32.length; i += 16) {
1684
- const h0 = a, h1 = b, h2 = c, h3 = d, h4 = e;
1684
+ const h0 = a, h1 = b, h22 = c, h3 = d, h4 = e;
1685
1685
  for (let j = 0;j < 80; j++) {
1686
1686
  if (j < 16) {
1687
1687
  w[j] = words32[i + j];
@@ -1700,7 +1700,7 @@ function sha1(str) {
1700
1700
  }
1701
1701
  a = add32(a, h0);
1702
1702
  b = add32(b, h1);
1703
- c = add32(c, h2);
1703
+ c = add32(c, h22);
1704
1704
  d = add32(d, h3);
1705
1705
  e = add32(e, h4);
1706
1706
  }
@@ -30398,14 +30398,14 @@ var init_islands2 = __esm(() => {
30398
30398
  import { createElement } from "react";
30399
30399
  import { renderToStaticMarkup } from "react-dom/server";
30400
30400
  import { render as renderSvelte } from "svelte/server";
30401
- import { createSSRApp, h } from "vue";
30401
+ import { createSSRApp, h as h3 } from "vue";
30402
30402
  import { renderToString as renderVueToString } from "vue/server-renderer";
30403
30403
  var renderReactIslandToHtml = (component, props) => renderToStaticMarkup(createElement(component, props)), renderSvelteIslandToHtml = (component, props) => {
30404
30404
  const { body } = renderSvelte(component, { props });
30405
30405
  return body;
30406
30406
  }, renderVueIslandToHtml = (component, props) => {
30407
30407
  const app = createSSRApp({
30408
- render: () => h(component, props)
30408
+ render: () => h3(component, props)
30409
30409
  });
30410
30410
  return renderVueToString(app);
30411
30411
  };
@@ -30782,6 +30782,105 @@ var init_renderIslandMarkup = __esm(() => {
30782
30782
  resolvedServerBuildComponentCache = new Map;
30783
30783
  });
30784
30784
 
30785
+ // src/vue/components/Image.vue
30786
+ var Image_default = "../Image-0pe96k20.vue";
30787
+ // src/vue/components/SuspenseSlot.ts
30788
+ import { defineComponent as defineComponent2, h as h2 } from "vue";
30789
+
30790
+ // src/vue/components/StreamSlot.ts
30791
+ import { defineComponent, h } from "vue";
30792
+
30793
+ // src/core/streamingSlotRegistry.ts
30794
+ var asyncLocalStorage;
30795
+ var isServerRuntime = () => typeof process !== "undefined" && typeof process.versions?.node === "string";
30796
+ var ensureAsyncLocalStorage = async () => {
30797
+ if (typeof asyncLocalStorage !== "undefined")
30798
+ return asyncLocalStorage;
30799
+ if (!isServerRuntime()) {
30800
+ asyncLocalStorage = null;
30801
+ return asyncLocalStorage;
30802
+ }
30803
+ const mod = await import("async_hooks");
30804
+ asyncLocalStorage = new mod.AsyncLocalStorage;
30805
+ return asyncLocalStorage;
30806
+ };
30807
+ var registerStreamingSlot = (slot) => {
30808
+ if (!asyncLocalStorage)
30809
+ return;
30810
+ const store = asyncLocalStorage.getStore();
30811
+ if (!store)
30812
+ return;
30813
+ store.set(slot.id, slot);
30814
+ };
30815
+ var runWithStreamingSlotRegistry = async (task) => {
30816
+ const storage = await ensureAsyncLocalStorage();
30817
+ if (!storage) {
30818
+ return {
30819
+ result: await task(),
30820
+ slots: []
30821
+ };
30822
+ }
30823
+ return storage.run(new Map, async () => {
30824
+ const result = await task();
30825
+ const store = storage.getStore();
30826
+ return {
30827
+ result,
30828
+ slots: store ? [...store.values()] : []
30829
+ };
30830
+ });
30831
+ };
30832
+
30833
+ // src/vue/components/StreamSlot.ts
30834
+ var StreamSlot = defineComponent({
30835
+ name: "AbsoluteStreamSlot",
30836
+ props: {
30837
+ className: { default: undefined, type: String },
30838
+ errorHtml: { default: undefined, type: String },
30839
+ fallbackHtml: { default: "", type: String },
30840
+ id: { required: true, type: String },
30841
+ resolve: {
30842
+ required: true,
30843
+ type: Function
30844
+ },
30845
+ timeoutMs: { default: undefined, type: Number }
30846
+ },
30847
+ setup(props) {
30848
+ if (typeof window === "undefined") {
30849
+ registerStreamingSlot({
30850
+ errorHtml: props.errorHtml,
30851
+ fallbackHtml: props.fallbackHtml,
30852
+ id: props.id,
30853
+ resolve: props.resolve,
30854
+ timeoutMs: props.timeoutMs
30855
+ });
30856
+ }
30857
+ return () => h("div", {
30858
+ class: props.className,
30859
+ "data-absolute-slot": "true",
30860
+ id: `slot-${props.id}`,
30861
+ innerHTML: props.fallbackHtml
30862
+ });
30863
+ }
30864
+ });
30865
+
30866
+ // src/vue/components/SuspenseSlot.ts
30867
+ var SuspenseSlot = defineComponent2({
30868
+ name: "AbsoluteSuspenseSlot",
30869
+ props: {
30870
+ className: { default: undefined, type: String },
30871
+ errorHtml: { default: undefined, type: String },
30872
+ fallbackHtml: { default: "", type: String },
30873
+ id: { required: true, type: String },
30874
+ resolve: {
30875
+ required: true,
30876
+ type: Function
30877
+ },
30878
+ timeoutMs: { default: undefined, type: Number }
30879
+ },
30880
+ setup(props) {
30881
+ return () => h2(StreamSlot, props);
30882
+ }
30883
+ });
30785
30884
  // src/client/streamSwap.ts
30786
30885
  var streamSwapRuntime = () => {
30787
30886
  if (window.__ABS_SLOT_RUNTIME__ === true)
@@ -31271,46 +31370,6 @@ var appendStreamingSlotPatchesToStream = (stream, slots = [], {
31271
31370
  });
31272
31371
  };
31273
31372
 
31274
- // src/core/streamingSlotRegistry.ts
31275
- var asyncLocalStorage;
31276
- var isServerRuntime = () => typeof process !== "undefined" && typeof process.versions?.node === "string";
31277
- var ensureAsyncLocalStorage = async () => {
31278
- if (typeof asyncLocalStorage !== "undefined")
31279
- return asyncLocalStorage;
31280
- if (!isServerRuntime()) {
31281
- asyncLocalStorage = null;
31282
- return asyncLocalStorage;
31283
- }
31284
- const mod = await import("async_hooks");
31285
- asyncLocalStorage = new mod.AsyncLocalStorage;
31286
- return asyncLocalStorage;
31287
- };
31288
- var registerStreamingSlot = (slot) => {
31289
- if (!asyncLocalStorage)
31290
- return;
31291
- const store = asyncLocalStorage.getStore();
31292
- if (!store)
31293
- return;
31294
- store.set(slot.id, slot);
31295
- };
31296
- var runWithStreamingSlotRegistry = async (task) => {
31297
- const storage = await ensureAsyncLocalStorage();
31298
- if (!storage) {
31299
- return {
31300
- result: await task(),
31301
- slots: []
31302
- };
31303
- }
31304
- return storage.run(new Map, async () => {
31305
- const result = await task();
31306
- const store = storage.getStore();
31307
- return {
31308
- result,
31309
- slots: store ? [...store.values()] : []
31310
- };
31311
- });
31312
- };
31313
-
31314
31373
  // src/core/responseEnhancers.ts
31315
31374
  var toResponse = async (responseLike) => await responseLike;
31316
31375
  var cloneHeaders = (response) => {
@@ -31357,7 +31416,7 @@ var wrapPageHandlerWithStreamingSlots = (handler) => (...args) => withRegistered
31357
31416
  init_pageHandler();
31358
31417
 
31359
31418
  // src/vue/Island.ts
31360
- import { defineComponent, h as h2, onServerPrefetch } from "vue";
31419
+ import { defineComponent as defineComponent3, h as h4, onServerPrefetch } from "vue";
31361
31420
 
31362
31421
  // src/client/preserveIslandMarkup.ts
31363
31422
  init_islandMarkupAttributes();
@@ -31445,7 +31504,7 @@ var preserveIslandMarkup = (props) => {
31445
31504
  // src/vue/Island.ts
31446
31505
  init_islandMarkupAttributes();
31447
31506
  init_renderIslandMarkup();
31448
- var defineRuntimeIslandComponent = (setup) => defineComponent({
31507
+ var defineRuntimeIslandComponent = (setup) => defineComponent3({
31449
31508
  name: "AbsoluteIsland",
31450
31509
  props: {
31451
31510
  component: {
@@ -31477,7 +31536,7 @@ var Island = defineRuntimeIslandComponent((props) => {
31477
31536
  });
31478
31537
  return () => {
31479
31538
  const preserved = isBrowser ? preserveIslandMarkup(props) : null;
31480
- return h2("div", {
31539
+ return h4("div", {
31481
31540
  ...preserved?.attributes ?? markerAttributes,
31482
31541
  "data-allow-mismatch": "",
31483
31542
  innerHTML: isBrowser ? preserved?.innerHTML : html
@@ -31487,8 +31546,8 @@ var Island = defineRuntimeIslandComponent((props) => {
31487
31546
  // src/vue/createIsland.ts
31488
31547
  init_islandMarkupAttributes();
31489
31548
  init_renderIslandMarkup();
31490
- import { defineComponent as defineComponent2, h as h3, onServerPrefetch as onServerPrefetch2 } from "vue";
31491
- var defineRuntimeIslandComponent2 = (setup) => defineComponent2({
31549
+ import { defineComponent as defineComponent4, h as h5, onServerPrefetch as onServerPrefetch2 } from "vue";
31550
+ var defineRuntimeIslandComponent2 = (setup) => defineComponent4({
31492
31551
  name: "AbsoluteIsland",
31493
31552
  props: {
31494
31553
  component: {
@@ -31518,7 +31577,7 @@ var createTypedIsland = (registry) => defineRuntimeIslandComponent2((props) => {
31518
31577
  const result = await renderIslandResult(registry, props);
31519
31578
  ({ attributes: markerAttributes, html } = result);
31520
31579
  });
31521
- return () => h3("div", {
31580
+ return () => h5("div", {
31522
31581
  ...markerAttributes,
31523
31582
  "data-allow-mismatch": "",
31524
31583
  innerHTML: isBrowser ? undefined : html
@@ -31669,8 +31728,11 @@ export {
31669
31728
  useIslandStore,
31670
31729
  handleVuePageRequest2 as handleVuePageRequest,
31671
31730
  createTypedIsland,
31672
- Island
31731
+ SuspenseSlot,
31732
+ StreamSlot,
31733
+ Island,
31734
+ Image_default as Image
31673
31735
  };
31674
31736
 
31675
- //# debugId=2F7033054CE3878164756E2164756E21
31737
+ //# debugId=5FAE5FAF19D8DFBB64756E2164756E21
31676
31738
  //# sourceMappingURL=index.js.map