@knapsack/types 4.69.11--canary.4739.aa827e9.0 → 4.69.11--canary.4820.6c04f2a.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,4 @@
1
+ import type { KnapsackPatternTemplate, TemplateDemo } from './app-client-data';
1
2
  export declare const rendererIds: {
2
3
  readonly react: "react";
3
4
  readonly vue: "vue";
@@ -33,6 +34,10 @@ export type TemplateSuggestion = {
33
34
  export type TemplateSuggestionsGetFn = (opt: {
34
35
  rendererId: RendererId;
35
36
  newPath?: string;
37
+ /**
38
+ * @todo change optional to required once App Client implements this
39
+ */
40
+ state?: ContentStateForRendering;
36
41
  }) => Promise<{
37
42
  suggestions: TemplateSuggestion[];
38
43
  }>;
@@ -46,4 +51,19 @@ export type TemplateSuggestionsGetFn = (opt: {
46
51
  * ```
47
52
  */
48
53
  export type PkgPathAliases = Record<string, string>;
54
+ export type ContentStateForRendering = {
55
+ /**
56
+ * Patterns by ID
57
+ */
58
+ patterns: {
59
+ [patternId: string]: {
60
+ id: string;
61
+ templates: Pick<KnapsackPatternTemplate, 'alias' | 'path' | 'templateLanguageId' | 'spec' | 'id' | 'title'>[];
62
+ templateDemos: Array<TemplateDemo & {
63
+ templateId: string;
64
+ templateLanguageId: RendererId;
65
+ }>;
66
+ };
67
+ };
68
+ };
49
69
  //# sourceMappingURL=renderers.d.ts.map
@@ -1 +1 @@
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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3C,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,wBAAwB,CAAC;CAClC,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;AAEpD,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,QAAQ,EAAE;QACR,CAAC,SAAS,EAAE,MAAM,GAAG;YACnB,EAAE,EAAE,MAAM,CAAC;YACX,SAAS,EAAE,IAAI,CACb,uBAAuB,EACvB,OAAO,GAAG,MAAM,GAAG,oBAAoB,GAAG,MAAM,GAAG,IAAI,GAAG,OAAO,CAClE,EAAE,CAAC;YACJ,aAAa,EAAE,KAAK,CAClB,YAAY,GAAG;gBACb,UAAU,EAAE,MAAM,CAAC;gBACnB,kBAAkB,EAAE,UAAU,CAAC;aAChC,CACF,CAAC;SACH,CAAC;KACH,CAAC;CACH,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@knapsack/types",
3
3
  "description": "",
4
- "version": "4.69.11--canary.4739.aa827e9.0",
4
+ "version": "4.69.11--canary.4820.6c04f2a.0",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",
@@ -38,19 +38,19 @@
38
38
  "test": "ava"
39
39
  },
40
40
  "dependencies": {
41
- "@knapsack/utils": "4.69.11--canary.4739.aa827e9.0",
41
+ "@knapsack/utils": "4.69.11--canary.4820.6c04f2a.0",
42
42
  "color-string": "^1.9.1",
43
- "immer": "^10.0.4",
43
+ "immer": "^10.1.1",
44
44
  "superstruct": "^0.16.7"
45
45
  },
46
46
  "devDependencies": {
47
- "@knapsack/eslint-config-starter": "4.69.11--canary.4739.aa827e9.0",
48
- "@knapsack/test-ava": "4.69.11--canary.4739.aa827e9.0",
49
- "@knapsack/typescript-config-starter": "4.69.11--canary.4739.aa827e9.0",
50
- "@tiptap/core": "^2.6.6",
47
+ "@knapsack/eslint-config-starter": "4.69.11--canary.4820.6c04f2a.0",
48
+ "@knapsack/test-ava": "4.69.11--canary.4820.6c04f2a.0",
49
+ "@knapsack/typescript-config-starter": "4.69.11--canary.4820.6c04f2a.0",
50
+ "@tiptap/core": "^2.7.1",
51
51
  "@types/color-string": "^1.5.5",
52
52
  "@types/fs-extra": "^11.0.4",
53
- "@types/react": "^18.3.5",
53
+ "@types/react": "^18.3.7",
54
54
  "ava": "^6.1.3",
55
55
  "eslint": "^8.57.0",
56
56
  "fs-extra": "^11.2.0",
@@ -68,5 +68,5 @@
68
68
  "directory": "libs/types",
69
69
  "type": "git"
70
70
  },
71
- "gitHead": "aa827e9559e08182e2db91290388673b95bcdf38"
71
+ "gitHead": "6c04f2a066b6dfde853781a65b2c6e43a3a29f2f"
72
72
  }