@knapsack/types 4.69.9--canary.32dcae2.0 → 4.69.10--canary.4739.305bd52.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +18 -0
- package/dist/acd-test-fixtures/index.js +2 -0
- package/dist/acd-test-fixtures/index.js.map +1 -1
- package/dist/acd-test-fixtures/index.mjs +2 -0
- package/dist/acd-test-fixtures/index.mjs.map +1 -1
- package/dist/acd-test-fixtures/ks-sandbox.d.ts.map +1 -1
- package/dist/design-src.types.d.ts +1 -1
- package/dist/design-src.types.d.ts.map +1 -1
- package/dist/index.js +3 -77
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -73
- package/dist/index.mjs.map +1 -1
- package/dist/renderer-client-types.d.ts +9 -0
- package/dist/renderer-client-types.d.ts.map +1 -1
- package/dist/renderers.d.ts +0 -105
- package/dist/renderers.d.ts.map +1 -1
- package/package.json +6 -6
@@ -19,6 +19,15 @@ export type KsRendererClientMsg = {
|
|
19
19
|
msg: string;
|
20
20
|
feedbackType?: FeedbackTypes;
|
21
21
|
};
|
22
|
+
/**
|
23
|
+
* The meta data is stored in a script tag with this id
|
24
|
+
* @see {KsRendererClientMeta}
|
25
|
+
*/
|
26
|
+
export declare const ksRendererClientMetaId = "ks-meta";
|
27
|
+
/**
|
28
|
+
* Metadata about the current renderer client demo
|
29
|
+
* @see {ksRendererClientMetaId} for the ID of the script tag
|
30
|
+
*/
|
22
31
|
export interface KsRendererClientMeta {
|
23
32
|
patternId: string;
|
24
33
|
templateId: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"renderer-client-types.d.ts","sourceRoot":"","sources":["../src/renderer-client-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE5C,oBAAY,sBAAsB;IAChC,KAAK,UAAU;CAChB;AAED;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAC3B;IACE;;OAEG;IACH,IAAI,EAAE,iCAAiC,CAAC;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,GACD;IACE,IAAI,EAAE,4BAA4B,CAAC;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEN,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;CACxB"}
|
1
|
+
{"version":3,"file":"renderer-client-types.d.ts","sourceRoot":"","sources":["../src/renderer-client-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE5C,oBAAY,sBAAsB;IAChC,KAAK,UAAU;CAChB;AAED;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAC3B;IACE;;OAEG;IACH,IAAI,EAAE,iCAAiC,CAAC;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,GACD;IACE,IAAI,EAAE,4BAA4B,CAAC;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEN;;;GAGG;AACH,eAAO,MAAM,sBAAsB,YAAY,CAAC;AAEhD;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;CACxB"}
|
package/dist/renderers.d.ts
CHANGED
@@ -13,110 +13,6 @@ export declare const rendererIds: {
|
|
13
13
|
* @see {KnapsackPatternTemplate['templateLanguageId']}
|
14
14
|
*/
|
15
15
|
export type RendererId = keyof typeof rendererIds;
|
16
|
-
/**
|
17
|
-
* Information about JS imports that can describe how to import a module in these ways:
|
18
|
-
* - `import { Foo, Bar } from './foo';`
|
19
|
-
* - `import * as Foo from './foo';`
|
20
|
-
* - `import Foo from './foo';`
|
21
|
-
*
|
22
|
-
* Used in Webpack-based renderers
|
23
|
-
*/
|
24
|
-
export type KsJsImportInfo = {
|
25
|
-
type: 'default';
|
26
|
-
/** import name from 'path'; */
|
27
|
-
name: string;
|
28
|
-
path: string;
|
29
|
-
} | {
|
30
|
-
type: 'named';
|
31
|
-
path: string;
|
32
|
-
/** import { name } from 'path'; */
|
33
|
-
name: string;
|
34
|
-
} | {
|
35
|
-
type: 'all';
|
36
|
-
path: string;
|
37
|
-
/** import * as name from 'path'; */
|
38
|
-
name: string;
|
39
|
-
};
|
40
|
-
/** The result of `import`-ing a module */
|
41
|
-
type EsModuleObject<ExportedType = unknown> = {
|
42
|
-
default?: ExportedType;
|
43
|
-
[key: string]: ExportedType;
|
44
|
-
};
|
45
|
-
export type KsJsImport = {
|
46
|
-
type: 'pattern-template';
|
47
|
-
patternId: string;
|
48
|
-
templateId: string;
|
49
|
-
importInfo: KsJsImportInfo;
|
50
|
-
} | {
|
51
|
-
type: 'pattern-template-demo';
|
52
|
-
patternId: string;
|
53
|
-
templateId: string;
|
54
|
-
demoId: string;
|
55
|
-
importInfo: KsJsImportInfo;
|
56
|
-
} | {
|
57
|
-
type: 'extra';
|
58
|
-
importInfo: KsJsImportInfo;
|
59
|
-
};
|
60
|
-
type GetKsJsImportParam = {
|
61
|
-
type: 'pattern-template';
|
62
|
-
patternId: string;
|
63
|
-
templateId: string;
|
64
|
-
} | {
|
65
|
-
type: 'pattern-template-demo';
|
66
|
-
patternId: string;
|
67
|
-
templateId: string;
|
68
|
-
demoId: string;
|
69
|
-
} | {
|
70
|
-
type: 'extra';
|
71
|
-
name: string;
|
72
|
-
};
|
73
|
-
type GetKsJsImportPatternParam = {
|
74
|
-
patternId: string;
|
75
|
-
templateId: string;
|
76
|
-
demoId?: string;
|
77
|
-
};
|
78
|
-
/**
|
79
|
-
* This is `window.knapsack` inside the renderer client: the iframe container for renderer components
|
80
|
-
*/
|
81
|
-
export interface KsRendererClientGlobal<ExportedComponentType = unknown> {
|
82
|
-
typeName: 'KsRendererClientGlobal';
|
83
|
-
importedModules: {
|
84
|
-
[id: string]: () => Promise<EsModuleObject<ExportedComponentType>>;
|
85
|
-
};
|
86
|
-
allAvailableImports: KsJsImport[];
|
87
|
-
getImport: (opt: GetKsJsImportParam) => Promise<{
|
88
|
-
name: string;
|
89
|
-
/** Most likely a component */
|
90
|
-
value: ExportedComponentType;
|
91
|
-
}>;
|
92
|
-
getImports: (imports: GetKsJsImportParam[]) => Promise<{
|
93
|
-
[importName: string]: ExportedComponentType;
|
94
|
-
}>;
|
95
|
-
getPatternImport: (opt: GetKsJsImportPatternParam) => Promise<{
|
96
|
-
name: string;
|
97
|
-
/** Most likely a component */
|
98
|
-
value: ExportedComponentType;
|
99
|
-
}>;
|
100
|
-
getExtraImport: (opt: {
|
101
|
-
name: string;
|
102
|
-
}) => Promise<{
|
103
|
-
name: string;
|
104
|
-
/** Most likely a component */
|
105
|
-
value: ExportedComponentType;
|
106
|
-
}>;
|
107
|
-
getAllImports: (opt: {
|
108
|
-
patterns: GetKsJsImportPatternParam[];
|
109
|
-
extras?: {
|
110
|
-
name: string;
|
111
|
-
}[];
|
112
|
-
}) => Promise<{
|
113
|
-
[importName: string]: ExportedComponentType;
|
114
|
-
}>;
|
115
|
-
}
|
116
|
-
export declare function isKsJsImports(imports: unknown): imports is KsJsImport[];
|
117
|
-
export declare function isKsRendererClientGlobalImportedModules(mods: unknown): mods is KsRendererClientGlobal['importedModules'];
|
118
|
-
export declare function isKsRendererClientGlobal<ExportedComponentType = unknown>(knapsack: unknown): knapsack is KsRendererClientGlobal<ExportedComponentType>;
|
119
|
-
export declare function getKsRendererClientGlobal<ExportedComponentType = unknown>(): KsRendererClientGlobal<ExportedComponentType>;
|
120
16
|
/**
|
121
17
|
* Results of rendering a pattern
|
122
18
|
*/
|
@@ -150,5 +46,4 @@ export type TemplateSuggestionsGetFn = (opt: {
|
|
150
46
|
* ```
|
151
47
|
*/
|
152
48
|
export type PkgPathAliases = Record<string, string>;
|
153
|
-
export {};
|
154
49
|
//# sourceMappingURL=renderers.d.ts.map
|
package/dist/renderers.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"renderers.d.ts","sourceRoot":"","sources":["../src/renderers.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"renderers.d.ts","sourceRoot":"","sources":["../src/renderers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW;;;;;;;;CAQd,CAAC;AAEX;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,WAAW,CAAC;AAClD;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,eAAe,GAAG;IACjD,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AACF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,CAAC,GAAG,EAAE;IAC3C,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,KAAK,OAAO,CAAC;IACZ,WAAW,EAAE,kBAAkB,EAAE,CAAC;CACnC,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC"}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@knapsack/types",
|
3
3
|
"description": "",
|
4
|
-
"version": "4.69.
|
4
|
+
"version": "4.69.10--canary.4739.305bd52.0",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"module": "dist/index.mjs",
|
7
7
|
"types": "dist/index.d.ts",
|
@@ -38,15 +38,15 @@
|
|
38
38
|
"test": "ava"
|
39
39
|
},
|
40
40
|
"dependencies": {
|
41
|
-
"@knapsack/utils": "4.69.
|
41
|
+
"@knapsack/utils": "4.69.10--canary.4739.305bd52.0",
|
42
42
|
"color-string": "^1.9.1",
|
43
43
|
"immer": "^10.0.4",
|
44
44
|
"superstruct": "^0.16.7"
|
45
45
|
},
|
46
46
|
"devDependencies": {
|
47
|
-
"@knapsack/eslint-config-starter": "4.69.
|
48
|
-
"@knapsack/test-ava": "4.69.
|
49
|
-
"@knapsack/typescript-config-starter": "4.69.
|
47
|
+
"@knapsack/eslint-config-starter": "4.69.10--canary.4739.305bd52.0",
|
48
|
+
"@knapsack/test-ava": "4.69.10--canary.4739.305bd52.0",
|
49
|
+
"@knapsack/typescript-config-starter": "4.69.10--canary.4739.305bd52.0",
|
50
50
|
"@tiptap/core": "^2.6.6",
|
51
51
|
"@types/color-string": "^1.5.5",
|
52
52
|
"@types/fs-extra": "^11.0.4",
|
@@ -68,5 +68,5 @@
|
|
68
68
|
"directory": "libs/types",
|
69
69
|
"type": "git"
|
70
70
|
},
|
71
|
-
"gitHead": "
|
71
|
+
"gitHead": "305bd523394250784af1f90d46345a3d7d86c698"
|
72
72
|
}
|