@knapsack/types 4.69.15--canary.4532.e420d28.0 → 4.69.15--canary.4771.9877e61.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;CA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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.15--canary.4532.e420d28.0",
4
+ "version": "4.69.15--canary.4771.9877e61.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.15--canary.4532.e420d28.0",
41
+ "@knapsack/utils": "4.69.15--canary.4771.9877e61.0",
42
42
  "color-string": "^1.9.1",
43
43
  "immer": "^10.1.1",
44
44
  "superstruct": "^0.16.7"
45
45
  },
46
46
  "devDependencies": {
47
- "@knapsack/eslint-config-starter": "4.69.15--canary.4532.e420d28.0",
48
- "@knapsack/test-ava": "4.69.15--canary.4532.e420d28.0",
49
- "@knapsack/typescript-config-starter": "4.69.15--canary.4532.e420d28.0",
47
+ "@knapsack/eslint-config-starter": "4.69.15--canary.4771.9877e61.0",
48
+ "@knapsack/test-ava": "4.69.15--canary.4771.9877e61.0",
49
+ "@knapsack/typescript-config-starter": "4.69.15--canary.4771.9877e61.0",
50
50
  "@tiptap/core": "^2.7.2",
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": "e420d28e48d4d0eaa23358de846b7c88008ad1c5"
71
+ "gitHead": "9877e612f2b63bc8dba31726acd0c019c1b57457"
72
72
  }