@knapsack/types 4.85.1--canary.6563.ed4bf9d.0 → 4.85.1--canary.6563.a558f4a.0
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/api-routes.d.ts +44 -0
- package/dist/api-routes.d.ts.map +1 -1
- package/dist/api-routes.js +2 -0
- package/dist/api-routes.js.map +1 -0
- package/dist/api-routes.mjs +2 -0
- package/dist/api-routes.mjs.map +1 -0
- package/dist/app-api-routes.js +2 -0
- package/dist/app-api-routes.js.map +1 -0
- package/dist/app-api-routes.mjs +2 -0
- package/dist/app-api-routes.mjs.map +1 -0
- package/dist/app-sections.js +2 -0
- package/dist/app-sections.js.map +1 -0
- package/dist/app-sections.mjs +2 -0
- package/dist/app-sections.mjs.map +1 -0
- package/dist/auth0.d.ts +24 -0
- package/dist/auth0.d.ts.map +1 -0
- package/dist/auth0.js +2 -0
- package/dist/auth0.js.map +1 -0
- package/dist/auth0.mjs +2 -0
- package/dist/auth0.mjs.map +1 -0
- package/dist/changes.js +2 -0
- package/dist/changes.js.map +1 -0
- package/dist/changes.mjs +2 -0
- package/dist/changes.mjs.map +1 -0
- package/dist/color-config.js +2 -0
- package/dist/color-config.js.map +1 -0
- package/dist/color-config.mjs +2 -0
- package/dist/color-config.mjs.map +1 -0
- package/dist/cypress-session-config.js +2 -0
- package/dist/cypress-session-config.js.map +1 -0
- package/dist/cypress-session-config.mjs +2 -0
- package/dist/cypress-session-config.mjs.map +1 -0
- package/dist/design-src.types.js +2 -0
- package/dist/design-src.types.js.map +1 -0
- package/dist/design-src.types.mjs +2 -0
- package/dist/design-src.types.mjs.map +1 -0
- package/dist/discovery.js +2 -0
- package/dist/discovery.js.map +1 -0
- package/dist/discovery.mjs +2 -0
- package/dist/discovery.mjs.map +1 -0
- package/dist/git-providers.js +2 -0
- package/dist/git-providers.js.map +1 -0
- package/dist/git-providers.mjs +2 -0
- package/dist/git-providers.mjs.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/intercepts.js +2 -0
- package/dist/intercepts.js.map +1 -0
- package/dist/intercepts.mjs +2 -0
- package/dist/intercepts.mjs.map +1 -0
- package/dist/json-schema.js +2 -0
- package/dist/json-schema.js.map +1 -0
- package/dist/json-schema.mjs +2 -0
- package/dist/json-schema.mjs.map +1 -0
- package/dist/misc.js +2 -0
- package/dist/misc.js.map +1 -0
- package/dist/misc.mjs +2 -0
- package/dist/misc.mjs.map +1 -0
- package/dist/nav-customization-config.js +2 -0
- package/dist/nav-customization-config.js.map +1 -0
- package/dist/nav-customization-config.mjs +2 -0
- package/dist/nav-customization-config.mjs.map +1 -0
- package/dist/re-exports.js +2 -0
- package/dist/re-exports.js.map +1 -0
- package/dist/re-exports.mjs +2 -0
- package/dist/re-exports.mjs.map +1 -0
- package/dist/renderer-client-types.js +2 -0
- package/dist/renderer-client-types.js.map +1 -0
- package/dist/renderer-client-types.mjs +2 -0
- package/dist/renderer-client-types.mjs.map +1 -0
- package/dist/renderers.js +2 -0
- package/dist/renderers.js.map +1 -0
- package/dist/renderers.mjs +2 -0
- package/dist/renderers.mjs.map +1 -0
- package/dist/renderers.vitest.js +451 -0
- package/dist/renderers.vitest.js.map +1 -0
- package/dist/renderers.vitest.mjs +451 -0
- package/dist/renderers.vitest.mjs.map +1 -0
- package/dist/type-utils.js +2 -0
- package/dist/type-utils.js.map +1 -0
- package/dist/type-utils.mjs +2 -0
- package/dist/type-utils.mjs.map +1 -0
- package/dist/typography-config.js +2 -0
- package/dist/typography-config.js.map +1 -0
- package/dist/typography-config.mjs +2 -0
- package/dist/typography-config.mjs.map +1 -0
- package/dist/ui-config.js +2 -0
- package/dist/ui-config.js.map +1 -0
- package/dist/ui-config.mjs +2 -0
- package/dist/ui-config.mjs.map +1 -0
- package/dist/user-roles.js +2 -0
- package/dist/user-roles.js.map +1 -0
- package/dist/user-roles.mjs +2 -0
- package/dist/user-roles.mjs.map +1 -0
- package/dist/web-sockets.js +2 -0
- package/dist/web-sockets.js.map +1 -0
- package/dist/web-sockets.mjs +2 -0
- package/dist/web-sockets.mjs.map +1 -0
- package/package.json +13 -8
- package/tsup.config.cjs +5 -1
package/dist/api-routes.d.ts
CHANGED
|
@@ -21,4 +21,48 @@ export type ApiRoute<Config extends {
|
|
|
21
21
|
input?: Config['input'];
|
|
22
22
|
output?: Config['output'];
|
|
23
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* Creates a URL for a specific API route with typed query parameters
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* createUrlForRoute({
|
|
29
|
+
* path: '/api/users',
|
|
30
|
+
* queryParams: { id: '123' },
|
|
31
|
+
* origin: 'https://example.com'
|
|
32
|
+
* })
|
|
33
|
+
* // => URL('https://example.com/api/users?id=123')
|
|
34
|
+
*/
|
|
35
|
+
export declare function createUrlForRoute<Route extends ApiRoute<any>>({
|
|
36
|
+
/** API route path */
|
|
37
|
+
path,
|
|
38
|
+
/** Typed query parameters matching the route's input type */
|
|
39
|
+
queryParams,
|
|
40
|
+
/** Base URL for relative paths */
|
|
41
|
+
origin, }: {
|
|
42
|
+
path: Route['path'];
|
|
43
|
+
queryParams: Route['input'] extends Record<string, unknown> ? Route['input'] : undefined;
|
|
44
|
+
origin?: string;
|
|
45
|
+
}): URL;
|
|
46
|
+
/**
|
|
47
|
+
* Converts URLSearchParams into a typed object
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* const params = new URLSearchParams('foo=bar&count=42');
|
|
51
|
+
* getParams(params)
|
|
52
|
+
* // => { foo: 'bar', count: '42' }
|
|
53
|
+
*/
|
|
54
|
+
export declare function getParams<Params extends Record<string, string>>(
|
|
55
|
+
/** URLSearchParams object to convert */
|
|
56
|
+
params: URLSearchParams): Params;
|
|
57
|
+
/**
|
|
58
|
+
* Converts URLSearchParams into a typed object matching an API route's input type
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const params = new URLSearchParams('userId=123&action=update');
|
|
62
|
+
* getParamsForRoute<UserRoute>(params)
|
|
63
|
+
* // => { userId: '123', action: 'update' }
|
|
64
|
+
*/
|
|
65
|
+
export declare function getParamsForRoute<Route extends ApiRoute<any>>(
|
|
66
|
+
/** URLSearchParams object to convert */
|
|
67
|
+
params: URLSearchParams): Route['input'];
|
|
24
68
|
//# sourceMappingURL=api-routes.d.ts.map
|
package/dist/api-routes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-routes.d.ts","sourceRoot":"","sources":["../src/api-routes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"api-routes.d.ts","sourceRoot":"","sources":["../src/api-routes.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,QAAQ,CAClB,MAAM,SAAS;IACb,IAAI,EAAE,IAAI,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,KAAK,GAAG,MAAM,CAAC;IACvB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC;CAC3C,IACC;IACF,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,SAAS,QAAQ,CAAC,GAAG,CAAC,EAAE;AAC7D,qBAAqB;AACrB,IAAI;AACJ,6DAA6D;AAC7D,WAAW;AACX,kCAAkC;AAClC,MAAM,GACP,EAAE;IACD,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACpB,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACvD,KAAK,CAAC,OAAO,CAAC,GACd,SAAS,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,OAMA;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;AAC7D,wCAAwC;AACxC,MAAM,EAAE,eAAe,GACtB,MAAM,CAER;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,SAAS,QAAQ,CAAC,GAAG,CAAC;AAC3D,wCAAwC;AACxC,MAAM,EAAE,eAAe,GACtB,KAAK,CAAC,OAAO,CAAC,CAEhB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var urls=require('@knapsack/utils/urls');var o=Object.defineProperty;var e=(t,n)=>o(t,"name",{value:n,configurable:true});function p({path:t,queryParams:n,origin:r}){return urls.createUrlWithParams({url:t,queryParams:n,origin:r})}e(p,"createUrlForRoute");function i(t){return Object.fromEntries(t.entries())}e(i,"getParams");function R(t){return i(t)}e(R,"getParamsForRoute");exports.createUrlForRoute=p;exports.getParams=i;exports.getParamsForRoute=R;//# sourceMappingURL=api-routes.js.map
|
|
2
|
+
//# sourceMappingURL=api-routes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/api-routes.ts"],"names":["createUrlForRoute","path","queryParams","origin","createUrlWithParams","__name","getParams","params","getParamsForRoute"],"mappings":"uIAuCO,SAASA,CAAAA,CAA+C,CAE7D,IAAAC,CAAAA,CAAAA,CAEA,WAAAC,CAAAA,CAAAA,CAEA,MAAAC,CAAAA,CACF,EAMG,CACD,OAAOC,wBAAoB,CAAA,CACzB,GAAKH,CAAAA,CAAAA,CACL,WAAAC,CAAAA,CAAAA,CACA,MAAAC,CAAAA,CACF,CAAC,CACH,CAnBgBE,CAAAA,CAAAL,EAAA,mBA6BT,CAAA,CAAA,SAASM,CAEdC,CAAAA,CAAAA,CACQ,CACR,OAAO,OAAO,WAAYA,CAAAA,CAAAA,CAAO,OAAQ,EAAC,CAC5C,CALgBF,EAAAC,CAAA,CAAA,WAAA,CAAA,CAeT,SAASE,CAAAA,CAEdD,CACgB,CAAA,CAChB,OAAOD,CAAAA,CAAUC,CAAM,CACzB,CALgBF,CAAAA,CAAAG,CAAA,CAAA,mBAAA,CAAA","file":"api-routes.js","sourcesContent":["import { createUrlWithParams } from '@knapsack/utils/urls';\n\n/**\n * A type-safe representation of an API route.\n */\nexport type ApiRoute<\n Config extends {\n path: `/${string}`;\n method: 'GET' | 'POST';\n /**\n * GET - query params\n * POST - body\n */\n input?: Record<string, unknown>;\n /**\n * Response body\n * Can be a string if the response is a plain text message or html\n * Otherwise, it should be a JSON object\n */\n output?: Record<string, unknown> | string;\n },\n> = {\n path: Config['path'];\n method: Config['method'];\n input?: Config['input'];\n output?: Config['output'];\n};\n\n/**\n * Creates a URL for a specific API route with typed query parameters\n * @example\n * ```ts\n * createUrlForRoute({\n * path: '/api/users',\n * queryParams: { id: '123' },\n * origin: 'https://example.com'\n * })\n * // => URL('https://example.com/api/users?id=123')\n */\nexport function createUrlForRoute<Route extends ApiRoute<any>>({\n /** API route path */\n path,\n /** Typed query parameters matching the route's input type */\n queryParams,\n /** Base URL for relative paths */\n origin,\n}: {\n path: Route['path'];\n queryParams: Route['input'] extends Record<string, unknown>\n ? Route['input']\n : undefined;\n origin?: string;\n}) {\n return createUrlWithParams({\n url: path,\n queryParams,\n origin,\n });\n}\n\n/**\n * Converts URLSearchParams into a typed object\n * @example\n * ```ts\n * const params = new URLSearchParams('foo=bar&count=42');\n * getParams(params)\n * // => { foo: 'bar', count: '42' }\n */\nexport function getParams<Params extends Record<string, string>>(\n /** URLSearchParams object to convert */\n params: URLSearchParams,\n): Params {\n return Object.fromEntries(params.entries()) as Params;\n}\n\n/**\n * Converts URLSearchParams into a typed object matching an API route's input type\n * @example\n * ```ts\n * const params = new URLSearchParams('userId=123&action=update');\n * getParamsForRoute<UserRoute>(params)\n * // => { userId: '123', action: 'update' }\n */\nexport function getParamsForRoute<Route extends ApiRoute<any>>(\n /** URLSearchParams object to convert */\n params: URLSearchParams,\n): Route['input'] {\n return getParams(params);\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {createUrlWithParams}from'@knapsack/utils/urls';var o=Object.defineProperty;var e=(t,n)=>o(t,"name",{value:n,configurable:true});function p({path:t,queryParams:n,origin:r}){return createUrlWithParams({url:t,queryParams:n,origin:r})}e(p,"createUrlForRoute");function i(t){return Object.fromEntries(t.entries())}e(i,"getParams");function R(t){return i(t)}e(R,"getParamsForRoute");export{p as createUrlForRoute,i as getParams,R as getParamsForRoute};//# sourceMappingURL=api-routes.mjs.map
|
|
2
|
+
//# sourceMappingURL=api-routes.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/api-routes.ts"],"names":["createUrlForRoute","path","queryParams","origin","createUrlWithParams","__name","getParams","params","getParamsForRoute"],"mappings":"wIAuCO,SAASA,CAAAA,CAA+C,CAE7D,IAAAC,CAAAA,CAAAA,CAEA,WAAAC,CAAAA,CAAAA,CAEA,MAAAC,CAAAA,CACF,EAMG,CACD,OAAOC,mBAAoB,CAAA,CACzB,GAAKH,CAAAA,CAAAA,CACL,WAAAC,CAAAA,CAAAA,CACA,MAAAC,CAAAA,CACF,CAAC,CACH,CAnBgBE,CAAAA,CAAAL,EAAA,mBA6BT,CAAA,CAAA,SAASM,CAEdC,CAAAA,CAAAA,CACQ,CACR,OAAO,OAAO,WAAYA,CAAAA,CAAAA,CAAO,OAAQ,EAAC,CAC5C,CALgBF,EAAAC,CAAA,CAAA,WAAA,CAAA,CAeT,SAASE,CAAAA,CAEdD,CACgB,CAAA,CAChB,OAAOD,CAAAA,CAAUC,CAAM,CACzB,CALgBF,CAAAA,CAAAG,CAAA,CAAA,mBAAA,CAAA","file":"api-routes.mjs","sourcesContent":["import { createUrlWithParams } from '@knapsack/utils/urls';\n\n/**\n * A type-safe representation of an API route.\n */\nexport type ApiRoute<\n Config extends {\n path: `/${string}`;\n method: 'GET' | 'POST';\n /**\n * GET - query params\n * POST - body\n */\n input?: Record<string, unknown>;\n /**\n * Response body\n * Can be a string if the response is a plain text message or html\n * Otherwise, it should be a JSON object\n */\n output?: Record<string, unknown> | string;\n },\n> = {\n path: Config['path'];\n method: Config['method'];\n input?: Config['input'];\n output?: Config['output'];\n};\n\n/**\n * Creates a URL for a specific API route with typed query parameters\n * @example\n * ```ts\n * createUrlForRoute({\n * path: '/api/users',\n * queryParams: { id: '123' },\n * origin: 'https://example.com'\n * })\n * // => URL('https://example.com/api/users?id=123')\n */\nexport function createUrlForRoute<Route extends ApiRoute<any>>({\n /** API route path */\n path,\n /** Typed query parameters matching the route's input type */\n queryParams,\n /** Base URL for relative paths */\n origin,\n}: {\n path: Route['path'];\n queryParams: Route['input'] extends Record<string, unknown>\n ? Route['input']\n : undefined;\n origin?: string;\n}) {\n return createUrlWithParams({\n url: path,\n queryParams,\n origin,\n });\n}\n\n/**\n * Converts URLSearchParams into a typed object\n * @example\n * ```ts\n * const params = new URLSearchParams('foo=bar&count=42');\n * getParams(params)\n * // => { foo: 'bar', count: '42' }\n */\nexport function getParams<Params extends Record<string, string>>(\n /** URLSearchParams object to convert */\n params: URLSearchParams,\n): Params {\n return Object.fromEntries(params.entries()) as Params;\n}\n\n/**\n * Converts URLSearchParams into a typed object matching an API route's input type\n * @example\n * ```ts\n * const params = new URLSearchParams('userId=123&action=update');\n * getParamsForRoute<UserRoute>(params)\n * // => { userId: '123', action: 'update' }\n */\nexport function getParamsForRoute<Route extends ApiRoute<any>>(\n /** URLSearchParams object to convert */\n params: URLSearchParams,\n): Route['input'] {\n return getParams(params);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"app-api-routes.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"app-api-routes.mjs"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var t={ROOT:"ROOT",DESIGN:"Design",DEVELOP:"Develop",DOCUMENT:"Documentation",PROTOTYPE:"Prototype",SETTINGS:"Settings"},e=Object.values(t);exports.appSections=e;exports.appSectionsById=t;//# sourceMappingURL=app-sections.js.map
|
|
2
|
+
//# sourceMappingURL=app-sections.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/app-sections.ts"],"names":["appSectionsById","appSections"],"mappings":"aAAO,IAAMA,EAAkB,CAC7B,IAAA,CAAM,OACN,MAAQ,CAAA,QAAA,CACR,QAAS,SACT,CAAA,QAAA,CAAU,eACV,CAAA,SAAA,CAAW,YACX,QAAU,CAAA,UACZ,EACaC,CAAc,CAAA,MAAA,CAAO,OAAOD,CAAe","file":"app-sections.js","sourcesContent":["export const appSectionsById = {\n ROOT: 'ROOT',\n DESIGN: 'Design',\n DEVELOP: 'Develop',\n DOCUMENT: 'Documentation',\n PROTOTYPE: 'Prototype',\n SETTINGS: 'Settings',\n} as const;\nexport const appSections = Object.values(appSectionsById);\nexport type AppSection = keyof typeof appSectionsById;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/app-sections.ts"],"names":["appSectionsById","appSections"],"mappings":"AAAO,IAAMA,EAAkB,CAC7B,IAAA,CAAM,OACN,MAAQ,CAAA,QAAA,CACR,QAAS,SACT,CAAA,QAAA,CAAU,eACV,CAAA,SAAA,CAAW,YACX,QAAU,CAAA,UACZ,EACaC,CAAc,CAAA,MAAA,CAAO,OAAOD,CAAe","file":"app-sections.mjs","sourcesContent":["export const appSectionsById = {\n ROOT: 'ROOT',\n DESIGN: 'Design',\n DEVELOP: 'Develop',\n DOCUMENT: 'Documentation',\n PROTOTYPE: 'Prototype',\n SETTINGS: 'Settings',\n} as const;\nexport const appSections = Object.values(appSectionsById);\nexport type AppSection = keyof typeof appSectionsById;\n"]}
|
package/dist/auth0.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims
|
|
3
|
+
*/
|
|
4
|
+
export type Auth0Scope = 'openid' | 'profile' | 'email' | 'offline_access';
|
|
5
|
+
/**
|
|
6
|
+
* https://auth0.com/docs/api/authentication#authorization-code-flow-with-pkce
|
|
7
|
+
*/
|
|
8
|
+
export type Auth0AuthorizationParams = {
|
|
9
|
+
connection: string;
|
|
10
|
+
redirect_uri: URL;
|
|
11
|
+
response_type: 'code';
|
|
12
|
+
client_id: string;
|
|
13
|
+
code_challenge: string;
|
|
14
|
+
code_challenge_method: 'S256';
|
|
15
|
+
state: string;
|
|
16
|
+
nonce: string;
|
|
17
|
+
scope: Auth0Scope[];
|
|
18
|
+
audience?: string;
|
|
19
|
+
max_age?: number;
|
|
20
|
+
prompt?: 'none' | 'login' | 'consent' | 'select_account';
|
|
21
|
+
organization?: string;
|
|
22
|
+
invitation?: string;
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=auth0.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth0.d.ts","sourceRoot":"","sources":["../src/auth0.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,gBAAgB,CAAC;AAE3E;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,GAAG,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,gBAAgB,CAAC;IACzD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC"}
|
package/dist/auth0.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"auth0.js"}
|
package/dist/auth0.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"auth0.mjs"}
|
package/dist/changes.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var t=require('superstruct');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var t__namespace=/*#__PURE__*/_interopNamespace(t);var i=Object.defineProperty;var s=(e,r)=>i(e,"name",{value:r,configurable:true});var a=t__namespace.object({op:t__namespace.union([t__namespace.literal("replace"),t__namespace.literal("remove"),t__namespace.literal("add")]),path:t__namespace.array(t__namespace.union([t__namespace.string(),t__namespace.number()])),value:t__namespace.optional(t__namespace.any())}),c=a,P=s(e=>c.is(e),"isPatch"),n=t__namespace.array(a),h=n,l=s(e=>h.is(e),"isPatches"),o=t__namespace.type({patches:n,inversePatches:t__namespace.optional(n),event:t__namespace.optional(t__namespace.object({type:t__namespace.string()})),id:t__namespace.string(),date:t__namespace.string(),userId:t__namespace.optional(t__namespace.string())}),p=o,R=s(e=>p.is(e),"isKsRemoteChange"),m=t__namespace.array(o),g=m,y=s(e=>g.is(e),"isKsRemoteChanges");exports.KsRemoteChangesStruct=g;exports.isKsRemoteChange=R;exports.isKsRemoteChanges=y;exports.isPatch=P;exports.isPatches=l;//# sourceMappingURL=changes.js.map
|
|
2
|
+
//# sourceMappingURL=changes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/changes.ts"],"names":["PatchStructRuntime","t","PatchStruct","isPatch","__name","patch","PatchesStructRuntime","PatchesStruct","isPatches","patches","KsRemoteChangeRuntime","KsRemoteChangeStruct","isKsRemoteChange","change","KsRemoteChangesStructRuntime","KsRemoteChangesStruct","isKsRemoteChanges","changes"],"mappings":"ieAWA,IAAMA,CAAuB,CAAAC,YAAA,CAAA,MAAA,CAAO,CAClC,EAAA,CAAMA,YAAM,CAAA,KAAA,CAAA,CAAGA,YAAQ,CAAA,OAAA,CAAA,SAAS,CAAK,CAAAA,YAAA,CAAA,OAAA,CAAQ,QAAQ,CAAK,CAAAA,YAAA,CAAA,OAAA,CAAQ,KAAK,CAAC,CAAC,CAAA,CACzE,IAAQ,CAAAA,YAAA,CAAA,KAAA,CAAQA,YAAM,CAAA,KAAA,CAAA,CAAGA,YAAO,CAAA,MAAA,EAAA,CAAKA,YAAO,CAAA,MAAA,EAAC,CAAC,CAAC,CAAA,CAC/C,KAAS,CAAAA,YAAA,CAAA,QAAA,CAAWA,YAAI,CAAA,GAAA,EAAC,CAC3B,CAAC,CACKC,CAAAA,CAAAA,CAAiCF,CAE1BG,CAAAA,CAAAA,CAAUC,CAACC,CAAAA,CAAAA,EACtBH,EAAY,EAAGG,CAAAA,CAAK,CADC,CAAA,SAAA,CAAA,CAGjBC,CAAyB,CAAAL,YAAA,CAAA,KAAA,CAAMD,CAAkB,CAAA,CACjDO,CAAqCD,CAAAA,CAAAA,CAE9BE,CAAYJ,CAAAA,CAAAA,CAACK,CACxBF,EAAAA,CAAAA,CAAc,GAAGE,CAAO,CAAA,CADD,WAenBC,CAAAA,CAAAA,CAAAA,CAA0BT,YAAK,CAAA,IAAA,CAAA,CACnC,OAASK,CAAAA,CAAAA,CACT,cAAkB,CAAAL,YAAA,CAAA,QAAA,CAASK,CAAoB,CAAA,CAC/C,KAAS,CAAAL,YAAA,CAAA,QAAA,CAAWA,oBAAO,CAAE,IAAA,CAAQA,YAAO,CAAA,MAAA,EAAE,CAAC,CAAC,CAChD,CAAA,EAAA,CAAMA,YAAO,CAAA,MAAA,EAAA,CACb,IAAQ,CAAAA,YAAA,CAAA,MAAA,EACR,CAAA,MAAA,CAAUA,sBAAWA,YAAO,CAAA,MAAA,EAAC,CAC/B,CAAC,CACKU,CAAAA,CAAAA,CAAmDD,CAE5CE,CAAAA,CAAAA,CAAmBR,CAACS,CAAAA,CAAAA,EAC/BF,CAAqB,CAAA,EAAA,CAAGE,CAAM,CAAA,CADA,oBAG1BC,CAAiC,CAAAb,YAAA,CAAA,KAAA,CAAMS,CAAqB,CAAA,CACrDK,CACXD,CAAAA,CAAAA,CAEWE,CAAoBZ,CAAAA,CAAAA,CAC/Ba,CACgCF,EAAAA,CAAAA,CAAsB,EAAGE,CAAAA,CAAO,CAFjC,CAAA,mBAAA","file":"changes.js","sourcesContent":["import * as s from 'superstruct';\nimport type { Patch } from 'immer';\nimport type { SetOptional } from '@knapsack/utils';\nimport type { UUID, DateString } from './misc';\n\n/**\n * Patch\n */\n\nexport type { Patch };\n\nconst PatchStructRuntime = s.object({\n op: s.union([s.literal('replace'), s.literal('remove'), s.literal('add')]),\n path: s.array(s.union([s.string(), s.number()])),\n value: s.optional(s.any()),\n});\nconst PatchStruct: s.Describe<Patch> = PatchStructRuntime;\n\nexport const isPatch = (patch: unknown): patch is Patch =>\n PatchStruct.is(patch);\n\nconst PatchesStructRuntime = s.array(PatchStructRuntime);\nconst PatchesStruct: s.Describe<Patch[]> = PatchesStructRuntime;\n\nexport const isPatches = (patches: unknown): patches is Patch[] =>\n PatchesStruct.is(patches);\n\n/**\n * KsRemoteChange\n */\nexport type KsChange<Event extends { type: string } = { type: string }> = {\n patches: Patch[];\n inversePatches: Patch[];\n event: Event;\n id: UUID;\n date: DateString;\n};\nexport type KsRemoteChange = SetOptional<KsChange, 'inversePatches' | 'event'>;\n\nconst KsRemoteChangeRuntime = s.type({\n patches: PatchesStructRuntime,\n inversePatches: s.optional(PatchesStructRuntime),\n event: s.optional(s.object({ type: s.string() })),\n id: s.string(),\n date: s.string(),\n userId: s.optional(s.string()),\n});\nconst KsRemoteChangeStruct: s.Describe<KsRemoteChange> = KsRemoteChangeRuntime;\n\nexport const isKsRemoteChange = (change: unknown): change is KsRemoteChange =>\n KsRemoteChangeStruct.is(change);\n\nconst KsRemoteChangesStructRuntime = s.array(KsRemoteChangeRuntime);\nexport const KsRemoteChangesStruct: s.Describe<KsRemoteChange[]> =\n KsRemoteChangesStructRuntime;\n\nexport const isKsRemoteChanges = (\n changes: unknown,\n): changes is KsRemoteChange[] => KsRemoteChangesStruct.is(changes);\n"]}
|
package/dist/changes.mjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import*as t from'superstruct';var i=Object.defineProperty;var s=(e,r)=>i(e,"name",{value:r,configurable:true});var a=t.object({op:t.union([t.literal("replace"),t.literal("remove"),t.literal("add")]),path:t.array(t.union([t.string(),t.number()])),value:t.optional(t.any())}),c=a,P=s(e=>c.is(e),"isPatch"),n=t.array(a),h=n,l=s(e=>h.is(e),"isPatches"),o=t.type({patches:n,inversePatches:t.optional(n),event:t.optional(t.object({type:t.string()})),id:t.string(),date:t.string(),userId:t.optional(t.string())}),p=o,R=s(e=>p.is(e),"isKsRemoteChange"),m=t.array(o),g=m,y=s(e=>g.is(e),"isKsRemoteChanges");export{g as KsRemoteChangesStruct,R as isKsRemoteChange,y as isKsRemoteChanges,P as isPatch,l as isPatches};//# sourceMappingURL=changes.mjs.map
|
|
2
|
+
//# sourceMappingURL=changes.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/changes.ts"],"names":["PatchStructRuntime","PatchStruct","isPatch","__name","patch","PatchesStructRuntime","PatchesStruct","isPatches","patches","KsRemoteChangeRuntime","KsRemoteChangeStruct","isKsRemoteChange","change","KsRemoteChangesStructRuntime","KsRemoteChangesStruct","isKsRemoteChanges","changes"],"mappings":"+GAWA,IAAMA,CAAuB,CAAA,CAAA,CAAA,MAAA,CAAO,CAClC,EAAA,CAAM,CAAM,CAAA,KAAA,CAAA,CAAG,CAAQ,CAAA,OAAA,CAAA,SAAS,CAAK,CAAA,CAAA,CAAA,OAAA,CAAQ,QAAQ,CAAK,CAAA,CAAA,CAAA,OAAA,CAAQ,KAAK,CAAC,CAAC,CAAA,CACzE,IAAQ,CAAA,CAAA,CAAA,KAAA,CAAQ,CAAM,CAAA,KAAA,CAAA,CAAG,CAAO,CAAA,MAAA,EAAA,CAAK,CAAO,CAAA,MAAA,EAAC,CAAC,CAAC,CAAA,CAC/C,KAAS,CAAA,CAAA,CAAA,QAAA,CAAW,CAAI,CAAA,GAAA,EAAC,CAC3B,CAAC,CACKC,CAAAA,CAAAA,CAAiCD,CAE1BE,CAAAA,CAAAA,CAAUC,CAACC,CAAAA,CAAAA,EACtBH,EAAY,EAAGG,CAAAA,CAAK,CADC,CAAA,SAAA,CAAA,CAGjBC,CAAyB,CAAA,CAAA,CAAA,KAAA,CAAML,CAAkB,CAAA,CACjDM,CAAqCD,CAAAA,CAAAA,CAE9BE,CAAYJ,CAAAA,CAAAA,CAACK,CACxBF,EAAAA,CAAAA,CAAc,GAAGE,CAAO,CAAA,CADD,WAenBC,CAAAA,CAAAA,CAAAA,CAA0B,CAAK,CAAA,IAAA,CAAA,CACnC,OAASJ,CAAAA,CAAAA,CACT,cAAkB,CAAA,CAAA,CAAA,QAAA,CAASA,CAAoB,CAAA,CAC/C,KAAS,CAAA,CAAA,CAAA,QAAA,CAAW,SAAO,CAAE,IAAA,CAAQ,CAAO,CAAA,MAAA,EAAE,CAAC,CAAC,CAChD,CAAA,EAAA,CAAM,CAAO,CAAA,MAAA,EAAA,CACb,IAAQ,CAAA,CAAA,CAAA,MAAA,EACR,CAAA,MAAA,CAAU,WAAW,CAAO,CAAA,MAAA,EAAC,CAC/B,CAAC,CACKK,CAAAA,CAAAA,CAAmDD,CAE5CE,CAAAA,CAAAA,CAAmBR,CAACS,CAAAA,CAAAA,EAC/BF,CAAqB,CAAA,EAAA,CAAGE,CAAM,CAAA,CADA,oBAG1BC,CAAiC,CAAA,CAAA,CAAA,KAAA,CAAMJ,CAAqB,CAAA,CACrDK,CACXD,CAAAA,CAAAA,CAEWE,CAAoBZ,CAAAA,CAAAA,CAC/Ba,CACgCF,EAAAA,CAAAA,CAAsB,EAAGE,CAAAA,CAAO,CAFjC,CAAA,mBAAA","file":"changes.mjs","sourcesContent":["import * as s from 'superstruct';\nimport type { Patch } from 'immer';\nimport type { SetOptional } from '@knapsack/utils';\nimport type { UUID, DateString } from './misc';\n\n/**\n * Patch\n */\n\nexport type { Patch };\n\nconst PatchStructRuntime = s.object({\n op: s.union([s.literal('replace'), s.literal('remove'), s.literal('add')]),\n path: s.array(s.union([s.string(), s.number()])),\n value: s.optional(s.any()),\n});\nconst PatchStruct: s.Describe<Patch> = PatchStructRuntime;\n\nexport const isPatch = (patch: unknown): patch is Patch =>\n PatchStruct.is(patch);\n\nconst PatchesStructRuntime = s.array(PatchStructRuntime);\nconst PatchesStruct: s.Describe<Patch[]> = PatchesStructRuntime;\n\nexport const isPatches = (patches: unknown): patches is Patch[] =>\n PatchesStruct.is(patches);\n\n/**\n * KsRemoteChange\n */\nexport type KsChange<Event extends { type: string } = { type: string }> = {\n patches: Patch[];\n inversePatches: Patch[];\n event: Event;\n id: UUID;\n date: DateString;\n};\nexport type KsRemoteChange = SetOptional<KsChange, 'inversePatches' | 'event'>;\n\nconst KsRemoteChangeRuntime = s.type({\n patches: PatchesStructRuntime,\n inversePatches: s.optional(PatchesStructRuntime),\n event: s.optional(s.object({ type: s.string() })),\n id: s.string(),\n date: s.string(),\n userId: s.optional(s.string()),\n});\nconst KsRemoteChangeStruct: s.Describe<KsRemoteChange> = KsRemoteChangeRuntime;\n\nexport const isKsRemoteChange = (change: unknown): change is KsRemoteChange =>\n KsRemoteChangeStruct.is(change);\n\nconst KsRemoteChangesStructRuntime = s.array(KsRemoteChangeRuntime);\nexport const KsRemoteChangesStruct: s.Describe<KsRemoteChange[]> =\n KsRemoteChangesStructRuntime;\n\nexport const isKsRemoteChanges = (\n changes: unknown,\n): changes is KsRemoteChange[] => KsRemoteChangesStruct.is(changes);\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var l=require('color-string'),superstruct=require('superstruct');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var l__default=/*#__PURE__*/_interopDefault(l);var g=Object.defineProperty;var n=(o,r)=>g(o,"name",{value:r,configurable:true});function C(o){if(typeof o!="string")return false;try{return !!l__default.default.get(o)}catch{return false}}n(C,"isColor");var c=superstruct.define("ColorStringStruct",o=>typeof o=="string"&&C(o)),a=superstruct.union([superstruct.type({type:superstruct.literal("value"),colorValue:c}),superstruct.type({type:superstruct.literal("design-token"),tokenName:superstruct.string()})]),m=superstruct.type({type:superstruct.literal("design-token"),tokenName:superstruct.string()});exports.ColorConfigStruct=a;exports.ColorStringStruct=c;exports.ColorTokenConfigStruct=m;//# sourceMappingURL=color-config.js.map
|
|
2
|
+
//# sourceMappingURL=color-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/color-config.ts"],"names":["isColor","color","colorString","__name","ColorStringStruct","define","value","ColorConfigStruct","union","type","literal","string","ColorTokenConfigStruct"],"mappings":"8LAAA,IAAA,CAAA,CAAA,MAAA,CAAA,cAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,MAAA,CAAA,CAAA,KAAA,CAAA,CAAA,CAAA,YAAA,CAAA,IAAA,CAAA,CAAA,CAIA,SAASA,EAAQC,CAAiC,CAAA,CAChD,GAAI,OAAOA,CAAAA,EAAU,SAAU,OAAO,MAAA,CACtC,GAAI,CACF,OAAO,CAAC,CAACC,kBAAAA,CAAY,IAAID,CAAK,CAChC,MAAY,CACV,OAAO,MACT,CACF,CAPSE,EAAAH,CAAA,CAAA,SAAA,CAAA,KAkBII,CAAoBC,CAAAA,kBAAAA,CAC/B,mBACCC,CAAAA,CAAAA,EAAU,OAAOA,CAAU,EAAA,QAAA,EAAYN,EAAQM,CAAK,CACvD,EAEaC,CAA2CC,CAAAA,iBAAAA,CAAM,CAC5DC,gBAAK,CAAA,CACH,KAAMC,mBAAQ,CAAA,OAAO,EACrB,UAAYN,CAAAA,CACd,CAAC,CACDK,CAAAA,gBAAAA,CAAK,CACH,IAAMC,CAAAA,mBAAAA,CAAQ,cAAc,CAC5B,CAAA,SAAA,CAAWC,oBACb,CAAC,CACH,CAAC,CAAA,CAGYC,EAAqDH,gBAAK,CAAA,CACrE,KAAMC,mBAAQ,CAAA,cAAc,EAC5B,SAAWC,CAAAA,kBAAAA,EACb,CAAC","file":"color-config.js","sourcesContent":["import colorString from 'color-string';\nimport { define, Describe, literal, string, type, union } from 'superstruct'; // https://docs.superstructjs.org\n\n/** Use `import { isColor } from '@knapsack/color-utils'` if you can, need to duplicate this logic due to dep cycle */\nfunction isColor(color: unknown): color is string {\n if (typeof color !== 'string') return false;\n try {\n return !!colorString.get(color);\n } catch (e) {\n return false;\n }\n}\n\nexport type ColorTokenConfig = {\n type: 'design-token';\n /** Will be **either** `-` (old) or `.` (new) separated */\n tokenName: string;\n};\nexport type ColorConfig =\n | { type: 'value'; colorValue: string }\n | ColorTokenConfig;\n\nexport const ColorStringStruct = define<string>(\n 'ColorStringStruct',\n (value) => typeof value === 'string' && isColor(value),\n);\n\nexport const ColorConfigStruct: Describe<ColorConfig> = union([\n type({\n type: literal('value'),\n colorValue: ColorStringStruct,\n }),\n type({\n type: literal('design-token'),\n tokenName: string(),\n }),\n]);\n\n// so we can check if an object is not just a ColorConfig but specifically a token\nexport const ColorTokenConfigStruct: Describe<ColorTokenConfig> = type({\n type: literal('design-token'),\n tokenName: string(),\n});\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import l from'color-string';import {define,union,type,literal,string}from'superstruct';var g=Object.defineProperty;var n=(o,r)=>g(o,"name",{value:r,configurable:true});function C(o){if(typeof o!="string")return false;try{return !!l.get(o)}catch{return false}}n(C,"isColor");var c=define("ColorStringStruct",o=>typeof o=="string"&&C(o)),a=union([type({type:literal("value"),colorValue:c}),type({type:literal("design-token"),tokenName:string()})]),m=type({type:literal("design-token"),tokenName:string()});export{a as ColorConfigStruct,c as ColorStringStruct,m as ColorTokenConfigStruct};//# sourceMappingURL=color-config.mjs.map
|
|
2
|
+
//# sourceMappingURL=color-config.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/color-config.ts"],"names":["isColor","color","colorString","__name","ColorStringStruct","define","value","ColorConfigStruct","union","type","literal","string","ColorTokenConfigStruct"],"mappings":"uFAAA,IAAA,CAAA,CAAA,MAAA,CAAA,cAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,MAAA,CAAA,CAAA,KAAA,CAAA,CAAA,CAAA,YAAA,CAAA,IAAA,CAAA,CAAA,CAIA,SAASA,EAAQC,CAAiC,CAAA,CAChD,GAAI,OAAOA,CAAAA,EAAU,SAAU,OAAO,MAAA,CACtC,GAAI,CACF,OAAO,CAAC,CAACC,CAAAA,CAAY,IAAID,CAAK,CAChC,MAAY,CACV,OAAO,MACT,CACF,CAPSE,EAAAH,CAAA,CAAA,SAAA,CAAA,KAkBII,CAAoBC,CAAAA,MAAAA,CAC/B,mBACCC,CAAAA,CAAAA,EAAU,OAAOA,CAAU,EAAA,QAAA,EAAYN,EAAQM,CAAK,CACvD,EAEaC,CAA2CC,CAAAA,KAAAA,CAAM,CAC5DC,IAAK,CAAA,CACH,KAAMC,OAAQ,CAAA,OAAO,EACrB,UAAYN,CAAAA,CACd,CAAC,CACDK,CAAAA,IAAAA,CAAK,CACH,IAAMC,CAAAA,OAAAA,CAAQ,cAAc,CAC5B,CAAA,SAAA,CAAWC,QACb,CAAC,CACH,CAAC,CAAA,CAGYC,EAAqDH,IAAK,CAAA,CACrE,KAAMC,OAAQ,CAAA,cAAc,EAC5B,SAAWC,CAAAA,MAAAA,EACb,CAAC","file":"color-config.mjs","sourcesContent":["import colorString from 'color-string';\nimport { define, Describe, literal, string, type, union } from 'superstruct'; // https://docs.superstructjs.org\n\n/** Use `import { isColor } from '@knapsack/color-utils'` if you can, need to duplicate this logic due to dep cycle */\nfunction isColor(color: unknown): color is string {\n if (typeof color !== 'string') return false;\n try {\n return !!colorString.get(color);\n } catch (e) {\n return false;\n }\n}\n\nexport type ColorTokenConfig = {\n type: 'design-token';\n /** Will be **either** `-` (old) or `.` (new) separated */\n tokenName: string;\n};\nexport type ColorConfig =\n | { type: 'value'; colorValue: string }\n | ColorTokenConfig;\n\nexport const ColorStringStruct = define<string>(\n 'ColorStringStruct',\n (value) => typeof value === 'string' && isColor(value),\n);\n\nexport const ColorConfigStruct: Describe<ColorConfig> = union([\n type({\n type: literal('value'),\n colorValue: ColorStringStruct,\n }),\n type({\n type: literal('design-token'),\n tokenName: string(),\n }),\n]);\n\n// so we can check if an object is not just a ColorConfig but specifically a token\nexport const ColorTokenConfigStruct: Describe<ColorTokenConfig> = type({\n type: literal('design-token'),\n tokenName: string(),\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"cypress-session-config.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"cypress-session-config.mjs"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"design-src.types.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"design-src.types.mjs"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"discovery.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"discovery.mjs"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var i=(e=>(e.GitHub="GitHub",e.GitLab="GitLab",e.GitLabRest="GitLabRest",e.Bitbucket="Bitbucket",e.Azure="Azure",e))(i||{}),s=(r=>(r.Conflicting="CONFLICTING",r.Mergeable="MERGEABLE",r.Unknown="UNKNOWN",r))(s||{}),o=(t=>(t.Create="CREATE",t.Move="MOVE",t.Update="UPDATE",t.Chmod="CHMOD",t))(o||{}),a=(n=>(n.Base64="BASE64",n.Text="TEXT",n))(a||{});exports.GitProviderType=i;exports.MergeableState=s;exports.RestActions=o;exports.TextEncoding=a;//# sourceMappingURL=git-providers.js.map
|
|
2
|
+
//# sourceMappingURL=git-providers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/git-providers.ts"],"names":["GitProviderType","MergeableState","RestActions","TextEncoding"],"mappings":"aAAYA,IAAAA,CAAAA,CAAAA,CAAAA,CAAAA,GACVA,CAAA,CAAA,MAAA,CAAS,QACTA,CAAAA,CAAAA,CAAA,OAAS,QACTA,CAAAA,CAAAA,CAAA,UAAa,CAAA,YAAA,CACbA,CAAA,CAAA,SAAA,CAAY,YACZA,CAAA,CAAA,KAAA,CAAQ,OALEA,CAAAA,CAAAA,CAAAA,EAAAA,CAAAA,EAAA,EA+BAC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,GACVA,EAAA,WAAc,CAAA,aAAA,CACdA,CAAA,CAAA,SAAA,CAAY,WACZA,CAAAA,CAAAA,CAAA,QAAU,SAHAA,CAAAA,CAAAA,CAAAA,EAAAA,CAAAA,EAAA,EAMAC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,GACVA,CAAA,CAAA,MAAA,CAAS,SACTA,CAAA,CAAA,IAAA,CAAO,MACPA,CAAAA,CAAAA,CAAA,MAAS,CAAA,QAAA,CACTA,EAAA,KAAQ,CAAA,OAAA,CAJEA,CAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA,CAOAC,CACVA,CAAAA,CAAAA,CAAAA,GAAAA,CAAAA,CAAA,OAAS,QACTA,CAAAA,CAAAA,CAAA,IAAO,CAAA,MAAA,CAFGA,CAAA,CAAA,EAAA,CAAA,EAAA,EAAA","file":"git-providers.js","sourcesContent":["export enum GitProviderType {\n GitHub = 'GitHub',\n GitLab = 'GitLab',\n GitLabRest = 'GitLabRest',\n Bitbucket = 'Bitbucket',\n Azure = 'Azure',\n}\n\nexport type FileAddition = {\n /** base64 */\n contents: string;\n path: string;\n\n /** Action to perform: create, delete, move, update, or chmod. */\n action?: RestActions;\n /** Content of the file. */\n content?: string;\n /** Full path to the file. */\n filePath?: string;\n /** Encoding of the file. Default is text. */\n encoding?: TextEncoding;\n /** Last known file commit ID. */\n lastCommitId?: string;\n /** Original full path to the file being moved. */\n previousPath?: string;\n};\n\nexport type FileDeletion = {\n path: string;\n};\n\nexport enum MergeableState {\n Conflicting = 'CONFLICTING',\n Mergeable = 'MERGEABLE',\n Unknown = 'UNKNOWN',\n}\n\nexport enum RestActions {\n Create = 'CREATE',\n Move = 'MOVE',\n Update = 'UPDATE',\n Chmod = 'CHMOD',\n}\n\nexport enum TextEncoding {\n Base64 = 'BASE64',\n Text = 'TEXT',\n}\n\nexport type FileChanges = {\n /** File to add or change. */\n additions?: FileAddition[];\n\n /** Files to delete. */\n deletions?: FileDeletion[];\n\n /** Last known file commit ID. */\n lastCommitId?: string;\n};\n\nexport type CommitAction = Record<string, unknown>;\n\nexport interface RepoLabel {\n name: string;\n /** ID optional because bitbucket does not provide id. We might be able to generate one if its required, eg. reponame-labelname */\n id?: string;\n}\n\nexport interface RepoInfo {\n id: string;\n url: string;\n name: string;\n ownerName?: string;\n defaultBranch?: any;\n}\n\n// 'BranchInfo' name is currently taken by GitLab generated queries. Thus 'BranchInfoResult'\nexport interface BranchInfoResult {\n sha?: string; // If branch info is not found, this can be undefined\n shortSha?: string;\n associatedPullRequests?: Pr[];\n additions?: number;\n commitUrl?: string;\n deletions?: number;\n id?: string; // In GitLab, this is the branch name. Modelled this way to make deleteBranch work.\n default?: boolean;\n}\n\nexport interface PrInfo {\n url: string;\n number: number;\n id: string;\n}\n\nexport interface Pr {\n id: string;\n title: string;\n createdAt: string;\n headRef: {\n id?: string;\n name?: string;\n target: BranchInfoResult;\n };\n mergeable: MergeableState;\n merged: boolean;\n number: number;\n body: string;\n isDraft: boolean;\n url: string;\n author: {\n login: string;\n avatarUrl?: string;\n };\n diffHeadSha?: string;\n targetBranch?: string;\n version?: string; // needed for bitbucket merge\n}\n\nexport interface GitProvider {\n type: GitProviderType;\n createBranch: (opt: { branch: string }) => Promise<BranchInfoResult>;\n commitOnBranch: (opt: {\n branch: string;\n message: string;\n fileChanges: FileChanges;\n }) => Promise<Record<string, unknown> | void>;\n getRepoLabels: () => Promise<RepoLabel[]>;\n getRepoInfo: () => Promise<RepoInfo>;\n getBranchInfo: ({ branch }: { branch: string }) => Promise<BranchInfoResult>;\n getPrs: () => Promise<Pr[]>;\n getPr: ({ prNumber }: { prNumber: number }) => Promise<Pr>;\n getTree?: (opt: { branch: string }) => Promise<{\n treeItems: {\n path: string;\n type: 'blob';\n /** SHA-1, use https://www.npmjs.com/package/git-hash-object */\n sha: string;\n url?: string;\n }[];\n }>;\n mergePr: ({ prNumber }: { prNumber: number }) => Promise<boolean>;\n createPr: ({\n siteId,\n branch,\n title,\n body,\n labelIds,\n }: {\n siteId: string;\n branch: string;\n title: string;\n body?: string;\n labelIds?: string[];\n }) => Promise<PrInfo>;\n deleteBranch: ({ id, branch }: { id: string; branch: string }) => Promise<{\n clientMutationId?: string;\n }>;\n getFileInfoOnBranchByPath: (opt: {\n filePath: string;\n branch: string;\n }) => Promise<{ exists: boolean; filePath: string }>;\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var i=(e=>(e.GitHub="GitHub",e.GitLab="GitLab",e.GitLabRest="GitLabRest",e.Bitbucket="Bitbucket",e.Azure="Azure",e))(i||{}),s=(r=>(r.Conflicting="CONFLICTING",r.Mergeable="MERGEABLE",r.Unknown="UNKNOWN",r))(s||{}),o=(t=>(t.Create="CREATE",t.Move="MOVE",t.Update="UPDATE",t.Chmod="CHMOD",t))(o||{}),a=(n=>(n.Base64="BASE64",n.Text="TEXT",n))(a||{});export{i as GitProviderType,s as MergeableState,o as RestActions,a as TextEncoding};//# sourceMappingURL=git-providers.mjs.map
|
|
2
|
+
//# sourceMappingURL=git-providers.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/git-providers.ts"],"names":["GitProviderType","MergeableState","RestActions","TextEncoding"],"mappings":"AAAYA,IAAAA,CAAAA,CAAAA,CAAAA,CAAAA,GACVA,CAAA,CAAA,MAAA,CAAS,QACTA,CAAAA,CAAAA,CAAA,OAAS,QACTA,CAAAA,CAAAA,CAAA,UAAa,CAAA,YAAA,CACbA,CAAA,CAAA,SAAA,CAAY,YACZA,CAAA,CAAA,KAAA,CAAQ,OALEA,CAAAA,CAAAA,CAAAA,EAAAA,CAAAA,EAAA,EA+BAC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,GACVA,EAAA,WAAc,CAAA,aAAA,CACdA,CAAA,CAAA,SAAA,CAAY,WACZA,CAAAA,CAAAA,CAAA,QAAU,SAHAA,CAAAA,CAAAA,CAAAA,EAAAA,CAAAA,EAAA,EAMAC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,GACVA,CAAA,CAAA,MAAA,CAAS,SACTA,CAAA,CAAA,IAAA,CAAO,MACPA,CAAAA,CAAAA,CAAA,MAAS,CAAA,QAAA,CACTA,EAAA,KAAQ,CAAA,OAAA,CAJEA,CAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA,CAOAC,CACVA,CAAAA,CAAAA,CAAAA,GAAAA,CAAAA,CAAA,OAAS,QACTA,CAAAA,CAAAA,CAAA,IAAO,CAAA,MAAA,CAFGA,CAAA,CAAA,EAAA,CAAA,EAAA,EAAA","file":"git-providers.mjs","sourcesContent":["export enum GitProviderType {\n GitHub = 'GitHub',\n GitLab = 'GitLab',\n GitLabRest = 'GitLabRest',\n Bitbucket = 'Bitbucket',\n Azure = 'Azure',\n}\n\nexport type FileAddition = {\n /** base64 */\n contents: string;\n path: string;\n\n /** Action to perform: create, delete, move, update, or chmod. */\n action?: RestActions;\n /** Content of the file. */\n content?: string;\n /** Full path to the file. */\n filePath?: string;\n /** Encoding of the file. Default is text. */\n encoding?: TextEncoding;\n /** Last known file commit ID. */\n lastCommitId?: string;\n /** Original full path to the file being moved. */\n previousPath?: string;\n};\n\nexport type FileDeletion = {\n path: string;\n};\n\nexport enum MergeableState {\n Conflicting = 'CONFLICTING',\n Mergeable = 'MERGEABLE',\n Unknown = 'UNKNOWN',\n}\n\nexport enum RestActions {\n Create = 'CREATE',\n Move = 'MOVE',\n Update = 'UPDATE',\n Chmod = 'CHMOD',\n}\n\nexport enum TextEncoding {\n Base64 = 'BASE64',\n Text = 'TEXT',\n}\n\nexport type FileChanges = {\n /** File to add or change. */\n additions?: FileAddition[];\n\n /** Files to delete. */\n deletions?: FileDeletion[];\n\n /** Last known file commit ID. */\n lastCommitId?: string;\n};\n\nexport type CommitAction = Record<string, unknown>;\n\nexport interface RepoLabel {\n name: string;\n /** ID optional because bitbucket does not provide id. We might be able to generate one if its required, eg. reponame-labelname */\n id?: string;\n}\n\nexport interface RepoInfo {\n id: string;\n url: string;\n name: string;\n ownerName?: string;\n defaultBranch?: any;\n}\n\n// 'BranchInfo' name is currently taken by GitLab generated queries. Thus 'BranchInfoResult'\nexport interface BranchInfoResult {\n sha?: string; // If branch info is not found, this can be undefined\n shortSha?: string;\n associatedPullRequests?: Pr[];\n additions?: number;\n commitUrl?: string;\n deletions?: number;\n id?: string; // In GitLab, this is the branch name. Modelled this way to make deleteBranch work.\n default?: boolean;\n}\n\nexport interface PrInfo {\n url: string;\n number: number;\n id: string;\n}\n\nexport interface Pr {\n id: string;\n title: string;\n createdAt: string;\n headRef: {\n id?: string;\n name?: string;\n target: BranchInfoResult;\n };\n mergeable: MergeableState;\n merged: boolean;\n number: number;\n body: string;\n isDraft: boolean;\n url: string;\n author: {\n login: string;\n avatarUrl?: string;\n };\n diffHeadSha?: string;\n targetBranch?: string;\n version?: string; // needed for bitbucket merge\n}\n\nexport interface GitProvider {\n type: GitProviderType;\n createBranch: (opt: { branch: string }) => Promise<BranchInfoResult>;\n commitOnBranch: (opt: {\n branch: string;\n message: string;\n fileChanges: FileChanges;\n }) => Promise<Record<string, unknown> | void>;\n getRepoLabels: () => Promise<RepoLabel[]>;\n getRepoInfo: () => Promise<RepoInfo>;\n getBranchInfo: ({ branch }: { branch: string }) => Promise<BranchInfoResult>;\n getPrs: () => Promise<Pr[]>;\n getPr: ({ prNumber }: { prNumber: number }) => Promise<Pr>;\n getTree?: (opt: { branch: string }) => Promise<{\n treeItems: {\n path: string;\n type: 'blob';\n /** SHA-1, use https://www.npmjs.com/package/git-hash-object */\n sha: string;\n url?: string;\n }[];\n }>;\n mergePr: ({ prNumber }: { prNumber: number }) => Promise<boolean>;\n createPr: ({\n siteId,\n branch,\n title,\n body,\n labelIds,\n }: {\n siteId: string;\n branch: string;\n title: string;\n body?: string;\n labelIds?: string[];\n }) => Promise<PrInfo>;\n deleteBranch: ({ id, branch }: { id: string; branch: string }) => Promise<{\n clientMutationId?: string;\n }>;\n getFileInfoOnBranchByPath: (opt: {\n filePath: string;\n branch: string;\n }) => Promise<{ exists: boolean; filePath: string }>;\n}\n"]}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC;AACzC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC;AACzC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var t=require('superstruct'),Ne=require('color-string'),v4Mini=require('zod/v4-mini'),utils=require('@knapsack/utils'),immer=require('immer'),zod=require('zod');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var t__namespace=/*#__PURE__*/_interopNamespace(t);var Ne__default=/*#__PURE__*/_interopDefault(Ne);var ve=Object.defineProperty;var n=(e,r)=>ve(e,"name",{value:r,configurable:true});function Be(e){if(typeof e!="string")return false;try{return !!Ne__default.default.get(e)}catch{return false}}n(Be,"isColor");var F=t.define("ColorStringStruct",e=>typeof e=="string"&&Be(e)),l=t.union([t.type({type:t.literal("value"),colorValue:F}),t.type({type:t.literal("design-token"),tokenName:t.string()})]),ln=t.type({type:t.literal("design-token"),tokenName:t.string()});var yn=["h1","h2","h3","h4","h5","h6"],fe=t.object({unit:t.enums(["rem","px"]),value:t.number()}),me=t.union([t.string(),t.number()]),Me=(a=>(a.woff2="woff2",a.woff="woff",a))(Me||{}),je=t.enums(["woff2","woff"]),ze=t.type({format:je,type:t.literal("url"),path:t.string()}),w=t.type({family:t.optional(t.string()),weight:t.optional(t.union([me,t.size(t.array(me),2)])),src:t.optional(t.array(ze)),style:t.optional(t.string()),display:t.optional(t.enums(["auto","block","swap","fallback","optional"])),variationSettings:t.optional(t.string()),unicodeRange:t.optional(t.string())}),We=(f=>(f.inherit="As typed",f.capitalize="Capitalize",f.lowercase="Lowercase",f.uppercase="Uppercase",f))(We||{}),Le=(u=>(u["ultra-condensed"]="Ultra-condensed",u["extra-condensed"]="Extra-condensed",u.condensed="Condensed",u["semi-condensed"]="Semi-condensed",u.normal="Normal",u["semi-expanded"]="Semi-expanded",u.expanded="Expanded",u["extra-expanded"]="Extra-expanded",u["ultra-expanded"]="Ultra-expanded",u))(Le||{}),O=t.type({fontWeight:t.optional(t.union([t.string(),t.number()])),textColor:t.optional(l),hoverColor:t.optional(l),underline:t.optional(t.boolean()),textTransform:t.optional(t.enums(["inherit","capitalize","lowercase","uppercase"])),fontStretch:t.optional(t.enums(["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"]))}),_e=t.type({min:fe,max:t.optional(fe)}),s=t.type({fontSize:t.optional(_e),lineHeight:t.optional(t.union([t.string(),t.number()])),fontWeight:t.optional(t.union([t.string(),t.number()])),letterSpacing:t.optional(t.string()),fontFamily:t.optional(t.string()),textColor:t.optional(l),textTransform:t.optional(t.enums(["inherit","capitalize","lowercase","uppercase"])),fontStretch:t.optional(t.enums(["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"]))}),m={},ye={},Tn={pageTitle:m,pageDescription:m,headingLarge:m,headingMedium:m,headingSmall:m,bodyText:m,link:ye},kn={pageTitle:m,pageDescription:m,headingXLarge:m,headingLarge:m,headingMedium:m,headingSmall:m,headingXSmall:m,bodyText:m,link:ye};var E=t.union([s,t.type({accentColor:t.optional(l)})]),W=t.union([E,t.type({hoverColor:t.optional(l),backgroundColor:t.optional(l)})]),L=t.union([E,t.type({backgroundColor:t.optional(l)})]),Ge={},$e={},Ye={},Pn={primaryNav:Ye,secondaryNav:$e,tabs:Ge};var Fn=t.object({version:t.literal(1),oldSillySidebarBgColor:F}),Mn=t.object({version:t.literal(2),anotherSillySidebarBgColor:F}),jn=t.object({version:t.literal(3),sidebarBgColor:F}),zn=t.object({version:t.literal(4),primaryColor:l,darkColor:l,lightColor:l,enableSidebarIcons:t.optional(t.defaulted(t.boolean(),true))}),Wn=t.object({version:t.literal(5),primaryColor:l,darkColor:l,lightColor:l,linkColor:l,enableSidebarIcons:t.optional(t.defaulted(t.boolean(),true))}),Ln=t.object({version:t.literal(6),primaryColor:l,darkColor:l,lightColor:l,linkColor:l,enableSidebarIcons:t.optional(t.defaulted(t.boolean(),true)),appearance:t.type({customFonts:t.optional(t.array(w)),pageElements:t.type({pageTitle:t.optional(s),pageDescription:t.optional(s),headingLarge:t.optional(s),headingMedium:t.optional(s),headingSmall:t.optional(s),bodyText:t.optional(s),link:t.optional(O)})})}),_n=t.object({version:t.literal(7),primaryColor:l,darkColor:l,lightColor:l,linkColor:l,enableSidebarIcons:t.optional(t.defaulted(t.boolean(),true)),appearance:t.type({customFonts:t.optional(t.array(w)),navigation:t.optional(t.type({primaryNav:t.optional(W),secondaryNav:t.optional(L),tabs:t.optional(E)})),pageElements:t.type({pageTitle:t.optional(s),pageDescription:t.optional(s),headingLarge:t.optional(s),headingMedium:t.optional(s),headingSmall:t.optional(s),bodyText:t.optional(s),link:t.optional(O)})})}),Gn=t.object({version:t.literal(8),primaryColor:l,darkColor:l,lightColor:l,linkColor:l,appearance:t.type({customFonts:t.optional(t.array(w)),navigation:t.optional(t.type({primaryNav:t.optional(W),secondaryNav:t.optional(L),tabs:t.optional(E)})),pageElements:t.type({pageTitle:t.optional(s),pageDescription:t.optional(s),headingLarge:t.optional(s),headingMedium:t.optional(s),headingSmall:t.optional(s),bodyText:t.optional(s),link:t.optional(O)})})}),$n=t.object({version:t.literal(9),appearance:t.type({customFonts:t.optional(t.array(w)),navigation:t.optional(t.type({primaryNav:t.optional(W),secondaryNav:t.optional(L),tabs:t.optional(E)})),pageElements:t.type({pageTitle:t.optional(s),pageDescription:t.optional(s),headingLarge:t.optional(s),headingMedium:t.optional(s),headingSmall:t.optional(s),bodyText:t.optional(s),link:t.optional(O)})})}),He=t.object({version:t.literal(10),appearance:t.type({customFonts:t.optional(t.array(w)),navigation:t.optional(t.type({primaryNav:t.optional(W),secondaryNav:t.optional(L),tabs:t.optional(E)})),pageElements:t.type({pageTitle:t.optional(s),pageDescription:t.optional(s),headingXLarge:t.optional(s),headingLarge:t.optional(s),headingMedium:t.optional(s),headingSmall:t.optional(s),headingXSmall:t.optional(s),bodyText:t.optional(s),link:t.optional(O)})})}),Yn=He;var Xn=["large","medium","small"],Zn=["large","medium","small"];var eo={default:"Default",android:"Android",cssVar:"CSS Var",json:"JSON",less:"Less",scss:"SCSS",swift:"Swift"};var no=["solid","dashed","dotted","double","groove","ridge","outset","inset"];function Je(e){return typeof e!="string"?false:e.split("{").length-1===1&&e.startsWith("{")&&e.endsWith("}")}n(Je,"isTokenReference");function x(e){return typeof e=="string"&&e.includes("{")}n(x,"hasTokenReferences");function qe(e){return !Je(e)}n(qe,"isNotTokenReference");var c=t__namespace.define("Token Reference",e=>typeof e!="string"?false:qe(e)?"Must start and end with curly braces":true),Xe={border:"border",shadow:"shadow",transition:"transition"},Ze=Object.values(Xe),Qe={string:"string",number:"number",boolean:"boolean",color:"color",dimension:"dimension",duration:"duration",fontWeight:"fontWeight",strokeStyle:"strokeStyle",cubicBezier:"cubicBezier"},et=Object.values(Qe);function J(e){return Ze.includes(e)}n(J,"isTokenTypeComposite");function ke(e){return et.includes(e)}n(ke,"isTokenTypeSingular");utils.expectType([{inset:false,color:"#000",offsetX:"0px",offsetY:"0px",spread:"0px",blur:"0px"},{color:"#000",offsetX:"0px",offsetY:"0px",spread:"0px",blur:"0px",inset:true}]);var d=t__namespace.type({id:t__namespace.string(),description:t__namespace.optional(t__namespace.string()),references:t__namespace.optional(t__namespace.array(t__namespace.array(t__namespace.string()))),tokenConfig:t__namespace.optional(t__namespace.type({purpose:t__namespace.optional(t__namespace.string())}))});utils.expectType([{type:"duration",value:"1ms",originalValue:"1ms",id:"1",kind:"static"},{type:"duration",value:"1ms",kind:"ref",id:"1",originalValue:"{a.b}",referencedTokenId:"1"},{type:"duration",value:"1ms",originalValue:"1ms",id:"1",kind:"ref"},{type:"duration",value:"1ms",kind:"static",id:"1",originalValue:"{a.b}",referencedTokenId:"1"},{type:"color",value:"#000",kind:"static",id:"1",originalValue:"#000"},{type:"color",value:"#000",kind:"ref",id:"1",originalValue:"{c.b}",referencedTokenId:"c.b"},{type:"cubicBezier",kind:"static",value:[0,0,0,1],originalValue:[0,0,0,1],id:"1"}]);function mo(e){return J(e.type)}n(mo,"isTokenDataComposite");utils.expectType([{type:"border",kind:"static",id:"1",value:{color:"#000",style:"solid",width:"1px"},originalValue:{color:"#000",style:"solid",width:"1px"}},{type:"border",kind:"ref",referencedTokenId:"a.b",id:"1",value:{color:"red",style:"dashed",width:"2px"},originalValue:"{a.b}"},{type:"shadow",value:{color:"#000",offsetX:"1px",offsetY:"1px",blur:"1px",spread:"1px",inset:false},originalValue:{color:"#000",offsetX:"{a.a}",offsetY:"1px",blur:"1px",spread:"1px",inset:false},id:"1",kind:"static"},{type:"shadow",kind:"ref",referencedTokenId:"a.b",value:{inset:true,color:"red",offsetX:"1px",blur:"2px",offsetY:"3px",spread:"4px"},originalValue:"{a.b}",id:"1"},{type:"transition",value:{duration:"100ms",delay:"200ms",timingFunction:[0,0,0,0]},originalValue:"{a.b}",kind:"ref",referencedTokenId:"a.b",id:"1"},{type:"transition",kind:"static",value:{duration:"100ms",delay:"200ms",timingFunction:[0,0,0,0]},originalValue:{duration:"100ms",delay:"{a.c}",timingFunction:"{a.c}"},id:"1"},{type:"transition",kind:"static",value:{duration:"100ms",delay:"200ms",timingFunction:[0,0,0,0]},originalValue:{duration:"100ms",delay:"200ms",timingFunction:[0,0,0,0]},id:"1"}]);function nt(e){return typeof e=="string"&&!x(e)}n(nt,"isTokenValueColor");var A=t__namespace.define("Color Value",e=>typeof e!="string"?"Value must be a string":e===""?"Value must not be empty":x(e)?"Value must not contain {} (token references)":true),ot=t__namespace.assign(t__namespace.type({type:t__namespace.literal("color"),value:A,kind:t__namespace.literal("static"),originalValue:A}),d),rt=t__namespace.assign(t__namespace.type({type:t__namespace.literal("color"),value:A,kind:t__namespace.literal("ref"),originalValue:c,referencedTokenId:t__namespace.string()}),d);function q(e){return typeof e=="string"&&(e.endsWith("px")||e.endsWith("rem"))&&!x(e)}n(q,"isTokenValueDimension");var D=t__namespace.define("Dimension Value",e=>typeof e!="string"?"Value must be a string":x(e)?"Value must not contain {} (token references)":!e.endsWith("px")&&!e.endsWith("rem")&&!e.endsWith("em")&&!e.endsWith("%")?"Value must end with px, rem, em or %":true),at=t__namespace.assign(t__namespace.type({type:t__namespace.literal("dimension"),value:D,kind:t__namespace.literal("static"),originalValue:D}),d),it=t__namespace.assign(t__namespace.type({type:t__namespace.literal("dimension"),value:D,kind:t__namespace.literal("ref"),originalValue:c,referencedTokenId:t__namespace.string()}),d);function yo(e){return typeof e=="string"&&e.endsWith("ms")&&!x(e)}n(yo,"isTokenValueDuration");var R=t__namespace.define("Duration Value",e=>typeof e!="string"?"Value must be a string":x(e)?"Value must not contain {} (token references)":/^\d+ms$/.test(e)?true:'Value must be a number followed by "ms" (e.g., "100ms")'),st=t__namespace.assign(t__namespace.type({type:t__namespace.literal("duration"),value:R,kind:t__namespace.literal("static"),originalValue:R}),d),pt=t__namespace.assign(t__namespace.type({type:t__namespace.literal("duration"),value:R,kind:t__namespace.literal("ref"),originalValue:c,referencedTokenId:t__namespace.string()}),d);function To(e){return (typeof e=="string"||typeof e=="number")&&!x(e)}n(To,"isTokenValueFontWeight");var se=t__namespace.define("Font Weight Value",e=>typeof e!="string"&&typeof e!="number"?"Value must be a string or number":x(e)?"Value must not contain {} (token references)":true),lt=t__namespace.assign(t__namespace.type({type:t__namespace.literal("fontWeight"),value:se,kind:t__namespace.literal("static"),originalValue:se}),d),ct=t__namespace.assign(t__namespace.type({type:t__namespace.literal("fontWeight"),value:se,kind:t__namespace.literal("ref"),originalValue:c,referencedTokenId:t__namespace.string()}),d),G=t__namespace.define("Cubic Bezier Value",e=>Array.isArray(e)?e.length!==4||!e.every(r=>typeof r=="number")?"Value must be an array of 4 numbers":e[0]<0||e[0]>1||e[2]<0||e[2]>1?"The first and third cubicBezier values must be between 0 and 1":true:"Value must be an array"),dt=t__namespace.assign(t__namespace.type({type:t__namespace.literal("cubicBezier"),value:G,kind:t__namespace.literal("static"),originalValue:G}),d),ut=t__namespace.assign(t__namespace.type({type:t__namespace.literal("cubicBezier"),value:G,kind:t__namespace.literal("ref"),originalValue:c,referencedTokenId:t__namespace.string()}),d);function gt(e){return utils.isObject(e)&&nt(e.color)&&q(e.offsetX)&&q(e.offsetY)&&q(e.blur)&&q(e.spread)}n(gt,"isTokenValueShadow");var Se=t__namespace.define("Shadow Value",e=>gt(e)?true:`Expected a shadow value, got ${JSON.stringify(e)}`),ft=t__namespace.assign(t__namespace.type({type:t__namespace.literal("shadow"),value:Se,kind:t__namespace.literal("static"),originalValue:t__namespace.type({color:t__namespace.union([A,c]),offsetX:t__namespace.union([D,c]),offsetY:t__namespace.union([D,c]),blur:t__namespace.union([D,c]),spread:t__namespace.union([D,c]),inset:t__namespace.union([t__namespace.optional(t__namespace.boolean()),c])})}),d),mt=t__namespace.assign(t__namespace.type({type:t__namespace.literal("shadow"),value:Se,kind:t__namespace.literal("ref"),originalValue:c,referencedTokenId:t__namespace.string()}),d),K=t__namespace.union([t__namespace.literal("solid"),t__namespace.literal("dashed"),t__namespace.literal("dotted"),t__namespace.literal("double"),t__namespace.literal("groove"),t__namespace.literal("ridge"),t__namespace.literal("outset"),t__namespace.literal("inset")]);function yt(e){return utils.isObject(e)&&A.is(e.color)&&K.is(e.style)&&D.is(e.width)}n(yt,"isTokenValueBorder");var be=t__namespace.define("Border Value",yt),Tt=t__namespace.assign(t__namespace.type({type:t__namespace.literal("border"),value:be,kind:t__namespace.literal("static"),originalValue:t__namespace.type({color:t__namespace.union([A,c]),style:t__namespace.union([K,c]),width:t__namespace.union([D,c])})}),d),kt=t__namespace.assign(t__namespace.type({type:t__namespace.literal("border"),value:be,kind:t__namespace.literal("ref"),originalValue:c,referencedTokenId:t__namespace.string()}),d);function St(e){return utils.isObject(e)&&G.is(e.timingFunction)&&R.is(e.duration)&&R.is(e.delay)}n(St,"isTokenValueTransition");var Ce=t__namespace.define("Transition Value",St),bt=t__namespace.assign(t__namespace.type({type:t__namespace.literal("transition"),value:Ce,kind:t__namespace.literal("static"),originalValue:t__namespace.type({timingFunction:t__namespace.union([G,c]),duration:t__namespace.union([R,c]),delay:t__namespace.union([R,c])})}),d),Ct=t__namespace.assign(t__namespace.type({type:t__namespace.literal("transition"),value:Ce,kind:t__namespace.literal("ref"),originalValue:c,referencedTokenId:t__namespace.string()}),d),xt=t__namespace.assign(t__namespace.type({type:t__namespace.literal("string"),value:t__namespace.string(),kind:t__namespace.literal("static"),originalValue:t__namespace.string()}),d),Dt=t__namespace.assign(t__namespace.type({type:t__namespace.literal("string"),value:t__namespace.string(),kind:t__namespace.literal("ref"),originalValue:c,referencedTokenId:t__namespace.string()}),d),ht=t__namespace.assign(t__namespace.type({type:t__namespace.literal("strokeStyle"),value:K,kind:t__namespace.literal("static"),originalValue:K}),d),It=t__namespace.assign(t__namespace.type({type:t__namespace.literal("strokeStyle"),value:K,kind:t__namespace.literal("ref"),originalValue:c,referencedTokenId:K}),d),Pt=t__namespace.assign(t__namespace.type({type:t__namespace.literal("number"),value:t__namespace.number(),kind:t__namespace.literal("static"),originalValue:t__namespace.number()}),d),Vt=t__namespace.assign(t__namespace.type({type:t__namespace.literal("number"),value:t__namespace.number(),kind:t__namespace.literal("ref"),originalValue:c,referencedTokenId:t__namespace.string()}),d),Et=t__namespace.assign(t__namespace.type({type:t__namespace.literal("boolean"),value:t__namespace.boolean(),kind:t__namespace.literal("static"),originalValue:t__namespace.boolean()}),d),Rt=t__namespace.assign(t__namespace.type({type:t__namespace.literal("boolean"),value:t__namespace.boolean(),kind:t__namespace.literal("ref"),originalValue:c,referencedTokenId:t__namespace.string()}),d),ko=n(e=>{if(!utils.isObject(e))throw new Error(`Expected token data to be an object, got ${JSON.stringify(e)}`);if(!utils.isObjKey("type",e))throw new Error(`Expected token data to have a "type" property, got ${JSON.stringify(e)}`);if(typeof e.type!="string")throw new Error(`Expected token data "type" property to be a string, got ${JSON.stringify(e)}`);let r=e.type,a=e.kind;try{switch(r){case "boolean":a==="ref"?Rt.assert(e):Et.assert(e);return;case "border":a==="ref"?kt.assert(e):Tt.assert(e);return;case "color":a==="ref"?rt.assert(e):ot.assert(e);return;case "cubicBezier":a==="ref"?ut.assert(e):dt.assert(e);return;case "dimension":a==="ref"?it.assert(e):at.assert(e);return;case "duration":a==="ref"?pt.assert(e):st.assert(e);return;case "fontWeight":a==="ref"?ct.assert(e):lt.assert(e);return;case "number":a==="ref"?Vt.assert(e):Pt.assert(e);return;case "shadow":a==="ref"?mt.assert(e):ft.assert(e);return;case "string":a==="ref"?Dt.assert(e):xt.assert(e);return;case "strokeStyle":a==="ref"?It.assert(e):ht.assert(e);return;case "transition":a==="ref"?Ct.assert(e):bt.assert(e);return;default:{throw new Error(`Unknown token data type: ${r}`)}}}catch(u){throw u instanceof t__namespace.StructError?new Error(`Invalid token data for type "${r}": ${u.message}. Received this data: "${JSON.stringify(e)}"`):u}},"assertTokenData");utils.expectType([{type:"dimension",kind:"static",value:"1px"},{type:"dimension",kind:"ref",referencedTokenId:"a.b"}]);utils.expectType([{type:"border",kind:"ref",referencedTokenId:"a.b"},{type:"border",kind:"static",value:{color:{kind:"static",type:"color",value:"red"},style:{kind:"ref",type:"strokeStyle",referencedTokenId:""},width:{kind:"static",type:"dimension",value:"2px"}}}]);utils.expectType([{type:"transition",kind:"ref",referencedTokenId:"a.b"},{type:"transition",kind:"static",value:{delay:{kind:"static",type:"duration",value:"1ms"},duration:{kind:"ref",type:"duration",referencedTokenId:"animation.slow"},timingFunction:{kind:"static",type:"cubicBezier",value:[.4,0,.2,1]}}}]);function Vo(e){return ke(e?.type)}n(Vo,"isTokenSrcValueInfoSingular");function Eo(e){return J(e?.type)}n(Eo,"isTokenSrcValueInfoComposite");utils.expectType([{type:"dimension",kind:"static",value:"1px"},{type:"transition",kind:"ref",referencedTokenId:"a.b"},{type:"transition",kind:"ref",value:"1px"},{kind:"ref",type:"duration",referencedTokenId:"animation.slow"},{kind:"static",type:"cubicBezier",value:[.4,0,.2,1]},{type:"transition",kind:"static",value:{delay:{kind:"static",type:"duration",value:"1ms"},duration:{kind:"ref",type:"duration",referencedTokenId:"animation.slow"},timingFunction:{kind:"static",type:"cubicBezier",value:[.4,0,.2,1]}}}]);function Nt(e){return utils.isObject(e)&&utils.isObjKey("cloud.knapsack",e)}n(Nt,"isTokenSrcExtensions");utils.expectType(["#ddd",true,[83,1,1,1],{color:"#000",style:"solid",width:"1px"},{inset:true,color:"#000",offsetX:"0px",offsetY:"{spacing.medium}",spread:"0px",blur:"0px"},{timingFunction:"{timing.ease}",duration:"{timing.duration.medium}",delay:"7ms",color:"#000"}]);function Oo(e){return !!(utils.isObject(e)&&utils.isObjKey("$value",e))}n(Oo,"isTokenSrc");function wt(e){return utils.isObject(e)&&!Nt(e)&&!utils.isObjKey("$value",e)&&!utils.isObjKey("cloud.knapsack",e)}n(wt,"isTokenGroup");function Bo(e){if(wt(e)){let r=e.$extensions["cloud.knapsack"].group.collectionInfo;if(utils.isObjKey("type",r)&&utils.isObjKey("referenceId",r))return true}return false}n(Bo,"isTokenTypeVarRef");function Fo(e){let r=typeof e;if(r==="string"||r==="number"||r==="boolean")return r;throw new Error(`Invalid token value type: ${JSON.stringify(r)}. Token value is: ${JSON.stringify(e)}`)}n(Fo,"getPrimitiveValue");var Mo=n(e=>e.includes("px")||e.includes("rem")||e.includes("em")||e.includes("%"),"isDimensionString");function jo(e){let{value:r,unit:a}=utils.parseNumberWithUnit(e);if(!a)return {value:r};if(a!=="px"&&a!=="rem"&&a!=="em"&&a!=="%")throw new Error(`Invalid unit "${a}" for value: ${r}`);return {value:r,unit:a}}n(jo,"parseTokenDimensionValue");function Lo(e){return e?.type==="data"||e?.type==="data-w-template-info"}n(Lo,"isDemoWithData");function _o(e){return e?.type==="data"}n(_o,"isDataDemo");function Go(e){return e?.type==="template"}n(Go,"isTemplateDemo");function $o(e){return typeof e=="object"&&!e.isInferred}n($o,"isSpecNotInferred");var Jo={designSrc:"Design Source",subPage:"Subpage",template:"Template"};var xe=(T=>(T.auto="auto",T.small="small",T.medium="medium",T.large="large",T.full="full",T))(xe||{});var nr={patternsState:{patterns:{},renderers:{},statusSets:[]},customPagesState:{pages:{}},assetSetsState:{},navsState:{byId:{},order:[]},tokensSrc:{},filesState:{files:{}},db:{blocks:{byId:{},settings:{tokens:{rootFontSize:"16px"}}},demos:{byId:{},settings:{}},tabs:{byId:{},settings:{}},blockCollections:{byId:{},settings:{}},settings:{title:"",logoUrl:""}}};function At(e){return !utils.isObject(e)||!["assetSetsState","customPagesState","navsState","patternsState","tokensSrc","db"].every(a=>utils.isObjKey(a,e))?false:!utils.isObjKey("metaState",e)}n(At,"isKsAppClientDataNoMeta");var or=t.define("KsAppClientDataNoMeta",At),Kt=v4Mini.z.strictObject({assetSetsState:v4Mini.z.object({}),customPagesState:v4Mini.z.object({pages:v4Mini.z.object({})}),navsState:v4Mini.z.object({byId:v4Mini.z.object(),order:v4Mini.z.array(v4Mini.z.string())}),patternsState:v4Mini.z.object({patterns:v4Mini.z.object({}),renderers:v4Mini.z.object({}),statusSets:v4Mini.z.array(v4Mini.z.object())}),tokensSrc:v4Mini.z.object({}),filesState:v4Mini.z.object({files:v4Mini.z.object({})}),db:v4Mini.z.object({blocks:v4Mini.z.object({byId:v4Mini.z.object({}),settings:v4Mini.z.object({})}),demos:v4Mini.z.object({byId:v4Mini.z.object({}),settings:v4Mini.z.object({})}),tabs:v4Mini.z.optional(v4Mini.z.object({byId:v4Mini.z.object({}),settings:v4Mini.z.object({})})),blockCollections:v4Mini.z.optional(v4Mini.z.object({byId:v4Mini.z.object({}),settings:v4Mini.z.object({})})),templatesConfig:v4Mini.z.optional(v4Mini.z.object({})),settings:v4Mini.z.object({title:v4Mini.z.optional(v4Mini.z.string()),hideTitleInNavigation:v4Mini.z.optional(v4Mini.z.boolean()),logoUrl:v4Mini.z.optional(v4Mini.z.string())})})}),rr=v4Mini.z.custom().check(e=>{let{error:r}=Kt.safeParse(e.value);r&&e.issues.push(...r.issues);});function Ut(e){return utils.isObject(e)?["assetSetsState","customPagesState","navsState","patternsState","tokensSrc","metaState","db"].every(a=>utils.isObjKey(a,e)):false}n(Ut,"isKsAppClientDataAndMeta");var ar=t.define("KsAppClientDataAndMeta",Ut),Ft=t.type({isLocalDev:t.boolean(),plugins:t.array(t.type({id:t.string(),hasContent:t.boolean(),clientPluginPath:t.optional(t.string()),cssPath:t.optional(t.string())})),meta:t.optional(t.type({version:t.optional(t.string()),hasKnapsackCloud:t.boolean(),knapsackCloudSiteId:t.optional(t.string()),serverPort:t.optional(t.number()),websocketsPort:t.optional(t.number()),https:t.optional(t.boolean()),cacheDir:t.optional(t.string()),ksVersions:t.type({app:t.string()})}))}),ir=Ft.is;function jt(e){return !utils.isObject(e)||!["assetSetsState","customPagesState","navsState","patternsState","settingsState","tokensState"].every(a=>utils.isObjKey(a,e))?false:!utils.isObjKey("metaState",e)}n(jt,"isKsAppClientDataNoMetaV3");var hr=t.define("KsAppClientDataNoMeta",jt);function zt(e){return utils.isObject(e)?["assetSetsState","customPagesState","navsState","patternsState","settingsState","tokensState","metaState"].every(a=>utils.isObjKey(a,e)):false}n(zt,"isKsAppClientDataAndMetaV3");var Ir=t.define("KsAppClientDataAndMeta",zt),Wt=t.type({isLocalDev:t.boolean(),plugins:t.array(t.type({id:t.string(),hasContent:t.boolean(),clientPluginPath:t.optional(t.string()),cssPath:t.optional(t.string())})),meta:t.optional(t.type({version:t.optional(t.string()),hasKnapsackCloud:t.boolean(),knapsackCloudSiteId:t.optional(t.string()),serverPort:t.optional(t.number()),websocketsPort:t.optional(t.number()),https:t.optional(t.boolean()),cacheDir:t.optional(t.string()),ksVersions:t.type({app:t.string()})}))}),Pr=Wt.is;var Ve={version:"4.1.7",checkIfNeeded:n(e=>true,"checkIfNeeded"),migrate:n(e=>{if(!immer.isDraft(e))throw new Error("Tried to run migrations on appClientData but it is not an Immer Draft");Object.values(e.patternsState.patterns).forEach(r=>{delete r.demoSize;}),Object.values(e.db.demos.byId).forEach(r=>{r.type==="data"&&(Object.entries(r.data.slots??{}).forEach(([a,u])=>{r.data.slots[a]=u.map(f=>typeof f=="string"?{type:"text",text:f}:(f.type==="template-reference"||f.type==="text"||(f.type="template-demo"),f));}),!(r.patternId&&r.templateId)&&(()=>{for(let{id:a,templates:u=[]}of Object.values(e.patternsState.patterns))for(let{id:f,demoIds:T=[]}of u)if(T.includes(r.id)){r.patternId=a,r.templateId=f;return}})());});},"migrate")};var Or=[Ve];var _t={ROOT:"ROOT",DESIGN:"Design",DEVELOP:"Develop",DOCUMENT:"Documentation",PROTOTYPE:"Prototype",SETTINGS:"Settings"},Ar=Object.values(_t);var Gt=(k=>(k.string="string",k.boolean="boolean",k.number="number",k.object="object",k.options="options",k.function="function",k.customTypeScript="customTypeScript",k.array="array",k.arrayOfObjects="arrayOfObjects",k.arrayOfStrings="arrayOfStrings",k.arrayOfNumbers="arrayOfNumbers",k.unknown="unknown",k))(Gt||{}),Ur=n(e=>"type"in e&&e.type==="string"&&!("enum"in e),"isStringProp"),Fr=n(e=>"type"in e&&e.type==="number","isNumberProp"),Mr=n(e=>"type"in e&&e.type==="boolean","isBooleanProp"),jr=n(e=>"enum"in e,"isOptionsProp"),zr=n(e=>"typeof"in e&&e?.typeof==="function","isFunctionProp"),Wr=n(e=>!("typeof"in e)&&"tsType"in e,"isCustomTypeScriptProp"),Lr=n(e=>"type"in e&&e.type==="array"&&"items"in e&&e.items.type==="object","isArrayOfObjectsProp"),_r=n(e=>"type"in e&&e.type==="object"&&"properties"in e&&Object.keys(e.properties).length>0,"isObjectProp"),Gr=n(e=>"type"in e&&e.type==="array"&&"items"in e&&e.items.type==="string","isArrayOfStringsProp"),$r=n(e=>"type"in e&&e.type==="array"&&"items"in e&&e.items.type==="number","isArrayOfNumbersProp");var Ee=t__namespace.object({op:t__namespace.union([t__namespace.literal("replace"),t__namespace.literal("remove"),t__namespace.literal("add")]),path:t__namespace.array(t__namespace.union([t__namespace.string(),t__namespace.number()])),value:t__namespace.optional(t__namespace.any())}),$t=Ee,Jr=n(e=>$t.is(e),"isPatch"),ce=t__namespace.array(Ee),Yt=ce,qr=n(e=>Yt.is(e),"isPatches"),Re=t__namespace.type({patches:ce,inversePatches:t__namespace.optional(ce),event:t__namespace.optional(t__namespace.object({type:t__namespace.string()})),id:t__namespace.string(),date:t__namespace.string(),userId:t__namespace.optional(t__namespace.string())}),Ht=Re,Xr=n(e=>Ht.is(e),"isKsRemoteChange"),Jt=t__namespace.array(Re),qt=Jt,Zr=n(e=>qt.is(e),"isKsRemoteChanges");var na={react:"react",vue:"vue","web-components":"web-components",twig:"twig",hbs:"hbs",angular:"angular",html:"html"},oa=zod.z.strictObject({path:zod.z.string().describe("Can contain glob patterns, relative paths, absolute paths, package paths, or package sub-paths"),filter:zod.z.custom(e=>typeof e=="function").optional().describe("A function that takes a path and returns a boolean")});function ra(e){return "codeSrcPath"in e}n(ra,"isTemplateInfoWithCodeSrcPath");function Xt(e){switch(e.rendererId){case "angular":case "react":return `${e.rendererId}---${e.codeSrcPath}---${e.exportName||"default"}`;case "web-components":return `${e.rendererId}---${e.elementName}`;case "twig":return `${e.rendererId}---${e.namespacePath}`;case "vue":case "hbs":case "html":return `${e.rendererId}---${e.codeSrcPath}`;default:{throw new Error(`Invalid template info: ${JSON.stringify(e)}`)}}}n(Xt,"createTemplateInfoId");function aa(e){return {...e,id:Xt(e)}}n(aa,"addIdToTemplateInfo");function ia({rendererId:e,alias:r,path:a}){return (()=>{switch(e){case "react":case "angular":return {rendererId:e,codeSrcPath:a,exportName:r||"default"};case "vue":case "hbs":case "html":return {rendererId:e,codeSrcPath:a};case "twig":return {rendererId:e,namespacePath:r};case "web-components":return {rendererId:e,elementName:r};default:{throw new Error(`Invalid renderer ID: ${e}`)}}})()}n(ia,"normalizeTemplateInfo");function sa(e){switch(e.rendererId){case "react":case "angular":return {path:e.codeSrcPath,alias:e.exportName};case "hbs":case "html":case "vue":return {path:e.codeSrcPath};case "twig":return {alias:e.namespacePath};case "web-components":return {alias:e.elementName};default:{throw new Error(`Invalid template info: ${JSON.stringify(e)}`)}}}n(sa,"convertTemplateInfoToOldWay");var Zt=(r=>(r.ready="ready",r))(Zt||{}),ca="ks-meta";var ua={PATTERN_TEMPLATE_CHANGED:"PATTERN_TEMPLATE_CHANGED",PATTERN_ASSET_CHANGED:"PATTERN_ASSET_CHANGED",DESIGN_TOKENS_CHANGED:"DESIGN_TOKENS_CHANGED",RENDERER_CLIENT_RELOAD:"RENDERER_CLIENT_RELOAD",APP_CLIENT_DATA_CHANGED:"APP_CLIENT_DATA_CHANGED"};var Qt=(T=>(T.GitHub="GitHub",T.GitLab="GitLab",T.GitLabRest="GitLabRest",T.Bitbucket="Bitbucket",T.Azure="Azure",T))(Qt||{}),en=(u=>(u.Conflicting="CONFLICTING",u.Mergeable="MERGEABLE",u.Unknown="UNKNOWN",u))(en||{}),tn=(f=>(f.Create="CREATE",f.Move="MOVE",f.Update="UPDATE",f.Chmod="CHMOD",f))(tn||{}),nn=(a=>(a.Base64="BASE64",a.Text="TEXT",a))(nn||{});var on={ADMIN:{id:"ADMIN",title:"Admin",hierarchy:4,permissions:{canManageUsers:true,canDelete:true,canEdit:true,canPublish:true,canView:true},sectionAccess:{ROOT:{canEdit:false,canView:true},DOCUMENT:{canEdit:true,canView:true},DESIGN:{canEdit:true,canView:true},DEVELOP:{canEdit:true,canView:true},PROTOTYPE:{canEdit:true,canView:true},SETTINGS:{canEdit:true,canView:true}}},CONTRIBUTOR:{id:"CONTRIBUTOR",title:"Contributor",hierarchy:3,permissions:{canManageUsers:false,canDelete:false,canEdit:true,canPublish:false,canView:true},sectionAccess:{ROOT:{canEdit:false,canView:true},DOCUMENT:{canEdit:true,canView:true},DESIGN:{canEdit:true,canView:true},DEVELOP:{canEdit:true,canView:true},PROTOTYPE:{canEdit:true,canView:true},SETTINGS:{canEdit:true,canView:true}}},CONSUMER:{id:"CONSUMER",title:"Consumer",hierarchy:2,permissions:{canManageUsers:false,canDelete:false,canEdit:true,canPublish:false,canView:true},sectionAccess:{ROOT:{canEdit:false,canView:true},DOCUMENT:{canEdit:false,canView:true},DESIGN:{canEdit:false,canView:false},DEVELOP:{canEdit:false,canView:false},PROTOTYPE:{canEdit:true,canView:true},SETTINGS:{canEdit:false,canView:false}}},VIEWER:{id:"VIEWER",title:"Viewer",hierarchy:1,permissions:{canManageUsers:false,canDelete:false,canEdit:false,canPublish:false,canView:true},sectionAccess:{ROOT:{canEdit:false,canView:true},DOCUMENT:{canEdit:false,canView:true},DESIGN:{canEdit:false,canView:false},DEVELOP:{canEdit:false,canView:false},PROTOTYPE:{canEdit:false,canView:false},SETTINGS:{canEdit:false,canView:false}}},ANONYMOUS:{id:"ANONYMOUS",title:"Anonymous",hierarchy:0,permissions:{canManageUsers:false,canDelete:false,canEdit:false,canPublish:false,canView:true},sectionAccess:{ROOT:{canEdit:false,canView:true},DOCUMENT:{canEdit:false,canView:true},DESIGN:{canEdit:false,canView:false},DEVELOP:{canEdit:false,canView:false},PROTOTYPE:{canEdit:false,canView:false},SETTINGS:{canEdit:false,canView:false}}},EDITOR:{id:"EDITOR",title:"Editor",hierarchy:0,permissions:{canManageUsers:false,canDelete:false,canEdit:false,canPublish:false,canView:false},sectionAccess:{ROOT:{canEdit:false,canView:false},DOCUMENT:{canEdit:false,canView:false},DESIGN:{canEdit:false,canView:false},DEVELOP:{canEdit:false,canView:false},PROTOTYPE:{canEdit:false,canView:false},SETTINGS:{canEdit:false,canView:false}}},MANAGER:{id:"MANAGER",title:"Manager",hierarchy:0,permissions:{canManageUsers:false,canDelete:false,canEdit:false,canPublish:false,canView:false},sectionAccess:{ROOT:{canEdit:false,canView:false},DOCUMENT:{canEdit:false,canView:false},DESIGN:{canEdit:false,canView:false},DEVELOP:{canEdit:false,canView:false},PROTOTYPE:{canEdit:false,canView:false},SETTINGS:{canEdit:false,canView:false}}}},ma=Object.values(on);Object.defineProperty(exports,"isObjKey",{enumerable:true,get:function(){return utils.isObjKey}});Object.defineProperty(exports,"isObject",{enumerable:true,get:function(){return utils.isObject}});exports.BlockSizes=Xn;exports.BlockSpacings=Zn;exports.CodeSrcUserConfigSchema=oa;exports.ColorConfigStruct=l;exports.ColorStringStruct=F;exports.ColorTokenConfigStruct=ln;exports.FontFaceConfigStruct=w;exports.FontFaceFormatsEnumStruct=je;exports.FontFaceSourceFormats=Me;exports.FontFaceSourceStruct=ze;exports.FontFaceWeightStruct=me;exports.FontSizeConfigStruct=_e;exports.FontSizeConfigValStruct=fe;exports.FontStretches=Le;exports.GitProviderType=Qt;exports.HeadingLevels=yn;exports.KsAppClientDataAndMetaStruct=ar;exports.KsAppClientDataAndMetaStructV3=Ir;exports.KsAppClientDataNoMetaStruct=or;exports.KsAppClientDataNoMetaStructV3=hr;exports.KsAppClientDataNoMetaZod=rr;exports.KsMetaStateStruct=Ft;exports.KsMetaStateStructV3=Wt;exports.KsRemoteChangesStruct=qt;exports.KsRendererClientEvents=Zt;exports.MergeableState=en;exports.NavCustomizationConfigStruct=E;exports.PageHeaderSizes=xe;exports.PrimaryNavCustomizationConfigStruct=W;exports.PropTypeNames=Gt;exports.RestActions=tn;exports.SecondaryNavCustomizationConfigStruct=L;exports.TextEncoding=nn;exports.TextTransforms=We;exports.TokenReferenceStruct=c;exports.TokenValueColorStruct=A;exports.TokenValueCubicBezierStruct=G;exports.TokenValueDimensionStruct=D;exports.TokenValueDurationStruct=R;exports.TokenValueFontWeightStruct=se;exports.TokenValueStrokeStyleStruct=K;exports.TypographyConfigStruct=s;exports.TypographyLinkConfigStruct=O;exports.UiConfigStruct=Yn;exports.UiConfigV10Struct=He;exports.UiConfigV1Struct=Fn;exports.UiConfigV2Struct=Mn;exports.UiConfigV3Struct=jn;exports.UiConfigV4Struct=zn;exports.UiConfigV5Struct=Wn;exports.UiConfigV6Struct=Ln;exports.UiConfigV7Struct=_n;exports.UiConfigV8Struct=Gn;exports.UiConfigV9Struct=$n;exports.WS_EVENTS=ua;exports.addIdToTemplateInfo=aa;exports.appSections=Ar;exports.appSectionsById=_t;exports.assertTokenData=ko;exports.convertTemplateInfoToOldWay=sa;exports.createTemplateInfoId=Xt;exports.customizableNavElements=Pn;exports.emptyAppClientData=nr;exports.getPrimitiveValue=Fo;exports.hasTokenReferences=x;exports.isArrayOfNumbersProp=$r;exports.isArrayOfObjectsProp=Lr;exports.isArrayOfStringsProp=Gr;exports.isBooleanProp=Mr;exports.isCustomTypeScriptProp=Wr;exports.isDataDemo=_o;exports.isDemoWithData=Lo;exports.isDimensionString=Mo;exports.isFunctionProp=zr;exports.isKsAppClientDataAndMeta=Ut;exports.isKsAppClientDataAndMetaV3=zt;exports.isKsAppClientDataNoMeta=At;exports.isKsAppClientDataNoMetaV3=jt;exports.isKsMetaState=ir;exports.isKsMetaStateV3=Pr;exports.isKsRemoteChange=Xr;exports.isKsRemoteChanges=Zr;exports.isNotTokenReference=qe;exports.isNumberProp=Fr;exports.isObjectProp=_r;exports.isOptionsProp=jr;exports.isPatch=Jr;exports.isPatches=qr;exports.isSpecNotInferred=$o;exports.isStringProp=Ur;exports.isTemplateDemo=Go;exports.isTemplateInfoWithCodeSrcPath=ra;exports.isTokenDataComposite=mo;exports.isTokenGroup=wt;exports.isTokenReference=Je;exports.isTokenSrc=Oo;exports.isTokenSrcExtensions=Nt;exports.isTokenSrcValueInfoComposite=Eo;exports.isTokenSrcValueInfoSingular=Vo;exports.isTokenTypeComposite=J;exports.isTokenTypeSingular=ke;exports.isTokenTypeVarRef=Bo;exports.isTokenValueBorder=yt;exports.isTokenValueColor=nt;exports.isTokenValueDimension=q;exports.isTokenValueDuration=yo;exports.isTokenValueFontWeight=To;exports.isTokenValueShadow=gt;exports.isTokenValueTransition=St;exports.ksRendererClientMetaId=ca;exports.migrations=Or;exports.normalizeTemplateInfo=ia;exports.pageElements=Tn;exports.pageElementsV2=kn;exports.parseTokenDimensionValue=jo;exports.patternTabTypes=Jo;exports.rendererIds=na;exports.roles=ma;exports.rolesById=on;exports.strokeStyleValues=no;exports.tokenNameDisplayFormats=eo;exports.tokenTypeComposites=Ze;exports.tokenTypeSingulars=et;//# sourceMappingURL=index.js.map
|
|
1
|
+
'use strict';var t=require('superstruct'),Ne=require('color-string'),v4Mini=require('zod/v4-mini'),utils=require('@knapsack/utils'),immer=require('immer'),zod=require('zod'),urls=require('@knapsack/utils/urls');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var t__namespace=/*#__PURE__*/_interopNamespace(t);var Ne__default=/*#__PURE__*/_interopDefault(Ne);var ve=Object.defineProperty;var n=(e,r)=>ve(e,"name",{value:r,configurable:true});function Be(e){if(typeof e!="string")return false;try{return !!Ne__default.default.get(e)}catch{return false}}n(Be,"isColor");var F=t.define("ColorStringStruct",e=>typeof e=="string"&&Be(e)),l=t.union([t.type({type:t.literal("value"),colorValue:F}),t.type({type:t.literal("design-token"),tokenName:t.string()})]),dn=t.type({type:t.literal("design-token"),tokenName:t.string()});var kn=["h1","h2","h3","h4","h5","h6"],fe=t.object({unit:t.enums(["rem","px"]),value:t.number()}),me=t.union([t.string(),t.number()]),Me=(a=>(a.woff2="woff2",a.woff="woff",a))(Me||{}),je=t.enums(["woff2","woff"]),ze=t.type({format:je,type:t.literal("url"),path:t.string()}),w=t.type({family:t.optional(t.string()),weight:t.optional(t.union([me,t.size(t.array(me),2)])),src:t.optional(t.array(ze)),style:t.optional(t.string()),display:t.optional(t.enums(["auto","block","swap","fallback","optional"])),variationSettings:t.optional(t.string()),unicodeRange:t.optional(t.string())}),We=(f=>(f.inherit="As typed",f.capitalize="Capitalize",f.lowercase="Lowercase",f.uppercase="Uppercase",f))(We||{}),Le=(u=>(u["ultra-condensed"]="Ultra-condensed",u["extra-condensed"]="Extra-condensed",u.condensed="Condensed",u["semi-condensed"]="Semi-condensed",u.normal="Normal",u["semi-expanded"]="Semi-expanded",u.expanded="Expanded",u["extra-expanded"]="Extra-expanded",u["ultra-expanded"]="Ultra-expanded",u))(Le||{}),O=t.type({fontWeight:t.optional(t.union([t.string(),t.number()])),textColor:t.optional(l),hoverColor:t.optional(l),underline:t.optional(t.boolean()),textTransform:t.optional(t.enums(["inherit","capitalize","lowercase","uppercase"])),fontStretch:t.optional(t.enums(["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"]))}),_e=t.type({min:fe,max:t.optional(fe)}),s=t.type({fontSize:t.optional(_e),lineHeight:t.optional(t.union([t.string(),t.number()])),fontWeight:t.optional(t.union([t.string(),t.number()])),letterSpacing:t.optional(t.string()),fontFamily:t.optional(t.string()),textColor:t.optional(l),textTransform:t.optional(t.enums(["inherit","capitalize","lowercase","uppercase"])),fontStretch:t.optional(t.enums(["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"]))}),m={},ye={},Sn={pageTitle:m,pageDescription:m,headingLarge:m,headingMedium:m,headingSmall:m,bodyText:m,link:ye},bn={pageTitle:m,pageDescription:m,headingXLarge:m,headingLarge:m,headingMedium:m,headingSmall:m,headingXSmall:m,bodyText:m,link:ye};var R=t.union([s,t.type({accentColor:t.optional(l)})]),W=t.union([R,t.type({hoverColor:t.optional(l),backgroundColor:t.optional(l)})]),L=t.union([R,t.type({backgroundColor:t.optional(l)})]),Ge={},$e={},Ye={},Rn={primaryNav:Ye,secondaryNav:$e,tabs:Ge};var jn=t.object({version:t.literal(1),oldSillySidebarBgColor:F}),zn=t.object({version:t.literal(2),anotherSillySidebarBgColor:F}),Wn=t.object({version:t.literal(3),sidebarBgColor:F}),Ln=t.object({version:t.literal(4),primaryColor:l,darkColor:l,lightColor:l,enableSidebarIcons:t.optional(t.defaulted(t.boolean(),true))}),_n=t.object({version:t.literal(5),primaryColor:l,darkColor:l,lightColor:l,linkColor:l,enableSidebarIcons:t.optional(t.defaulted(t.boolean(),true))}),Gn=t.object({version:t.literal(6),primaryColor:l,darkColor:l,lightColor:l,linkColor:l,enableSidebarIcons:t.optional(t.defaulted(t.boolean(),true)),appearance:t.type({customFonts:t.optional(t.array(w)),pageElements:t.type({pageTitle:t.optional(s),pageDescription:t.optional(s),headingLarge:t.optional(s),headingMedium:t.optional(s),headingSmall:t.optional(s),bodyText:t.optional(s),link:t.optional(O)})})}),$n=t.object({version:t.literal(7),primaryColor:l,darkColor:l,lightColor:l,linkColor:l,enableSidebarIcons:t.optional(t.defaulted(t.boolean(),true)),appearance:t.type({customFonts:t.optional(t.array(w)),navigation:t.optional(t.type({primaryNav:t.optional(W),secondaryNav:t.optional(L),tabs:t.optional(R)})),pageElements:t.type({pageTitle:t.optional(s),pageDescription:t.optional(s),headingLarge:t.optional(s),headingMedium:t.optional(s),headingSmall:t.optional(s),bodyText:t.optional(s),link:t.optional(O)})})}),Yn=t.object({version:t.literal(8),primaryColor:l,darkColor:l,lightColor:l,linkColor:l,appearance:t.type({customFonts:t.optional(t.array(w)),navigation:t.optional(t.type({primaryNav:t.optional(W),secondaryNav:t.optional(L),tabs:t.optional(R)})),pageElements:t.type({pageTitle:t.optional(s),pageDescription:t.optional(s),headingLarge:t.optional(s),headingMedium:t.optional(s),headingSmall:t.optional(s),bodyText:t.optional(s),link:t.optional(O)})})}),Hn=t.object({version:t.literal(9),appearance:t.type({customFonts:t.optional(t.array(w)),navigation:t.optional(t.type({primaryNav:t.optional(W),secondaryNav:t.optional(L),tabs:t.optional(R)})),pageElements:t.type({pageTitle:t.optional(s),pageDescription:t.optional(s),headingLarge:t.optional(s),headingMedium:t.optional(s),headingSmall:t.optional(s),bodyText:t.optional(s),link:t.optional(O)})})}),He=t.object({version:t.literal(10),appearance:t.type({customFonts:t.optional(t.array(w)),navigation:t.optional(t.type({primaryNav:t.optional(W),secondaryNav:t.optional(L),tabs:t.optional(R)})),pageElements:t.type({pageTitle:t.optional(s),pageDescription:t.optional(s),headingXLarge:t.optional(s),headingLarge:t.optional(s),headingMedium:t.optional(s),headingSmall:t.optional(s),headingXSmall:t.optional(s),bodyText:t.optional(s),link:t.optional(O)})})}),Jn=He;var Qn=["large","medium","small"],eo=["large","medium","small"];var no={default:"Default",android:"Android",cssVar:"CSS Var",json:"JSON",less:"Less",scss:"SCSS",swift:"Swift"};var ro=["solid","dashed","dotted","double","groove","ridge","outset","inset"];function Je(e){return typeof e!="string"?false:e.split("{").length-1===1&&e.startsWith("{")&&e.endsWith("}")}n(Je,"isTokenReference");function x(e){return typeof e=="string"&&e.includes("{")}n(x,"hasTokenReferences");function qe(e){return !Je(e)}n(qe,"isNotTokenReference");var c=t__namespace.define("Token Reference",e=>typeof e!="string"?false:qe(e)?"Must start and end with curly braces":true),Xe={border:"border",shadow:"shadow",transition:"transition"},Ze=Object.values(Xe),Qe={string:"string",number:"number",boolean:"boolean",color:"color",dimension:"dimension",duration:"duration",fontWeight:"fontWeight",strokeStyle:"strokeStyle",cubicBezier:"cubicBezier"},et=Object.values(Qe);function J(e){return Ze.includes(e)}n(J,"isTokenTypeComposite");function ke(e){return et.includes(e)}n(ke,"isTokenTypeSingular");utils.expectType([{inset:false,color:"#000",offsetX:"0px",offsetY:"0px",spread:"0px",blur:"0px"},{color:"#000",offsetX:"0px",offsetY:"0px",spread:"0px",blur:"0px",inset:true}]);var d=t__namespace.type({id:t__namespace.string(),description:t__namespace.optional(t__namespace.string()),references:t__namespace.optional(t__namespace.array(t__namespace.array(t__namespace.string()))),tokenConfig:t__namespace.optional(t__namespace.type({purpose:t__namespace.optional(t__namespace.string())}))});utils.expectType([{type:"duration",value:"1ms",originalValue:"1ms",id:"1",kind:"static"},{type:"duration",value:"1ms",kind:"ref",id:"1",originalValue:"{a.b}",referencedTokenId:"1"},{type:"duration",value:"1ms",originalValue:"1ms",id:"1",kind:"ref"},{type:"duration",value:"1ms",kind:"static",id:"1",originalValue:"{a.b}",referencedTokenId:"1"},{type:"color",value:"#000",kind:"static",id:"1",originalValue:"#000"},{type:"color",value:"#000",kind:"ref",id:"1",originalValue:"{c.b}",referencedTokenId:"c.b"},{type:"cubicBezier",kind:"static",value:[0,0,0,1],originalValue:[0,0,0,1],id:"1"}]);function To(e){return J(e.type)}n(To,"isTokenDataComposite");utils.expectType([{type:"border",kind:"static",id:"1",value:{color:"#000",style:"solid",width:"1px"},originalValue:{color:"#000",style:"solid",width:"1px"}},{type:"border",kind:"ref",referencedTokenId:"a.b",id:"1",value:{color:"red",style:"dashed",width:"2px"},originalValue:"{a.b}"},{type:"shadow",value:{color:"#000",offsetX:"1px",offsetY:"1px",blur:"1px",spread:"1px",inset:false},originalValue:{color:"#000",offsetX:"{a.a}",offsetY:"1px",blur:"1px",spread:"1px",inset:false},id:"1",kind:"static"},{type:"shadow",kind:"ref",referencedTokenId:"a.b",value:{inset:true,color:"red",offsetX:"1px",blur:"2px",offsetY:"3px",spread:"4px"},originalValue:"{a.b}",id:"1"},{type:"transition",value:{duration:"100ms",delay:"200ms",timingFunction:[0,0,0,0]},originalValue:"{a.b}",kind:"ref",referencedTokenId:"a.b",id:"1"},{type:"transition",kind:"static",value:{duration:"100ms",delay:"200ms",timingFunction:[0,0,0,0]},originalValue:{duration:"100ms",delay:"{a.c}",timingFunction:"{a.c}"},id:"1"},{type:"transition",kind:"static",value:{duration:"100ms",delay:"200ms",timingFunction:[0,0,0,0]},originalValue:{duration:"100ms",delay:"200ms",timingFunction:[0,0,0,0]},id:"1"}]);function nt(e){return typeof e=="string"&&!x(e)}n(nt,"isTokenValueColor");var A=t__namespace.define("Color Value",e=>typeof e!="string"?"Value must be a string":e===""?"Value must not be empty":x(e)?"Value must not contain {} (token references)":true),ot=t__namespace.assign(t__namespace.type({type:t__namespace.literal("color"),value:A,kind:t__namespace.literal("static"),originalValue:A}),d),rt=t__namespace.assign(t__namespace.type({type:t__namespace.literal("color"),value:A,kind:t__namespace.literal("ref"),originalValue:c,referencedTokenId:t__namespace.string()}),d);function q(e){return typeof e=="string"&&(e.endsWith("px")||e.endsWith("rem"))&&!x(e)}n(q,"isTokenValueDimension");var h=t__namespace.define("Dimension Value",e=>typeof e!="string"?"Value must be a string":x(e)?"Value must not contain {} (token references)":!e.endsWith("px")&&!e.endsWith("rem")&&!e.endsWith("em")&&!e.endsWith("%")?"Value must end with px, rem, em or %":true),at=t__namespace.assign(t__namespace.type({type:t__namespace.literal("dimension"),value:h,kind:t__namespace.literal("static"),originalValue:h}),d),it=t__namespace.assign(t__namespace.type({type:t__namespace.literal("dimension"),value:h,kind:t__namespace.literal("ref"),originalValue:c,referencedTokenId:t__namespace.string()}),d);function ko(e){return typeof e=="string"&&e.endsWith("ms")&&!x(e)}n(ko,"isTokenValueDuration");var E=t__namespace.define("Duration Value",e=>typeof e!="string"?"Value must be a string":x(e)?"Value must not contain {} (token references)":/^\d+ms$/.test(e)?true:'Value must be a number followed by "ms" (e.g., "100ms")'),st=t__namespace.assign(t__namespace.type({type:t__namespace.literal("duration"),value:E,kind:t__namespace.literal("static"),originalValue:E}),d),pt=t__namespace.assign(t__namespace.type({type:t__namespace.literal("duration"),value:E,kind:t__namespace.literal("ref"),originalValue:c,referencedTokenId:t__namespace.string()}),d);function So(e){return (typeof e=="string"||typeof e=="number")&&!x(e)}n(So,"isTokenValueFontWeight");var se=t__namespace.define("Font Weight Value",e=>typeof e!="string"&&typeof e!="number"?"Value must be a string or number":x(e)?"Value must not contain {} (token references)":true),lt=t__namespace.assign(t__namespace.type({type:t__namespace.literal("fontWeight"),value:se,kind:t__namespace.literal("static"),originalValue:se}),d),ct=t__namespace.assign(t__namespace.type({type:t__namespace.literal("fontWeight"),value:se,kind:t__namespace.literal("ref"),originalValue:c,referencedTokenId:t__namespace.string()}),d),G=t__namespace.define("Cubic Bezier Value",e=>Array.isArray(e)?e.length!==4||!e.every(r=>typeof r=="number")?"Value must be an array of 4 numbers":e[0]<0||e[0]>1||e[2]<0||e[2]>1?"The first and third cubicBezier values must be between 0 and 1":true:"Value must be an array"),dt=t__namespace.assign(t__namespace.type({type:t__namespace.literal("cubicBezier"),value:G,kind:t__namespace.literal("static"),originalValue:G}),d),ut=t__namespace.assign(t__namespace.type({type:t__namespace.literal("cubicBezier"),value:G,kind:t__namespace.literal("ref"),originalValue:c,referencedTokenId:t__namespace.string()}),d);function gt(e){return utils.isObject(e)&&nt(e.color)&&q(e.offsetX)&&q(e.offsetY)&&q(e.blur)&&q(e.spread)}n(gt,"isTokenValueShadow");var Se=t__namespace.define("Shadow Value",e=>gt(e)?true:`Expected a shadow value, got ${JSON.stringify(e)}`),ft=t__namespace.assign(t__namespace.type({type:t__namespace.literal("shadow"),value:Se,kind:t__namespace.literal("static"),originalValue:t__namespace.type({color:t__namespace.union([A,c]),offsetX:t__namespace.union([h,c]),offsetY:t__namespace.union([h,c]),blur:t__namespace.union([h,c]),spread:t__namespace.union([h,c]),inset:t__namespace.union([t__namespace.optional(t__namespace.boolean()),c])})}),d),mt=t__namespace.assign(t__namespace.type({type:t__namespace.literal("shadow"),value:Se,kind:t__namespace.literal("ref"),originalValue:c,referencedTokenId:t__namespace.string()}),d),K=t__namespace.union([t__namespace.literal("solid"),t__namespace.literal("dashed"),t__namespace.literal("dotted"),t__namespace.literal("double"),t__namespace.literal("groove"),t__namespace.literal("ridge"),t__namespace.literal("outset"),t__namespace.literal("inset")]);function yt(e){return utils.isObject(e)&&A.is(e.color)&&K.is(e.style)&&h.is(e.width)}n(yt,"isTokenValueBorder");var be=t__namespace.define("Border Value",yt),Tt=t__namespace.assign(t__namespace.type({type:t__namespace.literal("border"),value:be,kind:t__namespace.literal("static"),originalValue:t__namespace.type({color:t__namespace.union([A,c]),style:t__namespace.union([K,c]),width:t__namespace.union([h,c])})}),d),kt=t__namespace.assign(t__namespace.type({type:t__namespace.literal("border"),value:be,kind:t__namespace.literal("ref"),originalValue:c,referencedTokenId:t__namespace.string()}),d);function St(e){return utils.isObject(e)&&G.is(e.timingFunction)&&E.is(e.duration)&&E.is(e.delay)}n(St,"isTokenValueTransition");var Ce=t__namespace.define("Transition Value",St),bt=t__namespace.assign(t__namespace.type({type:t__namespace.literal("transition"),value:Ce,kind:t__namespace.literal("static"),originalValue:t__namespace.type({timingFunction:t__namespace.union([G,c]),duration:t__namespace.union([E,c]),delay:t__namespace.union([E,c])})}),d),Ct=t__namespace.assign(t__namespace.type({type:t__namespace.literal("transition"),value:Ce,kind:t__namespace.literal("ref"),originalValue:c,referencedTokenId:t__namespace.string()}),d),xt=t__namespace.assign(t__namespace.type({type:t__namespace.literal("string"),value:t__namespace.string(),kind:t__namespace.literal("static"),originalValue:t__namespace.string()}),d),ht=t__namespace.assign(t__namespace.type({type:t__namespace.literal("string"),value:t__namespace.string(),kind:t__namespace.literal("ref"),originalValue:c,referencedTokenId:t__namespace.string()}),d),Dt=t__namespace.assign(t__namespace.type({type:t__namespace.literal("strokeStyle"),value:K,kind:t__namespace.literal("static"),originalValue:K}),d),It=t__namespace.assign(t__namespace.type({type:t__namespace.literal("strokeStyle"),value:K,kind:t__namespace.literal("ref"),originalValue:c,referencedTokenId:K}),d),Pt=t__namespace.assign(t__namespace.type({type:t__namespace.literal("number"),value:t__namespace.number(),kind:t__namespace.literal("static"),originalValue:t__namespace.number()}),d),Vt=t__namespace.assign(t__namespace.type({type:t__namespace.literal("number"),value:t__namespace.number(),kind:t__namespace.literal("ref"),originalValue:c,referencedTokenId:t__namespace.string()}),d),Rt=t__namespace.assign(t__namespace.type({type:t__namespace.literal("boolean"),value:t__namespace.boolean(),kind:t__namespace.literal("static"),originalValue:t__namespace.boolean()}),d),Et=t__namespace.assign(t__namespace.type({type:t__namespace.literal("boolean"),value:t__namespace.boolean(),kind:t__namespace.literal("ref"),originalValue:c,referencedTokenId:t__namespace.string()}),d),bo=n(e=>{if(!utils.isObject(e))throw new Error(`Expected token data to be an object, got ${JSON.stringify(e)}`);if(!utils.isObjKey("type",e))throw new Error(`Expected token data to have a "type" property, got ${JSON.stringify(e)}`);if(typeof e.type!="string")throw new Error(`Expected token data "type" property to be a string, got ${JSON.stringify(e)}`);let r=e.type,a=e.kind;try{switch(r){case "boolean":a==="ref"?Et.assert(e):Rt.assert(e);return;case "border":a==="ref"?kt.assert(e):Tt.assert(e);return;case "color":a==="ref"?rt.assert(e):ot.assert(e);return;case "cubicBezier":a==="ref"?ut.assert(e):dt.assert(e);return;case "dimension":a==="ref"?it.assert(e):at.assert(e);return;case "duration":a==="ref"?pt.assert(e):st.assert(e);return;case "fontWeight":a==="ref"?ct.assert(e):lt.assert(e);return;case "number":a==="ref"?Vt.assert(e):Pt.assert(e);return;case "shadow":a==="ref"?mt.assert(e):ft.assert(e);return;case "string":a==="ref"?ht.assert(e):xt.assert(e);return;case "strokeStyle":a==="ref"?It.assert(e):Dt.assert(e);return;case "transition":a==="ref"?Ct.assert(e):bt.assert(e);return;default:{throw new Error(`Unknown token data type: ${r}`)}}}catch(u){throw u instanceof t__namespace.StructError?new Error(`Invalid token data for type "${r}": ${u.message}. Received this data: "${JSON.stringify(e)}"`):u}},"assertTokenData");utils.expectType([{type:"dimension",kind:"static",value:"1px"},{type:"dimension",kind:"ref",referencedTokenId:"a.b"}]);utils.expectType([{type:"border",kind:"ref",referencedTokenId:"a.b"},{type:"border",kind:"static",value:{color:{kind:"static",type:"color",value:"red"},style:{kind:"ref",type:"strokeStyle",referencedTokenId:""},width:{kind:"static",type:"dimension",value:"2px"}}}]);utils.expectType([{type:"transition",kind:"ref",referencedTokenId:"a.b"},{type:"transition",kind:"static",value:{delay:{kind:"static",type:"duration",value:"1ms"},duration:{kind:"ref",type:"duration",referencedTokenId:"animation.slow"},timingFunction:{kind:"static",type:"cubicBezier",value:[.4,0,.2,1]}}}]);function Eo(e){return ke(e?.type)}n(Eo,"isTokenSrcValueInfoSingular");function vo(e){return J(e?.type)}n(vo,"isTokenSrcValueInfoComposite");utils.expectType([{type:"dimension",kind:"static",value:"1px"},{type:"transition",kind:"ref",referencedTokenId:"a.b"},{type:"transition",kind:"ref",value:"1px"},{kind:"ref",type:"duration",referencedTokenId:"animation.slow"},{kind:"static",type:"cubicBezier",value:[.4,0,.2,1]},{type:"transition",kind:"static",value:{delay:{kind:"static",type:"duration",value:"1ms"},duration:{kind:"ref",type:"duration",referencedTokenId:"animation.slow"},timingFunction:{kind:"static",type:"cubicBezier",value:[.4,0,.2,1]}}}]);function Nt(e){return utils.isObject(e)&&utils.isObjKey("cloud.knapsack",e)}n(Nt,"isTokenSrcExtensions");utils.expectType(["#ddd",true,[83,1,1,1],{color:"#000",style:"solid",width:"1px"},{inset:true,color:"#000",offsetX:"0px",offsetY:"{spacing.medium}",spread:"0px",blur:"0px"},{timingFunction:"{timing.ease}",duration:"{timing.duration.medium}",delay:"7ms",color:"#000"}]);function Ao(e){return !!(utils.isObject(e)&&utils.isObjKey("$value",e))}n(Ao,"isTokenSrc");function wt(e){return utils.isObject(e)&&!Nt(e)&&!utils.isObjKey("$value",e)&&!utils.isObjKey("cloud.knapsack",e)}n(wt,"isTokenGroup");function Ko(e){if(wt(e)){let r=e.$extensions["cloud.knapsack"].group.collectionInfo;if(utils.isObjKey("type",r)&&utils.isObjKey("referenceId",r))return true}return false}n(Ko,"isTokenTypeVarRef");function jo(e){let r=typeof e;if(r==="string"||r==="number"||r==="boolean")return r;throw new Error(`Invalid token value type: ${JSON.stringify(r)}. Token value is: ${JSON.stringify(e)}`)}n(jo,"getPrimitiveValue");var zo=n(e=>e.includes("px")||e.includes("rem")||e.includes("em")||e.includes("%"),"isDimensionString");function Wo(e){let{value:r,unit:a}=utils.parseNumberWithUnit(e);if(!a)return {value:r};if(a!=="px"&&a!=="rem"&&a!=="em"&&a!=="%")throw new Error(`Invalid unit "${a}" for value: ${r}`);return {value:r,unit:a}}n(Wo,"parseTokenDimensionValue");function Go(e){return e?.type==="data"||e?.type==="data-w-template-info"}n(Go,"isDemoWithData");function $o(e){return e?.type==="data"}n($o,"isDataDemo");function Yo(e){return e?.type==="template"}n(Yo,"isTemplateDemo");function Ho(e){return typeof e=="object"&&!e.isInferred}n(Ho,"isSpecNotInferred");var Xo={designSrc:"Design Source",subPage:"Subpage",template:"Template"};var xe=(T=>(T.auto="auto",T.small="small",T.medium="medium",T.large="large",T.full="full",T))(xe||{});var rr={patternsState:{patterns:{},renderers:{},statusSets:[]},customPagesState:{pages:{}},assetSetsState:{},navsState:{byId:{},order:[]},tokensSrc:{},filesState:{files:{}},db:{blocks:{byId:{},settings:{tokens:{rootFontSize:"16px"}}},demos:{byId:{},settings:{}},tabs:{byId:{},settings:{}},blockCollections:{byId:{},settings:{}},settings:{title:"",logoUrl:""}}};function At(e){return !utils.isObject(e)||!["assetSetsState","customPagesState","navsState","patternsState","tokensSrc","db"].every(a=>utils.isObjKey(a,e))?false:!utils.isObjKey("metaState",e)}n(At,"isKsAppClientDataNoMeta");var ar=t.define("KsAppClientDataNoMeta",At),Kt=v4Mini.z.strictObject({assetSetsState:v4Mini.z.object({}),customPagesState:v4Mini.z.object({pages:v4Mini.z.object({})}),navsState:v4Mini.z.object({byId:v4Mini.z.object(),order:v4Mini.z.array(v4Mini.z.string())}),patternsState:v4Mini.z.object({patterns:v4Mini.z.object({}),renderers:v4Mini.z.object({}),statusSets:v4Mini.z.array(v4Mini.z.object())}),tokensSrc:v4Mini.z.object({}),filesState:v4Mini.z.object({files:v4Mini.z.object({})}),db:v4Mini.z.object({blocks:v4Mini.z.object({byId:v4Mini.z.object({}),settings:v4Mini.z.object({})}),demos:v4Mini.z.object({byId:v4Mini.z.object({}),settings:v4Mini.z.object({})}),tabs:v4Mini.z.optional(v4Mini.z.object({byId:v4Mini.z.object({}),settings:v4Mini.z.object({})})),blockCollections:v4Mini.z.optional(v4Mini.z.object({byId:v4Mini.z.object({}),settings:v4Mini.z.object({})})),templatesConfig:v4Mini.z.optional(v4Mini.z.object({})),settings:v4Mini.z.object({title:v4Mini.z.optional(v4Mini.z.string()),hideTitleInNavigation:v4Mini.z.optional(v4Mini.z.boolean()),logoUrl:v4Mini.z.optional(v4Mini.z.string())})})}),ir=v4Mini.z.custom().check(e=>{let{error:r}=Kt.safeParse(e.value);r&&e.issues.push(...r.issues);});function Ut(e){return utils.isObject(e)?["assetSetsState","customPagesState","navsState","patternsState","tokensSrc","metaState","db"].every(a=>utils.isObjKey(a,e)):false}n(Ut,"isKsAppClientDataAndMeta");var sr=t.define("KsAppClientDataAndMeta",Ut),Ft=t.type({isLocalDev:t.boolean(),plugins:t.array(t.type({id:t.string(),hasContent:t.boolean(),clientPluginPath:t.optional(t.string()),cssPath:t.optional(t.string())})),meta:t.optional(t.type({version:t.optional(t.string()),hasKnapsackCloud:t.boolean(),knapsackCloudSiteId:t.optional(t.string()),serverPort:t.optional(t.number()),websocketsPort:t.optional(t.number()),https:t.optional(t.boolean()),cacheDir:t.optional(t.string()),ksVersions:t.type({app:t.string()})}))}),pr=Ft.is;function jt(e){return !utils.isObject(e)||!["assetSetsState","customPagesState","navsState","patternsState","settingsState","tokensState"].every(a=>utils.isObjKey(a,e))?false:!utils.isObjKey("metaState",e)}n(jt,"isKsAppClientDataNoMetaV3");var Pr=t.define("KsAppClientDataNoMeta",jt);function zt(e){return utils.isObject(e)?["assetSetsState","customPagesState","navsState","patternsState","settingsState","tokensState","metaState"].every(a=>utils.isObjKey(a,e)):false}n(zt,"isKsAppClientDataAndMetaV3");var Vr=t.define("KsAppClientDataAndMeta",zt),Wt=t.type({isLocalDev:t.boolean(),plugins:t.array(t.type({id:t.string(),hasContent:t.boolean(),clientPluginPath:t.optional(t.string()),cssPath:t.optional(t.string())})),meta:t.optional(t.type({version:t.optional(t.string()),hasKnapsackCloud:t.boolean(),knapsackCloudSiteId:t.optional(t.string()),serverPort:t.optional(t.number()),websocketsPort:t.optional(t.number()),https:t.optional(t.boolean()),cacheDir:t.optional(t.string()),ksVersions:t.type({app:t.string()})}))}),Rr=Wt.is;var Ve={version:"4.1.7",checkIfNeeded:n(e=>true,"checkIfNeeded"),migrate:n(e=>{if(!immer.isDraft(e))throw new Error("Tried to run migrations on appClientData but it is not an Immer Draft");Object.values(e.patternsState.patterns).forEach(r=>{delete r.demoSize;}),Object.values(e.db.demos.byId).forEach(r=>{r.type==="data"&&(Object.entries(r.data.slots??{}).forEach(([a,u])=>{r.data.slots[a]=u.map(f=>typeof f=="string"?{type:"text",text:f}:(f.type==="template-reference"||f.type==="text"||(f.type="template-demo"),f));}),!(r.patternId&&r.templateId)&&(()=>{for(let{id:a,templates:u=[]}of Object.values(e.patternsState.patterns))for(let{id:f,demoIds:T=[]}of u)if(T.includes(r.id)){r.patternId=a,r.templateId=f;return}})());});},"migrate")};var Ar=[Ve];var _t={ROOT:"ROOT",DESIGN:"Design",DEVELOP:"Develop",DOCUMENT:"Documentation",PROTOTYPE:"Prototype",SETTINGS:"Settings"},Ur=Object.values(_t);var Gt=(k=>(k.string="string",k.boolean="boolean",k.number="number",k.object="object",k.options="options",k.function="function",k.customTypeScript="customTypeScript",k.array="array",k.arrayOfObjects="arrayOfObjects",k.arrayOfStrings="arrayOfStrings",k.arrayOfNumbers="arrayOfNumbers",k.unknown="unknown",k))(Gt||{}),Mr=n(e=>"type"in e&&e.type==="string"&&!("enum"in e),"isStringProp"),jr=n(e=>"type"in e&&e.type==="number","isNumberProp"),zr=n(e=>"type"in e&&e.type==="boolean","isBooleanProp"),Wr=n(e=>"enum"in e,"isOptionsProp"),Lr=n(e=>"typeof"in e&&e?.typeof==="function","isFunctionProp"),_r=n(e=>!("typeof"in e)&&"tsType"in e,"isCustomTypeScriptProp"),Gr=n(e=>"type"in e&&e.type==="array"&&"items"in e&&e.items.type==="object","isArrayOfObjectsProp"),$r=n(e=>"type"in e&&e.type==="object"&&"properties"in e&&Object.keys(e.properties).length>0,"isObjectProp"),Yr=n(e=>"type"in e&&e.type==="array"&&"items"in e&&e.items.type==="string","isArrayOfStringsProp"),Hr=n(e=>"type"in e&&e.type==="array"&&"items"in e&&e.items.type==="number","isArrayOfNumbersProp");var Re=t__namespace.object({op:t__namespace.union([t__namespace.literal("replace"),t__namespace.literal("remove"),t__namespace.literal("add")]),path:t__namespace.array(t__namespace.union([t__namespace.string(),t__namespace.number()])),value:t__namespace.optional(t__namespace.any())}),$t=Re,Xr=n(e=>$t.is(e),"isPatch"),ce=t__namespace.array(Re),Yt=ce,Zr=n(e=>Yt.is(e),"isPatches"),Ee=t__namespace.type({patches:ce,inversePatches:t__namespace.optional(ce),event:t__namespace.optional(t__namespace.object({type:t__namespace.string()})),id:t__namespace.string(),date:t__namespace.string(),userId:t__namespace.optional(t__namespace.string())}),Ht=Ee,Qr=n(e=>Ht.is(e),"isKsRemoteChange"),Jt=t__namespace.array(Ee),qt=Jt,ea=n(e=>qt.is(e),"isKsRemoteChanges");var ra={react:"react",vue:"vue","web-components":"web-components",twig:"twig",hbs:"hbs",angular:"angular",html:"html"},aa=zod.z.strictObject({path:zod.z.string().describe("Can contain glob patterns, relative paths, absolute paths, package paths, or package sub-paths"),filter:zod.z.custom(e=>typeof e=="function").optional().describe("A function that takes a path and returns a boolean")});function ia(e){return "codeSrcPath"in e}n(ia,"isTemplateInfoWithCodeSrcPath");function Xt(e){switch(e.rendererId){case "angular":case "react":return `${e.rendererId}---${e.codeSrcPath}---${e.exportName||"default"}`;case "web-components":return `${e.rendererId}---${e.elementName}`;case "twig":return `${e.rendererId}---${e.namespacePath}`;case "vue":case "hbs":case "html":return `${e.rendererId}---${e.codeSrcPath}`;default:{throw new Error(`Invalid template info: ${JSON.stringify(e)}`)}}}n(Xt,"createTemplateInfoId");function sa(e){return {...e,id:Xt(e)}}n(sa,"addIdToTemplateInfo");function pa({rendererId:e,alias:r,path:a}){return (()=>{switch(e){case "react":case "angular":return {rendererId:e,codeSrcPath:a,exportName:r||"default"};case "vue":case "hbs":case "html":return {rendererId:e,codeSrcPath:a};case "twig":return {rendererId:e,namespacePath:r};case "web-components":return {rendererId:e,elementName:r};default:{throw new Error(`Invalid renderer ID: ${e}`)}}})()}n(pa,"normalizeTemplateInfo");function la(e){switch(e.rendererId){case "react":case "angular":return {path:e.codeSrcPath,alias:e.exportName};case "hbs":case "html":case "vue":return {path:e.codeSrcPath};case "twig":return {alias:e.namespacePath};case "web-components":return {alias:e.elementName};default:{throw new Error(`Invalid template info: ${JSON.stringify(e)}`)}}}n(la,"convertTemplateInfoToOldWay");var Zt=(r=>(r.ready="ready",r))(Zt||{}),ua="ks-meta";var fa={PATTERN_TEMPLATE_CHANGED:"PATTERN_TEMPLATE_CHANGED",PATTERN_ASSET_CHANGED:"PATTERN_ASSET_CHANGED",DESIGN_TOKENS_CHANGED:"DESIGN_TOKENS_CHANGED",RENDERER_CLIENT_RELOAD:"RENDERER_CLIENT_RELOAD",APP_CLIENT_DATA_CHANGED:"APP_CLIENT_DATA_CHANGED"};var Qt=(T=>(T.GitHub="GitHub",T.GitLab="GitLab",T.GitLabRest="GitLabRest",T.Bitbucket="Bitbucket",T.Azure="Azure",T))(Qt||{}),en=(u=>(u.Conflicting="CONFLICTING",u.Mergeable="MERGEABLE",u.Unknown="UNKNOWN",u))(en||{}),tn=(f=>(f.Create="CREATE",f.Move="MOVE",f.Update="UPDATE",f.Chmod="CHMOD",f))(tn||{}),nn=(a=>(a.Base64="BASE64",a.Text="TEXT",a))(nn||{});var on={ADMIN:{id:"ADMIN",title:"Admin",hierarchy:4,permissions:{canManageUsers:true,canDelete:true,canEdit:true,canPublish:true,canView:true},sectionAccess:{ROOT:{canEdit:false,canView:true},DOCUMENT:{canEdit:true,canView:true},DESIGN:{canEdit:true,canView:true},DEVELOP:{canEdit:true,canView:true},PROTOTYPE:{canEdit:true,canView:true},SETTINGS:{canEdit:true,canView:true}}},CONTRIBUTOR:{id:"CONTRIBUTOR",title:"Contributor",hierarchy:3,permissions:{canManageUsers:false,canDelete:false,canEdit:true,canPublish:false,canView:true},sectionAccess:{ROOT:{canEdit:false,canView:true},DOCUMENT:{canEdit:true,canView:true},DESIGN:{canEdit:true,canView:true},DEVELOP:{canEdit:true,canView:true},PROTOTYPE:{canEdit:true,canView:true},SETTINGS:{canEdit:true,canView:true}}},CONSUMER:{id:"CONSUMER",title:"Consumer",hierarchy:2,permissions:{canManageUsers:false,canDelete:false,canEdit:true,canPublish:false,canView:true},sectionAccess:{ROOT:{canEdit:false,canView:true},DOCUMENT:{canEdit:false,canView:true},DESIGN:{canEdit:false,canView:false},DEVELOP:{canEdit:false,canView:false},PROTOTYPE:{canEdit:true,canView:true},SETTINGS:{canEdit:false,canView:false}}},VIEWER:{id:"VIEWER",title:"Viewer",hierarchy:1,permissions:{canManageUsers:false,canDelete:false,canEdit:false,canPublish:false,canView:true},sectionAccess:{ROOT:{canEdit:false,canView:true},DOCUMENT:{canEdit:false,canView:true},DESIGN:{canEdit:false,canView:false},DEVELOP:{canEdit:false,canView:false},PROTOTYPE:{canEdit:false,canView:false},SETTINGS:{canEdit:false,canView:false}}},ANONYMOUS:{id:"ANONYMOUS",title:"Anonymous",hierarchy:0,permissions:{canManageUsers:false,canDelete:false,canEdit:false,canPublish:false,canView:true},sectionAccess:{ROOT:{canEdit:false,canView:true},DOCUMENT:{canEdit:false,canView:true},DESIGN:{canEdit:false,canView:false},DEVELOP:{canEdit:false,canView:false},PROTOTYPE:{canEdit:false,canView:false},SETTINGS:{canEdit:false,canView:false}}},EDITOR:{id:"EDITOR",title:"Editor",hierarchy:0,permissions:{canManageUsers:false,canDelete:false,canEdit:false,canPublish:false,canView:false},sectionAccess:{ROOT:{canEdit:false,canView:false},DOCUMENT:{canEdit:false,canView:false},DESIGN:{canEdit:false,canView:false},DEVELOP:{canEdit:false,canView:false},PROTOTYPE:{canEdit:false,canView:false},SETTINGS:{canEdit:false,canView:false}}},MANAGER:{id:"MANAGER",title:"Manager",hierarchy:0,permissions:{canManageUsers:false,canDelete:false,canEdit:false,canPublish:false,canView:false},sectionAccess:{ROOT:{canEdit:false,canView:false},DOCUMENT:{canEdit:false,canView:false},DESIGN:{canEdit:false,canView:false},DEVELOP:{canEdit:false,canView:false},PROTOTYPE:{canEdit:false,canView:false},SETTINGS:{canEdit:false,canView:false}}}},Ta=Object.values(on);function ba({path:e,queryParams:r,origin:a}){return urls.createUrlWithParams({url:e,queryParams:r,origin:a})}n(ba,"createUrlForRoute");function an(e){return Object.fromEntries(e.entries())}n(an,"getParams");function Ca(e){return an(e)}n(Ca,"getParamsForRoute");Object.defineProperty(exports,"isObjKey",{enumerable:true,get:function(){return utils.isObjKey}});Object.defineProperty(exports,"isObject",{enumerable:true,get:function(){return utils.isObject}});exports.BlockSizes=Qn;exports.BlockSpacings=eo;exports.CodeSrcUserConfigSchema=aa;exports.ColorConfigStruct=l;exports.ColorStringStruct=F;exports.ColorTokenConfigStruct=dn;exports.FontFaceConfigStruct=w;exports.FontFaceFormatsEnumStruct=je;exports.FontFaceSourceFormats=Me;exports.FontFaceSourceStruct=ze;exports.FontFaceWeightStruct=me;exports.FontSizeConfigStruct=_e;exports.FontSizeConfigValStruct=fe;exports.FontStretches=Le;exports.GitProviderType=Qt;exports.HeadingLevels=kn;exports.KsAppClientDataAndMetaStruct=sr;exports.KsAppClientDataAndMetaStructV3=Vr;exports.KsAppClientDataNoMetaStruct=ar;exports.KsAppClientDataNoMetaStructV3=Pr;exports.KsAppClientDataNoMetaZod=ir;exports.KsMetaStateStruct=Ft;exports.KsMetaStateStructV3=Wt;exports.KsRemoteChangesStruct=qt;exports.KsRendererClientEvents=Zt;exports.MergeableState=en;exports.NavCustomizationConfigStruct=R;exports.PageHeaderSizes=xe;exports.PrimaryNavCustomizationConfigStruct=W;exports.PropTypeNames=Gt;exports.RestActions=tn;exports.SecondaryNavCustomizationConfigStruct=L;exports.TextEncoding=nn;exports.TextTransforms=We;exports.TokenReferenceStruct=c;exports.TokenValueColorStruct=A;exports.TokenValueCubicBezierStruct=G;exports.TokenValueDimensionStruct=h;exports.TokenValueDurationStruct=E;exports.TokenValueFontWeightStruct=se;exports.TokenValueStrokeStyleStruct=K;exports.TypographyConfigStruct=s;exports.TypographyLinkConfigStruct=O;exports.UiConfigStruct=Jn;exports.UiConfigV10Struct=He;exports.UiConfigV1Struct=jn;exports.UiConfigV2Struct=zn;exports.UiConfigV3Struct=Wn;exports.UiConfigV4Struct=Ln;exports.UiConfigV5Struct=_n;exports.UiConfigV6Struct=Gn;exports.UiConfigV7Struct=$n;exports.UiConfigV8Struct=Yn;exports.UiConfigV9Struct=Hn;exports.WS_EVENTS=fa;exports.addIdToTemplateInfo=sa;exports.appSections=Ur;exports.appSectionsById=_t;exports.assertTokenData=bo;exports.convertTemplateInfoToOldWay=la;exports.createTemplateInfoId=Xt;exports.createUrlForRoute=ba;exports.customizableNavElements=Rn;exports.emptyAppClientData=rr;exports.getParams=an;exports.getParamsForRoute=Ca;exports.getPrimitiveValue=jo;exports.hasTokenReferences=x;exports.isArrayOfNumbersProp=Hr;exports.isArrayOfObjectsProp=Gr;exports.isArrayOfStringsProp=Yr;exports.isBooleanProp=zr;exports.isCustomTypeScriptProp=_r;exports.isDataDemo=$o;exports.isDemoWithData=Go;exports.isDimensionString=zo;exports.isFunctionProp=Lr;exports.isKsAppClientDataAndMeta=Ut;exports.isKsAppClientDataAndMetaV3=zt;exports.isKsAppClientDataNoMeta=At;exports.isKsAppClientDataNoMetaV3=jt;exports.isKsMetaState=pr;exports.isKsMetaStateV3=Rr;exports.isKsRemoteChange=Qr;exports.isKsRemoteChanges=ea;exports.isNotTokenReference=qe;exports.isNumberProp=jr;exports.isObjectProp=$r;exports.isOptionsProp=Wr;exports.isPatch=Xr;exports.isPatches=Zr;exports.isSpecNotInferred=Ho;exports.isStringProp=Mr;exports.isTemplateDemo=Yo;exports.isTemplateInfoWithCodeSrcPath=ia;exports.isTokenDataComposite=To;exports.isTokenGroup=wt;exports.isTokenReference=Je;exports.isTokenSrc=Ao;exports.isTokenSrcExtensions=Nt;exports.isTokenSrcValueInfoComposite=vo;exports.isTokenSrcValueInfoSingular=Eo;exports.isTokenTypeComposite=J;exports.isTokenTypeSingular=ke;exports.isTokenTypeVarRef=Ko;exports.isTokenValueBorder=yt;exports.isTokenValueColor=nt;exports.isTokenValueDimension=q;exports.isTokenValueDuration=ko;exports.isTokenValueFontWeight=So;exports.isTokenValueShadow=gt;exports.isTokenValueTransition=St;exports.ksRendererClientMetaId=ua;exports.migrations=Ar;exports.normalizeTemplateInfo=pa;exports.pageElements=Sn;exports.pageElementsV2=bn;exports.parseTokenDimensionValue=Wo;exports.patternTabTypes=Xo;exports.rendererIds=ra;exports.roles=Ta;exports.rolesById=on;exports.strokeStyleValues=ro;exports.tokenNameDisplayFormats=no;exports.tokenTypeComposites=Ze;exports.tokenTypeSingulars=et;//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|