tempo-sdk 0.0.102 → 0.0.106
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/assets/editor.js +1 -1
- package/dist/assets/index.js +1 -1
- package/dist/assets/parser.js +1 -1
- package/dist/astro/runtime.js +1 -1
- package/dist/astro.js +1 -1
- package/dist/canvas/astro.d.ts +1 -1
- package/dist/canvas/astro.js +1 -1
- package/dist/canvas/editor.d.ts +1 -1
- package/dist/canvas/editor.js +1 -1
- package/dist/canvas/index.d.ts +2 -2
- package/dist/canvas/index.js +1 -1
- package/dist/canvas/parser.d.ts +2 -2
- package/dist/canvas/parser.js +1 -1
- package/dist/canvas/svelte.d.ts +11 -2
- package/dist/canvas/svelte.js +1 -1
- package/dist/canvas/vue.d.ts +11 -2
- package/dist/canvas/vue.js +1 -1
- package/dist/{chunk-LJCBFTMP.js → chunk-6IBN6C5F.js} +1 -1
- package/dist/{chunk-GQIOB5SV.js → chunk-CKHFND4C.js} +1 -1
- package/dist/chunk-I7QHVG22.js +1 -0
- package/dist/{chunk-HBQ7FFH7.js → chunk-NCDY2IDX.js} +1 -1
- package/dist/{chunk-FL7FSJSL.js → chunk-NLUW2DFD.js} +1 -1
- package/dist/{chunk-ZXBMP6RV.js → chunk-UBI4I7J4.js} +1 -1
- package/dist/expo/plugin.cjs +1 -1
- package/dist/expo/plugin.js +1 -1
- package/dist/expo-babel-plugin.cjs +1 -1
- package/dist/expo-babel-plugin.js +1 -1
- package/dist/flutter-preview-path.js +1 -1
- package/dist/index.js +1 -1
- package/dist/nextjs/plugin.cjs +1 -1
- package/dist/nextjs/plugin.js +1 -1
- package/dist/nextjs-loader.cjs +1 -1
- package/dist/nextjs.cjs +1 -1
- package/dist/nextjs.js +1 -1
- package/dist/nuxt/runtime/identity.js +1 -1
- package/dist/nuxt.js +1 -1
- package/dist/{parser.d-MO5ciJ5n.d.ts → parser.d-C2wqSGAt.d.ts} +11 -0
- package/dist/{storyboard.contract.d-UQ4MUYN5.d.ts → storyboard.contract.d-D23m3fhP.d.ts} +12 -2
- package/dist/svelte.js +1 -1
- package/dist/vue.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-CXCUJCXD.js +0 -1
package/dist/assets/editor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e}from"../chunk-
|
|
1
|
+
import{b as e}from"../chunk-UBI4I7J4.js";import"../chunk-XUSV3KOD.js";var r=e("assets/editor","ensureNamedDefaultExport"),o=e("assets/editor","ensureAssetDeclaration"),s=e("assets/editor","addLibraries"),a=e("assets/editor","removeLibraries");export{s as addLibraries,o as ensureAssetDeclaration,r as ensureNamedDefaultExport,a as removeLibraries};
|
package/dist/assets/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as a,f as b,g as c,h as d,i as e,j as f,k as g,l as h,m as i}from"../chunk-
|
|
1
|
+
import{e as a,f as b,g as c,h as d,i as e,j as f,k as g,l as h,m as i}from"../chunk-CKHFND4C.js";import"../chunk-JRJOWLCN.js";import"../chunk-XO2BSHWM.js";import"../chunk-M3GN2KUH.js";import"../chunk-FH6TMWFA.js";import"../chunk-XUSV3KOD.js";export{a as AssetLivePreview,d as TEMPO_ASSET_CONFIG_PROPERTY,g as TEMPO_CONTROLS_CONFIG_PROPERTY,e as defineAsset,h as defineControls,f as getAssetConfig,c as getAssetConfigSnapshot,i as getComponentControls,b as getComponentControlsSnapshot};
|
package/dist/assets/parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e}from"../chunk-
|
|
1
|
+
import{b as e}from"../chunk-UBI4I7J4.js";import{a as s,b as t}from"../chunk-JRJOWLCN.js";import"../chunk-XUSV3KOD.js";var r=e("assets/parser","parseAssetFile"),a=e("assets/parser","parseAssetProgram"),p=e("assets/parser","readSourceComments"),n=e("assets/parser","readAssetImports"),c=e("assets/parser","parseControlsFile"),l=e("assets/parser","collectTopLevelScope"),m=e("assets/parser","hasTopLevelDefineAssetCallFor"),i=e("assets/parser","collectIdentifierNames"),C=e("assets/parser","unwrapTsExpression"),f=e("assets/parser","toSourceSpan"),x="tempo-sdk/assets";export{x as ASSET_SDK_IMPORT_SOURCE,s as UNRESOLVED_VALUE,i as collectIdentifierNames,l as collectTopLevelScope,m as hasTopLevelDefineAssetCallFor,t as isUnresolvedValue,r as parseAssetFile,a as parseAssetProgram,c as parseControlsFile,n as readAssetImports,p as readSourceComments,f as toSourceSpan,C as unwrapTsExpression};
|
package/dist/astro/runtime.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as t}from"../chunk-
|
|
1
|
+
import{b as t}from"../chunk-UBI4I7J4.js";import"../chunk-XUSV3KOD.js";var o=t("astro/runtime","instrumentFrameworkComponent"),e=t("astro/runtime","astroHostId"),r=t("astro/runtime","instrumentCreateComponent"),m=t("astro/runtime","instrumentRenderComponent");export{e as astroHostId,r as instrumentCreateComponent,o as instrumentFrameworkComponent,m as instrumentRenderComponent};
|
package/dist/astro.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n,b as e}from"./chunk-
|
|
1
|
+
import{a as n,b as e}from"./chunk-UBI4I7J4.js";import{a as r}from"./chunk-XUSV3KOD.js";import{fileURLToPath as a}from"url";var s=r(function(t={}){return{name:"tempo-astro",hooks:{"astro:config:setup":r(function(o){return o.command!=="dev"||!(t.enabled??!!process.env.TEMPO)?void 0:n("astro",a(o.config.root)).tempoAstro(t).hooks["astro:config:setup"]?.call(this,o)},"astro:config:setup")}}},"tempoAstro"),f=e("astro","astroAnnotationPlugins"),i=r((t=>t instanceof Promise?t.then(o=>i(o)):{...t,integrations:[...t.integrations??[],s()]}),"withTempoAstro"),u=s;export{f as astroAnnotationPlugins,u as default,s as tempoAstro,i as withTempoAstro};
|
package/dist/canvas/astro.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { AstroJson, AstroComponent } from './astro-contract.js';
|
|
3
3
|
export { astroStoryboardPath, isAstroComponent } from './astro-contract.js';
|
|
4
|
-
import { b as StoryboardLayout, c as StoryboardVrtConfig } from '../storyboard.contract.d-
|
|
4
|
+
import { b as StoryboardLayout, c as StoryboardVrtConfig } from '../storyboard.contract.d-D23m3fhP.js';
|
|
5
5
|
import '../page-Bc8PekIX.js';
|
|
6
6
|
import '../v1-client-compat-n0E0XxuX.js';
|
|
7
7
|
|
package/dist/canvas/astro.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as t}from"../chunk-
|
|
1
|
+
import{e as t}from"../chunk-NCDY2IDX.js";import"../chunk-CKHFND4C.js";import"../chunk-JRJOWLCN.js";import"../chunk-XO2BSHWM.js";import"../chunk-M3GN2KUH.js";import"../chunk-FH6TMWFA.js";import{a as i,b as o}from"../chunk-T5TY3U2H.js";import{a as r}from"../chunk-XUSV3KOD.js";import{jsx as m}from"react/jsx-runtime";function b({id:n,name:e,component:s,layout:p,vrt:a}){if(!o(s))throw new Error("AstroStoryboard requires a .astro?tempo-component descriptor import");return m(t,{"data-tempo-hide-fiber":"true",id:n,name:e,layout:p,kind:"component",uiFramework:"astro",vrt:!!a})}r(b,"AstroStoryboard");export{b as AstroStoryboard,i as astroStoryboardPath,o as isAstroComponent};
|
package/dist/canvas/editor.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as StoryboardUiFramework, P as ParsedCanvasFile, C as CanvasSourceSpan } from '../parser.d-
|
|
1
|
+
import { S as StoryboardUiFramework, P as ParsedCanvasFile, C as CanvasSourceSpan } from '../parser.d-C2wqSGAt.js';
|
|
2
2
|
import { V as V1LayoutCompat } from '../v1-client-compat-n0E0XxuX.js';
|
|
3
3
|
import 'oxc-parser';
|
|
4
4
|
|
package/dist/canvas/editor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as t}from"../chunk-
|
|
1
|
+
import{b as t}from"../chunk-UBI4I7J4.js";import"../chunk-XUSV3KOD.js";var a=t("canvas/editor","applyCanvasSourceEdits"),e=t("canvas/editor","updateCanvasName"),r=t("canvas/editor","updateCanvasPath"),n=t("canvas/editor","updateCanvasBackgroundColor"),d=t("canvas/editor","updateStoryboardName"),p=t("canvas/editor","updateStoryboardId"),s=t("canvas/editor","updateStoryboardLayout"),c=t("canvas/editor","updateStoryboardComponent"),i=t("canvas/editor","updateStoryboardProps"),u=t("canvas/editor","updateStoryboardVrt"),y=t("canvas/editor","updateRouteStoryboardRoute"),C=t("canvas/editor","updateHtmlStoryboardSource"),v=t("canvas/editor","addCanvasStoryboard"),S=t("canvas/editor","removeCanvasStoryboard"),f=t("canvas/editor","formatJsxStringAttribute"),b=t("canvas/editor","expandToFullLines"),l=t("canvas/editor","expandStatementForward"),x=t("canvas/editor","collapseBlankLines"),m=t("canvas/editor","detectNewline"),I=t("canvas/editor","topLevelInsertionOffset"),L=t("canvas/editor","hasIdentifier"),N=t("canvas/editor","sourceContainsIdentifierNode"),h=t("canvas/editor","walkWithParent");export{v as addCanvasStoryboard,a as applyCanvasSourceEdits,x as collapseBlankLines,m as detectNewline,l as expandStatementForward,b as expandToFullLines,f as formatJsxStringAttribute,L as hasIdentifier,S as removeCanvasStoryboard,N as sourceContainsIdentifierNode,I as topLevelInsertionOffset,n as updateCanvasBackgroundColor,e as updateCanvasName,r as updateCanvasPath,C as updateHtmlStoryboardSource,y as updateRouteStoryboardRoute,c as updateStoryboardComponent,p as updateStoryboardId,s as updateStoryboardLayout,d as updateStoryboardName,i as updateStoryboardProps,u as updateStoryboardVrt,h as walkWithParent};
|
package/dist/canvas/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, ComponentType } from 'react';
|
|
3
|
-
import { H as HtmlStoryboard$1, L as LegacyStoryboardV1$1, R as RouteStoryboard$1, S as Storyboard$1, a as StoryboardSlot$1, b as StoryboardLayout, c as StoryboardVrtConfig } from '../storyboard.contract.d-
|
|
4
|
-
export { d as StoryboardVrtIgnoreRegion } from '../storyboard.contract.d-
|
|
3
|
+
import { H as HtmlStoryboard$1, L as LegacyStoryboardV1$1, R as RouteStoryboard$1, S as Storyboard$1, a as StoryboardSlot$1, b as StoryboardLayout, c as StoryboardVrtConfig } from '../storyboard.contract.d-D23m3fhP.js';
|
|
4
|
+
export { d as StoryboardVrtIgnoreRegion } from '../storyboard.contract.d-D23m3fhP.js';
|
|
5
5
|
import '../page-Bc8PekIX.js';
|
|
6
6
|
import '../v1-client-compat-n0E0XxuX.js';
|
|
7
7
|
|
package/dist/canvas/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as b,b as u,c as f,d as S,e as l}from"../chunk-
|
|
1
|
+
import{a as b,b as u,c as f,d as S,e as l}from"../chunk-NCDY2IDX.js";import{a,b as n,c as p,d as c,n as e,o as s,p as C,q as y,r as i,s as r}from"../chunk-CKHFND4C.js";import"../chunk-JRJOWLCN.js";import"../chunk-XO2BSHWM.js";import{a as d,b as m}from"../chunk-M3GN2KUH.js";import"../chunk-FH6TMWFA.js";import{a as o}from"../chunk-XUSV3KOD.js";var v="INTERNAL tempo-host \u2014 Tempo component host, do not interact";var R=o(((...t)=>r("canvas/canvas-host").CanvasHost(...t)),"CanvasHost");var H=o(((...t)=>r("canvas/canvas-host-operations").buildRenderSelector(...t)),"buildRenderSelector"),x=o(((...t)=>r("canvas/canvas-host-operations").buildRenderContentSelector(...t)),"buildRenderContentSelector"),h=o(((...t)=>r("canvas/canvas-host-operations").buildRenderContentFiberSelector(...t)),"buildRenderContentFiberSelector"),T=o(((...t)=>r("canvas/canvas-host-operations").stripRenderContentWrapperAttributes(...t)),"stripRenderContentWrapperAttributes"),F=o(((...t)=>r("canvas/canvas-host-operations").stripRenderContentWrapperFromCombinedCapture(...t)),"stripRenderContentWrapperFromCombinedCapture");var I=o(((...t)=>r("canvas/canvas-host-operations").captureStoryboardImage(...t)),"captureStoryboardImage"),g=o(((...t)=>r("canvas/canvas-host-operations").captureStoryboardHtml(...t)),"captureStoryboardHtml");var A=o(((...t)=>r("canvas/canvas-host-operations").captureStoryboardCombined(...t)),"captureStoryboardCombined");var P=o(((...t)=>r("canvas/canvas-host-operations").watchStoryboardCombined(...t)),"watchStoryboardCombined");var w=o(((...t)=>r("canvas/canvas-import-boundary").CanvasImportBoundary(...t)),"CanvasImportBoundary");var E=o(((...t)=>r("canvas/flutter").FlutterStoryboard(...t)),"FlutterStoryboard");var W={protocolVersion:1,supportsModules:!0};export{v as CANVAS_HOST_DOCUMENT_TITLE,p as Canvas,c as CanvasContext,R as CanvasHost,e as CanvasHostContractError,w as CanvasImportBoundary,E as FlutterStoryboard,S as HtmlStoryboard,u as LegacyStoryboardV1,f as RouteStoryboard,b as Storyboard,l as StoryboardSlot,d as TEMPO_INTERACT_FRAME_NAME,h as buildRenderContentFiberSelector,x as buildRenderContentSelector,H as buildRenderSelector,W as canvasHostCapability,A as captureStoryboardCombined,g as captureStoryboardHtml,I as captureStoryboardImage,y as getCanvasHostRecoveryFeed,s as getCanvasHostRuntime,n as getCanvasStoryboardRenderId,C as getOptionalCanvasHostRuntime,a as getStoryboardKey,m as isTempoInteractFrameName,T as stripRenderContentWrapperAttributes,F as stripRenderContentWrapperFromCombinedCapture,i as useActiveState,P as watchStoryboardCombined};
|
package/dist/canvas/parser.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as componentFrameworkForStoryboard$1, f as fallbackPageName$1, m as misimportedSdkCanvasImportMessage$1, p as parseCanvasFile$1, a as parseComponentRoot$1, u as unwrapTsExpression$1 } from '../parser.d-
|
|
2
|
-
export { b as CanvasParseError, C as CanvasSourceSpan, M as MisimportedSdkCanvasImport, d as ParsedCanvasComponentReference, e as ParsedCanvasExpressionReference, P as ParsedCanvasFile, g as ParsedCanvasImport, h as ParsedCanvasLayout, i as ParsedCanvasLayoutSpans, j as ParsedCanvasStoryboard, k as ParsedStoryboardVrt, l as ParsedStoryboardVrtIgnoreRegion, n as STORYBOARD_SDK_COMPONENTS, o as StoryboardSdkComponent, q as StoryboardSdkComponentSpec, S as StoryboardUiFramework, r as componentFileExtensionForFramework, s as componentImportPath, t as componentImportSpecifier, v as storyboardComponentForFramework } from '../parser.d-
|
|
1
|
+
import { c as componentFrameworkForStoryboard$1, f as fallbackPageName$1, m as misimportedSdkCanvasImportMessage$1, p as parseCanvasFile$1, a as parseComponentRoot$1, u as unwrapTsExpression$1 } from '../parser.d-C2wqSGAt.js';
|
|
2
|
+
export { b as CanvasParseError, C as CanvasSourceSpan, M as MisimportedSdkCanvasImport, d as ParsedCanvasComponentReference, e as ParsedCanvasExpressionReference, P as ParsedCanvasFile, g as ParsedCanvasImport, h as ParsedCanvasLayout, i as ParsedCanvasLayoutSpans, j as ParsedCanvasStoryboard, k as ParsedStoryboardVrt, l as ParsedStoryboardVrtIgnoreRegion, n as STORYBOARD_SDK_COMPONENTS, o as StoryboardSdkComponent, q as StoryboardSdkComponentSpec, S as StoryboardUiFramework, r as componentFileExtensionForFramework, s as componentImportPath, t as componentImportSpecifier, v as storyboardComponentForFramework } from '../parser.d-C2wqSGAt.js';
|
|
3
3
|
import 'oxc-parser';
|
|
4
4
|
|
|
5
5
|
declare const componentFrameworkForStoryboard: typeof componentFrameworkForStoryboard$1;
|
package/dist/canvas/parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as t}from"../chunk-
|
|
1
|
+
import{b as t}from"../chunk-UBI4I7J4.js";import{a}from"../chunk-XUSV3KOD.js";var i={Storyboard:{importSource:"tempo-sdk/canvas",kind:"component",requiresComponentProp:!0,allowsVrt:!0,allowsResponsive:!0,componentFileExtension:".tsx"},SvelteStoryboard:{importSource:"tempo-sdk/canvas/svelte",kind:"component",uiFramework:"svelte",requiresComponentProp:!0,allowsVrt:!0,allowsResponsive:!0,componentFileExtension:".svelte"},VueStoryboard:{importSource:"tempo-sdk/canvas/vue",kind:"component",uiFramework:"vue",requiresComponentProp:!0,allowsVrt:!0,allowsResponsive:!0,componentFileExtension:".vue"},AstroStoryboard:{importSource:"tempo-sdk/canvas/astro",kind:"component",uiFramework:"astro",requiresComponentProp:!0,allowsVrt:!0,allowsResponsive:!1,componentFileExtension:".astro",componentImportQuery:"?tempo-component"},FlutterStoryboard:{importSource:"tempo-sdk/canvas",kind:"component",requiresComponentProp:!1,allowsVrt:!0,allowsResponsive:!1},RouteStoryboard:{importSource:"tempo-sdk/canvas",kind:"route",requiresComponentProp:!1,allowsVrt:!1,allowsResponsive:!1},HtmlStoryboard:{importSource:"tempo-sdk/canvas",kind:"html",requiresComponentProp:!1,allowsVrt:!0,allowsResponsive:!1},LegacyStoryboardV1:{importSource:"tempo-sdk/canvas",kind:"component",requiresComponentProp:!1,allowsVrt:!1,allowsResponsive:!1}},n=i,m=Object.keys(n);function p(o){if(o===void 0||o==="react")return"Storyboard";let r=m.find(e=>n[e].uiFramework===o);if(!r)throw new Error(`No storyboard component renders "${o}"`);return r}a(p,"storyboardComponentForFramework");function c(o){let r=p(o),e=n[r].componentFileExtension;if(!e)throw new Error(`<${r}> declares no component file extension`);return e}a(c,"componentFileExtensionForFramework");function l(o){for(let r of Object.values(n)){let e=r.componentImportQuery,s=r.componentFileExtension;if(!(!e||!s)&&o.endsWith(s))return o+e}return o}a(l,"componentImportSpecifier");function d(o){for(let r of Object.values(n)){let e=r.componentImportQuery;if(e&&o.endsWith(e))return o.slice(0,-e.length)}return o}a(d,"componentImportPath");var f=t("canvas/parser","componentFrameworkForStoryboard"),k=t("canvas/parser","parseCanvasFile"),v=t("canvas/parser","misimportedSdkCanvasImportMessage"),C=t("canvas/parser","unwrapTsExpression"),b=t("canvas/parser","fallbackPageName"),w=t("canvas/parser","parseComponentRoot"),x="No <Canvas> declaration found in canvas file";export{x as NO_CANVAS_DECLARATION_ERROR,n as STORYBOARD_SDK_COMPONENTS,c as componentFileExtensionForFramework,f as componentFrameworkForStoryboard,d as componentImportPath,l as componentImportSpecifier,b as fallbackPageName,v as misimportedSdkCanvasImportMessage,k as parseCanvasFile,w as parseComponentRoot,p as storyboardComponentForFramework,C as unwrapTsExpression};
|
package/dist/canvas/svelte.d.ts
CHANGED
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import * as svelte from 'svelte';
|
|
3
|
-
import { b as StoryboardLayout, c as StoryboardVrtConfig } from '../storyboard.contract.d-
|
|
3
|
+
import { b as StoryboardLayout, c as StoryboardVrtConfig } from '../storyboard.contract.d-D23m3fhP.js';
|
|
4
4
|
import '../page-Bc8PekIX.js';
|
|
5
5
|
import '../v1-client-compat-n0E0XxuX.js';
|
|
6
6
|
|
|
7
7
|
type SvelteComponent<Props extends Record<string, unknown> = Record<string, unknown>> = svelte.Component<Props>;
|
|
8
|
-
declare function SvelteStoryboard$1<Props extends Record<string, unknown> = Record<string, unknown>>({ id, name, component, layout, props, vrt, ...annotations }: {
|
|
8
|
+
declare function SvelteStoryboard$1<Props extends Record<string, unknown> = Record<string, unknown>>({ id, name, component, layout, props, vrt, responsive, ...annotations }: {
|
|
9
9
|
id: string;
|
|
10
10
|
component: SvelteComponent<Props>;
|
|
11
11
|
layout: StoryboardLayout;
|
|
12
12
|
name?: string;
|
|
13
13
|
props?: Props;
|
|
14
14
|
vrt?: boolean | StoryboardVrtConfig;
|
|
15
|
+
/**
|
|
16
|
+
* Run this storyboard in a window resized to its own width and height, so
|
|
17
|
+
* `window.innerWidth`, `matchMedia` and viewport units match the frame, and
|
|
18
|
+
* screenshots show the layout chosen at that size. Without a
|
|
19
|
+
* `layout.width` and `layout.height`, the window takes the size the
|
|
20
|
+
* board renders at. The board refreshes about once a second while it is
|
|
21
|
+
* selected or being edited. Must be the literal `true`.
|
|
22
|
+
*/
|
|
23
|
+
responsive?: boolean;
|
|
15
24
|
} & Record<`data-tempo-${string}`, unknown>): react.JSX.Element;
|
|
16
25
|
|
|
17
26
|
declare const SvelteStoryboard: typeof SvelteStoryboard$1;
|
package/dist/canvas/svelte.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as o}from"../chunk-
|
|
1
|
+
import{s as o}from"../chunk-CKHFND4C.js";import"../chunk-JRJOWLCN.js";import"../chunk-XO2BSHWM.js";import"../chunk-M3GN2KUH.js";import"../chunk-FH6TMWFA.js";import{a as t}from"../chunk-XUSV3KOD.js";var a=t(((...e)=>o("canvas/svelte",{svelte:t(()=>import("svelte"),"svelte")}).SvelteStoryboard(...e)),"SvelteStoryboard");export{a as SvelteStoryboard};
|
package/dist/canvas/vue.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import * as vue from 'vue';
|
|
3
|
-
import { b as StoryboardLayout, c as StoryboardVrtConfig } from '../storyboard.contract.d-
|
|
3
|
+
import { b as StoryboardLayout, c as StoryboardVrtConfig } from '../storyboard.contract.d-D23m3fhP.js';
|
|
4
4
|
import '../page-Bc8PekIX.js';
|
|
5
5
|
import '../v1-client-compat-n0E0XxuX.js';
|
|
6
6
|
|
|
@@ -17,13 +17,22 @@ interface VueStoryboardEnvironment {
|
|
|
17
17
|
}
|
|
18
18
|
type VueStoryboardSetup = ((app: VueApp) => void) | ((app: VueApp) => Promise<void>);
|
|
19
19
|
declare function configureVueStoryboards$1(next: VueStoryboardEnvironment | null): void;
|
|
20
|
-
declare function VueStoryboard$1<Props extends Record<string, unknown> = Record<string, unknown>>({ id, name, component, layout, props, vrt, setup, }: {
|
|
20
|
+
declare function VueStoryboard$1<Props extends Record<string, unknown> = Record<string, unknown>>({ id, name, component, layout, props, vrt, responsive, setup, }: {
|
|
21
21
|
id: string;
|
|
22
22
|
component: VueComponent<Props>;
|
|
23
23
|
layout: StoryboardLayout;
|
|
24
24
|
name?: string;
|
|
25
25
|
props?: Props;
|
|
26
26
|
vrt?: boolean | StoryboardVrtConfig;
|
|
27
|
+
/**
|
|
28
|
+
* Run this storyboard in a window resized to its own width and height, so
|
|
29
|
+
* `window.innerWidth`, `matchMedia` and viewport units match the frame, and
|
|
30
|
+
* screenshots show the layout chosen at that size. Without a
|
|
31
|
+
* `layout.width` and `layout.height`, the window takes the size the
|
|
32
|
+
* board renders at. The board refreshes about once a second while it is
|
|
33
|
+
* selected or being edited. Must be the literal `true`.
|
|
34
|
+
*/
|
|
35
|
+
responsive?: boolean;
|
|
27
36
|
setup?: VueStoryboardSetup;
|
|
28
37
|
} & Record<`data-tempo-${string}`, unknown>): react.JSX.Element;
|
|
29
38
|
|
package/dist/canvas/vue.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as r}from"../chunk-
|
|
1
|
+
import{s as r}from"../chunk-CKHFND4C.js";import"../chunk-JRJOWLCN.js";import"../chunk-XO2BSHWM.js";import"../chunk-M3GN2KUH.js";import"../chunk-FH6TMWFA.js";import{a as o}from"../chunk-XUSV3KOD.js";var a=15e3,c=o(((...t)=>r("canvas/vue",{vue:o(()=>import("vue"),"vue")}).configureVueStoryboards(...t)),"configureVueStoryboards"),u=o(((...t)=>r("canvas/vue",{vue:o(()=>import("vue"),"vue")}).VueStoryboard(...t)),"VueStoryboard");export{a as VUE_STORYBOARD_SETUP_TIMEOUT_MS,u as VueStoryboard,c as configureVueStoryboards};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var M=Object.defineProperty;var r=(t,e)=>M(t,"name",{value:e,configurable:!0});var X=(t,e)=>{for(var n in e)M(t,n,{get:e[n],enumerable:!0})};import{createHash as ct}from"crypto";import{readFileSync as f,realpathSync as K}from"fs";import{createRequire as L,isBuiltin as J}from"module";import{dirname as y,isAbsolute as d,relative as W,resolve as p,sep as B}from"path";import{fileURLToPath as U,pathToFileURL as x}from"url";var g={};X(g,{TEMPO_HOST_IDENTITY_CAPABILITY_HEADER:()=>nt,TEMPO_HOST_IDENTITY_CONTRACT_VERSION:()=>H,TEMPO_HOST_IDENTITY_ENDPOINT:()=>et,TEMPO_VUE_ANNOTATION_PLUGIN_NAME:()=>st,TEMPO_WORKSPACE_NONCE_ENV:()=>F,TEMPO_WORKSPACE_NONCE_META_NAME:()=>ot,createTempoHostIdentity:()=>at,readTempoWorkspaceNonce:()=>D});import{readFileSync as Z}from"fs";import{resolve as tt}from"path";var
|
|
1
|
+
var M=Object.defineProperty;var r=(t,e)=>M(t,"name",{value:e,configurable:!0});var X=(t,e)=>{for(var n in e)M(t,n,{get:e[n],enumerable:!0})};import{createHash as ct}from"crypto";import{readFileSync as f,realpathSync as K}from"fs";import{createRequire as L,isBuiltin as J}from"module";import{dirname as y,isAbsolute as d,relative as W,resolve as p,sep as B}from"path";import{fileURLToPath as U,pathToFileURL as x}from"url";var g={};X(g,{TEMPO_HOST_IDENTITY_CAPABILITY_HEADER:()=>nt,TEMPO_HOST_IDENTITY_CONTRACT_VERSION:()=>H,TEMPO_HOST_IDENTITY_ENDPOINT:()=>et,TEMPO_VUE_ANNOTATION_PLUGIN_NAME:()=>st,TEMPO_WORKSPACE_NONCE_ENV:()=>F,TEMPO_WORKSPACE_NONCE_META_NAME:()=>ot,createTempoHostIdentity:()=>at,readTempoWorkspaceNonce:()=>D});import{readFileSync as Z}from"fs";import{resolve as tt}from"path";var $={version:"0.0.106"};var v="latest";var et="/__tempo/identity",nt="x-tempo-host-identity",H=1,F="TEMPO_WORKSPACE_NONCE",ot="tempo-workspace-nonce",rt=".tempo/workspace-nonce",it=128,st="tempo-vue-source-annotation";function j(t){let e=t?.trim()??"";return e.length>0&&e.length<=it?e:""}r(j,"normalizeWorkspaceNonce");function D(t=process.cwd()){let e=j(process.env[F]);if(e)return e;try{return j(Z(tt(t,rt),"utf-8"))}catch{return""}}r(D,"readTempoWorkspaceNonce");function at(t,e={}){return{tempoHost:!0,contractVersion:H,workspaceNonce:D(e.root),sdkVersion:$.version,sdkChannel:v,tempoRuntimeContract:1,pluginActive:e.pluginActive??!!process.env.TEMPO,framework:t,...e.capabilities?{capabilities:e.capabilities}:{}}}r(at,"createTempoHostIdentity");var w=1,_="TEMPO_SDK_RUNTIME_PATH",E=typeof import.meta.url=="string"?import.meta.url:x(__filename).href,h=L(E),V=new Map,m=new Map;var T;function ut(t){if(!T){let n=y(U(E));for(;;){try{if(JSON.parse(f(p(n,"package.json"),"utf8")).name==="tempo-sdk"){T=n;break}}catch{}let o=y(n);if(n===o)throw u("the SDK package directory could not be found");n=o}}let e=U(E).endsWith(".ts");return x(p(T,e?t:`dist/${t.replace(/\.tsx?$/,".js")}`)).href}r(ut,"sdkModuleUrl");function u(t){return new Error(`Tempo SDK runtime unavailable: ${t}. Start this project with an updated Tempo host, or provision its matching runtime and set ${_}.`)}r(u,"runtimeError");function pt(){let t=process.env[_];if(!t||!d(t))throw u("an absolute runtime directory was not supplied");let e=p(t),n;try{n=JSON.parse(f(p(e,"runtime.json"),"utf8"))}catch{throw u("runtime.json could not be read")}if(n?.tempoRuntimeContract!==w)throw u(`contract ${n?.tempoRuntimeContract} does not match ${w}`);return{root:e,manifest:n}}r(pt,"readRuntimeManifest");function q(t,e,n){if(!n||typeof n.file!="string"||!/^[a-f0-9]{64}$/.test(n.sha256))throw u(`the ${e} entry is missing or invalid`);let o=p(t,n.file),i=W(t,o);if(d(i)||i===".."||i.startsWith(`..${B}`))throw u(`the ${e} entry escapes its runtime directory`);let a;try{let c=W(K(t),K(o));if(d(c)||c===".."||c.startsWith(`..${B}`))throw u(`the ${e} entry escapes its runtime directory`);a=f(o)}catch{throw u(`the ${e} artifact could not be read`)}if(ct("sha256").update(a).digest("hex")!==n.sha256)throw u(`the ${e} artifact failed its integrity check`);return o}r(q,"verifyArtifact");function R(t){if(typeof t=="string")return t;if(Array.isArray(t)){for(let e of t){let n=R(e);if(n)return n}return}if(!(!t||typeof t!="object"))for(let[e,n]of Object.entries(t)){if(!(["node","import","default"].includes(e)||e==="module-sync"&&process.features.require_module))continue;let i=R(n);if(i)return i}}r(R,"importExportTarget");function mt(t,e){if(J(t))return t;let n=e.resolve(`${t}/package.json`),o=JSON.parse(f(n,"utf8")),i=o.exports,a=i===void 0?o.module??o.main:R(i?.["."]??i);if(typeof a!="string")throw u(`${t} has no supported Node import entry`);return x(p(y(n),a)).href}r(mt,"resolveProjectImport");function G(t,e=process.cwd(),n={}){let o=process.env[_];if(!o||!d(o))throw u("an absolute runtime directory was not supplied");let i=p(o),a=p(e),c=`${i}\0${a}\0${t}`;if(m.has(c))return m.get(c);let{manifest:b}=pt(),k=b.node?.[t],Y=q(i,t,k);h(q(i,"serverBrowser",b.serverBrowser));let N=`${i}\0${a}\0${k.file}`,A=V.get(N);if(A){let s=A.getEntry(t);return m.set(c,s),s}let l=h(Y);if(l.tempoRuntimeContract!==w||typeof l.createRuntime!="function")throw u(`the ${t} factory has an incompatible contract`);let P=L(p(a,"package.json")),O=r(s=>J(s)||s==="oxc-parser"||s.startsWith("oxc-parser/")||s.startsWith("@astrojs/compiler-")?h:P,"from"),C=Object.assign(s=>s==="@tempo-sdk-public/host-identity"?g:Object.hasOwn(n,s)?n[s]:O(s)(s),P,{resolve:r((s,z)=>O(s).resolve(s,z),"resolve")}),I=l.createRuntime({require:C,projectRoot:a,import:r(s=>import(mt(s,C)),"import"),sdkModuleUrl:ut});V.set(N,I);let S=I.getEntry(t);return m.set(c,S),S}r(G,"getNodeRuntime");var dt=r(function(t,e={}){return e.enabled??!!process.env.TEMPO?G("expo-babel-plugin",e.root).tempoExpoBabelPlugin(t,e):(t.assertVersion(7),{name:"tempo-expo-annotate",manipulateOptions(n,o){o.plugins??(o.plugins=[]);let i=r(a=>o.plugins.some(c=>(Array.isArray(c)?c[0]:c)===a),"has");i("jsx")||o.plugins.push("jsx"),/\.(ts|tsx)$/.test(n.filename??"")&&!i("typescript")&&o.plugins.push("typescript")},visitor:{Program:{enter(){}}}})},"tempoExpoBabelPlugin"),Ct=dt;export{dt as a,Ct as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as M}from"./chunk-JRJOWLCN.js";import{a as K}from"./chunk-XO2BSHWM.js";import{b as W,c as J}from"./chunk-M3GN2KUH.js";import{c as F}from"./chunk-FH6TMWFA.js";import{a as o,b as a}from"./chunk-XUSV3KOD.js";var B={};a(B,{AssetLivePreview:()=>ae,TEMPO_ASSET_CONFIG_PROPERTY:()=>U,TEMPO_CONTROLS_CONFIG_PROPERTY:()=>C,defineAsset:()=>ze,defineControls:()=>Ke,getAssetConfig:()=>Fe,getAssetConfigSnapshot:()=>pe,getComponentControls:()=>Me,getComponentControlsSnapshot:()=>ie});function g(e){return e&&(e.type==="radio"||e.type==="inline-radio")?{...e,type:"select"}:e}o(g,"normalizeAssetControl");import*as Le from"react";import*as Be from"react/jsx-dev-runtime";import*as Ue from"react/jsx-runtime";var b={};a(b,{OMIT_ASSET_PROP:()=>le,applyPropOverrides:()=>fe});var le={__tempo_omit_prop__:!0};function fe(e,t){let n={...e};for(let[r,s]of Object.entries(t??{}))s&&typeof s=="object"&&Object.keys(s).length===1&&s.__tempo_omit_prop__===!0?delete n[r]:Object.defineProperty(n,r,{value:s,enumerable:!0,configurable:!0,writable:!0});return n}o(fe,"applyPropOverrides");var E={};a(E,{Canvas:()=>be,CanvasContext:()=>Re,getCanvasStoryboardRenderId:()=>G,useCanvasIdentity:()=>P,useCanvasStoryboardRenderId:()=>p});import{Children as ve,cloneElement as Ce,createContext as ye,isValidElement as $,useContext as ge,useMemo as w}from"react";var x={};a(x,{getStoryboardKey:()=>R,normalizeId:()=>
|
|
1
|
+
import{c as M}from"./chunk-JRJOWLCN.js";import{a as K}from"./chunk-XO2BSHWM.js";import{b as W,c as J}from"./chunk-M3GN2KUH.js";import{c as F}from"./chunk-FH6TMWFA.js";import{a as o,b as a}from"./chunk-XUSV3KOD.js";var B={};a(B,{AssetLivePreview:()=>ae,TEMPO_ASSET_CONFIG_PROPERTY:()=>U,TEMPO_CONTROLS_CONFIG_PROPERTY:()=>C,defineAsset:()=>ze,defineControls:()=>Ke,getAssetConfig:()=>Fe,getAssetConfigSnapshot:()=>pe,getComponentControls:()=>Me,getComponentControlsSnapshot:()=>ie});function g(e){return e&&(e.type==="radio"||e.type==="inline-radio")?{...e,type:"select"}:e}o(g,"normalizeAssetControl");import*as Le from"react";import*as Be from"react/jsx-dev-runtime";import*as Ue from"react/jsx-runtime";var b={};a(b,{OMIT_ASSET_PROP:()=>le,applyPropOverrides:()=>fe});var le={__tempo_omit_prop__:!0};function fe(e,t){let n={...e};for(let[r,s]of Object.entries(t??{}))s&&typeof s=="object"&&Object.keys(s).length===1&&s.__tempo_omit_prop__===!0?delete n[r]:Object.defineProperty(n,r,{value:s,enumerable:!0,configurable:!0,writable:!0});return n}o(fe,"applyPropOverrides");var E={};a(E,{Canvas:()=>be,CanvasContext:()=>Re,getCanvasStoryboardRenderId:()=>G,useCanvasIdentity:()=>P,useCanvasStoryboardRenderId:()=>p});import{Children as ve,cloneElement as Ce,createContext as ye,isValidElement as $,useContext as ge,useMemo as w}from"react";var x={};a(x,{getStoryboardKey:()=>R,normalizeId:()=>d});function d(e,t){let n=e?.trim();if(!n)throw new Error(`${t} is required.`);return n}o(d,"normalizeId");function R(e){return`storyboard:${e}`}o(R,"getStoryboardKey");import{jsx as A}from"react/jsx-runtime";var h=ye(null);function G(e,t){return`canvas:${encodeURIComponent(d(e,"Canvas path"))}#storyboard:${encodeURIComponent(d(t,"Storyboard id"))}`}o(G,"getCanvasStoryboardRenderId");function P(){return ge(h)}o(P,"useCanvasIdentity");function p(e){let t=P(),n=d(e,"Storyboard id");return t?G(t.path,n):n}o(p,"useCanvasStoryboardRenderId");function be({children:e,name:t,path:n,backgroundColor:r,defaultViewport:s,...m}){let ce=P(),y=t?.trim()||void 0,l=n===void 0?ce?.path:d(n,"Canvas path");if(!l)throw new Error('<Canvas> must be rendered inside <CanvasContext path="..."> or receive a path prop.');let ue=w(()=>({path:l}),[l]),de={path:l,...y?{name:y}:{},backgroundColor:r,defaultViewport:s},me=w(()=>{let z=new Set;return ve.map(e,i=>{if($(i)&&i.key==null){let u=i.props.id;typeof u=="string"&&u.length&&z.add(u)}return i})?.map(i=>{if(!$(i))return i;let u=i.props.id;return typeof u=="string"&&z.has(u)?Ce(i,{key:R(u)}):i})},[e]);return A(h.Provider,{value:ue,children:A("div",{...m,"data-tempo-canvas":y,"data-tempo-canvas-path":l,"data-tempo-canvas-declaration":JSON.stringify(de),children:me})})}o(be,"Canvas");function Re({children:e,path:t}){let n=d(t,"Canvas path"),r=w(()=>({path:n}),[n]);return A(h.Provider,{value:r,children:e})}o(Re,"CanvasContext");var S={};a(S,{CanvasHostContractError:()=>T});var _=class _ extends Error{constructor(){super(...arguments);this.name="CanvasHostContractError"}};o(_,"CanvasHostContractError");var T=_;var k={};a(k,{getCanvasHostRuntime:()=>xe,getOptionalCanvasHostRuntime:()=>we});function xe(){let e=window.__tempoCanvasHostRuntime;if(!e)throw new Error("window.__tempoCanvasHostRuntime is not installed.");return e}o(xe,"getCanvasHostRuntime");function we(){return typeof window>"u"?void 0:window.__tempoCanvasHostRuntime}o(we,"getOptionalCanvasHostRuntime");var O={};a(O,{CanvasPendingMarker:()=>Q,CanvasUnavailableMarker:()=>X});var I="__tempoProjectionScopeRole",q="data-tempo-projection-pending",Y="data-tempo-projection-unavailable";import{jsx as Z}from"react/jsx-runtime";function Q(){return Z("div",{[q]:"","data-tempo-hide-fiber":"true",style:{display:"none"},"aria-hidden":"true"})}o(Q,"CanvasPendingMarker");Object.assign(Q,{[I]:"transparent"});function X(){return Z("div",{[Y]:"","data-tempo-hide-fiber":"true",style:{display:"none"},"aria-hidden":"true"})}o(X,"CanvasUnavailableMarker");Object.assign(X,{[I]:"transparent"});var H={};a(H,{CANVAS_CLIENT_PROTOCOL:()=>Ae,CANVAS_CLIENT_PROTOCOL_PARAM:()=>ee,CANVAS_INTERACT_DESTINATION_PARAM:()=>te,CANVAS_INTERACT_DESTINATION_VALUE:()=>oe,canvasClientPlacesInteractRoot:()=>Pe,canvasClientProtocol:()=>he});var Ae=3,ee="canvasProtocol";function he(){if(typeof window>"u")return 1;let e=new URLSearchParams(window.location.search).get(ee);if(e===null)return 1;let t=Number(e.trim());return Number.isInteger(t)&&t>=1?t:1}o(he,"canvasClientProtocol");var te="canvasCoordinates",oe="destination";function Pe(){return typeof window>"u"?!1:new URLSearchParams(window.location.search).get(te)===oe}o(Pe,"canvasClientPlacesInteractRoot");var V={};a(V,{getCanvasHostRecoveryFeed:()=>Te});var N="__tempoCanvasHostRecoveryFeed";function Ee(){let e=new Set;return{publish(t){for(let n of[...e])n(t)},subscribe(t){return e.add(t),()=>e.delete(t)}}}o(Ee,"createFeed");function Te(){let e=globalThis;return e[N]??(e[N]=Ee())}o(Te,"getCanvasHostRecoveryFeed");var j={};a(j,{installTempoInteractProjectionFallback:()=>Se});function Se(e="electron"){if(typeof window>"u"||window.parent===window||!W(window.name)||window.__tempoInteractProjectionOwner)return null;window.__tempoInteractProjectionOwner=e;let t=J();return()=>{t(),window.__tempoInteractProjectionOwner===e&&delete window.__tempoInteractProjectionOwner}}o(Se,"installTempoInteractProjectionFallback");var D={};a(D,{CanvasHostContext:()=>ne,useActiveState:()=>Ie,useRequiredCanvasHost:()=>c,useStoryboardErrorReporter:()=>Ve,useStoryboardPlacement:()=>De,useStoryboardRendered:()=>He,useStoryboardSize:()=>je,useStoryboardStatus:()=>Oe,useStoryboardUnmounted:()=>Ne});import{createContext as _e,useCallback as v,useContext as ke}from"react";var ne=_e(null);function c(){let e=ke(ne);if(!e)throw new Error("Tempo canvas components must be rendered inside <CanvasHost>.");return e}o(c,"useRequiredCanvasHost");function Ie(e){let t=p(e);return c().getStoryboardStatus(t)!=="unmounted"}o(Ie,"useActiveState");function Oe(e){let t=p(e);return c().getStoryboardStatus(t)}o(Oe,"useStoryboardStatus");function He(e){let t=p(e),n=c();return v(()=>{n.markStoryboardRendered(t)},[n,t])}o(He,"useStoryboardRendered");function Ne(e){let t=p(e),{markStoryboardUnmounted:n}=c();return v(()=>{n(t)},[n,t])}o(Ne,"useStoryboardUnmounted");function Ve(e){let t=p(e),n=c(),r=v(m=>{n.reportStoryboardError(t,m)},[n,t]),s=v(()=>{n.clearStoryboardError(t)},[n,t]);return{reportError:r,clearError:s}}o(Ve,"useStoryboardErrorReporter");function je(e){let t=p(e);return c().getStoryboardSize(t)}o(je,"useStoryboardSize");function De(e){let t=p(e);return c().getStoryboardPlacement(t)}o(De,"useStoryboardPlacement");var re="__tempoViteServerErrors";var se={},L;function f(e,t){if(Object.assign(se,t),!L){let r=typeof window>"u"?globalThis.__tempoSdkRuntime:window.__tempoSdkRuntime;if(!r||r.contract!==1||typeof r.createBrowserRuntime!="function")throw new Error("This Tempo SDK needs an updated Tempo app with browser runtime contract 1.");L=r.createBrowserRuntime({react:Le,"react/jsx-runtime":Ue,"react/jsx-dev-runtime":Be,"@tempo-sdk-public/frameworks":{frameworkLoaders:se},"@tempo-sdk-public/canvas/canvas":E,"@tempo-sdk-public/canvas/canvas-pending-marker":O,"@tempo-sdk-public/canvas/runtime-context":D,"@tempo-sdk-public/canvas/canvas-host-contract":S,"@tempo-sdk-public/canvas/canvas-host-runtime":k,"@tempo-sdk-public/canvas/host-recovery-feed":V,"@tempo-sdk-public/canvas/ids":x,"@tempo-sdk-public/canvas/interact-projection-fallback":j,"@tempo-sdk-public/canvas/client-protocol":H,"@tempo-sdk-public/canvas/flutter-preview":F,"@tempo-sdk-public/assets/index":B,"@tempo-sdk-public/assets/types":M,"@tempo-sdk-public/assets/prop-overrides":b,"@tempo-sdk-public/assets/preview-snapshot":K,"@tempo-sdk-public/vite-error-transport":{VITE_ERROR_FEED_KEY:re}})}let n=L[e.replaceAll("/","_").replaceAll("-","_")];if(!n)throw new Error(`The Tempo app does not provide SDK browser module "${e}".`);return n}o(f,"getBrowserModule");var ae=o(((...e)=>f("assets/live-preview").AssetLivePreview(...e)),"AssetLivePreview");var ie=o(((...e)=>f("assets/snapshot").getComponentControlsSnapshot(...e)),"getComponentControlsSnapshot"),pe=o(((...e)=>f("assets/snapshot").getAssetConfigSnapshot(...e)),"getAssetConfigSnapshot");var U="__tempoAssetConfig";function ze(e,t){try{Object.defineProperty(e,U,{value:t,enumerable:!1,configurable:!0,writable:!1})}catch{}}o(ze,"defineAsset");function Fe(e){if(typeof e!="function"&&typeof e!="object"||e===null)return;let t=e[U];return t}o(Fe,"getAssetConfig");var C="__tempoControlsConfig";function Ke(e,t){let n={controls:Object.fromEntries(Object.entries(t).map(([s,m])=>[s,g(m)]))},r;try{r=e[C]??new Set,r.add(n),Object.defineProperty(e,C,{value:r,enumerable:!1,configurable:!0})}catch{return()=>{}}return()=>r.delete(n)}o(Ke,"defineControls");function Me(e){if(!e||typeof e!="function"&&typeof e!="object")return{};let t=e[C],n=e.__tempoAstroControls;return n&&(n.controls||n.error)?t?.size&&(!n.shared||t.size>1)?{error:"Keep one controls declaration for this Astro component; remove the duplicate shared declaration."}:{...n,...n.controls&&{controls:Object.fromEntries(Object.entries(n.controls).map(([r,s])=>[r,g(s)]))}}:t?.size?t.size>1?{error:"Multiple defineControls declarations for this component. Keep one declaration in the component file or tempo/controls.ts; remove the duplicate."}:t.values().next().value??{}:{}}o(Me,"getComponentControls");export{R as a,G as b,be as c,Re as d,ae as e,ie as f,pe as g,U as h,ze as i,Fe as j,C as k,Ke as l,Me as m,T as n,xe as o,we as p,Te as q,Ie as r,f as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n=Object.defineProperty;var o=(e,t)=>n(e,"name",{value:t,configurable:!0});var T=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})};var C={};T(C,{TEMPO_HOST_IDENTITY_CAPABILITY_HEADER:()=>O,TEMPO_HOST_IDENTITY_CONTRACT_VERSION:()=>p,TEMPO_HOST_IDENTITY_ENDPOINT:()=>N,TEMPO_VUE_ANNOTATION_PLUGIN_NAME:()=>d,TEMPO_WORKSPACE_NONCE_ENV:()=>c,TEMPO_WORKSPACE_NONCE_META_NAME:()=>k,createTempoHostIdentity:()=>g,readTempoWorkspaceNonce:()=>m});import{readFileSync as E}from"fs";import{resolve as u}from"path";var i={version:"0.0.106"};var s="latest";var N="/__tempo/identity",O="x-tempo-host-identity",p=1,c="TEMPO_WORKSPACE_NONCE",k="tempo-workspace-nonce",l=".tempo/workspace-nonce",A=128,d="tempo-vue-source-annotation";function a(e){let t=e?.trim()??"";return t.length>0&&t.length<=A?t:""}o(a,"normalizeWorkspaceNonce");function m(e=process.cwd()){let t=a(process.env[c]);if(t)return t;try{return a(E(u(e,l),"utf-8"))}catch{return""}}o(m,"readTempoWorkspaceNonce");function g(e,t={}){return{tempoHost:!0,contractVersion:p,workspaceNonce:m(t.root),sdkVersion:i.version,sdkChannel:s,tempoRuntimeContract:1,pluginActive:t.pluginActive??!!process.env.TEMPO,framework:e,...t.capabilities?{capabilities:t.capabilities}:{}}}o(g,"createTempoHostIdentity");export{o as a,O as b,g as c,C as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as r}from"./chunk-
|
|
1
|
+
import{s as r}from"./chunk-CKHFND4C.js";import{a as t}from"./chunk-XUSV3KOD.js";var y=t(((...o)=>r("canvas/storyboard").Storyboard(...o)),"Storyboard"),e=t(((...o)=>r("canvas/storyboard").LegacyStoryboardV1(...o)),"LegacyStoryboardV1"),c=t(((...o)=>r("canvas/storyboard").RouteStoryboard(...o)),"RouteStoryboard"),d=t(((...o)=>r("canvas/storyboard").HtmlStoryboard(...o)),"HtmlStoryboard"),n=t(((...o)=>r("canvas/storyboard").StoryboardSlot(...o)),"StoryboardSlot");export{y as a,e as b,c,d,n as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var $=Object.defineProperty;var o=(e,t)=>$(e,"name",{value:t,configurable:!0});import{createHash as A}from"crypto";import{readFileSync as O,realpathSync as E}from"fs";import{createRequire as J,isBuiltin as bt}from"module";import{dirname as yt,isAbsolute as g,relative as _,resolve as d,sep as j}from"path";import{fileURLToPath as Nt,pathToFileURL as Y}from"url";import{readFileSync as V}from"fs";import{resolve as D}from"path";var R={version:"0.0.
|
|
1
|
+
var $=Object.defineProperty;var o=(e,t)=>$(e,"name",{value:t,configurable:!0});import{createHash as A}from"crypto";import{readFileSync as O,realpathSync as E}from"fs";import{createRequire as J,isBuiltin as bt}from"module";import{dirname as yt,isAbsolute as g,relative as _,resolve as d,sep as j}from"path";import{fileURLToPath as Nt,pathToFileURL as Y}from"url";import{readFileSync as V}from"fs";import{resolve as D}from"path";var R={version:"0.0.106"};var y="latest";var F=1,W="TEMPO_WORKSPACE_NONCE";var K=".tempo/workspace-nonce",U=128;function w(e){let t=e?.trim()??"";return t.length>0&&t.length<=U?t:""}o(w,"normalizeWorkspaceNonce");function q(e=process.cwd()){let t=w(process.env[W]);if(t)return t;try{return w(V(D(e,K),"utf-8"))}catch{return""}}o(q,"readTempoWorkspaceNonce");function N(e,t={}){return{tempoHost:!0,contractVersion:F,workspaceNonce:q(t.root),sdkVersion:R.version,sdkChannel:y,tempoRuntimeContract:1,pluginActive:t.pluginActive??!!process.env.TEMPO,framework:e,...t.capabilities?{capabilities:t.capabilities}:{}}}o(N,"createTempoHostIdentity");var C=1,T="TEMPO_SDK_RUNTIME_PATH",G=typeof import.meta.url=="string"?import.meta.url:Y(__filename).href,Et=J(G);var I=new Map;function u(e){return new Error(`Tempo SDK runtime unavailable: ${e}. Start this project with an updated Tempo host, or provision its matching runtime and set ${T}.`)}o(u,"runtimeError");function z(){let e=process.env[T];if(!e||!g(e))throw u("an absolute runtime directory was not supplied");let t=d(e),n;try{n=JSON.parse(O(d(t,"runtime.json"),"utf8"))}catch{throw u("runtime.json could not be read")}if(n?.tempoRuntimeContract!==C)throw u(`contract ${n?.tempoRuntimeContract} does not match ${C}`);return{root:t,manifest:n}}o(z,"readRuntimeManifest");function P(e,t,n){if(!n||typeof n.file!="string"||!/^[a-f0-9]{64}$/.test(n.sha256))throw u(`the ${t} entry is missing or invalid`);let r=d(e,n.file),i=_(e,r);if(g(i)||i===".."||i.startsWith(`..${j}`))throw u(`the ${t} entry escapes its runtime directory`);let c;try{let s=_(E(e),E(r));if(g(s)||s===".."||s.startsWith(`..${j}`))throw u(`the ${t} entry escapes its runtime directory`);c=O(r)}catch{throw u(`the ${t} artifact could not be read`)}if(A("sha256").update(c).digest("hex")!==n.sha256)throw u(`the ${t} artifact failed its integrity check`);return r}o(P,"verifyArtifact");function h(e){let t=process.env[T];if(!t||!g(t))throw u("an absolute runtime directory was not supplied");let n=d(t),r=`${n}\0${e}`,i=I.get(r);if(i)return i;let{manifest:c}=z(),s=c.node?.[e],a=P(n,e,s),m=c.browser,p=m&&P(n,"browser",m),l={sha256:m?A("sha256").update(s.sha256).update(m.sha256).digest("hex"):s.sha256,dependencies:[d(n,"runtime.json"),a,...p?[p]:[]]};return I.set(r,l),l}o(h,"nodeRuntimeIdentity");import{existsSync as X,realpathSync as Q}from"fs";import{createRequire as Z}from"module";import{dirname as tt,resolve as et}from"path";var nt=["*.{tsx,jsx}","*.{js,mjs}"],M=Z(typeof import.meta.url=="string"&&import.meta.url.length>0?import.meta.url:__filename);function ot(){for(let e of["./nextjs-loader.cjs","./dist/nextjs-loader.cjs"])try{return M.resolve(e)}catch{}throw new Error("tempo-sdk/nextjs: could not resolve nextjs-loader.cjs. Run `pnpm build` in the tempo-sdk package to produce the dist/ output.")}o(ot,"resolveLoaderPath");function rt(){try{let e=M("next/package.json"),t=/^(\d+)\.(\d+)/.exec(e.version);return t?{major:Number(t[1]),minor:Number(t[2])}:null}catch{return null}}o(rt,"detectNextVersion");function it(e){return e?e.major<15||e.major===15&&e.minor<3:!1}o(it,"useExperimentalTurbo");function st(e){return e?e.major<13:!1}o(st,"shouldOmitTurbopack");function v(e,t){let n={tempoRuntimeHash:h("nextjs-loader").sha256};return t.computeAnnotatedPropsModule!==void 0&&(n.computeAnnotatedPropsModule=t.computeAnnotatedPropsModule),t.autoInjectRootMeta!==void 0&&(n.autoInjectRootMeta=t.autoInjectRootMeta),{condition:t.productionBuild?{not:"foreign"}:{all:[{not:"foreign"},"development"]},loaders:[{loader:e,options:n}]}}o(v,"buildTurbopackRule");function S(e,t){let n={...e?.rules};for(let r of nt){let i=n[r];i?Array.isArray(i)?n[r]=[...i,t]:n[r]=[i,t]:n[r]=t}return{...e,rules:n}}o(S,"mergeTurbopackRules");function H(e,t,n){let r={tempoRuntimeHash:h("nextjs-loader").sha256};t.computeAnnotatedPropsModule!==void 0&&(r.computeAnnotatedPropsModule=t.computeAnnotatedPropsModule),t.autoInjectRootMeta!==void 0&&(r.autoInjectRootMeta=t.autoInjectRootMeta);let i=t.productionBuild===!0;return(c,s)=>{var p;let a=c;return(s.dev||i)&&(a.module??(a.module={}),(p=a.module).rules??(p.rules=[]),a.module.rules.push({test:/\.(tsx|jsx|m?js)$/,exclude:/node_modules/,enforce:"pre",use:[{loader:e,options:r}]})),typeof n=="function"?n(a,s):a}}o(H,"buildWebpackHook");var x=null;function Mt(){if(x!==null)return x;let e=process.cwd();for(;!X(et(e,"package.json"));){let n=tt(e);if(n===e)break;e=n}let t=e;try{t=Q.native(e)}catch{}return x=t,t}o(Mt,"tempoProjectRoot");function vt(){return N("nextjs")}o(vt,"tempoHostIdentity");function St(){x=null}o(St,"_resetTempoProjectRoot");function at(e={}){return t=>{let n=t??{};if(!process.env.TEMPO)return n;let r=k.resolveLoaderPath(),i=k.detectNextVersion(),c=k.shouldOmitTurbopack(i),s=k.useExperimentalTurbo(i),a=v(r,e),m=s?n.experimental?.turbo:n.turbopack,p=S(m,a),l=H(r,e,n.webpack??null),f={...n,webpack:l},b=process.env.TEMPO_NEXT_DIST_DIR;return b&&(f.distDir=b),c||(s?f.experimental={...n.experimental,turbo:p}:f.turbopack=p),f}}o(at,"tempoNextjsPlugin");var Ht=at,k={buildTurbopackRule:v,mergeTurbopackRules:S,buildWebpackHook:H,detectNextVersion:rt,useExperimentalTurbo:it,shouldOmitTurbopack:st,resolveLoaderPath:ot};export{Mt as a,vt as b,St as c,at as d,Ht as e,k as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s,b as Y}from"./chunk-XUSV3KOD.js";import{createHash as st}from"crypto";import{readFileSync as f,realpathSync as D}from"fs";import{createRequire as L,isBuiltin as B}from"module";import{dirname as
|
|
1
|
+
import{a as s,b as Y}from"./chunk-XUSV3KOD.js";import{createHash as st}from"crypto";import{readFileSync as f,realpathSync as D}from"fs";import{createRequire as L,isBuiltin as B}from"module";import{dirname as w,isAbsolute as d,relative as K,resolve as u,sep as W}from"path";import{fileURLToPath as U,pathToFileURL as _}from"url";var g={};Y(g,{TEMPO_HOST_IDENTITY_CAPABILITY_HEADER:()=>tt,TEMPO_HOST_IDENTITY_CONTRACT_VERSION:()=>H,TEMPO_HOST_IDENTITY_ENDPOINT:()=>Z,TEMPO_VUE_ANNOTATION_PLUGIN_NAME:()=>ot,TEMPO_WORKSPACE_NONCE_ENV:()=>j,TEMPO_WORKSPACE_NONCE_META_NAME:()=>et,createTempoHostIdentity:()=>it,readTempoWorkspaceNonce:()=>F});import{readFileSync as X}from"fs";import{resolve as Q}from"path";var M={version:"0.0.106"};var $="latest";var Z="/__tempo/identity",tt="x-tempo-host-identity",H=1,j="TEMPO_WORKSPACE_NONCE",et="tempo-workspace-nonce",nt=".tempo/workspace-nonce",rt=128,ot="tempo-vue-source-annotation";function v(t){let e=t?.trim()??"";return e.length>0&&e.length<=rt?e:""}s(v,"normalizeWorkspaceNonce");function F(t=process.cwd()){let e=v(process.env[j]);if(e)return e;try{return v(X(Q(t,nt),"utf-8"))}catch{return""}}s(F,"readTempoWorkspaceNonce");function it(t,e={}){return{tempoHost:!0,contractVersion:H,workspaceNonce:F(e.root),sdkVersion:M.version,sdkChannel:$,tempoRuntimeContract:1,pluginActive:e.pluginActive??!!process.env.TEMPO,framework:t,...e.capabilities?{capabilities:e.capabilities}:{}}}s(it,"createTempoHostIdentity");var y=1,k="TEMPO_SDK_RUNTIME_PATH",R=typeof import.meta.url=="string"?import.meta.url:_(__filename).href,h=L(R),q=new Map,m=new Map;var T;function at(t){if(!T){let n=w(U(R));for(;;){try{if(JSON.parse(f(u(n,"package.json"),"utf8")).name==="tempo-sdk"){T=n;break}}catch{}let r=w(n);if(n===r)throw a("the SDK package directory could not be found");n=r}}let e=U(R).endsWith(".ts");return _(u(T,e?t:`dist/${t.replace(/\.tsx?$/,".js")}`)).href}s(at,"sdkModuleUrl");function a(t){return new Error(`Tempo SDK runtime unavailable: ${t}. Start this project with an updated Tempo host, or provision its matching runtime and set ${k}.`)}s(a,"runtimeError");function ct(){let t=process.env[k];if(!t||!d(t))throw a("an absolute runtime directory was not supplied");let e=u(t),n;try{n=JSON.parse(f(u(e,"runtime.json"),"utf8"))}catch{throw a("runtime.json could not be read")}if(n?.tempoRuntimeContract!==y)throw a(`contract ${n?.tempoRuntimeContract} does not match ${y}`);return{root:e,manifest:n}}s(ct,"readRuntimeManifest");function V(t,e,n){if(!n||typeof n.file!="string"||!/^[a-f0-9]{64}$/.test(n.sha256))throw a(`the ${e} entry is missing or invalid`);let r=u(t,n.file),o=K(t,r);if(d(o)||o===".."||o.startsWith(`..${W}`))throw a(`the ${e} entry escapes its runtime directory`);let c;try{let p=K(D(t),D(r));if(d(p)||p===".."||p.startsWith(`..${W}`))throw a(`the ${e} entry escapes its runtime directory`);c=f(r)}catch{throw a(`the ${e} artifact could not be read`)}if(st("sha256").update(c).digest("hex")!==n.sha256)throw a(`the ${e} artifact failed its integrity check`);return r}s(V,"verifyArtifact");function E(t){if(typeof t=="string")return t;if(Array.isArray(t)){for(let e of t){let n=E(e);if(n)return n}return}if(!(!t||typeof t!="object"))for(let[e,n]of Object.entries(t)){if(!(["node","import","default"].includes(e)||e==="module-sync"&&process.features.require_module))continue;let o=E(n);if(o)return o}}s(E,"importExportTarget");function ut(t,e){if(B(t))return t;let n=e.resolve(`${t}/package.json`),r=JSON.parse(f(n,"utf8")),o=r.exports,c=o===void 0?r.module??r.main:E(o?.["."]??o);if(typeof c!="string")throw a(`${t} has no supported Node import entry`);return _(u(w(n),c)).href}s(ut,"resolveProjectImport");function pt(t,e=process.cwd(),n={}){let r=process.env[k];if(!r||!d(r))throw a("an absolute runtime directory was not supplied");let o=u(r),c=u(e),p=`${o}\0${c}\0${t}`;if(m.has(p))return m.get(p);let{manifest:N}=ct(),b=N.node?.[t],J=V(o,t,b);h(V(o,"serverBrowser",N.serverBrowser));let O=`${o}\0${c}\0${b.file}`,x=q.get(O);if(x){let i=x.getEntry(t);return m.set(p,i),i}let l=h(J);if(l.tempoRuntimeContract!==y||typeof l.createRuntime!="function")throw a(`the ${t} factory has an incompatible contract`);let A=L(u(c,"package.json")),C=s(i=>B(i)||i==="oxc-parser"||i.startsWith("oxc-parser/")||i.startsWith("@astrojs/compiler-")?h:A,"from"),I=Object.assign(i=>i==="@tempo-sdk-public/host-identity"?g:Object.hasOwn(n,i)?n[i]:C(i)(i),A,{resolve:s((i,G)=>C(i).resolve(i,G),"resolve")}),P=l.createRuntime({require:I,projectRoot:c,import:s(i=>import(ut(i,I)),"import"),sdkModuleUrl:at});q.set(O,P);let S=P.getEntry(t);return m.set(p,S),S}s(pt,"getNodeRuntime");function Nt(t,e){let n=s(function(...r){let o=pt(t)[e];if(typeof o!="function")throw a(`${t}.${e} is missing`);return Reflect.apply(o,this,r)},"delegate");return Object.defineProperty(n,"name",{value:e}),n}s(Nt,"nodeRuntimeFunction");export{pt as a,Nt as b};
|
package/dist/expo/plugin.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var l=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var Q=Object.getOwnPropertyNames;var Z=Object.prototype.hasOwnProperty;var s=(t,e)=>l(t,"name",{value:e,configurable:!0});var
|
|
1
|
+
"use strict";var l=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var Q=Object.getOwnPropertyNames;var Z=Object.prototype.hasOwnProperty;var s=(t,e)=>l(t,"name",{value:e,configurable:!0});var $=(t,e)=>{for(var n in e)l(t,n,{get:e[n],enumerable:!0})},tt=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Q(e))!Z.call(t,i)&&i!==n&&l(t,i,{get:()=>e[i],enumerable:!(o=X(e,i))||o.enumerable});return t};var et=t=>tt(l({},"__esModule",{value:!0}),t);var ft={};$(ft,{default:()=>G,tempoExpoBabelPlugin:()=>_});module.exports=et(ft);var L=require("crypto"),m=require("fs"),f=require("module"),r=require("path"),d=require("url");var T={};$(T,{TEMPO_HOST_IDENTITY_CAPABILITY_HEADER:()=>rt,TEMPO_HOST_IDENTITY_CONTRACT_VERSION:()=>D,TEMPO_HOST_IDENTITY_ENDPOINT:()=>ot,TEMPO_VUE_ANNOTATION_PLUGIN_NAME:()=>ct,TEMPO_WORKSPACE_NONCE_ENV:()=>K,TEMPO_WORKSPACE_NONCE_META_NAME:()=>it,createTempoHostIdentity:()=>ut,readTempoWorkspaceNonce:()=>W});var F=require("fs"),B=require("path");var v={version:"0.0.106"};var j="latest";var ot="/__tempo/identity",rt="x-tempo-host-identity",D=1,K="TEMPO_WORKSPACE_NONCE",it="tempo-workspace-nonce",st=".tempo/workspace-nonce",at=128,ct="tempo-vue-source-annotation";function H(t){let e=t?.trim()??"";return e.length>0&&e.length<=at?e:""}s(H,"normalizeWorkspaceNonce");function W(t=process.cwd()){let e=H(process.env[K]);if(e)return e;try{return H((0,F.readFileSync)((0,B.resolve)(t,st),"utf-8"))}catch{return""}}s(W,"readTempoWorkspaceNonce");function ut(t,e={}){return{tempoHost:!0,contractVersion:D,workspaceNonce:W(e.root),sdkVersion:v.version,sdkChannel:j,tempoRuntimeContract:1,pluginActive:e.pluginActive??!!process.env.TEMPO,framework:t,...e.capabilities?{capabilities:e.capabilities}:{}}}s(ut,"createTempoHostIdentity");var q={};var w=1,b="TEMPO_SDK_RUNTIME_PATH",x=typeof q.url=="string"?q.url:(0,d.pathToFileURL)(__filename).href,y=(0,f.createRequire)(x),U=new Map,g=new Map;var E;function pt(t){if(!E){let n=(0,r.dirname)((0,d.fileURLToPath)(x));for(;;){try{if(JSON.parse((0,m.readFileSync)((0,r.resolve)(n,"package.json"),"utf8")).name==="tempo-sdk"){E=n;break}}catch{}let o=(0,r.dirname)(n);if(n===o)throw p("the SDK package directory could not be found");n=o}}let e=(0,d.fileURLToPath)(x).endsWith(".ts");return(0,d.pathToFileURL)((0,r.resolve)(E,e?t:`dist/${t.replace(/\.tsx?$/,".js")}`)).href}s(pt,"sdkModuleUrl");function p(t){return new Error(`Tempo SDK runtime unavailable: ${t}. Start this project with an updated Tempo host, or provision its matching runtime and set ${b}.`)}s(p,"runtimeError");function mt(){let t=process.env[b];if(!t||!(0,r.isAbsolute)(t))throw p("an absolute runtime directory was not supplied");let e=(0,r.resolve)(t),n;try{n=JSON.parse((0,m.readFileSync)((0,r.resolve)(e,"runtime.json"),"utf8"))}catch{throw p("runtime.json could not be read")}if(n?.tempoRuntimeContract!==w)throw p(`contract ${n?.tempoRuntimeContract} does not match ${w}`);return{root:e,manifest:n}}s(mt,"readRuntimeManifest");function V(t,e,n){if(!n||typeof n.file!="string"||!/^[a-f0-9]{64}$/.test(n.sha256))throw p(`the ${e} entry is missing or invalid`);let o=(0,r.resolve)(t,n.file),i=(0,r.relative)(t,o);if((0,r.isAbsolute)(i)||i===".."||i.startsWith(`..${r.sep}`))throw p(`the ${e} entry escapes its runtime directory`);let c;try{let u=(0,r.relative)((0,m.realpathSync)(t),(0,m.realpathSync)(o));if((0,r.isAbsolute)(u)||u===".."||u.startsWith(`..${r.sep}`))throw p(`the ${e} entry escapes its runtime directory`);c=(0,m.readFileSync)(o)}catch{throw p(`the ${e} artifact could not be read`)}if((0,L.createHash)("sha256").update(c).digest("hex")!==n.sha256)throw p(`the ${e} artifact failed its integrity check`);return o}s(V,"verifyArtifact");function R(t){if(typeof t=="string")return t;if(Array.isArray(t)){for(let e of t){let n=R(e);if(n)return n}return}if(!(!t||typeof t!="object"))for(let[e,n]of Object.entries(t)){if(!(["node","import","default"].includes(e)||e==="module-sync"&&process.features.require_module))continue;let i=R(n);if(i)return i}}s(R,"importExportTarget");function dt(t,e){if((0,f.isBuiltin)(t))return t;let n=e.resolve(`${t}/package.json`),o=JSON.parse((0,m.readFileSync)(n,"utf8")),i=o.exports,c=i===void 0?o.module??o.main:R(i?.["."]??i);if(typeof c!="string")throw p(`${t} has no supported Node import entry`);return(0,d.pathToFileURL)((0,r.resolve)((0,r.dirname)(n),c)).href}s(dt,"resolveProjectImport");function J(t,e=process.cwd(),n={}){let o=process.env[b];if(!o||!(0,r.isAbsolute)(o))throw p("an absolute runtime directory was not supplied");let i=(0,r.resolve)(o),c=(0,r.resolve)(e),u=`${i}\0${c}\0${t}`;if(g.has(u))return g.get(u);let{manifest:k}=mt(),N=k.node?.[t],Y=V(i,t,N);y(V(i,"serverBrowser",k.serverBrowser));let A=`${i}\0${c}\0${N.file}`,P=U.get(A);if(P){let a=P.getEntry(t);return g.set(u,a),a}let h=y(Y);if(h.tempoRuntimeContract!==w||typeof h.createRuntime!="function")throw p(`the ${t} factory has an incompatible contract`);let O=(0,f.createRequire)((0,r.resolve)(c,"package.json")),C=s(a=>(0,f.isBuiltin)(a)||a==="oxc-parser"||a.startsWith("oxc-parser/")||a.startsWith("@astrojs/compiler-")?y:O,"from"),I=Object.assign(a=>a==="@tempo-sdk-public/host-identity"?T:Object.hasOwn(n,a)?n[a]:C(a)(a),O,{resolve:s((a,z)=>C(a).resolve(a,z),"resolve")}),S=h.createRuntime({require:I,projectRoot:c,import:s(a=>import(dt(a,I)),"import"),sdkModuleUrl:pt});U.set(A,S);let M=S.getEntry(t);return g.set(u,M),M}s(J,"getNodeRuntime");var _=s(function(t,e={}){return e.enabled??!!process.env.TEMPO?J("expo-babel-plugin",e.root).tempoExpoBabelPlugin(t,e):(t.assertVersion(7),{name:"tempo-expo-annotate",manipulateOptions(n,o){o.plugins??(o.plugins=[]);let i=s(c=>o.plugins.some(u=>(Array.isArray(u)?u[0]:u)===c),"has");i("jsx")||o.plugins.push("jsx"),/\.(ts|tsx)$/.test(n.filename??"")&&!i("typescript")&&o.plugins.push("typescript")},visitor:{Program:{enter(){}}}})},"tempoExpoBabelPlugin"),G=_;0&&(module.exports={tempoExpoBabelPlugin});
|
package/dist/expo/plugin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,b as o}from"../chunk-
|
|
1
|
+
import{a as e,b as o}from"../chunk-6IBN6C5F.js";export{o as default,e as tempoExpoBabelPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var l=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var X=Object.getOwnPropertyNames;var Q=Object.prototype.hasOwnProperty;var s=(t,e)=>l(t,"name",{value:e,configurable:!0});var M=(t,e)=>{for(var n in e)l(t,n,{get:e[n],enumerable:!0})},Z=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of X(e))!Q.call(t,i)&&i!==n&&l(t,i,{get:()=>e[i],enumerable:!(o=z(e,i))||o.enumerable});return t};var tt=t=>Z(l({},"__esModule",{value:!0}),t);var ft={};M(ft,{default:()=>dt,tempoExpoBabelPlugin:()=>J});module.exports=tt(ft);var q=require("crypto"),m=require("fs"),f=require("module"),r=require("path"),d=require("url");var T={};M(T,{TEMPO_HOST_IDENTITY_CAPABILITY_HEADER:()=>ot,TEMPO_HOST_IDENTITY_CONTRACT_VERSION:()=>D,TEMPO_HOST_IDENTITY_ENDPOINT:()=>nt,TEMPO_VUE_ANNOTATION_PLUGIN_NAME:()=>at,TEMPO_WORKSPACE_NONCE_ENV:()=>K,TEMPO_WORKSPACE_NONCE_META_NAME:()=>rt,createTempoHostIdentity:()=>ct,readTempoWorkspaceNonce:()=>W});var H=require("fs"),F=require("path");var
|
|
1
|
+
"use strict";var l=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var X=Object.getOwnPropertyNames;var Q=Object.prototype.hasOwnProperty;var s=(t,e)=>l(t,"name",{value:e,configurable:!0});var M=(t,e)=>{for(var n in e)l(t,n,{get:e[n],enumerable:!0})},Z=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of X(e))!Q.call(t,i)&&i!==n&&l(t,i,{get:()=>e[i],enumerable:!(o=z(e,i))||o.enumerable});return t};var tt=t=>Z(l({},"__esModule",{value:!0}),t);var ft={};M(ft,{default:()=>dt,tempoExpoBabelPlugin:()=>J});module.exports=tt(ft);var q=require("crypto"),m=require("fs"),f=require("module"),r=require("path"),d=require("url");var T={};M(T,{TEMPO_HOST_IDENTITY_CAPABILITY_HEADER:()=>ot,TEMPO_HOST_IDENTITY_CONTRACT_VERSION:()=>D,TEMPO_HOST_IDENTITY_ENDPOINT:()=>nt,TEMPO_VUE_ANNOTATION_PLUGIN_NAME:()=>at,TEMPO_WORKSPACE_NONCE_ENV:()=>K,TEMPO_WORKSPACE_NONCE_META_NAME:()=>rt,createTempoHostIdentity:()=>ct,readTempoWorkspaceNonce:()=>W});var H=require("fs"),F=require("path");var $={version:"0.0.106"};var v="latest";var nt="/__tempo/identity",ot="x-tempo-host-identity",D=1,K="TEMPO_WORKSPACE_NONCE",rt="tempo-workspace-nonce",it=".tempo/workspace-nonce",st=128,at="tempo-vue-source-annotation";function j(t){let e=t?.trim()??"";return e.length>0&&e.length<=st?e:""}s(j,"normalizeWorkspaceNonce");function W(t=process.cwd()){let e=j(process.env[K]);if(e)return e;try{return j((0,H.readFileSync)((0,F.resolve)(t,it),"utf-8"))}catch{return""}}s(W,"readTempoWorkspaceNonce");function ct(t,e={}){return{tempoHost:!0,contractVersion:D,workspaceNonce:W(e.root),sdkVersion:$.version,sdkChannel:v,tempoRuntimeContract:1,pluginActive:e.pluginActive??!!process.env.TEMPO,framework:t,...e.capabilities?{capabilities:e.capabilities}:{}}}s(ct,"createTempoHostIdentity");var V={};var E=1,_="TEMPO_SDK_RUNTIME_PATH",R=typeof V.url=="string"?V.url:(0,d.pathToFileURL)(__filename).href,y=(0,f.createRequire)(R),B=new Map,g=new Map;var w;function ut(t){if(!w){let n=(0,r.dirname)((0,d.fileURLToPath)(R));for(;;){try{if(JSON.parse((0,m.readFileSync)((0,r.resolve)(n,"package.json"),"utf8")).name==="tempo-sdk"){w=n;break}}catch{}let o=(0,r.dirname)(n);if(n===o)throw p("the SDK package directory could not be found");n=o}}let e=(0,d.fileURLToPath)(R).endsWith(".ts");return(0,d.pathToFileURL)((0,r.resolve)(w,e?t:`dist/${t.replace(/\.tsx?$/,".js")}`)).href}s(ut,"sdkModuleUrl");function p(t){return new Error(`Tempo SDK runtime unavailable: ${t}. Start this project with an updated Tempo host, or provision its matching runtime and set ${_}.`)}s(p,"runtimeError");function pt(){let t=process.env[_];if(!t||!(0,r.isAbsolute)(t))throw p("an absolute runtime directory was not supplied");let e=(0,r.resolve)(t),n;try{n=JSON.parse((0,m.readFileSync)((0,r.resolve)(e,"runtime.json"),"utf8"))}catch{throw p("runtime.json could not be read")}if(n?.tempoRuntimeContract!==E)throw p(`contract ${n?.tempoRuntimeContract} does not match ${E}`);return{root:e,manifest:n}}s(pt,"readRuntimeManifest");function U(t,e,n){if(!n||typeof n.file!="string"||!/^[a-f0-9]{64}$/.test(n.sha256))throw p(`the ${e} entry is missing or invalid`);let o=(0,r.resolve)(t,n.file),i=(0,r.relative)(t,o);if((0,r.isAbsolute)(i)||i===".."||i.startsWith(`..${r.sep}`))throw p(`the ${e} entry escapes its runtime directory`);let c;try{let u=(0,r.relative)((0,m.realpathSync)(t),(0,m.realpathSync)(o));if((0,r.isAbsolute)(u)||u===".."||u.startsWith(`..${r.sep}`))throw p(`the ${e} entry escapes its runtime directory`);c=(0,m.readFileSync)(o)}catch{throw p(`the ${e} artifact could not be read`)}if((0,q.createHash)("sha256").update(c).digest("hex")!==n.sha256)throw p(`the ${e} artifact failed its integrity check`);return o}s(U,"verifyArtifact");function x(t){if(typeof t=="string")return t;if(Array.isArray(t)){for(let e of t){let n=x(e);if(n)return n}return}if(!(!t||typeof t!="object"))for(let[e,n]of Object.entries(t)){if(!(["node","import","default"].includes(e)||e==="module-sync"&&process.features.require_module))continue;let i=x(n);if(i)return i}}s(x,"importExportTarget");function mt(t,e){if((0,f.isBuiltin)(t))return t;let n=e.resolve(`${t}/package.json`),o=JSON.parse((0,m.readFileSync)(n,"utf8")),i=o.exports,c=i===void 0?o.module??o.main:x(i?.["."]??i);if(typeof c!="string")throw p(`${t} has no supported Node import entry`);return(0,d.pathToFileURL)((0,r.resolve)((0,r.dirname)(n),c)).href}s(mt,"resolveProjectImport");function L(t,e=process.cwd(),n={}){let o=process.env[_];if(!o||!(0,r.isAbsolute)(o))throw p("an absolute runtime directory was not supplied");let i=(0,r.resolve)(o),c=(0,r.resolve)(e),u=`${i}\0${c}\0${t}`;if(g.has(u))return g.get(u);let{manifest:b}=pt(),k=b.node?.[t],G=U(i,t,k);y(U(i,"serverBrowser",b.serverBrowser));let N=`${i}\0${c}\0${k.file}`,A=B.get(N);if(A){let a=A.getEntry(t);return g.set(u,a),a}let h=y(G);if(h.tempoRuntimeContract!==E||typeof h.createRuntime!="function")throw p(`the ${t} factory has an incompatible contract`);let P=(0,f.createRequire)((0,r.resolve)(c,"package.json")),O=s(a=>(0,f.isBuiltin)(a)||a==="oxc-parser"||a.startsWith("oxc-parser/")||a.startsWith("@astrojs/compiler-")?y:P,"from"),C=Object.assign(a=>a==="@tempo-sdk-public/host-identity"?T:Object.hasOwn(n,a)?n[a]:O(a)(a),P,{resolve:s((a,Y)=>O(a).resolve(a,Y),"resolve")}),I=h.createRuntime({require:C,projectRoot:c,import:s(a=>import(mt(a,C)),"import"),sdkModuleUrl:ut});B.set(N,I);let S=I.getEntry(t);return g.set(u,S),S}s(L,"getNodeRuntime");var J=s(function(t,e={}){return e.enabled??!!process.env.TEMPO?L("expo-babel-plugin",e.root).tempoExpoBabelPlugin(t,e):(t.assertVersion(7),{name:"tempo-expo-annotate",manipulateOptions(n,o){o.plugins??(o.plugins=[]);let i=s(c=>o.plugins.some(u=>(Array.isArray(u)?u[0]:u)===c),"has");i("jsx")||o.plugins.push("jsx"),/\.(ts|tsx)$/.test(n.filename??"")&&!i("typescript")&&o.plugins.push("typescript")},visitor:{Program:{enter(){}}}})},"tempoExpoBabelPlugin"),dt=J;0&&(module.exports={tempoExpoBabelPlugin});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"./chunk-
|
|
1
|
+
import{a,b}from"./chunk-6IBN6C5F.js";export{b as default,a as tempoExpoBabelPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as t}from"./chunk-
|
|
1
|
+
import{b as t}from"./chunk-UBI4I7J4.js";import"./chunk-XUSV3KOD.js";var r=t("flutter-preview-path","canonicalPathAllowMissing"),o=t("flutter-preview-path","flutterPreviewKey"),a=t("flutter-preview-path","flutterPreviewForCanvas"),n=t("flutter-preview-path","pathInside"),i=t("flutter-preview-path","rebaseFlutterPreview");export{r as canonicalPathAllowMissing,a as flutterPreviewForCanvas,o as flutterPreviewKey,n as pathInside,i as rebaseFlutterPreview};
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-UBI4I7J4.js";import{a as t}from"./chunk-XUSV3KOD.js";var i=t(function(e={}){if(!(e.enabled??!!process.env.TEMPO)){let n={name:"tempo-annotate",apply:"serve",enforce:"pre"},a,p=t(()=>a??(a=r("index",e.root).tempoVitePlugin({...e,enabled:!1})),"inspect");for(let o of["_tempoErrorServer","_tempoHotUpdateState","_tempoUnresolvedImportState"])Object.defineProperty(n,o,{configurable:!0,get:t(()=>p()[o],"get"),set:t(m=>{p()[o]=m},"set")});return n}return r("index",e.root).tempoVitePlugin(e)},"tempoVitePlugin"),d=i;export{d as tempoAnnotate,i as tempoVitePlugin};
|
package/dist/nextjs/plugin.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var k=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var V=Object.prototype.hasOwnProperty;var s=(e,t)=>k(e,"name",{value:t,configurable:!0});var D=(e,t)=>{for(var n in t)k(e,n,{get:t[n],enumerable:!0})},F=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of L(t))!V.call(e,r)&&r!==n&&k(e,r,{get:()=>t[r],enumerable:!(o=$(t,r))||o.enumerable});return e};var W=e=>F(k({},"__esModule",{value:!0}),e);var Z={};D(Z,{default:()=>H});module.exports=W(Z);var T=require("crypto"),l=require("fs"),h=require("module"),i=require("path"),b=require("url");var K=require("fs"),U=require("path");var C={};var E=1,R="TEMPO_SDK_RUNTIME_PATH",B=typeof C.url=="string"?C.url:(0,b.pathToFileURL)(__filename).href,st=(0,h.createRequire)(B);var j=new Map;function p(e){return new Error(`Tempo SDK runtime unavailable: ${e}. Start this project with an updated Tempo host, or provision its matching runtime and set ${R}.`)}s(p,"runtimeError");function J(){let e=process.env[R];if(!e||!(0,i.isAbsolute)(e))throw p("an absolute runtime directory was not supplied");let t=(0,i.resolve)(e),n;try{n=JSON.parse((0,l.readFileSync)((0,i.resolve)(t,"runtime.json"),"utf8"))}catch{throw p("runtime.json could not be read")}if(n?.tempoRuntimeContract!==E)throw p(`contract ${n?.tempoRuntimeContract} does not match ${E}`);return{root:t,manifest:n}}s(J,"readRuntimeManifest");function _(e,t,n){if(!n||typeof n.file!="string"||!/^[a-f0-9]{64}$/.test(n.sha256))throw p(`the ${t} entry is missing or invalid`);let o=(0,i.resolve)(e,n.file),r=(0,i.relative)(e,o);if((0,i.isAbsolute)(r)||r===".."||r.startsWith(`..${i.sep}`))throw p(`the ${t} entry escapes its runtime directory`);let u;try{let a=(0,i.relative)((0,l.realpathSync)(e),(0,l.realpathSync)(o));if((0,i.isAbsolute)(a)||a===".."||a.startsWith(`..${i.sep}`))throw p(`the ${t} entry escapes its runtime directory`);u=(0,l.readFileSync)(o)}catch{throw p(`the ${t} artifact could not be read`)}if((0,T.createHash)("sha256").update(u).digest("hex")!==n.sha256)throw p(`the ${t} artifact failed its integrity check`);return o}s(_,"verifyArtifact");function y(e){let t=process.env[R];if(!t||!(0,i.isAbsolute)(t))throw p("an absolute runtime directory was not supplied");let n=(0,i.resolve)(t),o=`${n}\0${e}`,r=j.get(o);if(r)return r;let{manifest:u}=J(),a=u.node?.[e],c=_(n,e,a),d=u.browser,m=d&&_(n,"browser",d),f={sha256:d?(0,T.createHash)("sha256").update(a.sha256).update(d.sha256).digest("hex"):a.sha256,dependencies:[(0,i.resolve)(n,"runtime.json"),c,...m?[m]:[]]};return j.set(o,f),f}s(y,"nodeRuntimeIdentity");var P=require("fs"),I=require("module"),O=require("path");var w={};var Y=["*.{tsx,jsx}","*.{js,mjs}"],A=(0,I.createRequire)(typeof w.url=="string"&&w.url.length>0?w.url:__filename);function G(){for(let e of["./nextjs-loader.cjs","./dist/nextjs-loader.cjs"])try{return A.resolve(e)}catch{}throw new Error("tempo-sdk/nextjs: could not resolve nextjs-loader.cjs. Run `pnpm build` in the tempo-sdk package to produce the dist/ output.")}s(G,"resolveLoaderPath");function
|
|
1
|
+
"use strict";var k=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var V=Object.prototype.hasOwnProperty;var s=(e,t)=>k(e,"name",{value:t,configurable:!0});var D=(e,t)=>{for(var n in t)k(e,n,{get:t[n],enumerable:!0})},F=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of L(t))!V.call(e,r)&&r!==n&&k(e,r,{get:()=>t[r],enumerable:!(o=$(t,r))||o.enumerable});return e};var W=e=>F(k({},"__esModule",{value:!0}),e);var Z={};D(Z,{default:()=>H});module.exports=W(Z);var T=require("crypto"),l=require("fs"),h=require("module"),i=require("path"),b=require("url");var K=require("fs"),U=require("path");var C={};var E=1,R="TEMPO_SDK_RUNTIME_PATH",B=typeof C.url=="string"?C.url:(0,b.pathToFileURL)(__filename).href,st=(0,h.createRequire)(B);var j=new Map;function p(e){return new Error(`Tempo SDK runtime unavailable: ${e}. Start this project with an updated Tempo host, or provision its matching runtime and set ${R}.`)}s(p,"runtimeError");function J(){let e=process.env[R];if(!e||!(0,i.isAbsolute)(e))throw p("an absolute runtime directory was not supplied");let t=(0,i.resolve)(e),n;try{n=JSON.parse((0,l.readFileSync)((0,i.resolve)(t,"runtime.json"),"utf8"))}catch{throw p("runtime.json could not be read")}if(n?.tempoRuntimeContract!==E)throw p(`contract ${n?.tempoRuntimeContract} does not match ${E}`);return{root:t,manifest:n}}s(J,"readRuntimeManifest");function _(e,t,n){if(!n||typeof n.file!="string"||!/^[a-f0-9]{64}$/.test(n.sha256))throw p(`the ${t} entry is missing or invalid`);let o=(0,i.resolve)(e,n.file),r=(0,i.relative)(e,o);if((0,i.isAbsolute)(r)||r===".."||r.startsWith(`..${i.sep}`))throw p(`the ${t} entry escapes its runtime directory`);let u;try{let a=(0,i.relative)((0,l.realpathSync)(e),(0,l.realpathSync)(o));if((0,i.isAbsolute)(a)||a===".."||a.startsWith(`..${i.sep}`))throw p(`the ${t} entry escapes its runtime directory`);u=(0,l.readFileSync)(o)}catch{throw p(`the ${t} artifact could not be read`)}if((0,T.createHash)("sha256").update(u).digest("hex")!==n.sha256)throw p(`the ${t} artifact failed its integrity check`);return o}s(_,"verifyArtifact");function y(e){let t=process.env[R];if(!t||!(0,i.isAbsolute)(t))throw p("an absolute runtime directory was not supplied");let n=(0,i.resolve)(t),o=`${n}\0${e}`,r=j.get(o);if(r)return r;let{manifest:u}=J(),a=u.node?.[e],c=_(n,e,a),d=u.browser,m=d&&_(n,"browser",d),f={sha256:d?(0,T.createHash)("sha256").update(a.sha256).update(d.sha256).digest("hex"):a.sha256,dependencies:[(0,i.resolve)(n,"runtime.json"),c,...m?[m]:[]]};return j.set(o,f),f}s(y,"nodeRuntimeIdentity");var P=require("fs"),I=require("module"),O=require("path");var w={};var Y=["*.{tsx,jsx}","*.{js,mjs}"],A=(0,I.createRequire)(typeof w.url=="string"&&w.url.length>0?w.url:__filename);function G(){for(let e of["./nextjs-loader.cjs","./dist/nextjs-loader.cjs"])try{return A.resolve(e)}catch{}throw new Error("tempo-sdk/nextjs: could not resolve nextjs-loader.cjs. Run `pnpm build` in the tempo-sdk package to produce the dist/ output.")}s(G,"resolveLoaderPath");function z(){try{let e=A("next/package.json"),t=/^(\d+)\.(\d+)/.exec(e.version);return t?{major:Number(t[1]),minor:Number(t[2])}:null}catch{return null}}s(z,"detectNextVersion");function X(e){return e?e.major<15||e.major===15&&e.minor<3:!1}s(X,"useExperimentalTurbo");function Q(e){return e?e.major<13:!1}s(Q,"shouldOmitTurbopack");function M(e,t){let n={tempoRuntimeHash:y("nextjs-loader").sha256};return t.computeAnnotatedPropsModule!==void 0&&(n.computeAnnotatedPropsModule=t.computeAnnotatedPropsModule),t.autoInjectRootMeta!==void 0&&(n.autoInjectRootMeta=t.autoInjectRootMeta),{condition:t.productionBuild?{not:"foreign"}:{all:[{not:"foreign"},"development"]},loaders:[{loader:e,options:n}]}}s(M,"buildTurbopackRule");function v(e,t){let n={...e?.rules};for(let o of Y){let r=n[o];r?Array.isArray(r)?n[o]=[...r,t]:n[o]=[r,t]:n[o]=t}return{...e,rules:n}}s(v,"mergeTurbopackRules");function S(e,t,n){let o={tempoRuntimeHash:y("nextjs-loader").sha256};t.computeAnnotatedPropsModule!==void 0&&(o.computeAnnotatedPropsModule=t.computeAnnotatedPropsModule),t.autoInjectRootMeta!==void 0&&(o.autoInjectRootMeta=t.autoInjectRootMeta);let r=t.productionBuild===!0;return(u,a)=>{var m;let c=u;return(a.dev||r)&&(c.module??(c.module={}),(m=c.module).rules??(m.rules=[]),c.module.rules.push({test:/\.(tsx|jsx|m?js)$/,exclude:/node_modules/,enforce:"pre",use:[{loader:e,options:o}]})),typeof n=="function"?n(c,a):c}}s(S,"buildWebpackHook");function H(e={}){return t=>{let n=t??{};if(!process.env.TEMPO)return n;let o=x.resolveLoaderPath(),r=x.detectNextVersion(),u=x.shouldOmitTurbopack(r),a=x.useExperimentalTurbo(r),c=M(o,e),d=a?n.experimental?.turbo:n.turbopack,m=v(d,c),f=S(o,e,n.webpack??null),g={...n,webpack:f},N=process.env.TEMPO_NEXT_DIST_DIR;return N&&(g.distDir=N),u||(a?g.experimental={...n.experimental,turbo:m}:g.turbopack=m),g}}s(H,"tempoNextjsPlugin");var x={buildTurbopackRule:M,mergeTurbopackRules:v,buildWebpackHook:S,detectNextVersion:z,useExperimentalTurbo:X,shouldOmitTurbopack:Q,resolveLoaderPath:G};
|
|
2
2
|
module.exports = Object.assign(module.exports.default, module.exports);
|
package/dist/nextjs/plugin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e}from"../chunk-
|
|
1
|
+
import{d as e}from"../chunk-NLUW2DFD.js";export{e as default};
|
package/dist/nextjs-loader.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var R=Object.defineProperty;var et=Object.getOwnPropertyDescriptor;var ot=Object.getOwnPropertyNames;var nt=Object.prototype.hasOwnProperty;var
|
|
1
|
+
"use strict";var R=Object.defineProperty;var et=Object.getOwnPropertyDescriptor;var ot=Object.getOwnPropertyNames;var nt=Object.prototype.hasOwnProperty;var s=(t,e)=>R(t,"name",{value:e,configurable:!0});var D=(t,e)=>{for(var o in e)R(t,o,{get:e[o],enumerable:!0})},rt=(t,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of ot(e))!nt.call(t,r)&&r!==o&&R(t,r,{get:()=>e[r],enumerable:!(i=et(e,r))||i.enumerable});return t};var it=t=>rt(R({},"__esModule",{value:!0}),t);var wt={};D(wt,{_resetLoaderState:()=>ht,default:()=>Rt,injectRootMetaIntoAnnotatedSource:()=>yt,injectRootMetaIntoSource:()=>Tt,nextjsLoader:()=>Z});module.exports=it(wt);var g=require("path");var I=require("crypto"),m=require("fs"),l=require("module"),n=require("path"),f=require("url");var N={};D(N,{TEMPO_HOST_IDENTITY_CAPABILITY_HEADER:()=>ct,TEMPO_HOST_IDENTITY_CONTRACT_VERSION:()=>V,TEMPO_HOST_IDENTITY_ENDPOINT:()=>at,TEMPO_VUE_ANNOTATION_PLUGIN_NAME:()=>dt,TEMPO_WORKSPACE_NONCE_ENV:()=>B,TEMPO_WORKSPACE_NONCE_META_NAME:()=>ut,createTempoHostIdentity:()=>ft,readTempoWorkspaceNonce:()=>J});var U=require("fs"),q=require("path");var L={version:"0.0.106"};var W="latest";var at="/__tempo/identity",ct="x-tempo-host-identity",V=1,B="TEMPO_WORKSPACE_NONCE",ut="tempo-workspace-nonce",pt=".tempo/workspace-nonce",mt=128,dt="tempo-vue-source-annotation";function K(t){let e=t?.trim()??"";return e.length>0&&e.length<=mt?e:""}s(K,"normalizeWorkspaceNonce");function J(t=process.cwd()){let e=K(process.env[B]);if(e)return e;try{return K((0,U.readFileSync)((0,q.resolve)(t,pt),"utf-8"))}catch{return""}}s(J,"readTempoWorkspaceNonce");function ft(t,e={}){return{tempoHost:!0,contractVersion:V,workspaceNonce:J(e.root),sdkVersion:L.version,sdkChannel:W,tempoRuntimeContract:1,pluginActive:e.pluginActive??!!process.env.TEMPO,framework:t,...e.capabilities?{capabilities:e.capabilities}:{}}}s(ft,"createTempoHostIdentity");var z={};var O=1,E="TEMPO_SDK_RUNTIME_PATH",S=typeof z.url=="string"?z.url:(0,f.pathToFileURL)(__filename).href,b=(0,l.createRequire)(S),G=new Map,w=new Map,Y=new Map,A;function lt(t){if(!A){let o=(0,n.dirname)((0,f.fileURLToPath)(S));for(;;){try{if(JSON.parse((0,m.readFileSync)((0,n.resolve)(o,"package.json"),"utf8")).name==="tempo-sdk"){A=o;break}}catch{}let i=(0,n.dirname)(o);if(o===i)throw c("the SDK package directory could not be found");o=i}}let e=(0,f.fileURLToPath)(S).endsWith(".ts");return(0,f.pathToFileURL)((0,n.resolve)(A,e?t:`dist/${t.replace(/\.tsx?$/,".js")}`)).href}s(lt,"sdkModuleUrl");function c(t){return new Error(`Tempo SDK runtime unavailable: ${t}. Start this project with an updated Tempo host, or provision its matching runtime and set ${E}.`)}s(c,"runtimeError");function X(){let t=process.env[E];if(!t||!(0,n.isAbsolute)(t))throw c("an absolute runtime directory was not supplied");let e=(0,n.resolve)(t),o;try{o=JSON.parse((0,m.readFileSync)((0,n.resolve)(e,"runtime.json"),"utf8"))}catch{throw c("runtime.json could not be read")}if(o?.tempoRuntimeContract!==O)throw c(`contract ${o?.tempoRuntimeContract} does not match ${O}`);return{root:e,manifest:o}}s(X,"readRuntimeManifest");function x(t,e,o){if(!o||typeof o.file!="string"||!/^[a-f0-9]{64}$/.test(o.sha256))throw c(`the ${e} entry is missing or invalid`);let i=(0,n.resolve)(t,o.file),r=(0,n.relative)(t,i);if((0,n.isAbsolute)(r)||r===".."||r.startsWith(`..${n.sep}`))throw c(`the ${e} entry escapes its runtime directory`);let u;try{let p=(0,n.relative)((0,m.realpathSync)(t),(0,m.realpathSync)(i));if((0,n.isAbsolute)(p)||p===".."||p.startsWith(`..${n.sep}`))throw c(`the ${e} entry escapes its runtime directory`);u=(0,m.readFileSync)(i)}catch{throw c(`the ${e} artifact could not be read`)}if((0,I.createHash)("sha256").update(u).digest("hex")!==o.sha256)throw c(`the ${e} artifact failed its integrity check`);return i}s(x,"verifyArtifact");function Q(t){let e=process.env[E];if(!e||!(0,n.isAbsolute)(e))throw c("an absolute runtime directory was not supplied");let o=(0,n.resolve)(e),i=`${o}\0${t}`,r=Y.get(i);if(r)return r;let{manifest:u}=X(),p=u.node?.[t],T=x(o,t,p),d=u.browser,y=d&&x(o,"browser",d),h={sha256:d?(0,I.createHash)("sha256").update(p.sha256).update(d.sha256).digest("hex"):p.sha256,dependencies:[(0,n.resolve)(o,"runtime.json"),T,...y?[y]:[]]};return Y.set(i,h),h}s(Q,"nodeRuntimeIdentity");function C(t){if(typeof t=="string")return t;if(Array.isArray(t)){for(let e of t){let o=C(e);if(o)return o}return}if(!(!t||typeof t!="object"))for(let[e,o]of Object.entries(t)){if(!(["node","import","default"].includes(e)||e==="module-sync"&&process.features.require_module))continue;let r=C(o);if(r)return r}}s(C,"importExportTarget");function gt(t,e){if((0,l.isBuiltin)(t))return t;let o=e.resolve(`${t}/package.json`),i=JSON.parse((0,m.readFileSync)(o,"utf8")),r=i.exports,u=r===void 0?i.module??i.main:C(r?.["."]??r);if(typeof u!="string")throw c(`${t} has no supported Node import entry`);return(0,f.pathToFileURL)((0,n.resolve)((0,n.dirname)(o),u)).href}s(gt,"resolveProjectImport");function j(t,e=process.cwd(),o={}){let i=process.env[E];if(!i||!(0,n.isAbsolute)(i))throw c("an absolute runtime directory was not supplied");let r=(0,n.resolve)(i),u=(0,n.resolve)(e),p=`${r}\0${u}\0${t}`;if(w.has(p))return w.get(p);let{manifest:T}=X(),d=T.node?.[t],y=x(r,t,d);b(x(r,"serverBrowser",T.serverBrowser));let h=`${r}\0${u}\0${d.file}`,M=G.get(h);if(M){let a=M.getEntry(t);return w.set(p,a),a}let k=b(y);if(k.tempoRuntimeContract!==O||typeof k.createRuntime!="function")throw c(`the ${t} factory has an incompatible contract`);let P=(0,l.createRequire)((0,n.resolve)(u,"package.json")),$=s(a=>(0,l.isBuiltin)(a)||a==="oxc-parser"||a.startsWith("oxc-parser/")||a.startsWith("@astrojs/compiler-")?b:P,"from"),v=Object.assign(a=>a==="@tempo-sdk-public/host-identity"?N:Object.hasOwn(o,a)?o[a]:$(a)(a),P,{resolve:s((a,tt)=>$(a).resolve(a,tt),"resolve")}),H=k.createRuntime({require:v,projectRoot:u,import:s(a=>import(gt(a,v)),"import"),sdkModuleUrl:lt});G.set(h,H);let F=H.getEntry(t);return w.set(p,F),F}s(j,"getNodeRuntime");function _(t,e){let o=s(function(...i){let r=j(t)[e];if(typeof r!="function")throw c(`${t}.${e} is missing`);return Reflect.apply(r,this,i)},"delegate");return Object.defineProperty(o,"name",{value:e}),o}s(_,"nodeRuntimeFunction");var ht=_("nextjs-loader","_resetLoaderState"),Tt=_("nextjs-loader","injectRootMetaIntoSource"),yt=_("nextjs-loader","injectRootMetaIntoAnnotatedSource"),Z=s(function(t){if(!process.env.TEMPO)return this.cacheable?.(!0),t;for(let e of Q("nextjs-loader").dependencies){let o=(0,g.relative)(this.rootContext,e);(0,g.isAbsolute)(o)||o===".."||o.startsWith(`..${g.sep}`)||this.addDependency?.(e)}return j("nextjs-loader",this.rootContext).nextjsLoader.call(this,t)},"nextjsLoader"),Rt=Z;0&&(module.exports={_resetLoaderState,injectRootMetaIntoAnnotatedSource,injectRootMetaIntoSource,nextjsLoader});
|
package/dist/nextjs.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var x=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var B=Object.prototype.hasOwnProperty;var i=(e,t)=>x(e,"name",{value:t,configurable:!0});var J=(e,t)=>{for(var n in t)x(e,n,{get:t[n],enumerable:!0})},Y=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of q(t))!B.call(e,r)&&r!==n&&x(e,r,{get:()=>t[r],enumerable:!(o=U(t,r))||o.enumerable});return e};var G=e=>Y(x({},"__esModule",{value:!0}),e);var ft={};J(ft,{_internal:()=>f,_resetTempoProjectRoot:()=>dt,default:()=>lt,tempoHostIdentity:()=>mt,tempoNextjsPlugin:()=>K,tempoProjectRoot:()=>pt});module.exports=G(ft);var R=require("crypto"),l=require("fs"),y=require("module"),s=require("path"),w=require("url");var A=require("fs"),O=require("path");var C={version:"0.0.
|
|
1
|
+
"use strict";var x=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var B=Object.prototype.hasOwnProperty;var i=(e,t)=>x(e,"name",{value:t,configurable:!0});var J=(e,t)=>{for(var n in t)x(e,n,{get:t[n],enumerable:!0})},Y=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of q(t))!B.call(e,r)&&r!==n&&x(e,r,{get:()=>t[r],enumerable:!(o=U(t,r))||o.enumerable});return e};var G=e=>Y(x({},"__esModule",{value:!0}),e);var ft={};J(ft,{_internal:()=>f,_resetTempoProjectRoot:()=>dt,default:()=>lt,tempoHostIdentity:()=>mt,tempoNextjsPlugin:()=>K,tempoProjectRoot:()=>pt});module.exports=G(ft);var R=require("crypto"),l=require("fs"),y=require("module"),s=require("path"),w=require("url");var A=require("fs"),O=require("path");var C={version:"0.0.106"};var I="latest";var X=1,Q="TEMPO_WORKSPACE_NONCE";var Z=".tempo/workspace-nonce",tt=128;function P(e){let t=e?.trim()??"";return t.length>0&&t.length<=tt?t:""}i(P,"normalizeWorkspaceNonce");function et(e=process.cwd()){let t=P(process.env[Q]);if(t)return t;try{return P((0,A.readFileSync)((0,O.resolve)(e,Z),"utf-8"))}catch{return""}}i(et,"readTempoWorkspaceNonce");function M(e,t={}){return{tempoHost:!0,contractVersion:X,workspaceNonce:et(t.root),sdkVersion:C.version,sdkChannel:I,tempoRuntimeContract:1,pluginActive:t.pluginActive??!!process.env.TEMPO,framework:e,...t.capabilities?{capabilities:t.capabilities}:{}}}i(M,"createTempoHostIdentity");var $={};var v=1,N="TEMPO_SDK_RUNTIME_PATH",ot=typeof $.url=="string"?$.url:(0,w.pathToFileURL)(__filename).href,yt=(0,y.createRequire)(ot);var S=new Map;function p(e){return new Error(`Tempo SDK runtime unavailable: ${e}. Start this project with an updated Tempo host, or provision its matching runtime and set ${N}.`)}i(p,"runtimeError");function rt(){let e=process.env[N];if(!e||!(0,s.isAbsolute)(e))throw p("an absolute runtime directory was not supplied");let t=(0,s.resolve)(e),n;try{n=JSON.parse((0,l.readFileSync)((0,s.resolve)(t,"runtime.json"),"utf8"))}catch{throw p("runtime.json could not be read")}if(n?.tempoRuntimeContract!==v)throw p(`contract ${n?.tempoRuntimeContract} does not match ${v}`);return{root:t,manifest:n}}i(rt,"readRuntimeManifest");function H(e,t,n){if(!n||typeof n.file!="string"||!/^[a-f0-9]{64}$/.test(n.sha256))throw p(`the ${t} entry is missing or invalid`);let o=(0,s.resolve)(e,n.file),r=(0,s.relative)(e,o);if((0,s.isAbsolute)(r)||r===".."||r.startsWith(`..${s.sep}`))throw p(`the ${t} entry escapes its runtime directory`);let u;try{let a=(0,s.relative)((0,l.realpathSync)(e),(0,l.realpathSync)(o));if((0,s.isAbsolute)(a)||a===".."||a.startsWith(`..${s.sep}`))throw p(`the ${t} entry escapes its runtime directory`);u=(0,l.readFileSync)(o)}catch{throw p(`the ${t} artifact could not be read`)}if((0,R.createHash)("sha256").update(u).digest("hex")!==n.sha256)throw p(`the ${t} artifact failed its integrity check`);return o}i(H,"verifyArtifact");function E(e){let t=process.env[N];if(!t||!(0,s.isAbsolute)(t))throw p("an absolute runtime directory was not supplied");let n=(0,s.resolve)(t),o=`${n}\0${e}`,r=S.get(o);if(r)return r;let{manifest:u}=rt(),a=u.node?.[e],c=H(n,e,a),d=u.browser,m=d&&H(n,"browser",d),g={sha256:d?(0,R.createHash)("sha256").update(a.sha256).update(d.sha256).digest("hex"):a.sha256,dependencies:[(0,s.resolve)(n,"runtime.json"),c,...m?[m]:[]]};return S.set(o,g),g}i(E,"nodeRuntimeIdentity");var h=require("fs"),L=require("module"),b=require("path");var _={};var it=["*.{tsx,jsx}","*.{js,mjs}"],V=(0,L.createRequire)(typeof _.url=="string"&&_.url.length>0?_.url:__filename);function st(){for(let e of["./nextjs-loader.cjs","./dist/nextjs-loader.cjs"])try{return V.resolve(e)}catch{}throw new Error("tempo-sdk/nextjs: could not resolve nextjs-loader.cjs. Run `pnpm build` in the tempo-sdk package to produce the dist/ output.")}i(st,"resolveLoaderPath");function at(){try{let e=V("next/package.json"),t=/^(\d+)\.(\d+)/.exec(e.version);return t?{major:Number(t[1]),minor:Number(t[2])}:null}catch{return null}}i(at,"detectNextVersion");function ct(e){return e?e.major<15||e.major===15&&e.minor<3:!1}i(ct,"useExperimentalTurbo");function ut(e){return e?e.major<13:!1}i(ut,"shouldOmitTurbopack");function D(e,t){let n={tempoRuntimeHash:E("nextjs-loader").sha256};return t.computeAnnotatedPropsModule!==void 0&&(n.computeAnnotatedPropsModule=t.computeAnnotatedPropsModule),t.autoInjectRootMeta!==void 0&&(n.autoInjectRootMeta=t.autoInjectRootMeta),{condition:t.productionBuild?{not:"foreign"}:{all:[{not:"foreign"},"development"]},loaders:[{loader:e,options:n}]}}i(D,"buildTurbopackRule");function F(e,t){let n={...e?.rules};for(let o of it){let r=n[o];r?Array.isArray(r)?n[o]=[...r,t]:n[o]=[r,t]:n[o]=t}return{...e,rules:n}}i(F,"mergeTurbopackRules");function W(e,t,n){let o={tempoRuntimeHash:E("nextjs-loader").sha256};t.computeAnnotatedPropsModule!==void 0&&(o.computeAnnotatedPropsModule=t.computeAnnotatedPropsModule),t.autoInjectRootMeta!==void 0&&(o.autoInjectRootMeta=t.autoInjectRootMeta);let r=t.productionBuild===!0;return(u,a)=>{var m;let c=u;return(a.dev||r)&&(c.module??(c.module={}),(m=c.module).rules??(m.rules=[]),c.module.rules.push({test:/\.(tsx|jsx|m?js)$/,exclude:/node_modules/,enforce:"pre",use:[{loader:e,options:o}]})),typeof n=="function"?n(c,a):c}}i(W,"buildWebpackHook");var T=null;function pt(){if(T!==null)return T;let e=process.cwd();for(;!(0,h.existsSync)((0,b.resolve)(e,"package.json"));){let n=(0,b.dirname)(e);if(n===e)break;e=n}let t=e;try{t=h.realpathSync.native(e)}catch{}return T=t,t}i(pt,"tempoProjectRoot");function mt(){return M("nextjs")}i(mt,"tempoHostIdentity");function dt(){T=null}i(dt,"_resetTempoProjectRoot");function K(e={}){return t=>{let n=t??{};if(!process.env.TEMPO)return n;let o=f.resolveLoaderPath(),r=f.detectNextVersion(),u=f.shouldOmitTurbopack(r),a=f.useExperimentalTurbo(r),c=D(o,e),d=a?n.experimental?.turbo:n.turbopack,m=F(d,c),g=W(o,e,n.webpack??null),k={...n,webpack:g},j=process.env.TEMPO_NEXT_DIST_DIR;return j&&(k.distDir=j),u||(a?k.experimental={...n.experimental,turbo:m}:k.turbopack=m),k}}i(K,"tempoNextjsPlugin");var lt=K,f={buildTurbopackRule:D,mergeTurbopackRules:F,buildWebpackHook:W,detectNextVersion:at,useExperimentalTurbo:ct,shouldOmitTurbopack:ut,resolveLoaderPath:st};0&&(module.exports={_internal,_resetTempoProjectRoot,tempoHostIdentity,tempoNextjsPlugin,tempoProjectRoot});
|
|
2
2
|
module.exports = Object.assign(module.exports.default, module.exports);
|
package/dist/nextjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f}from"./chunk-
|
|
1
|
+
import{a,b,c,d,e,f}from"./chunk-NLUW2DFD.js";export{f as _internal,c as _resetTempoProjectRoot,e as default,b as tempoHostIdentity,d as tempoNextjsPlugin,a as tempoProjectRoot};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e,c as t}from"../../chunk-
|
|
1
|
+
import{b as e,c as t}from"../../chunk-I7QHVG22.js";import{defineEventHandler as r,setResponseHeaders as n}from"h3";var a=r(o=>(n(o,{"cache-control":"no-store",[e]:"1"}),t("nuxt")));export{a as default};
|
package/dist/nuxt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as i,d as A}from"./chunk-
|
|
1
|
+
import{a as i,d as A}from"./chunk-I7QHVG22.js";import*as m from"nuxt/kit";import{createHash as W}from"crypto";import{readFileSync as g,realpathSync as _}from"fs";import{createRequire as D,isBuiltin as F}from"module";import{dirname as w,isAbsolute as l,relative as I,resolve as u,sep as U}from"path";import{fileURLToPath as q,pathToFileURL as k}from"url";var x=1,$="TEMPO_SDK_RUNTIME_PATH",T=typeof import.meta.url=="string"?import.meta.url:k(__filename).href,y=D(T),H=new Map,f=new Map;var R;function L(t){if(!R){let e=w(q(T));for(;;){try{if(JSON.parse(g(u(e,"package.json"),"utf8")).name==="tempo-sdk"){R=e;break}}catch{}let r=w(e);if(e===r)throw a("the SDK package directory could not be found");e=r}}let n=q(T).endsWith(".ts");return k(u(R,n?t:`dist/${t.replace(/\.tsx?$/,".js")}`)).href}i(L,"sdkModuleUrl");function a(t){return new Error(`Tempo SDK runtime unavailable: ${t}. Start this project with an updated Tempo host, or provision its matching runtime and set ${$}.`)}i(a,"runtimeError");function G(){let t=process.env[$];if(!t||!l(t))throw a("an absolute runtime directory was not supplied");let n=u(t),e;try{e=JSON.parse(g(u(n,"runtime.json"),"utf8"))}catch{throw a("runtime.json could not be read")}if(e?.tempoRuntimeContract!==x)throw a(`contract ${e?.tempoRuntimeContract} does not match ${x}`);return{root:n,manifest:e}}i(G,"readRuntimeManifest");function B(t,n,e){if(!e||typeof e.file!="string"||!/^[a-f0-9]{64}$/.test(e.sha256))throw a(`the ${n} entry is missing or invalid`);let r=u(t,e.file),s=I(t,r);if(l(s)||s===".."||s.startsWith(`..${U}`))throw a(`the ${n} entry escapes its runtime directory`);let c;try{let p=I(_(t),_(r));if(l(p)||p===".."||p.startsWith(`..${U}`))throw a(`the ${n} entry escapes its runtime directory`);c=g(r)}catch{throw a(`the ${n} artifact could not be read`)}if(W("sha256").update(c).digest("hex")!==e.sha256)throw a(`the ${n} artifact failed its integrity check`);return r}i(B,"verifyArtifact");function b(t){if(typeof t=="string")return t;if(Array.isArray(t)){for(let n of t){let e=b(n);if(e)return e}return}if(!(!t||typeof t!="object"))for(let[n,e]of Object.entries(t)){if(!(["node","import","default"].includes(n)||n==="module-sync"&&process.features.require_module))continue;let s=b(e);if(s)return s}}i(b,"importExportTarget");function V(t,n){if(F(t))return t;let e=n.resolve(`${t}/package.json`),r=JSON.parse(g(e,"utf8")),s=r.exports,c=s===void 0?r.module??r.main:b(s?.["."]??s);if(typeof c!="string")throw a(`${t} has no supported Node import entry`);return k(u(w(e),c)).href}i(V,"resolveProjectImport");function d(t,n=process.cwd(),e={}){let r=process.env[$];if(!r||!l(r))throw a("an absolute runtime directory was not supplied");let s=u(r),c=u(n),p=`${s}\0${c}\0${t}`;if(f.has(p))return f.get(p);let{manifest:M}=G(),j=M.node?.[t],J=B(s,t,j);y(B(s,"serverBrowser",M.serverBrowser));let E=`${s}\0${c}\0${j.file}`,O=H.get(E);if(O){let o=O.getEntry(t);return f.set(p,o),o}let h=y(J);if(h.tempoRuntimeContract!==x||typeof h.createRuntime!="function")throw a(`the ${t} factory has an incompatible contract`);let P=D(u(c,"package.json")),C=i(o=>F(o)||o==="oxc-parser"||o.startsWith("oxc-parser/")||o.startsWith("@astrojs/compiler-")?y:P,"from"),N=Object.assign(o=>o==="@tempo-sdk-public/host-identity"?A:Object.hasOwn(e,o)?e[o]:C(o)(o),P,{resolve:i((o,K)=>C(o).resolve(o,K),"resolve")}),S=h.createRuntime({require:N,projectRoot:c,import:i(o=>import(V(o,N)),"import"),sdkModuleUrl:L});H.set(E,S);let v=S.getEntry(t);return f.set(p,v),v}i(d,"getNodeRuntime");var rt=i((...t)=>d("nuxt",process.cwd(),{"nuxt/kit":m}).tempoHostPageMetas(...t),"tempoHostPageMetas"),st=i((...t)=>d("nuxt",process.cwd(),{"nuxt/kit":m}).boardPluginSourcesModule(...t),"boardPluginSourcesModule"),it=i((...t)=>d("nuxt",process.cwd(),{"nuxt/kit":m}).pinHostTransformOptions(...t),"pinHostTransformOptions"),at="tempo-board-plugin-sources.mjs",z=m.defineNuxtModule({meta:{name:"tempo",configKey:"tempo"},async setup(t,n){let e=n.options.tempo?.enabled;return(typeof e=="boolean"?e:process.env.TEMPO)?d("nuxt",n.options.rootDir,{"nuxt/kit":m}).nuxtDefinition.setup.call(this,t,n):void 0}}),ct=z;export{at as BOARD_PLUGIN_SOURCES_TEMPLATE,st as boardPluginSourcesModule,ct as default,it as pinHostTransformOptions,rt as tempoHostPageMetas};
|
|
@@ -8,6 +8,7 @@ type StoryboardSdkComponentSpec = {
|
|
|
8
8
|
uiFramework?: StoryboardUiFramework;
|
|
9
9
|
requiresComponentProp: boolean;
|
|
10
10
|
allowsVrt: boolean;
|
|
11
|
+
allowsResponsive?: boolean;
|
|
11
12
|
componentFileExtension?: string;
|
|
12
13
|
componentImportQuery?: string;
|
|
13
14
|
};
|
|
@@ -17,6 +18,7 @@ declare const STORYBOARD_SDK_COMPONENT_ROWS: {
|
|
|
17
18
|
kind: "component";
|
|
18
19
|
requiresComponentProp: true;
|
|
19
20
|
allowsVrt: true;
|
|
21
|
+
allowsResponsive: true;
|
|
20
22
|
componentFileExtension: string;
|
|
21
23
|
};
|
|
22
24
|
SvelteStoryboard: {
|
|
@@ -25,6 +27,7 @@ declare const STORYBOARD_SDK_COMPONENT_ROWS: {
|
|
|
25
27
|
uiFramework: "svelte";
|
|
26
28
|
requiresComponentProp: true;
|
|
27
29
|
allowsVrt: true;
|
|
30
|
+
allowsResponsive: true;
|
|
28
31
|
componentFileExtension: string;
|
|
29
32
|
};
|
|
30
33
|
VueStoryboard: {
|
|
@@ -33,6 +36,7 @@ declare const STORYBOARD_SDK_COMPONENT_ROWS: {
|
|
|
33
36
|
uiFramework: "vue";
|
|
34
37
|
requiresComponentProp: true;
|
|
35
38
|
allowsVrt: true;
|
|
39
|
+
allowsResponsive: true;
|
|
36
40
|
componentFileExtension: string;
|
|
37
41
|
};
|
|
38
42
|
AstroStoryboard: {
|
|
@@ -41,6 +45,7 @@ declare const STORYBOARD_SDK_COMPONENT_ROWS: {
|
|
|
41
45
|
uiFramework: "astro";
|
|
42
46
|
requiresComponentProp: true;
|
|
43
47
|
allowsVrt: true;
|
|
48
|
+
allowsResponsive: false;
|
|
44
49
|
componentFileExtension: string;
|
|
45
50
|
componentImportQuery: string;
|
|
46
51
|
};
|
|
@@ -49,24 +54,28 @@ declare const STORYBOARD_SDK_COMPONENT_ROWS: {
|
|
|
49
54
|
kind: "component";
|
|
50
55
|
requiresComponentProp: false;
|
|
51
56
|
allowsVrt: true;
|
|
57
|
+
allowsResponsive: false;
|
|
52
58
|
};
|
|
53
59
|
RouteStoryboard: {
|
|
54
60
|
importSource: string;
|
|
55
61
|
kind: "route";
|
|
56
62
|
requiresComponentProp: false;
|
|
57
63
|
allowsVrt: false;
|
|
64
|
+
allowsResponsive: false;
|
|
58
65
|
};
|
|
59
66
|
HtmlStoryboard: {
|
|
60
67
|
importSource: string;
|
|
61
68
|
kind: "html";
|
|
62
69
|
requiresComponentProp: false;
|
|
63
70
|
allowsVrt: true;
|
|
71
|
+
allowsResponsive: false;
|
|
64
72
|
};
|
|
65
73
|
LegacyStoryboardV1: {
|
|
66
74
|
importSource: string;
|
|
67
75
|
kind: "component";
|
|
68
76
|
requiresComponentProp: false;
|
|
69
77
|
allowsVrt: false;
|
|
78
|
+
allowsResponsive: false;
|
|
70
79
|
};
|
|
71
80
|
};
|
|
72
81
|
type StoryboardSdkComponent = keyof typeof STORYBOARD_SDK_COMPONENT_ROWS;
|
|
@@ -168,6 +177,8 @@ type ParsedCanvasStoryboard = {
|
|
|
168
177
|
props?: ParsedCanvasExpressionReference;
|
|
169
178
|
vrt?: ParsedStoryboardVrt;
|
|
170
179
|
vrtAttributeSpan?: CanvasSourceSpan;
|
|
180
|
+
responsive?: true;
|
|
181
|
+
responsiveAttributeSpan?: CanvasSourceSpan;
|
|
171
182
|
route?: string;
|
|
172
183
|
routeSpan?: CanvasSourceSpan;
|
|
173
184
|
routeAttributeSpan?: CanvasSourceSpan;
|
|
@@ -21,7 +21,7 @@ interface StoryboardVrtConfig {
|
|
|
21
21
|
skip?: boolean;
|
|
22
22
|
ignore?: StoryboardVrtIgnoreRegion[];
|
|
23
23
|
}
|
|
24
|
-
declare function Storyboard<Props extends object = object>({ id, name, component, layout, props, vrt, ...annotations }: {
|
|
24
|
+
declare function Storyboard<Props extends object = object>({ id, name, component, layout, props, vrt, responsive, ...annotations }: {
|
|
25
25
|
id: string;
|
|
26
26
|
component: ComponentType<Props>;
|
|
27
27
|
layout: StoryboardLayout;
|
|
@@ -29,6 +29,15 @@ declare function Storyboard<Props extends object = object>({ id, name, component
|
|
|
29
29
|
props?: Props;
|
|
30
30
|
[annotation: `data-tempo-${string}`]: unknown;
|
|
31
31
|
vrt?: boolean | StoryboardVrtConfig;
|
|
32
|
+
/**
|
|
33
|
+
* Run this storyboard in a window resized to its own width and height, so
|
|
34
|
+
* `window.innerWidth`, `matchMedia` and viewport units match the frame, and
|
|
35
|
+
* screenshots show the layout chosen at that size. Without a
|
|
36
|
+
* `layout.width` and `layout.height`, the window takes the size the
|
|
37
|
+
* board renders at. The board refreshes about once a second while it is
|
|
38
|
+
* selected or being edited. Must be the literal `true`.
|
|
39
|
+
*/
|
|
40
|
+
responsive?: boolean;
|
|
32
41
|
} & Record<`data-tempo-${string}`, unknown>): react.JSX.Element;
|
|
33
42
|
declare function LegacyStoryboardV1({ id, storyboard, }: {
|
|
34
43
|
id: string;
|
|
@@ -54,9 +63,10 @@ declare function HtmlStoryboard({ id, name, filepath, src, layout, vrt, ...annot
|
|
|
54
63
|
name?: string;
|
|
55
64
|
vrt?: boolean | StoryboardVrtConfig;
|
|
56
65
|
} & Record<`data-tempo-${string}`, unknown>): react.JSX.Element;
|
|
57
|
-
declare function StoryboardSlot({ children, id, kind, layout, name, route, filepath, src, vrt, uiFramework, preview, previewKey, keepLayoutWhenParked, }: {
|
|
66
|
+
declare function StoryboardSlot({ children, id, kind, layout, name, route, filepath, src, vrt, responsive, uiFramework, preview, previewKey, keepLayoutWhenParked, }: {
|
|
58
67
|
"data-tempo-hide-fiber": "true";
|
|
59
68
|
vrt?: boolean;
|
|
69
|
+
responsive?: boolean;
|
|
60
70
|
uiFramework?: "svelte" | "vue" | "astro";
|
|
61
71
|
preview?: string;
|
|
62
72
|
previewKey?: string;
|
package/dist/svelte.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
1
|
+
import{a as o}from"./chunk-UBI4I7J4.js";import{a as e}from"./chunk-XUSV3KOD.js";var n=e(function(t={}){return t.enabled??!!process.env.TEMPO?o("svelte",t.root).tempoSveltePreprocess(t):{name:"svelte-source-annotation",markup:e(()=>{},"markup"),script:e(()=>{},"script")}},"tempoSveltePreprocess");export{n as tempoSveltePreprocess};
|
package/dist/vue.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
1
|
+
import{a as t}from"./chunk-UBI4I7J4.js";import{a as o}from"./chunk-XUSV3KOD.js";var n=o(function(e={}){return e.enabled??!!process.env.TEMPO?t("vue",e.root).tempoVuePlugin(e):[{name:"tempo-vue-source-annotation",enforce:"pre",api:{enabled:!1},transform:{order:"pre",handler:o(()=>{},"handler")}},{name:"tempo-vue-source-records",enforce:"post",transform:{order:"post",handler:o(()=>{},"handler")}}]},"tempoVuePlugin"),p=o(function(e){return t("vue",e.root).tempoVueAppPlugins(e)},"tempoVueAppPlugins");export{p as tempoVueAppPlugins,n as tempoVuePlugin};
|
package/package.json
CHANGED
package/dist/chunk-CXCUJCXD.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var r=Object.defineProperty;var o=(t,e)=>r(t,"name",{value:e,configurable:!0});var T=(t,e)=>{for(var n in e)r(t,n,{get:e[n],enumerable:!0})};var P={};T(P,{TEMPO_HOST_IDENTITY_CAPABILITY_HEADER:()=>O,TEMPO_HOST_IDENTITY_CONTRACT_VERSION:()=>a,TEMPO_HOST_IDENTITY_ENDPOINT:()=>N,TEMPO_VUE_ANNOTATION_PLUGIN_NAME:()=>d,TEMPO_WORKSPACE_NONCE_ENV:()=>c,TEMPO_WORKSPACE_NONCE_META_NAME:()=>l,createTempoHostIdentity:()=>C,readTempoWorkspaceNonce:()=>m});import{readFileSync as E}from"fs";import{resolve as u}from"path";var i={version:"0.0.102"};var s="latest";var N="/__tempo/identity",O="x-tempo-host-identity",a=1,c="TEMPO_WORKSPACE_NONCE",l="tempo-workspace-nonce",k=".tempo/workspace-nonce",A=128,d="tempo-vue-source-annotation";function p(t){let e=t?.trim()??"";return e.length>0&&e.length<=A?e:""}o(p,"normalizeWorkspaceNonce");function m(t=process.cwd()){let e=p(process.env[c]);if(e)return e;try{return p(E(u(t,k),"utf-8"))}catch{return""}}o(m,"readTempoWorkspaceNonce");function C(t,e={}){return{tempoHost:!0,contractVersion:a,workspaceNonce:m(e.root),sdkVersion:i.version,sdkChannel:s,tempoRuntimeContract:1,pluginActive:e.pluginActive??!!process.env.TEMPO,framework:t,...e.capabilities?{capabilities:e.capabilities}:{}}}o(C,"createTempoHostIdentity");export{o as a,O as b,C as c,P as d};
|