@knapsack/types 4.70.0--canary.3797.b249674.0 → 4.70.0--canary.4821.56b0218.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,7 @@ export type TemplateSuggestion = {
33
34
  export type TemplateSuggestionsGetFn = (opt: {
34
35
  rendererId: RendererId;
35
36
  newPath?: string;
37
+ state: ContentStateForRendering;
36
38
  }) => Promise<{
37
39
  suggestions: TemplateSuggestion[];
38
40
  }>;
@@ -46,4 +48,19 @@ export type TemplateSuggestionsGetFn = (opt: {
46
48
  * ```
47
49
  */
48
50
  export type PkgPathAliases = Record<string, string>;
51
+ export type ContentStateForRendering = {
52
+ /**
53
+ * Patterns by ID
54
+ */
55
+ patterns: {
56
+ [patternId: string]: {
57
+ id: string;
58
+ templates: Pick<KnapsackPatternTemplate, 'alias' | 'path' | 'templateLanguageId' | 'spec' | 'id' | 'title'>[];
59
+ templateDemos: Array<TemplateDemo & {
60
+ templateId: string;
61
+ templateLanguageId: RendererId;
62
+ }>;
63
+ };
64
+ };
65
+ };
49
66
  //# 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;CAClB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,e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AAE,MAAM,CAAC;IACjB,KAAK,EAAE,wBAAwB,CAAC;CACjC,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.70.0--canary.3797.b249674.0",
4
+ "version": "4.70.0--canary.4821.56b0218.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.70.0--canary.3797.b249674.0",
41
+ "@knapsack/utils": "4.70.0--canary.4821.56b0218.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.70.0--canary.3797.b249674.0",
48
- "@knapsack/test-ava": "4.70.0--canary.3797.b249674.0",
49
- "@knapsack/typescript-config-starter": "4.70.0--canary.3797.b249674.0",
47
+ "@knapsack/eslint-config-starter": "4.70.0--canary.4821.56b0218.0",
48
+ "@knapsack/test-ava": "4.70.0--canary.4821.56b0218.0",
49
+ "@knapsack/typescript-config-starter": "4.70.0--canary.4821.56b0218.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": "b249674c50182c969f973424bdeae9bc2ba4f49b"
71
+ "gitHead": "56b02187ee87f98fefa3254d2a725a06fc1f13f8"
72
72
  }