@makeswift/runtime 0.25.0 → 0.25.1-canary.1
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/cjs/api-handler/handlers/manifest.js +1 -1
- package/dist/cjs/next/api-handler/config/app-router.js +2 -6
- package/dist/cjs/next/api-handler/config/app-router.js.map +1 -1
- package/dist/cjs/next/app-router-site-version.js +9 -2
- package/dist/cjs/next/app-router-site-version.js.map +1 -1
- package/dist/cjs/runtimes/react/components/framework-context.js +4 -1
- package/dist/cjs/runtimes/react/components/framework-context.js.map +1 -1
- package/dist/esm/api-handler/handlers/manifest.js +1 -1
- package/dist/esm/next/api-handler/config/app-router.js +2 -6
- package/dist/esm/next/api-handler/config/app-router.js.map +1 -1
- package/dist/esm/next/app-router-site-version.js +10 -3
- package/dist/esm/next/app-router-site-version.js.map +1 -1
- package/dist/esm/runtimes/react/components/framework-context.js +3 -1
- package/dist/esm/runtimes/react/components/framework-context.js.map +1 -1
- package/dist/types/next/api-handler/config/app-router.d.ts +3 -3
- package/dist/types/next/api-handler/config/app-router.d.ts.map +1 -1
- package/dist/types/next/app-router-site-version.d.ts.map +1 -1
- package/dist/types/runtimes/react/components/framework-context.d.ts +2 -0
- package/dist/types/runtimes/react/components/framework-context.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -28,7 +28,7 @@ async function manifestHandler(req, { apiKey, manifest }) {
|
|
|
28
28
|
return import_request_response.ApiResponse.json({ message: "Unauthorized" }, { status: 401 });
|
|
29
29
|
}
|
|
30
30
|
return import_request_response.ApiResponse.json({
|
|
31
|
-
version: "0.25.
|
|
31
|
+
version: "0.25.1-canary.1",
|
|
32
32
|
interactionMode: true,
|
|
33
33
|
clientSideNavigation: false,
|
|
34
34
|
elementFromPoint: false,
|
|
@@ -29,10 +29,7 @@ var import_cache2 = require("../../cache");
|
|
|
29
29
|
var import_app_router_redirect_preview = require("../handlers/app-router-redirect-preview");
|
|
30
30
|
var import_preview = require("../preview");
|
|
31
31
|
var import_base = require("./base");
|
|
32
|
-
const argsPattern = [
|
|
33
|
-
import_ts_pattern.P.union(import_ts_pattern.P.instanceOf(Request), import_ts_pattern.P.instanceOf(import_server.NextRequest)),
|
|
34
|
-
import_ts_pattern.P.any
|
|
35
|
-
];
|
|
32
|
+
const argsPattern = [import_ts_pattern.P.instanceOf(import_server.NextRequest), import_ts_pattern.P.any];
|
|
36
33
|
async function config({
|
|
37
34
|
req,
|
|
38
35
|
context,
|
|
@@ -52,8 +49,7 @@ async function config({
|
|
|
52
49
|
},
|
|
53
50
|
customRoutes: async (route) => {
|
|
54
51
|
if (route === "/redirect-preview") {
|
|
55
|
-
|
|
56
|
-
return { res: await (0, import_app_router_redirect_preview.appRouterRedirectPreviewHandler)(request, context, client) };
|
|
52
|
+
return { res: await (0, import_app_router_redirect_preview.appRouterRedirectPreviewHandler)(req, context, client) };
|
|
57
53
|
}
|
|
58
54
|
return null;
|
|
59
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/next/api-handler/config/app-router.ts"],"sourcesContent":["import { P } from 'ts-pattern'\nimport { revalidatePath, revalidateTag } from 'next/cache'\nimport { NextRequest } from 'next/server'\n\nimport { MAKESWIFT_CACHE_TAG } from '../../cache'\nimport { type ApiResponse } from '../../../api-handler/request-response'\n\nimport { appRouterRedirectPreviewHandler } from '../handlers/app-router-redirect-preview'\nimport { MAKESWIFT_SITE_VERSION_COOKIE, PRERENDER_BYPASS_COOKIE } from '../preview'\n\nimport { validateApiRoute, type ApiHandlerConfig } from './base'\nimport { MakeswiftClient } from '../../../client'\n\ntype Params = { [key: string]: string | string[] }\ntype Context = { params: Promise<Params> }\n\nexport type ApiHandlerArgs = [NextRequest
|
|
1
|
+
{"version":3,"sources":["../../../../../src/next/api-handler/config/app-router.ts"],"sourcesContent":["import { P } from 'ts-pattern'\nimport { revalidatePath, revalidateTag } from 'next/cache'\nimport { NextRequest } from 'next/server'\n\nimport { MAKESWIFT_CACHE_TAG } from '../../cache'\nimport { type ApiResponse } from '../../../api-handler/request-response'\n\nimport { appRouterRedirectPreviewHandler } from '../handlers/app-router-redirect-preview'\nimport { MAKESWIFT_SITE_VERSION_COOKIE, PRERENDER_BYPASS_COOKIE } from '../preview'\n\nimport { validateApiRoute, type ApiHandlerConfig } from './base'\nimport { MakeswiftClient } from '../../../client'\n\ntype Params = { [key: string]: string | string[] }\ntype Context = { params: Promise<Params> }\n\nexport type ApiHandlerArgs = [NextRequest, Context]\nexport const argsPattern = [P.instanceOf(NextRequest), P.any] as const\n\nexport async function config({\n req,\n context,\n client,\n}: {\n req: NextRequest\n context: Context\n client: MakeswiftClient\n}): Promise<ApiHandlerConfig> {\n return {\n req,\n route: validateApiRoute(await context.params),\n previewCookieNames: [PRERENDER_BYPASS_COOKIE, MAKESWIFT_SITE_VERSION_COOKIE],\n sendResponse: async (res: ApiResponse): Promise<Response | void> => res,\n revalidationHandler: async (path?: string): Promise<void> => {\n if (path != null) {\n revalidatePath(path)\n } else {\n revalidateTag(MAKESWIFT_CACHE_TAG)\n }\n },\n customRoutes: async (route: string) => {\n if (route === '/redirect-preview') {\n return { res: await appRouterRedirectPreviewHandler(req, context, client) }\n }\n\n return null\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAkB;AAClB,mBAA8C;AAC9C,oBAA4B;AAE5B,IAAAA,gBAAoC;AAGpC,yCAAgD;AAChD,qBAAuE;AAEvE,kBAAwD;AAOjD,MAAM,cAAc,CAAC,oBAAE,WAAW,yBAAW,GAAG,oBAAE,GAAG;AAE5D,eAAsB,OAAO;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AACF,GAI8B;AAC5B,SAAO;AAAA,IACL;AAAA,IACA,WAAO,8BAAiB,MAAM,QAAQ,MAAM;AAAA,IAC5C,oBAAoB,CAAC,wCAAyB,4CAA6B;AAAA,IAC3E,cAAc,OAAO,QAA+C;AAAA,IACpE,qBAAqB,OAAO,SAAiC;AAC3D,UAAI,QAAQ,MAAM;AAChB,yCAAe,IAAI;AAAA,MACrB,OAAO;AACL,wCAAc,iCAAmB;AAAA,MACnC;AAAA,IACF;AAAA,IACA,cAAc,OAAO,UAAkB;AACrC,UAAI,UAAU,qBAAqB;AACjC,eAAO,EAAE,KAAK,UAAM,oEAAgC,KAAK,SAAS,MAAM,EAAE;AAAA,MAC5E;AAEA,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":["import_cache"]}
|
|
@@ -28,9 +28,16 @@ async function getSiteVersion() {
|
|
|
28
28
|
const { isEnabled: isDraftModeEnabled } = await (0, import_headers.draftMode)();
|
|
29
29
|
if (!isDraftModeEnabled)
|
|
30
30
|
return null;
|
|
31
|
-
const
|
|
32
|
-
|
|
31
|
+
const allCookies = await (0, import_headers.cookies)();
|
|
32
|
+
const cookie = allCookies.get(import_preview.MAKESWIFT_SITE_VERSION_COOKIE);
|
|
33
|
+
if (cookie == null) {
|
|
34
|
+
if (allCookies.get(import_preview.PRERENDER_BYPASS_COOKIE) == null) {
|
|
35
|
+
console.error(
|
|
36
|
+
"WARNING: Draft mode is enabled, but both the site version and the prerender bypass cookies are missing.\nThis is abnormal and could cause Makeswift editing and preview to not work as expected.\nDouble-check that you're not forcing static rendering (export const dynamic = 'force-static') on your Makeswift pages.\nMore info: https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#dynamic"
|
|
37
|
+
);
|
|
38
|
+
}
|
|
33
39
|
return null;
|
|
40
|
+
}
|
|
34
41
|
return (0, import_site_version.deserializeSiteVersion)(cookie.value);
|
|
35
42
|
}
|
|
36
43
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/next/app-router-site-version.tsx"],"sourcesContent":["import { cookies, draftMode } from 'next/headers'\nimport { deserializeSiteVersion, SiteVersion } from '../api/site-version'\nimport { MAKESWIFT_SITE_VERSION_COOKIE } from './api-handler/preview'\n\nexport async function getSiteVersion(): Promise<SiteVersion | null> {\n const { isEnabled: isDraftModeEnabled } = await draftMode()\n if (!isDraftModeEnabled) return null\n\n const
|
|
1
|
+
{"version":3,"sources":["../../../src/next/app-router-site-version.tsx"],"sourcesContent":["import { cookies, draftMode } from 'next/headers'\nimport { deserializeSiteVersion, SiteVersion } from '../api/site-version'\nimport { MAKESWIFT_SITE_VERSION_COOKIE, PRERENDER_BYPASS_COOKIE } from './api-handler/preview'\n\nexport async function getSiteVersion(): Promise<SiteVersion | null> {\n const { isEnabled: isDraftModeEnabled } = await draftMode()\n if (!isDraftModeEnabled) return null\n\n const allCookies = await cookies()\n const cookie = allCookies.get(MAKESWIFT_SITE_VERSION_COOKIE)\n if (cookie == null) {\n if (allCookies.get(PRERENDER_BYPASS_COOKIE) == null) {\n // logging this as an error for greater visibility during local development;\n // end-users will not see this warning in production\n console.error(\n 'WARNING: Draft mode is enabled, but both the site version and the prerender bypass cookies are missing.\\n' +\n 'This is abnormal and could cause Makeswift editing and preview to not work as expected.\\n' +\n \"Double-check that you're not forcing static rendering (export const dynamic = 'force-static') on your Makeswift pages.\\n\" +\n 'More info: https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#dynamic',\n )\n }\n\n return null\n }\n\n return deserializeSiteVersion(cookie.value)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAmC;AACnC,0BAAoD;AACpD,qBAAuE;AAEvE,eAAsB,iBAA8C;AAClE,QAAM,EAAE,WAAW,mBAAmB,IAAI,UAAM,0BAAU;AAC1D,MAAI,CAAC;AAAoB,WAAO;AAEhC,QAAM,aAAa,UAAM,wBAAQ;AACjC,QAAM,SAAS,WAAW,IAAI,4CAA6B;AAC3D,MAAI,UAAU,MAAM;AAClB,QAAI,WAAW,IAAI,sCAAuB,KAAK,MAAM;AAGnD,cAAQ;AAAA,QACN;AAAA,MAIF;AAAA,IACF;AAEA,WAAO;AAAA,EACT;AAEA,aAAO,4CAAuB,OAAO,KAAK;AAC5C;","names":[]}
|
|
@@ -19,6 +19,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
var framework_context_exports = {};
|
|
20
20
|
__export(framework_context_exports, {
|
|
21
21
|
DefaultHead: () => DefaultHead,
|
|
22
|
+
DefaultHeadSnippet: () => DefaultHeadSnippet,
|
|
22
23
|
DefaultImage: () => DefaultImage,
|
|
23
24
|
DefaultLink: () => DefaultLink,
|
|
24
25
|
FrameworkContext: () => FrameworkContext,
|
|
@@ -30,6 +31,7 @@ var import_react = require("react");
|
|
|
30
31
|
var import_site_version = require("../../../api/site-version");
|
|
31
32
|
var import_HeadSnippet = require("./page/HeadSnippet");
|
|
32
33
|
const DefaultHead = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
|
|
34
|
+
const DefaultHeadSnippet = import_HeadSnippet.BaseHeadSnippet;
|
|
33
35
|
const DefaultImage = ({ priority, fill, style, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
34
36
|
"img",
|
|
35
37
|
{
|
|
@@ -57,7 +59,7 @@ const versionedFetch = (siteVersion) => (url, init) => fetch(url, {
|
|
|
57
59
|
});
|
|
58
60
|
const FrameworkContext = (0, import_react.createContext)({
|
|
59
61
|
Head: DefaultHead,
|
|
60
|
-
HeadSnippet:
|
|
62
|
+
HeadSnippet: DefaultHeadSnippet,
|
|
61
63
|
Image: DefaultImage,
|
|
62
64
|
Link: DefaultLink,
|
|
63
65
|
versionedFetch
|
|
@@ -65,6 +67,7 @@ const FrameworkContext = (0, import_react.createContext)({
|
|
|
65
67
|
// Annotate the CommonJS export names for ESM import in node:
|
|
66
68
|
0 && (module.exports = {
|
|
67
69
|
DefaultHead,
|
|
70
|
+
DefaultHeadSnippet,
|
|
68
71
|
DefaultImage,
|
|
69
72
|
DefaultLink,
|
|
70
73
|
FrameworkContext,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/runtimes/react/components/framework-context.tsx"],"sourcesContent":["import {\n createContext,\n type ReactNode,\n type PropsWithChildren,\n type CSSProperties,\n type ComponentPropsWithoutRef,\n type MouseEvent,\n type ForwardRefExoticComponent,\n type RefAttributes,\n forwardRef,\n} from 'react'\n\nimport { type LinkData } from '@makeswift/prop-controllers'\n\nimport { type Snippet } from '../../../client'\nimport { type HttpFetch } from '../../../state/makeswift-api-client'\nimport {\n ApiHandlerHeaders,\n serializeSiteVersion,\n type SiteVersion,\n} from '../../../api/site-version'\n\nimport { BaseHeadSnippet } from './page/HeadSnippet'\n\ntype HeadComponent = (props: { children: ReactNode }) => ReactNode\ntype HeadSnippet = (props: { snippet: Snippet }) => ReactNode\ntype ImageComponent = (props: {\n src: string\n alt: string\n sizes?: string\n width?: number\n height?: number\n priority?: boolean\n fill?: boolean\n style?: CSSProperties\n}) => ReactNode\n\ntype LinkProps = Omit<ComponentPropsWithoutRef<'a'>, 'onClick'> & {\n linkType?: LinkData['type']\n onClick?: (event: MouseEvent<HTMLAnchorElement>) => unknown\n}\n\ntype LinkComponent = ForwardRefExoticComponent<RefAttributes<HTMLAnchorElement> & LinkProps>\n\nexport type FrameworkContext = {\n Head: HeadComponent\n HeadSnippet: HeadSnippet\n Image: ImageComponent\n Link: LinkComponent\n versionedFetch: (siteVersion: SiteVersion | null) => HttpFetch\n}\n\n// React 19 automatically hoists metadata tags to the <head>\nexport const DefaultHead = ({ children }: PropsWithChildren) => <>{children}</>\n\nexport const DefaultImage: ImageComponent = ({ priority, fill, style, ...props }) => (\n <img\n {...props}\n style={{\n ...(fill\n ? {\n height: '100%',\n width: '100%',\n objectFit: 'cover',\n }\n : {}),\n ...style,\n }}\n loading={priority ? 'eager' : 'lazy'}\n />\n)\n\nexport const DefaultLink: LinkComponent = forwardRef<HTMLAnchorElement, LinkProps>(\n ({ linkType, ...props }, ref) => <a {...props} ref={ref} />,\n)\n\nexport const versionedFetch: FrameworkContext['versionedFetch'] = siteVersion => (url, init) =>\n fetch(url, {\n ...init,\n headers: {\n ...init?.headers,\n ...(siteVersion != null\n ? { [ApiHandlerHeaders.SiteVersion]: serializeSiteVersion(siteVersion) }\n : {}),\n },\n })\n\nexport const FrameworkContext = createContext<FrameworkContext>({\n Head: DefaultHead,\n HeadSnippet:
|
|
1
|
+
{"version":3,"sources":["../../../../../src/runtimes/react/components/framework-context.tsx"],"sourcesContent":["import {\n createContext,\n type ReactNode,\n type PropsWithChildren,\n type CSSProperties,\n type ComponentPropsWithoutRef,\n type MouseEvent,\n type ForwardRefExoticComponent,\n type RefAttributes,\n forwardRef,\n} from 'react'\n\nimport { type LinkData } from '@makeswift/prop-controllers'\n\nimport { type Snippet } from '../../../client'\nimport { type HttpFetch } from '../../../state/makeswift-api-client'\nimport {\n ApiHandlerHeaders,\n serializeSiteVersion,\n type SiteVersion,\n} from '../../../api/site-version'\n\nimport { BaseHeadSnippet } from './page/HeadSnippet'\n\ntype HeadComponent = (props: { children: ReactNode }) => ReactNode\ntype HeadSnippet = (props: { snippet: Snippet }) => ReactNode\ntype ImageComponent = (props: {\n src: string\n alt: string\n sizes?: string\n width?: number\n height?: number\n priority?: boolean\n fill?: boolean\n style?: CSSProperties\n}) => ReactNode\n\ntype LinkProps = Omit<ComponentPropsWithoutRef<'a'>, 'onClick'> & {\n linkType?: LinkData['type']\n onClick?: (event: MouseEvent<HTMLAnchorElement>) => unknown\n}\n\ntype LinkComponent = ForwardRefExoticComponent<RefAttributes<HTMLAnchorElement> & LinkProps>\n\nexport type FrameworkContext = {\n Head: HeadComponent\n HeadSnippet: HeadSnippet\n Image: ImageComponent\n Link: LinkComponent\n versionedFetch: (siteVersion: SiteVersion | null) => HttpFetch\n}\n\n// React 19 automatically hoists metadata tags to the <head>\nexport const DefaultHead = ({ children }: PropsWithChildren) => <>{children}</>\n\nexport const DefaultHeadSnippet = BaseHeadSnippet\n\nexport const DefaultImage: ImageComponent = ({ priority, fill, style, ...props }) => (\n <img\n {...props}\n style={{\n ...(fill\n ? {\n height: '100%',\n width: '100%',\n objectFit: 'cover',\n }\n : {}),\n ...style,\n }}\n loading={priority ? 'eager' : 'lazy'}\n />\n)\n\nexport const DefaultLink: LinkComponent = forwardRef<HTMLAnchorElement, LinkProps>(\n ({ linkType, ...props }, ref) => <a {...props} ref={ref} />,\n)\n\nexport const versionedFetch: FrameworkContext['versionedFetch'] = siteVersion => (url, init) =>\n fetch(url, {\n ...init,\n headers: {\n ...init?.headers,\n ...(siteVersion != null\n ? { [ApiHandlerHeaders.SiteVersion]: serializeSiteVersion(siteVersion) }\n : {}),\n },\n })\n\nexport const FrameworkContext = createContext<FrameworkContext>({\n Head: DefaultHead,\n HeadSnippet: DefaultHeadSnippet,\n Image: DefaultImage,\n Link: DefaultLink,\n versionedFetch,\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqDgE;AArDhE,mBAUO;AAMP,0BAIO;AAEP,yBAAgC;AA+BzB,MAAM,cAAc,CAAC,EAAE,SAAS,MAAyB,2EAAG,UAAS;AAErE,MAAM,qBAAqB;AAE3B,MAAM,eAA+B,CAAC,EAAE,UAAU,MAAM,OAAO,GAAG,MAAM,MAC7E;AAAA,EAAC;AAAA;AAAA,IACE,GAAG;AAAA,IACJ,OAAO;AAAA,MACL,GAAI,OACA;AAAA,QACE,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,WAAW;AAAA,MACb,IACA,CAAC;AAAA,MACL,GAAG;AAAA,IACL;AAAA,IACA,SAAS,WAAW,UAAU;AAAA;AAChC;AAGK,MAAM,kBAA6B;AAAA,EACxC,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,QAAQ,4CAAC,OAAG,GAAG,OAAO,KAAU;AAC3D;AAEO,MAAM,iBAAqD,iBAAe,CAAC,KAAK,SACrF,MAAM,KAAK;AAAA,EACT,GAAG;AAAA,EACH,SAAS;AAAA,IACP,GAAG,MAAM;AAAA,IACT,GAAI,eAAe,OACf,EAAE,CAAC,sCAAkB,WAAW,OAAG,0CAAqB,WAAW,EAAE,IACrE,CAAC;AAAA,EACP;AACF,CAAC;AAEI,MAAM,uBAAmB,4BAAgC;AAAA,EAC9D,MAAM;AAAA,EACN,aAAa;AAAA,EACb,OAAO;AAAA,EACP,MAAM;AAAA,EACN;AACF,CAAC;","names":[]}
|
|
@@ -8,7 +8,7 @@ async function manifestHandler(req, { apiKey, manifest }) {
|
|
|
8
8
|
return ApiResponse.json({ message: "Unauthorized" }, { status: 401 });
|
|
9
9
|
}
|
|
10
10
|
return ApiResponse.json({
|
|
11
|
-
version: "0.25.
|
|
11
|
+
version: "0.25.1-canary.1",
|
|
12
12
|
interactionMode: true,
|
|
13
13
|
clientSideNavigation: false,
|
|
14
14
|
elementFromPoint: false,
|
|
@@ -5,10 +5,7 @@ import { MAKESWIFT_CACHE_TAG } from "../../cache";
|
|
|
5
5
|
import { appRouterRedirectPreviewHandler } from "../handlers/app-router-redirect-preview";
|
|
6
6
|
import { MAKESWIFT_SITE_VERSION_COOKIE, PRERENDER_BYPASS_COOKIE } from "../preview";
|
|
7
7
|
import { validateApiRoute } from "./base";
|
|
8
|
-
const argsPattern = [
|
|
9
|
-
P.union(P.instanceOf(Request), P.instanceOf(NextRequest)),
|
|
10
|
-
P.any
|
|
11
|
-
];
|
|
8
|
+
const argsPattern = [P.instanceOf(NextRequest), P.any];
|
|
12
9
|
async function config({
|
|
13
10
|
req,
|
|
14
11
|
context,
|
|
@@ -28,8 +25,7 @@ async function config({
|
|
|
28
25
|
},
|
|
29
26
|
customRoutes: async (route) => {
|
|
30
27
|
if (route === "/redirect-preview") {
|
|
31
|
-
|
|
32
|
-
return { res: await appRouterRedirectPreviewHandler(request, context, client) };
|
|
28
|
+
return { res: await appRouterRedirectPreviewHandler(req, context, client) };
|
|
33
29
|
}
|
|
34
30
|
return null;
|
|
35
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/next/api-handler/config/app-router.ts"],"sourcesContent":["import { P } from 'ts-pattern'\nimport { revalidatePath, revalidateTag } from 'next/cache'\nimport { NextRequest } from 'next/server'\n\nimport { MAKESWIFT_CACHE_TAG } from '../../cache'\nimport { type ApiResponse } from '../../../api-handler/request-response'\n\nimport { appRouterRedirectPreviewHandler } from '../handlers/app-router-redirect-preview'\nimport { MAKESWIFT_SITE_VERSION_COOKIE, PRERENDER_BYPASS_COOKIE } from '../preview'\n\nimport { validateApiRoute, type ApiHandlerConfig } from './base'\nimport { MakeswiftClient } from '../../../client'\n\ntype Params = { [key: string]: string | string[] }\ntype Context = { params: Promise<Params> }\n\nexport type ApiHandlerArgs = [NextRequest
|
|
1
|
+
{"version":3,"sources":["../../../../../src/next/api-handler/config/app-router.ts"],"sourcesContent":["import { P } from 'ts-pattern'\nimport { revalidatePath, revalidateTag } from 'next/cache'\nimport { NextRequest } from 'next/server'\n\nimport { MAKESWIFT_CACHE_TAG } from '../../cache'\nimport { type ApiResponse } from '../../../api-handler/request-response'\n\nimport { appRouterRedirectPreviewHandler } from '../handlers/app-router-redirect-preview'\nimport { MAKESWIFT_SITE_VERSION_COOKIE, PRERENDER_BYPASS_COOKIE } from '../preview'\n\nimport { validateApiRoute, type ApiHandlerConfig } from './base'\nimport { MakeswiftClient } from '../../../client'\n\ntype Params = { [key: string]: string | string[] }\ntype Context = { params: Promise<Params> }\n\nexport type ApiHandlerArgs = [NextRequest, Context]\nexport const argsPattern = [P.instanceOf(NextRequest), P.any] as const\n\nexport async function config({\n req,\n context,\n client,\n}: {\n req: NextRequest\n context: Context\n client: MakeswiftClient\n}): Promise<ApiHandlerConfig> {\n return {\n req,\n route: validateApiRoute(await context.params),\n previewCookieNames: [PRERENDER_BYPASS_COOKIE, MAKESWIFT_SITE_VERSION_COOKIE],\n sendResponse: async (res: ApiResponse): Promise<Response | void> => res,\n revalidationHandler: async (path?: string): Promise<void> => {\n if (path != null) {\n revalidatePath(path)\n } else {\n revalidateTag(MAKESWIFT_CACHE_TAG)\n }\n },\n customRoutes: async (route: string) => {\n if (route === '/redirect-preview') {\n return { res: await appRouterRedirectPreviewHandler(req, context, client) }\n }\n\n return null\n },\n }\n}\n"],"mappings":"AAAA,SAAS,SAAS;AAClB,SAAS,gBAAgB,qBAAqB;AAC9C,SAAS,mBAAmB;AAE5B,SAAS,2BAA2B;AAGpC,SAAS,uCAAuC;AAChD,SAAS,+BAA+B,+BAA+B;AAEvE,SAAS,wBAA+C;AAOjD,MAAM,cAAc,CAAC,EAAE,WAAW,WAAW,GAAG,EAAE,GAAG;AAE5D,eAAsB,OAAO;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AACF,GAI8B;AAC5B,SAAO;AAAA,IACL;AAAA,IACA,OAAO,iBAAiB,MAAM,QAAQ,MAAM;AAAA,IAC5C,oBAAoB,CAAC,yBAAyB,6BAA6B;AAAA,IAC3E,cAAc,OAAO,QAA+C;AAAA,IACpE,qBAAqB,OAAO,SAAiC;AAC3D,UAAI,QAAQ,MAAM;AAChB,uBAAe,IAAI;AAAA,MACrB,OAAO;AACL,sBAAc,mBAAmB;AAAA,MACnC;AAAA,IACF;AAAA,IACA,cAAc,OAAO,UAAkB;AACrC,UAAI,UAAU,qBAAqB;AACjC,eAAO,EAAE,KAAK,MAAM,gCAAgC,KAAK,SAAS,MAAM,EAAE;AAAA,MAC5E;AAEA,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
import { cookies, draftMode } from "next/headers";
|
|
2
2
|
import { deserializeSiteVersion } from "../api/site-version";
|
|
3
|
-
import { MAKESWIFT_SITE_VERSION_COOKIE } from "./api-handler/preview";
|
|
3
|
+
import { MAKESWIFT_SITE_VERSION_COOKIE, PRERENDER_BYPASS_COOKIE } from "./api-handler/preview";
|
|
4
4
|
async function getSiteVersion() {
|
|
5
5
|
const { isEnabled: isDraftModeEnabled } = await draftMode();
|
|
6
6
|
if (!isDraftModeEnabled)
|
|
7
7
|
return null;
|
|
8
|
-
const
|
|
9
|
-
|
|
8
|
+
const allCookies = await cookies();
|
|
9
|
+
const cookie = allCookies.get(MAKESWIFT_SITE_VERSION_COOKIE);
|
|
10
|
+
if (cookie == null) {
|
|
11
|
+
if (allCookies.get(PRERENDER_BYPASS_COOKIE) == null) {
|
|
12
|
+
console.error(
|
|
13
|
+
"WARNING: Draft mode is enabled, but both the site version and the prerender bypass cookies are missing.\nThis is abnormal and could cause Makeswift editing and preview to not work as expected.\nDouble-check that you're not forcing static rendering (export const dynamic = 'force-static') on your Makeswift pages.\nMore info: https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#dynamic"
|
|
14
|
+
);
|
|
15
|
+
}
|
|
10
16
|
return null;
|
|
17
|
+
}
|
|
11
18
|
return deserializeSiteVersion(cookie.value);
|
|
12
19
|
}
|
|
13
20
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/next/app-router-site-version.tsx"],"sourcesContent":["import { cookies, draftMode } from 'next/headers'\nimport { deserializeSiteVersion, SiteVersion } from '../api/site-version'\nimport { MAKESWIFT_SITE_VERSION_COOKIE } from './api-handler/preview'\n\nexport async function getSiteVersion(): Promise<SiteVersion | null> {\n const { isEnabled: isDraftModeEnabled } = await draftMode()\n if (!isDraftModeEnabled) return null\n\n const
|
|
1
|
+
{"version":3,"sources":["../../../src/next/app-router-site-version.tsx"],"sourcesContent":["import { cookies, draftMode } from 'next/headers'\nimport { deserializeSiteVersion, SiteVersion } from '../api/site-version'\nimport { MAKESWIFT_SITE_VERSION_COOKIE, PRERENDER_BYPASS_COOKIE } from './api-handler/preview'\n\nexport async function getSiteVersion(): Promise<SiteVersion | null> {\n const { isEnabled: isDraftModeEnabled } = await draftMode()\n if (!isDraftModeEnabled) return null\n\n const allCookies = await cookies()\n const cookie = allCookies.get(MAKESWIFT_SITE_VERSION_COOKIE)\n if (cookie == null) {\n if (allCookies.get(PRERENDER_BYPASS_COOKIE) == null) {\n // logging this as an error for greater visibility during local development;\n // end-users will not see this warning in production\n console.error(\n 'WARNING: Draft mode is enabled, but both the site version and the prerender bypass cookies are missing.\\n' +\n 'This is abnormal and could cause Makeswift editing and preview to not work as expected.\\n' +\n \"Double-check that you're not forcing static rendering (export const dynamic = 'force-static') on your Makeswift pages.\\n\" +\n 'More info: https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#dynamic',\n )\n }\n\n return null\n }\n\n return deserializeSiteVersion(cookie.value)\n}\n"],"mappings":"AAAA,SAAS,SAAS,iBAAiB;AACnC,SAAS,8BAA2C;AACpD,SAAS,+BAA+B,+BAA+B;AAEvE,eAAsB,iBAA8C;AAClE,QAAM,EAAE,WAAW,mBAAmB,IAAI,MAAM,UAAU;AAC1D,MAAI,CAAC;AAAoB,WAAO;AAEhC,QAAM,aAAa,MAAM,QAAQ;AACjC,QAAM,SAAS,WAAW,IAAI,6BAA6B;AAC3D,MAAI,UAAU,MAAM;AAClB,QAAI,WAAW,IAAI,uBAAuB,KAAK,MAAM;AAGnD,cAAQ;AAAA,QACN;AAAA,MAIF;AAAA,IACF;AAEA,WAAO;AAAA,EACT;AAEA,SAAO,uBAAuB,OAAO,KAAK;AAC5C;","names":[]}
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
} from "../../../api/site-version";
|
|
10
10
|
import { BaseHeadSnippet } from "./page/HeadSnippet";
|
|
11
11
|
const DefaultHead = ({ children }) => /* @__PURE__ */ jsx(Fragment, { children });
|
|
12
|
+
const DefaultHeadSnippet = BaseHeadSnippet;
|
|
12
13
|
const DefaultImage = ({ priority, fill, style, ...props }) => /* @__PURE__ */ jsx(
|
|
13
14
|
"img",
|
|
14
15
|
{
|
|
@@ -36,13 +37,14 @@ const versionedFetch = (siteVersion) => (url, init) => fetch(url, {
|
|
|
36
37
|
});
|
|
37
38
|
const FrameworkContext = createContext({
|
|
38
39
|
Head: DefaultHead,
|
|
39
|
-
HeadSnippet:
|
|
40
|
+
HeadSnippet: DefaultHeadSnippet,
|
|
40
41
|
Image: DefaultImage,
|
|
41
42
|
Link: DefaultLink,
|
|
42
43
|
versionedFetch
|
|
43
44
|
});
|
|
44
45
|
export {
|
|
45
46
|
DefaultHead,
|
|
47
|
+
DefaultHeadSnippet,
|
|
46
48
|
DefaultImage,
|
|
47
49
|
DefaultLink,
|
|
48
50
|
FrameworkContext,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/runtimes/react/components/framework-context.tsx"],"sourcesContent":["import {\n createContext,\n type ReactNode,\n type PropsWithChildren,\n type CSSProperties,\n type ComponentPropsWithoutRef,\n type MouseEvent,\n type ForwardRefExoticComponent,\n type RefAttributes,\n forwardRef,\n} from 'react'\n\nimport { type LinkData } from '@makeswift/prop-controllers'\n\nimport { type Snippet } from '../../../client'\nimport { type HttpFetch } from '../../../state/makeswift-api-client'\nimport {\n ApiHandlerHeaders,\n serializeSiteVersion,\n type SiteVersion,\n} from '../../../api/site-version'\n\nimport { BaseHeadSnippet } from './page/HeadSnippet'\n\ntype HeadComponent = (props: { children: ReactNode }) => ReactNode\ntype HeadSnippet = (props: { snippet: Snippet }) => ReactNode\ntype ImageComponent = (props: {\n src: string\n alt: string\n sizes?: string\n width?: number\n height?: number\n priority?: boolean\n fill?: boolean\n style?: CSSProperties\n}) => ReactNode\n\ntype LinkProps = Omit<ComponentPropsWithoutRef<'a'>, 'onClick'> & {\n linkType?: LinkData['type']\n onClick?: (event: MouseEvent<HTMLAnchorElement>) => unknown\n}\n\ntype LinkComponent = ForwardRefExoticComponent<RefAttributes<HTMLAnchorElement> & LinkProps>\n\nexport type FrameworkContext = {\n Head: HeadComponent\n HeadSnippet: HeadSnippet\n Image: ImageComponent\n Link: LinkComponent\n versionedFetch: (siteVersion: SiteVersion | null) => HttpFetch\n}\n\n// React 19 automatically hoists metadata tags to the <head>\nexport const DefaultHead = ({ children }: PropsWithChildren) => <>{children}</>\n\nexport const DefaultImage: ImageComponent = ({ priority, fill, style, ...props }) => (\n <img\n {...props}\n style={{\n ...(fill\n ? {\n height: '100%',\n width: '100%',\n objectFit: 'cover',\n }\n : {}),\n ...style,\n }}\n loading={priority ? 'eager' : 'lazy'}\n />\n)\n\nexport const DefaultLink: LinkComponent = forwardRef<HTMLAnchorElement, LinkProps>(\n ({ linkType, ...props }, ref) => <a {...props} ref={ref} />,\n)\n\nexport const versionedFetch: FrameworkContext['versionedFetch'] = siteVersion => (url, init) =>\n fetch(url, {\n ...init,\n headers: {\n ...init?.headers,\n ...(siteVersion != null\n ? { [ApiHandlerHeaders.SiteVersion]: serializeSiteVersion(siteVersion) }\n : {}),\n },\n })\n\nexport const FrameworkContext = createContext<FrameworkContext>({\n Head: DefaultHead,\n HeadSnippet:
|
|
1
|
+
{"version":3,"sources":["../../../../../src/runtimes/react/components/framework-context.tsx"],"sourcesContent":["import {\n createContext,\n type ReactNode,\n type PropsWithChildren,\n type CSSProperties,\n type ComponentPropsWithoutRef,\n type MouseEvent,\n type ForwardRefExoticComponent,\n type RefAttributes,\n forwardRef,\n} from 'react'\n\nimport { type LinkData } from '@makeswift/prop-controllers'\n\nimport { type Snippet } from '../../../client'\nimport { type HttpFetch } from '../../../state/makeswift-api-client'\nimport {\n ApiHandlerHeaders,\n serializeSiteVersion,\n type SiteVersion,\n} from '../../../api/site-version'\n\nimport { BaseHeadSnippet } from './page/HeadSnippet'\n\ntype HeadComponent = (props: { children: ReactNode }) => ReactNode\ntype HeadSnippet = (props: { snippet: Snippet }) => ReactNode\ntype ImageComponent = (props: {\n src: string\n alt: string\n sizes?: string\n width?: number\n height?: number\n priority?: boolean\n fill?: boolean\n style?: CSSProperties\n}) => ReactNode\n\ntype LinkProps = Omit<ComponentPropsWithoutRef<'a'>, 'onClick'> & {\n linkType?: LinkData['type']\n onClick?: (event: MouseEvent<HTMLAnchorElement>) => unknown\n}\n\ntype LinkComponent = ForwardRefExoticComponent<RefAttributes<HTMLAnchorElement> & LinkProps>\n\nexport type FrameworkContext = {\n Head: HeadComponent\n HeadSnippet: HeadSnippet\n Image: ImageComponent\n Link: LinkComponent\n versionedFetch: (siteVersion: SiteVersion | null) => HttpFetch\n}\n\n// React 19 automatically hoists metadata tags to the <head>\nexport const DefaultHead = ({ children }: PropsWithChildren) => <>{children}</>\n\nexport const DefaultHeadSnippet = BaseHeadSnippet\n\nexport const DefaultImage: ImageComponent = ({ priority, fill, style, ...props }) => (\n <img\n {...props}\n style={{\n ...(fill\n ? {\n height: '100%',\n width: '100%',\n objectFit: 'cover',\n }\n : {}),\n ...style,\n }}\n loading={priority ? 'eager' : 'lazy'}\n />\n)\n\nexport const DefaultLink: LinkComponent = forwardRef<HTMLAnchorElement, LinkProps>(\n ({ linkType, ...props }, ref) => <a {...props} ref={ref} />,\n)\n\nexport const versionedFetch: FrameworkContext['versionedFetch'] = siteVersion => (url, init) =>\n fetch(url, {\n ...init,\n headers: {\n ...init?.headers,\n ...(siteVersion != null\n ? { [ApiHandlerHeaders.SiteVersion]: serializeSiteVersion(siteVersion) }\n : {}),\n },\n })\n\nexport const FrameworkContext = createContext<FrameworkContext>({\n Head: DefaultHead,\n HeadSnippet: DefaultHeadSnippet,\n Image: DefaultImage,\n Link: DefaultLink,\n versionedFetch,\n})\n"],"mappings":"AAqDgE;AArDhE;AAAA,EACE;AAAA,EAQA;AAAA,OACK;AAMP;AAAA,EACE;AAAA,EACA;AAAA,OAEK;AAEP,SAAS,uBAAuB;AA+BzB,MAAM,cAAc,CAAC,EAAE,SAAS,MAAyB,gCAAG,UAAS;AAErE,MAAM,qBAAqB;AAE3B,MAAM,eAA+B,CAAC,EAAE,UAAU,MAAM,OAAO,GAAG,MAAM,MAC7E;AAAA,EAAC;AAAA;AAAA,IACE,GAAG;AAAA,IACJ,OAAO;AAAA,MACL,GAAI,OACA;AAAA,QACE,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,WAAW;AAAA,MACb,IACA,CAAC;AAAA,MACL,GAAG;AAAA,IACL;AAAA,IACA,SAAS,WAAW,UAAU;AAAA;AAChC;AAGK,MAAM,cAA6B;AAAA,EACxC,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,QAAQ,oBAAC,OAAG,GAAG,OAAO,KAAU;AAC3D;AAEO,MAAM,iBAAqD,iBAAe,CAAC,KAAK,SACrF,MAAM,KAAK;AAAA,EACT,GAAG;AAAA,EACH,SAAS;AAAA,IACP,GAAG,MAAM;AAAA,IACT,GAAI,eAAe,OACf,EAAE,CAAC,kBAAkB,WAAW,GAAG,qBAAqB,WAAW,EAAE,IACrE,CAAC;AAAA,EACP;AACF,CAAC;AAEI,MAAM,mBAAmB,cAAgC;AAAA,EAC9D,MAAM;AAAA,EACN,aAAa;AAAA,EACb,OAAO;AAAA,EACP,MAAM;AAAA,EACN;AACF,CAAC;","names":[]}
|
|
@@ -7,10 +7,10 @@ type Params = {
|
|
|
7
7
|
type Context = {
|
|
8
8
|
params: Promise<Params>;
|
|
9
9
|
};
|
|
10
|
-
export type ApiHandlerArgs = [NextRequest
|
|
11
|
-
export declare const argsPattern: readonly [import("ts-pattern/dist/types/Pattern").Chainable<import("ts-pattern/dist/types/Pattern").
|
|
10
|
+
export type ApiHandlerArgs = [NextRequest, Context];
|
|
11
|
+
export declare const argsPattern: readonly [import("ts-pattern/dist/types/Pattern").Chainable<import("ts-pattern/dist/types/Pattern").GuardP<unknown, NextRequest>>, import("ts-pattern/dist/types/Pattern").AnyPattern];
|
|
12
12
|
export declare function config({ req, context, client, }: {
|
|
13
|
-
req: NextRequest
|
|
13
|
+
req: NextRequest;
|
|
14
14
|
context: Context;
|
|
15
15
|
client: MakeswiftClient;
|
|
16
16
|
}): Promise<ApiHandlerConfig>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-router.d.ts","sourceRoot":"","sources":["../../../../../src/next/api-handler/config/app-router.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAQzC,OAAO,EAAoB,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAA;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEjD,KAAK,MAAM,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAA;CAAE,CAAA;AAClD,KAAK,OAAO,GAAG;IAAE,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAA;CAAE,CAAA;AAE1C,MAAM,MAAM,cAAc,GAAG,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"app-router.d.ts","sourceRoot":"","sources":["../../../../../src/next/api-handler/config/app-router.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAQzC,OAAO,EAAoB,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAA;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEjD,KAAK,MAAM,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAA;CAAE,CAAA;AAClD,KAAK,OAAO,GAAG;IAAE,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAA;CAAE,CAAA;AAE1C,MAAM,MAAM,cAAc,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC,CAAA;AACnD,eAAO,MAAM,WAAW,wLAA8C,CAAA;AAEtE,wBAAsB,MAAM,CAAC,EAC3B,GAAG,EACH,OAAO,EACP,MAAM,GACP,EAAE;IACD,GAAG,EAAE,WAAW,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,eAAe,CAAA;CACxB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAqB5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-router-site-version.d.ts","sourceRoot":"","sources":["../../../src/next/app-router-site-version.tsx"],"names":[],"mappings":"AACA,OAAO,EAA0B,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAGzE,wBAAsB,cAAc,IAAI,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"app-router-site-version.d.ts","sourceRoot":"","sources":["../../../src/next/app-router-site-version.tsx"],"names":[],"mappings":"AACA,OAAO,EAA0B,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAGzE,wBAAsB,cAAc,IAAI,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAsBlE"}
|
|
@@ -3,6 +3,7 @@ import { type LinkData } from '@makeswift/prop-controllers';
|
|
|
3
3
|
import { type Snippet } from '../../../client';
|
|
4
4
|
import { type HttpFetch } from '../../../state/makeswift-api-client';
|
|
5
5
|
import { type SiteVersion } from '../../../api/site-version';
|
|
6
|
+
import { BaseHeadSnippet } from './page/HeadSnippet';
|
|
6
7
|
type HeadComponent = (props: {
|
|
7
8
|
children: ReactNode;
|
|
8
9
|
}) => ReactNode;
|
|
@@ -32,6 +33,7 @@ export type FrameworkContext = {
|
|
|
32
33
|
versionedFetch: (siteVersion: SiteVersion | null) => HttpFetch;
|
|
33
34
|
};
|
|
34
35
|
export declare const DefaultHead: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare const DefaultHeadSnippet: typeof BaseHeadSnippet;
|
|
35
37
|
export declare const DefaultImage: ImageComponent;
|
|
36
38
|
export declare const DefaultLink: LinkComponent;
|
|
37
39
|
export declare const versionedFetch: FrameworkContext['versionedFetch'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framework-context.d.ts","sourceRoot":"","sources":["../../../../../src/runtimes/react/components/framework-context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC7B,KAAK,UAAU,EACf,KAAK,yBAAyB,EAC9B,KAAK,aAAa,EAEnB,MAAM,OAAO,CAAA;AAEd,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAE3D,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,qCAAqC,CAAA;AACpE,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"framework-context.d.ts","sourceRoot":"","sources":["../../../../../src/runtimes/react/components/framework-context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC7B,KAAK,UAAU,EACf,KAAK,yBAAyB,EAC9B,KAAK,aAAa,EAEnB,MAAM,OAAO,CAAA;AAEd,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAE3D,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,qCAAqC,CAAA;AACpE,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,2BAA2B,CAAA;AAElC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEpD,KAAK,aAAa,GAAG,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,KAAK,SAAS,CAAA;AAClE,KAAK,WAAW,GAAG,CAAC,KAAK,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,KAAK,SAAS,CAAA;AAC7D,KAAK,cAAc,GAAG,CAAC,KAAK,EAAE;IAC5B,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB,KAAK,SAAS,CAAA;AAEf,KAAK,SAAS,GAAG,IAAI,CAAC,wBAAwB,CAAC,GAAG,CAAC,EAAE,SAAS,CAAC,GAAG;IAChE,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAA;IAC3B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,OAAO,CAAA;CAC5D,CAAA;AAED,KAAK,aAAa,GAAG,yBAAyB,CAAC,aAAa,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAAC,CAAA;AAE5F,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,aAAa,CAAA;IACnB,WAAW,EAAE,WAAW,CAAA;IACxB,KAAK,EAAE,cAAc,CAAA;IACrB,IAAI,EAAE,aAAa,CAAA;IACnB,cAAc,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,KAAK,SAAS,CAAA;CAC/D,CAAA;AAGD,eAAO,MAAM,WAAW,GAAI,cAAc,iBAAiB,4CAAoB,CAAA;AAE/E,eAAO,MAAM,kBAAkB,wBAAkB,CAAA;AAEjD,eAAO,MAAM,YAAY,EAAE,cAe1B,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,aAEzB,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,gBAAgB,CAAC,gBAAgB,CAS1D,CAAA;AAEJ,eAAO,MAAM,gBAAgB,2CAM3B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@makeswift/runtime",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.1-canary.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"@popmotion/popcorn": "^0.4.4",
|
|
140
140
|
"@reduxjs/toolkit": "^2.8.2",
|
|
141
141
|
"@types/is-hotkey": "^0.1.7",
|
|
142
|
-
"@types/use-sync-external-store": "^
|
|
142
|
+
"@types/use-sync-external-store": "^1.5.0",
|
|
143
143
|
"@types/uuid": "^9.0.1",
|
|
144
144
|
"@use-gesture/react": "^10.2.24",
|
|
145
145
|
"color": "^3.1.3",
|
|
@@ -169,12 +169,12 @@
|
|
|
169
169
|
"slate-hyperscript": "^0.77.0",
|
|
170
170
|
"slate-react": "^0.91.7",
|
|
171
171
|
"ts-pattern": "^5.0.5",
|
|
172
|
-
"use-sync-external-store": "^1.
|
|
172
|
+
"use-sync-external-store": "^1.5.0",
|
|
173
173
|
"uuid": "^9.0.0",
|
|
174
174
|
"zod": "^3.21.4",
|
|
175
175
|
"@makeswift/controls": "0.1.12",
|
|
176
|
-
"@makeswift/
|
|
177
|
-
"@makeswift/
|
|
176
|
+
"@makeswift/next-plugin": "0.5.0",
|
|
177
|
+
"@makeswift/prop-controllers": "0.4.6"
|
|
178
178
|
},
|
|
179
179
|
"devDependencies": {
|
|
180
180
|
"@emotion/jest": "^11.11.0",
|