@knapsack/renderer-webpack-base 4.70.0--canary.4433.133de0f.0 → 4.70.0--canary.4513.12c8d13.0

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,145 @@
1
+ # v4.69.13 (Thu Sep 26 2024)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - update design src user flow to be async [#4739](https://github.com/knapsack-labs/app-monorepo/pull/4739) ([@mabry1985](https://github.com/mabry1985))
6
+ - Merge branch 'latest' into feature/ksp-5512-create-add-design-src-file-async-mutation ([@mabry1985](https://github.com/mabry1985))
7
+
8
+ #### 🏠 Internal
9
+
10
+ - improve Renderer clients [#4770](https://github.com/knapsack-labs/app-monorepo/pull/4770) ([@EvanLovely](https://github.com/EvanLovely))
11
+ - refactors user flow for updating design src files [#4769](https://github.com/knapsack-labs/app-monorepo/pull/4769) ([@mabry1985](https://github.com/mabry1985))
12
+
13
+ #### Authors: 2
14
+
15
+ - Evan Lovely ([@EvanLovely](https://github.com/EvanLovely))
16
+ - Josh Mabry ([@mabry1985](https://github.com/mabry1985))
17
+
18
+ ---
19
+
20
+ # v4.69.12 (Thu Sep 26 2024)
21
+
22
+ #### 🐛 Bug Fix
23
+
24
+ - Merge branch 'latest' into feature/ksp-5560-replace-schema-forms-in-content-blocks ([@GormanDesign](https://github.com/GormanDesign))
25
+
26
+ #### 🏠 Internal
27
+
28
+ - Remove unused types [#4819](https://github.com/knapsack-labs/app-monorepo/pull/4819) ([@greylabel](https://github.com/greylabel))
29
+ - chore(deps): update dependency @types/node to ^20.16.6 [#4846](https://github.com/knapsack-labs/app-monorepo/pull/4846) ([@renovate[bot]](https://github.com/renovate[bot]))
30
+
31
+ #### Authors: 3
32
+
33
+ - [@renovate[bot]](https://github.com/renovate[bot])
34
+ - Grant Gaudet ([@greylabel](https://github.com/greylabel))
35
+ - Matt Gorman ([@GormanDesign](https://github.com/GormanDesign))
36
+
37
+ ---
38
+
39
+ # v4.69.11 (Fri Sep 20 2024)
40
+
41
+ #### 🏠 Internal
42
+
43
+ - adds select all option to exclude patterns filters [#4803](https://github.com/knapsack-labs/app-monorepo/pull/4803) ([@GormanDesign](https://github.com/GormanDesign))
44
+ - chore(deps): update dependency @types/estree to ^1.0.6 [#4795](https://github.com/knapsack-labs/app-monorepo/pull/4795) ([@renovate[bot]](https://github.com/renovate[bot]))
45
+
46
+ #### Authors: 2
47
+
48
+ - [@renovate[bot]](https://github.com/renovate[bot])
49
+ - Matt Gorman ([@GormanDesign](https://github.com/GormanDesign))
50
+
51
+ ---
52
+
53
+ # v4.69.10 (Wed Sep 18 2024)
54
+
55
+ #### 🐛 Bug Fix
56
+
57
+ - Merge branch 'latest' into docs/cloud-authoring-docs ([@rockymountainhigh1943](https://github.com/rockymountainhigh1943))
58
+
59
+ #### 🏠 Internal
60
+
61
+ - chore(deps): update dependency babel-loader to ^9.2.1 [#4775](https://github.com/knapsack-labs/app-monorepo/pull/4775) ([@renovate[bot]](https://github.com/renovate[bot]))
62
+
63
+ #### Authors: 2
64
+
65
+ - [@renovate[bot]](https://github.com/renovate[bot])
66
+ - Jake Love ([@rockymountainhigh1943](https://github.com/rockymountainhigh1943))
67
+
68
+ ---
69
+
70
+ # v4.69.9 (Sat Sep 14 2024)
71
+
72
+ #### 🐛 Bug Fix
73
+
74
+ - refactor Renderer clients [#4768](https://github.com/knapsack-labs/app-monorepo/pull/4768) ([@EvanLovely](https://github.com/EvanLovely))
75
+
76
+ #### 🏠 Internal
77
+
78
+ - update template stage ui [#4763](https://github.com/knapsack-labs/app-monorepo/pull/4763) ([@GormanDesign](https://github.com/GormanDesign))
79
+ - add spacing under form feedback banner [#4747](https://github.com/knapsack-labs/app-monorepo/pull/4747) ([@GormanDesign](https://github.com/GormanDesign))
80
+
81
+ #### Authors: 2
82
+
83
+ - Evan Lovely ([@EvanLovely](https://github.com/EvanLovely))
84
+ - Matt Gorman ([@GormanDesign](https://github.com/GormanDesign))
85
+
86
+ ---
87
+
88
+ # v4.69.8 (Thu Sep 12 2024)
89
+
90
+ #### 🐛 Bug Fix
91
+
92
+ - refactor Renderers for cleaner types [#4746](https://github.com/knapsack-labs/app-monorepo/pull/4746) ([@EvanLovely](https://github.com/EvanLovely))
93
+
94
+ #### Authors: 1
95
+
96
+ - Evan Lovely ([@EvanLovely](https://github.com/EvanLovely))
97
+
98
+ ---
99
+
100
+ # v4.69.7 (Wed Sep 11 2024)
101
+
102
+ #### 🐛 Bug Fix
103
+
104
+ - Merge branch 'latest' into feature/ksp-5497-setup-status-id-in-client ([@mabry1985](https://github.com/mabry1985))
105
+
106
+ #### 🏠 Internal
107
+
108
+ - fixes schema form select appearance [#4700](https://github.com/knapsack-labs/app-monorepo/pull/4700) ([@GormanDesign](https://github.com/GormanDesign))
109
+ - add scroll indicator to popover [#4697](https://github.com/knapsack-labs/app-monorepo/pull/4697) ([@GormanDesign](https://github.com/GormanDesign))
110
+
111
+ #### Authors: 2
112
+
113
+ - Josh Mabry ([@mabry1985](https://github.com/mabry1985))
114
+ - Matt Gorman ([@GormanDesign](https://github.com/GormanDesign))
115
+
116
+ ---
117
+
118
+ # v4.69.6 (Fri Sep 06 2024)
119
+
120
+ #### 🐛 Bug Fix
121
+
122
+ - Merge branch 'latest' into feature/ksp-5458-anchor-links-not-jumping-to-the-right-spot ([@GormanDesign](https://github.com/GormanDesign))
123
+
124
+ #### 🏠 Internal
125
+
126
+ - Update dependency webpack-manifest-plugin to ^4.1.1 [#4695](https://github.com/knapsack-labs/app-monorepo/pull/4695) ([@renovate[bot]](https://github.com/renovate[bot]))
127
+ - Update dependency webpack to ^5.94.0 [#4681](https://github.com/knapsack-labs/app-monorepo/pull/4681) ([@renovate[bot]](https://github.com/renovate[bot]))
128
+ - Update dependency @types/node to ^20.16.5 [#4669](https://github.com/knapsack-labs/app-monorepo/pull/4669) ([@renovate[bot]](https://github.com/renovate[bot]))
129
+ - restores hash link handling [#4637](https://github.com/knapsack-labs/app-monorepo/pull/4637) ([@GormanDesign](https://github.com/GormanDesign))
130
+
131
+ #### 📝 Documentation
132
+
133
+ - Improve Clarity for Knapsack Installation and Local Development Setup - Brittany Smart [#4689](https://github.com/knapsack-labs/app-monorepo/pull/4689) ([@knapsack-cloud[bot]](https://github.com/knapsack-cloud[bot]))
134
+
135
+ #### Authors: 3
136
+
137
+ - [@knapsack-cloud[bot]](https://github.com/knapsack-cloud[bot])
138
+ - [@renovate[bot]](https://github.com/renovate[bot])
139
+ - Matt Gorman ([@GormanDesign](https://github.com/GormanDesign))
140
+
141
+ ---
142
+
1
143
  # v4.69.3 (Wed Sep 04 2024)
2
144
 
3
145
  #### 🏠 Internal
@@ -0,0 +1,3 @@
1
+ export * from './renderer-webpack-client.mjs';
2
+ export type { KsJsImport, KsJsImportInfo, RendererMetaBase } from '../types.js';
3
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/client/index.mts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './renderer-webpack-client.mjs';
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/client/index.mts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
@@ -1,2 +1,78 @@
1
+ import { KsRendererClientMeta } from '@knapsack/types';
2
+ import { RendererMetaBase } from '../types.js';
3
+ type ImportedModules<ExportedComponentType> = {
4
+ [id: string]: () => Promise<EsModuleObject<ExportedComponentType>>;
5
+ };
6
+ /** The result of `import`-ing a module */
7
+ type EsModuleObject<ExportedType = unknown> = {
8
+ default?: ExportedType;
9
+ [key: string]: ExportedType;
10
+ };
11
+ type GetKsJsImportParam = {
12
+ type: 'pattern-template';
13
+ patternId: string;
14
+ templateId: string;
15
+ } | {
16
+ type: 'pattern-template-demo';
17
+ patternId: string;
18
+ templateId: string;
19
+ demoId: string;
20
+ } | {
21
+ type: 'extra';
22
+ name: string;
23
+ };
24
+ type GetKsJsImportPatternParam = {
25
+ patternId: string;
26
+ templateId: string;
27
+ demoId?: string;
28
+ };
29
+ /**
30
+ * This is `window.knapsack` inside the renderer client: the iframe container for renderer components
31
+ */
32
+ export interface KsRendererClientGlobal<ExportedComponentType = unknown, RendererMetaType extends RendererMetaBase = RendererMetaBase, RendererMethods extends Record<string, unknown> = Record<string, unknown>> {
33
+ typeName: 'KsRendererClientGlobal';
34
+ importedModules: ImportedModules<ExportedComponentType>;
35
+ rendererMeta: RendererMetaType;
36
+ rendererMethods: RendererMethods;
37
+ meta: KsRendererClientMeta;
38
+ getImport: (opt: GetKsJsImportParam) => Promise<{
39
+ name: string;
40
+ /** Most likely a component */
41
+ value: ExportedComponentType;
42
+ }>;
43
+ getImports: (imports: GetKsJsImportParam[]) => Promise<{
44
+ [importName: string]: ExportedComponentType;
45
+ }>;
46
+ getPatternImport: (opt: GetKsJsImportPatternParam) => Promise<{
47
+ name: string;
48
+ /** Most likely a component */
49
+ value: ExportedComponentType;
50
+ }>;
51
+ getExtraImport: (opt: {
52
+ name: string;
53
+ }) => Promise<{
54
+ name: string;
55
+ /** Most likely a component */
56
+ value: ExportedComponentType;
57
+ }>;
58
+ getAllImports: (opt: {
59
+ patterns: GetKsJsImportPatternParam[];
60
+ extras?: {
61
+ name: string;
62
+ }[];
63
+ }) => Promise<{
64
+ [importName: string]: ExportedComponentType;
65
+ }>;
66
+ }
67
+ export declare function getKsRendererClientGlobal<ExportedComponentType, RendererMetaType extends RendererMetaBase,
68
+ /**
69
+ * Any extra properties or methods placed on the window.knapsack object by the renderer in a `<script>` tag
70
+ */
71
+ RendererMethods extends Record<string, unknown>>({ rendererMetaScriptTagId }: {
72
+ rendererMetaScriptTagId: string;
73
+ }): KsRendererClientGlobal<ExportedComponentType, RendererMetaType, RendererMethods>;
74
+ export declare function showUiToastMsg({ msg }: {
75
+ msg: string;
76
+ }): void;
1
77
  export {};
2
78
  //# sourceMappingURL=renderer-webpack-client.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderer-webpack-client.d.mts","sourceRoot":"","sources":["../../src/client/renderer-webpack-client.mts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"renderer-webpack-client.d.mts","sourceRoot":"","sources":["../../src/client/renderer-webpack-client.mts"],"names":[],"mappings":"AAAA,OAAO,EAEL,oBAAoB,EAGrB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAc,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAW3D,KAAK,eAAe,CAAC,qBAAqB,IAAI;IAC5C,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,OAAO,CAAC,cAAc,CAAC,qBAAqB,CAAC,CAAC,CAAC;CACpE,CAAC;AAEF,0CAA0C;AAC1C,KAAK,cAAc,CAAC,YAAY,GAAG,OAAO,IAAI;IAC5C,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAC;CAC7B,CAAC;AAEF,KAAK,kBAAkB,GACnB;IACE,IAAI,EAAE,kBAAkB,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,GACD;IACE,IAAI,EAAE,uBAAuB,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB,GACD;IACE,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEN,KAAK,yBAAyB,GAAG;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,sBAAsB,CACrC,qBAAqB,GAAG,OAAO,EAC/B,gBAAgB,SAAS,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EACrB,gBAAgB,SAAS,gBAAgB;AACzC;;GAEG;AACH,eAAe,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/C,EAAE,uBAAuB,EAAE,EAAE;IAAE,uBAAuB,EAAE,MAAM,CAAA;CAAE,GAyJ7C,sBAAsB,CACvC,qBAAqB,EACrB,gBAAgB,EAChB,eAAe,CAChB,CACF;AAED,wBAAgB,cAAc,CAAC,EAAE,GAAG,EAAE,EAAE;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,QAYtD"}
@@ -1,32 +1,9 @@
1
- import { isKsJsImports, isKsRendererClientGlobalImportedModules, isObject, } from '@knapsack/types';
2
- if (!isObject(window.knapsack)) {
3
- throw new Error(`Could not find "window.knapsack"`);
1
+ import { isObject, ksRendererClientMetaId, } from '@knapsack/types';
2
+ import { getJsonFromScriptTag } from './utils.mjs';
3
+ const isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';
4
+ if (!isBrowser) {
5
+ throw new Error('Cannot get KsRendererClientGlobal in a non-browser environment');
4
6
  }
5
- const { allAvailableImports, importedModules } = window
6
- .knapsack;
7
- if (!isKsJsImports(allAvailableImports)) {
8
- throw new Error(`The object "window.knapsack.allAvailableImports" is not a valid "KsJsImports"`);
9
- }
10
- if (!isKsRendererClientGlobalImportedModules(importedModules)) {
11
- throw new Error(`The object "window.knapsack.importedModules" is not a valid "KsRendererClientGlobalImportedModules"`);
12
- }
13
- const findImport = (opt) => {
14
- return allAvailableImports.find((imp) => {
15
- if (imp.type === 'pattern-template' && opt.type === 'pattern-template') {
16
- return (opt.patternId === imp.patternId && opt.templateId === imp.templateId);
17
- }
18
- if (imp.type === 'pattern-template-demo' &&
19
- opt.type === 'pattern-template-demo') {
20
- return (opt.patternId === imp.patternId &&
21
- opt.templateId === imp.templateId &&
22
- opt.demoId === imp.demoId);
23
- }
24
- if (imp.type === 'extra' && opt.type === 'extra') {
25
- return opt.name === imp.importInfo.name;
26
- }
27
- return false;
28
- });
29
- };
30
7
  const createErrorName = (opt) => {
31
8
  switch (opt.type) {
32
9
  case 'extra':
@@ -39,99 +16,139 @@ const createErrorName = (opt) => {
39
16
  return JSON.stringify(opt);
40
17
  }
41
18
  };
42
- // don't use `function` keyword as that hoists to top of file above our type assertions
43
- const getImport = async (opt) => {
44
- const theImport = findImport(opt);
45
- if (!theImport) {
46
- throw new Error(`No import found for ${createErrorName(opt)}`);
19
+ export function getKsRendererClientGlobal({ rendererMetaScriptTagId }) {
20
+ if (!isObject(window?.knapsack)) {
21
+ throw new Error(`Could not find "window.knapsack"`);
47
22
  }
48
- const { importInfo } = theImport;
49
- const getModule = importedModules[importInfo.path];
50
- if (!getModule) {
51
- throw new Error(`No "${importInfo.path}" module found for ${JSON.stringify(opt)}`);
23
+ const { importedModules, ...rendererMethods } = window.knapsack;
24
+ if (!isObject(importedModules)) {
25
+ throw new Error(`The object "window.knapsack.importedModules" is not a valid "KsRendererClientGlobalImportedModules"`);
52
26
  }
53
- const mod = await getModule();
54
- if (!mod) {
55
- throw new Error(`No module found for ${JSON.stringify(opt)}`);
56
- }
57
- switch (importInfo.type) {
58
- case 'all':
59
- return {
60
- value: mod,
61
- name: importInfo.name,
62
- };
63
- case 'default': {
64
- const item = mod.default;
65
- if (!item) {
66
- throw new Error(`No default export found for ${JSON.stringify(opt)}`);
27
+ const meta = getJsonFromScriptTag(ksRendererClientMetaId);
28
+ const rendererMeta = getJsonFromScriptTag(rendererMetaScriptTagId);
29
+ const findImport = (opt) => {
30
+ return rendererMeta.neededImports.find((imp) => {
31
+ if (imp.type === 'pattern-template' && opt.type === 'pattern-template') {
32
+ return (opt.patternId === imp.patternId && opt.templateId === imp.templateId);
33
+ }
34
+ if (imp.type === 'pattern-template-demo' &&
35
+ opt.type === 'pattern-template-demo') {
36
+ return (opt.patternId === imp.patternId &&
37
+ opt.templateId === imp.templateId &&
38
+ opt.demoId === imp.demoId);
39
+ }
40
+ if (imp.type === 'extra' && opt.type === 'extra') {
41
+ return opt.name === imp.importInfo.name;
67
42
  }
68
- return {
69
- value: item,
70
- name: importInfo.name,
71
- };
43
+ return false;
44
+ });
45
+ };
46
+ const getImport = async (opt) => {
47
+ const theImport = findImport(opt);
48
+ if (!theImport) {
49
+ throw new Error(`No import found for ${createErrorName(opt)}`);
50
+ }
51
+ const { importInfo } = theImport;
52
+ const getModule = importedModules[importInfo.path];
53
+ if (!getModule) {
54
+ throw new Error(`No "${importInfo.path}" module found for ${JSON.stringify(opt)}`);
55
+ }
56
+ const mod = await getModule();
57
+ if (!mod) {
58
+ throw new Error(`No module found for ${JSON.stringify(opt)}`);
72
59
  }
73
- case 'named': {
74
- const { name } = importInfo;
75
- const item = mod[name];
76
- if (!item) {
77
- throw new Error(`No named export, ${name}, found for ${JSON.stringify(opt)}`);
60
+ switch (importInfo.type) {
61
+ case 'all':
62
+ return {
63
+ value: mod,
64
+ name: importInfo.name,
65
+ };
66
+ case 'default': {
67
+ const item = mod.default;
68
+ if (!item) {
69
+ throw new Error(`No default export found for ${JSON.stringify(opt)}`);
70
+ }
71
+ return {
72
+ value: item,
73
+ name: importInfo.name,
74
+ };
75
+ }
76
+ case 'named': {
77
+ const { name } = importInfo;
78
+ const item = mod[name];
79
+ if (!item) {
80
+ throw new Error(`No named export, ${name}, found for ${JSON.stringify(opt)}`);
81
+ }
82
+ return {
83
+ value: item,
84
+ name,
85
+ };
86
+ }
87
+ default: {
88
+ throw new Error(`Unknown import type`);
78
89
  }
79
- return {
80
- value: item,
81
- name,
82
- };
83
90
  }
84
- default: {
85
- throw new Error(`Unknown import type`);
91
+ };
92
+ const getPatternImport = async ({ patternId, templateId, demoId, }) => {
93
+ if (demoId) {
94
+ return getImport({
95
+ type: 'pattern-template-demo',
96
+ patternId,
97
+ templateId,
98
+ demoId,
99
+ });
86
100
  }
87
- }
88
- };
89
- const getPatternImport = async ({ patternId, templateId, demoId, }) => {
90
- if (demoId) {
91
101
  return getImport({
92
- type: 'pattern-template-demo',
102
+ type: 'pattern-template',
93
103
  patternId,
94
104
  templateId,
95
- demoId,
96
105
  });
97
- }
98
- return getImport({
99
- type: 'pattern-template',
100
- patternId,
101
- templateId,
102
- });
103
- };
104
- const getExtraImport = async ({ name, }) => getImport({ type: 'extra', name });
105
- const knapsack = {
106
- typeName: 'KsRendererClientGlobal',
107
- allAvailableImports,
108
- importedModules,
109
- getImport,
110
- getPatternImport,
111
- getExtraImport,
112
- getAllImports: async ({ patterns, extras = [] }) => {
113
- const imported = await Promise.all([
114
- ...patterns.map(getPatternImport),
115
- ...extras.map(getExtraImport),
116
- ]);
117
- return imported.reduce((cur, { name, value }) => {
118
- if (cur[name]) {
119
- throw new Error(`Duplicate import name: ${name}`);
120
- }
121
- cur[name] = value;
122
- return cur;
123
- }, {});
124
- },
125
- getImports: async (importsToGet) => {
126
- const imported = await Promise.all(importsToGet.map(getImport));
127
- return imported.reduce((cur, { name, value }) => {
128
- if (cur[name]) {
129
- throw new Error(`Duplicate import name: ${name}`);
130
- }
131
- cur[name] = value;
132
- return cur;
133
- }, {});
134
- },
135
- };
136
- window.knapsack = knapsack;
106
+ };
107
+ const getExtraImport = async ({ name, }) => getImport({ type: 'extra', name });
108
+ const knapsack = {
109
+ typeName: 'KsRendererClientGlobal',
110
+ importedModules,
111
+ meta,
112
+ rendererMeta,
113
+ rendererMethods,
114
+ getImport,
115
+ getPatternImport,
116
+ getExtraImport,
117
+ getAllImports: async ({ patterns, extras = [] }) => {
118
+ const imported = await Promise.all([
119
+ ...patterns.map(getPatternImport),
120
+ ...extras.map(getExtraImport),
121
+ ]);
122
+ return imported.reduce((cur, { name, value }) => {
123
+ if (cur[name]) {
124
+ throw new Error(`Duplicate import name: ${name}`);
125
+ }
126
+ cur[name] = value;
127
+ return cur;
128
+ }, {});
129
+ },
130
+ getImports: async (importsToGet) => {
131
+ const imported = await Promise.all(importsToGet.map(getImport));
132
+ return imported.reduce((cur, { name, value }) => {
133
+ if (cur[name]) {
134
+ throw new Error(`Duplicate import name: ${name}`);
135
+ }
136
+ cur[name] = value;
137
+ return cur;
138
+ }, {});
139
+ },
140
+ };
141
+ return knapsack;
142
+ }
143
+ export function showUiToastMsg({ msg }) {
144
+ const hasParentWindow = window.parent !== window;
145
+ if (!hasParentWindow)
146
+ return;
147
+ window.parent.postMessage({
148
+ // search for this string in the UI to find where we receive the message and then send the toast
149
+ type: 'ksRendererClient.showToast',
150
+ msg,
151
+ feedbackType: 'info',
152
+ }, '*');
153
+ }
137
154
  //# sourceMappingURL=renderer-webpack-client.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderer-webpack-client.mjs","sourceRoot":"","sources":["../../src/client/renderer-webpack-client.mts"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EACb,uCAAuC,EACvC,QAAQ,GAET,MAAM,iBAAiB,CAAC;AAIzB,IAAI,CAAC,QAAQ,CAAE,MAAc,CAAC,QAAQ,CAAC,EAAE,CAAC;IACxC,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;AACtD,CAAC;AACD,MAAM,EAAE,mBAAmB,EAAE,eAAe,EAAE,GAAI,MAAc;KAC7D,QAGF,CAAC;AACF,IAAI,CAAC,aAAa,CAAC,mBAAmB,CAAC,EAAE,CAAC;IACxC,MAAM,IAAI,KAAK,CACb,+EAA+E,CAChF,CAAC;AACJ,CAAC;AACD,IAAI,CAAC,uCAAuC,CAAC,eAAe,CAAC,EAAE,CAAC;IAC9D,MAAM,IAAI,KAAK,CACb,qGAAqG,CACtG,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,GAAG,CAAC,GAAmB,EAAc,EAAE;IACrD,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;QACtC,IAAI,GAAG,CAAC,IAAI,KAAK,kBAAkB,IAAI,GAAG,CAAC,IAAI,KAAK,kBAAkB,EAAE,CAAC;YACvE,OAAO,CACL,GAAG,CAAC,SAAS,KAAK,GAAG,CAAC,SAAS,IAAI,GAAG,CAAC,UAAU,KAAK,GAAG,CAAC,UAAU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,CAAC;gBACpD,CAAC;gBACD,GAAG,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;gBAClB,OAAO,GAAG,CAAC;YACb,CAAC,EAAE,EAA6B,CAAC,CAAC;QACpC,CAAC;KACF,CAAC;IAEF,OAAO,QAIN,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,EAAE,GAAG,EAAmB;IACrD,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,KAAK,MAAM,CAAC;IACjD,IAAI,CAAC,eAAe;QAAE,OAAO;IAC7B,MAAM,CAAC,MAAM,CAAC,WAAW,CACvB;QACE,gGAAgG;QAChG,IAAI,EAAE,4BAA4B;QAClC,GAAG;QACH,YAAY,EAAE,MAAM;KACS,EAC/B,GAAG,CACJ,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function getJsonFromScriptTag<T>(id: string): T;
2
+ //# sourceMappingURL=utils.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.mts","sourceRoot":"","sources":["../../src/client/utils.mts"],"names":[],"mappings":"AAAA,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,GAAG,CAAC,CAUrD"}
@@ -0,0 +1,13 @@
1
+ export function getJsonFromScriptTag(id) {
2
+ const scriptTag = document.getElementById(id);
3
+ if (!scriptTag) {
4
+ throw new Error(`Script tag with id "${id}" not found`);
5
+ }
6
+ try {
7
+ return JSON.parse(scriptTag.innerText);
8
+ }
9
+ catch (e) {
10
+ throw new Error(`Error parsing JSON from script tag with id "${id}": ${e}`);
11
+ }
12
+ }
13
+ //# sourceMappingURL=utils.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.mjs","sourceRoot":"","sources":["../../src/client/utils.mts"],"names":[],"mappings":"AAAA,MAAM,UAAU,oBAAoB,CAAI,EAAU;IAChD,MAAM,SAAS,GAAG,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;IAC9C,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,uBAAuB,EAAE,aAAa,CAAC,CAAC;IAC1D,CAAC;IACD,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IACzC,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,+CAA+C,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;IAC9E,CAAC;AACH,CAAC"}
@@ -1,3 +1,2 @@
1
- import { KsJsImport } from '@knapsack/types';
2
- export declare function getEntryString(imports: KsJsImport[]): string;
1
+ export declare function getEntryString(importPaths: Set<string>): string;
3
2
  //# sourceMappingURL=create-js-import-entry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-js-import-entry.d.ts","sourceRoot":"","sources":["../src/create-js-import-entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,wBAAgB,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,MAAM,CAwB5D"}
1
+ {"version":3,"file":"create-js-import-entry.d.ts","sourceRoot":"","sources":["../src/create-js-import-entry.ts"],"names":[],"mappings":"AAAA,wBAAgB,cAAc,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,CAW/D"}
@@ -1,24 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getEntryString = getEntryString;
4
- function getEntryString(imports) {
5
- const importedModulePaths = [
6
- ...new Set(imports.map((i) => i.importInfo.path)),
7
- ];
4
+ function getEntryString(importPaths) {
8
5
  return `
9
- import type { KsRendererClientGlobal } from '@knapsack/types';
10
-
11
- const allAvailableImports: KsRendererClientGlobal['allAvailableImports'] = ${JSON.stringify(imports, null, ' ')};
12
-
13
- const importedModules: KsRendererClientGlobal['importedModules'] = {
14
- ${importedModulePaths
6
+ const importedModules = {
7
+ ${[...importPaths]
15
8
  .map((path) => `'${path}': () => import('${path}'),`)
16
9
  .join('\n')}
17
10
  };
18
11
 
19
- (window as any).knapsack = {};
20
- (window as any).knapsack.allAvailableImports = allAvailableImports;
21
- (window as any).knapsack.importedModules = importedModules;
12
+ window.knapsack = window.knapsack || {};
13
+ window.knapsack.importedModules = importedModules;
22
14
  `;
23
15
  }
24
16
  //# sourceMappingURL=create-js-import-entry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-js-import-entry.js","sourceRoot":"","sources":["../src/create-js-import-entry.ts"],"names":[],"mappings":";;AAEA,wCAwBC;AAxBD,SAAgB,cAAc,CAAC,OAAqB;IAClD,MAAM,mBAAmB,GAAG;QAC1B,GAAG,IAAI,GAAG,CAAS,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;KAC1D,CAAC;IAEF,OAAO;;;6EAGoE,IAAI,CAAC,SAAS,CACvF,OAAO,EACP,IAAI,EACJ,IAAI,CACL;;;IAGC,mBAAmB;SAClB,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,oBAAoB,IAAI,KAAK,CAAC;SACpD,IAAI,CAAC,IAAI,CAAC;;;;;;CAMd,CAAC;AACF,CAAC"}
1
+ {"version":3,"file":"create-js-import-entry.js","sourceRoot":"","sources":["../src/create-js-import-entry.ts"],"names":[],"mappings":";;AAAA,wCAWC;AAXD,SAAgB,cAAc,CAAC,WAAwB;IACrD,OAAO;;IAEL,CAAC,GAAG,WAAW,CAAC;SACf,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,oBAAoB,IAAI,KAAK,CAAC;SACpD,IAAI,CAAC,IAAI,CAAC;;;;;CAKd,CAAC;AACF,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './renderer-webpack-base';
2
+ export * from './types';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./renderer-webpack-base"), exports);
18
+ __exportStar(require("./types"), exports);
18
19
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,0CAAwB"}
@@ -1,16 +1,11 @@
1
- import { KsJsImport, RendererId } from '@knapsack/types';
2
- import { KnapsackRendererBase } from '@knapsack/app';
3
- import { KnapsackTemplateRendererBase, Patterns } from '@knapsack/app/types';
4
- import { basicWebpackBabelConfig } from '@knapsack/babel-config-starter';
1
+ import { RendererId } from '@knapsack/types';
2
+ import { RendererBase, type Renderable } from '@knapsack/app/renderers';
5
3
  import { Configuration as WebpackConfig } from 'webpack';
6
- export declare class KnapsackRendererWebpackBase extends KnapsackRendererBase implements KnapsackTemplateRendererBase {
4
+ import { KsJsImport } from './types';
5
+ export declare abstract class RendererWebpackBase extends RendererBase {
7
6
  #private;
8
7
  private webpack;
9
8
  private webpackConfig;
10
- publicPath: string;
11
- language: string;
12
- pkgPathAliases: KnapsackTemplateRendererBase['pkgPathAliases'];
13
- basicWebpackBabelConfig: typeof basicWebpackBabelConfig;
14
9
  private webpackCompiler;
15
10
  private extraScripts;
16
11
  private entryFilePath;
@@ -21,11 +16,8 @@ export declare class KnapsackRendererWebpackBase extends KnapsackRendererBase im
21
16
  webpackConfig?: WebpackConfig;
22
17
  extraScripts?: string[];
23
18
  });
24
- init(opt: {
25
- patterns: Patterns;
26
- cacheDir: string;
27
- }): Promise<void>;
28
- hydrate(opt: Parameters<KnapsackTemplateRendererBase['hydrate']>[0]): Promise<void>;
19
+ init(opt: Parameters<RendererBase['init']>[0]): Promise<void>;
20
+ hydrate(opt: Parameters<RendererBase['hydrate']>[0]): Promise<void>;
29
21
  /**
30
22
  * @see {getJsImport} for types "pattern-template" and "pattern-template-demo"
31
23
  * @see {getJsImportExtra} for type "extra"
@@ -71,8 +63,13 @@ export declare class KnapsackRendererWebpackBase extends KnapsackRendererBase im
71
63
  build(): Promise<void>;
72
64
  /** Starts a webpack watch, returns an object with a `.close()` method for shutting down */
73
65
  private startWebpackWatch;
74
- watch(_opt: Parameters<KnapsackTemplateRendererBase['watch']>[0]): Promise<void>;
66
+ watch(_opt: Parameters<RendererBase['watch']>[0]): Promise<void>;
75
67
  onChange(): void;
68
+ abstract getUsageAndImports(_opt: Parameters<Renderable['render']>[0]): Promise<{
69
+ usage: string;
70
+ imports: KsJsImport[];
71
+ }>;
72
+ getUsage: Renderable['getUsage'];
76
73
  makeKsJsImportsUnique({ imports }: {
77
74
  imports: KsJsImport[];
78
75
  }): {
@@ -92,4 +89,5 @@ export declare class KnapsackRendererWebpackBase extends KnapsackRendererBase im
92
89
  nameCollisions: string[];
93
90
  };
94
91
  }
92
+ export type Renderer = Renderable & RendererWebpackBase;
95
93
  //# sourceMappingURL=renderer-webpack-base.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderer-webpack-base.d.ts","sourceRoot":"","sources":["../src/renderer-webpack-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAuB,oBAAoB,E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B,cAAc,EAAE,MAAM,EAAE,CAAC;QACzB,wBAAwB;QACxB,YAAY,EAAE,MAAM,EAAE,CAAC;QACvB,oBAAoB,EAAE,OAAO,CAAC;KAC/B;IAiCD,uBAAuB,CAAC,EACtB,OAAO,EAAE,gBAAgB,GAC1B,EAAE;QACD,OAAO,EAAE,UAAU,EAAE,CAAC;KACvB,GAAG;QACF,IAAI,EAAE,MAAM,CAAC;QACb,wBAAwB;QACxB,YAAY,EAAE,MAAM,EAAE,CAAC;QACvB,oBAAoB,EAAE,OAAO,CAAC;QAC9B,cAAc,EAAE,MAAM,EAAE,CAAC;KAC1B;CAqEF;AAED,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,mBAAmB,CAAC"}
@@ -13,10 +13,11 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
13
13
  var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
15
  };
16
- var _KnapsackRendererWebpackBase_webpackAssetsPaths, _KnapsackRendererWebpackBase_webpackAssetsPathsFilePath, _KnapsackRendererWebpackBase_entryString;
16
+ var _RendererWebpackBase_webpackAssetsPaths, _RendererWebpackBase_webpackAssetsPathsFilePath, _RendererWebpackBase_entryString;
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.KnapsackRendererWebpackBase = void 0;
18
+ exports.RendererWebpackBase = void 0;
19
19
  const app_1 = require("@knapsack/app");
20
+ const renderers_1 = require("@knapsack/app/renderers");
20
21
  const file_utils_1 = require("@knapsack/file-utils");
21
22
  const utils_1 = require("@knapsack/utils");
22
23
  const babel_config_starter_1 = require("@knapsack/babel-config-starter");
@@ -24,8 +25,6 @@ const path_1 = require("path");
24
25
  const webpack_1 = __importDefault(require("webpack"));
25
26
  const webpack_manifest_plugin_1 = require("webpack-manifest-plugin");
26
27
  const create_js_import_entry_1 = require("./create-js-import-entry");
27
- const clientFile = (0, path_1.join)(__dirname, './client/renderer-webpack-client.mjs');
28
- (0, file_utils_1.assertFileExists)(clientFile);
29
28
  /**
30
29
  * Used in `webpackConfig.entry` as a key
31
30
  * Also used to get the assets generated from this entry
@@ -46,17 +45,21 @@ function normalizeAliases(aliases) {
46
45
  return [[name, alias]];
47
46
  }));
48
47
  }
49
- class KnapsackRendererWebpackBase extends app_1.KnapsackRendererBase {
48
+ class RendererWebpackBase extends renderers_1.RendererBase {
50
49
  constructor({ id, extension, language, webpackConfig = {}, extraScripts = [], }) {
51
50
  super({
52
51
  id,
53
52
  extension,
54
53
  language,
55
54
  });
56
- _KnapsackRendererWebpackBase_webpackAssetsPaths.set(this, void 0);
57
- _KnapsackRendererWebpackBase_webpackAssetsPathsFilePath.set(this, void 0);
55
+ _RendererWebpackBase_webpackAssetsPaths.set(this, void 0);
56
+ _RendererWebpackBase_webpackAssetsPathsFilePath.set(this, void 0);
58
57
  /** Last written value of `getEntryString` - used for preventing file writes */
59
- _KnapsackRendererWebpackBase_entryString.set(this, void 0);
58
+ _RendererWebpackBase_entryString.set(this, void 0);
59
+ this.getUsage = async (opt) => {
60
+ const { usage } = await this.getUsageAndImports(opt);
61
+ return usage;
62
+ };
60
63
  this.webpack = webpack_1.default;
61
64
  const alias = normalizeAliases(webpackConfig.resolve?.alias);
62
65
  this.pkgPathAliases = alias;
@@ -68,23 +71,22 @@ class KnapsackRendererWebpackBase extends app_1.KnapsackRendererBase {
68
71
  },
69
72
  };
70
73
  this.extraScripts = extraScripts;
71
- this.basicWebpackBabelConfig = babel_config_starter_1.basicWebpackBabelConfig;
72
- __classPrivateFieldSet(this, _KnapsackRendererWebpackBase_entryString, '', "f");
74
+ __classPrivateFieldSet(this, _RendererWebpackBase_entryString, '', "f");
73
75
  }
74
76
  async init(opt) {
75
77
  await super.init(opt);
76
78
  app_1.log.info(`Using WebPack v${this.webpackVersion.majorVersion}`, null, this.id);
77
79
  this.publicPath = `/${(0, path_1.relative)(this.cacheDir, this.outputDir)}/`;
78
- __classPrivateFieldSet(this, _KnapsackRendererWebpackBase_webpackAssetsPathsFilePath, (0, path_1.join)(this.outputDir, 'webpack-asset-paths.json'), "f");
79
- this.entryFilePath = (0, path_1.join)(this.outputDir, 'ks-pattern-import-global-setup.ts');
80
+ __classPrivateFieldSet(this, _RendererWebpackBase_webpackAssetsPathsFilePath, (0, path_1.join)(this.outputDir, 'webpack-asset-paths.json'), "f");
81
+ this.entryFilePath = (0, path_1.join)(this.outputDir, 'ks-pattern-import-global-setup.js');
80
82
  }
81
83
  async hydrate(opt) {
82
84
  await super.hydrate(opt);
83
85
  try {
84
- __classPrivateFieldSet(this, _KnapsackRendererWebpackBase_webpackAssetsPaths, await (0, file_utils_1.readJSON)(__classPrivateFieldGet(this, _KnapsackRendererWebpackBase_webpackAssetsPathsFilePath, "f")), "f");
86
+ __classPrivateFieldSet(this, _RendererWebpackBase_webpackAssetsPaths, await (0, file_utils_1.readJSON)(__classPrivateFieldGet(this, _RendererWebpackBase_webpackAssetsPathsFilePath, "f")), "f");
85
87
  }
86
88
  catch (e) {
87
- throw new Error(`It looks like 'knapsack build' was not ran before 'knapsack serve' - not able to find ${__classPrivateFieldGet(this, _KnapsackRendererWebpackBase_webpackAssetsPathsFilePath, "f")}`);
89
+ throw new Error(`It looks like 'knapsack build' was not ran before 'knapsack serve' - not able to find ${__classPrivateFieldGet(this, _RendererWebpackBase_webpackAssetsPathsFilePath, "f")}`);
88
90
  }
89
91
  }
90
92
  /**
@@ -172,6 +174,9 @@ class KnapsackRendererWebpackBase extends app_1.KnapsackRendererBase {
172
174
  return (0, utils_1.expectNever)(imp);
173
175
  }
174
176
  });
177
+ if (!result) {
178
+ throw new Error(`Could not find import for patternId: ${patternId} templateId: ${templateId} demoId: ${demoId}`);
179
+ }
175
180
  if (result.type === 'extra') {
176
181
  throw new Error('getJsImport: type "extra" not expected');
177
182
  }
@@ -187,6 +192,9 @@ class KnapsackRendererWebpackBase extends app_1.KnapsackRendererBase {
187
192
  return false;
188
193
  return imp.importInfo.name === name;
189
194
  });
195
+ if (!result) {
196
+ throw new Error(`Could not find import for name: ${name}`);
197
+ }
190
198
  if (result.type !== 'extra') {
191
199
  throw new Error('getJsImportExtra: type "extra" expected');
192
200
  }
@@ -197,10 +205,10 @@ class KnapsackRendererWebpackBase extends app_1.KnapsackRendererBase {
197
205
  throw new Error('Cannot write entry file because entryFilePath is not set');
198
206
  }
199
207
  const imports = this.getJsImports();
200
- const contents = (0, create_js_import_entry_1.getEntryString)(imports);
201
- if (contents === __classPrivateFieldGet(this, _KnapsackRendererWebpackBase_entryString, "f"))
208
+ const contents = (0, create_js_import_entry_1.getEntryString)(new Set(imports.map((imp) => imp.importInfo.path)));
209
+ if (contents === __classPrivateFieldGet(this, _RendererWebpackBase_entryString, "f"))
202
210
  return;
203
- __classPrivateFieldSet(this, _KnapsackRendererWebpackBase_entryString, contents, "f");
211
+ __classPrivateFieldSet(this, _RendererWebpackBase_entryString, contents, "f");
204
212
  (0, file_utils_1.writeFormattedFileSync)({
205
213
  contents,
206
214
  path: this.entryFilePath,
@@ -258,7 +266,7 @@ class KnapsackRendererWebpackBase extends app_1.KnapsackRendererBase {
258
266
  ],
259
267
  },
260
268
  entry: {
261
- [wpEntryMainId]: [this.entryFilePath, clientFile, ...this.extraScripts],
269
+ [wpEntryMainId]: [this.entryFilePath, ...this.extraScripts],
262
270
  },
263
271
  mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
264
272
  externals: {},
@@ -285,7 +293,7 @@ class KnapsackRendererWebpackBase extends app_1.KnapsackRendererBase {
285
293
  // keys on `entrypoints` match keys on `webpackConfig.entry`
286
294
  // we only use `wpEntryMainId`
287
295
  const mainEntrypoint = entrypoints[wpEntryMainId] || [];
288
- __classPrivateFieldSet(this, _KnapsackRendererWebpackBase_webpackAssetsPaths, {
296
+ __classPrivateFieldSet(this, _RendererWebpackBase_webpackAssetsPaths, {
289
297
  [wpEntryMainId]: mainEntrypoint.map((asset) => encodeURI((0, path_1.join)(this.publicPath, asset))),
290
298
  }, "f");
291
299
  // the original default "generate the manfiest" function
@@ -310,7 +318,7 @@ class KnapsackRendererWebpackBase extends app_1.KnapsackRendererBase {
310
318
  * Every asset file path needed in `<script>` tags
311
319
  */
312
320
  getWebpackAssetPaths() {
313
- return __classPrivateFieldGet(this, _KnapsackRendererWebpackBase_webpackAssetsPaths, "f")?.[wpEntryMainId] || [];
321
+ return __classPrivateFieldGet(this, _RendererWebpackBase_webpackAssetsPaths, "f")?.[wpEntryMainId] || [];
314
322
  }
315
323
  createHtmlTagsForAssetPaths({ assets, scriptTagsAreAsync, }) {
316
324
  return assets
@@ -353,8 +361,8 @@ class KnapsackRendererWebpackBase extends app_1.KnapsackRendererBase {
353
361
  * Writing out this info to a file so that the `hydrate` step can read it and get it back in-memory
354
362
  */
355
363
  await (0, file_utils_1.writeJSON)({
356
- path: __classPrivateFieldGet(this, _KnapsackRendererWebpackBase_webpackAssetsPathsFilePath, "f"),
357
- contents: __classPrivateFieldGet(this, _KnapsackRendererWebpackBase_webpackAssetsPaths, "f"),
364
+ path: __classPrivateFieldGet(this, _RendererWebpackBase_webpackAssetsPathsFilePath, "f"),
365
+ contents: __classPrivateFieldGet(this, _RendererWebpackBase_webpackAssetsPaths, "f"),
358
366
  });
359
367
  app_1.log.info('Webpack built', null, this.logPrefix);
360
368
  resolve();
@@ -489,6 +497,6 @@ class KnapsackRendererWebpackBase extends app_1.KnapsackRendererBase {
489
497
  };
490
498
  }
491
499
  }
492
- exports.KnapsackRendererWebpackBase = KnapsackRendererWebpackBase;
493
- _KnapsackRendererWebpackBase_webpackAssetsPaths = new WeakMap(), _KnapsackRendererWebpackBase_webpackAssetsPathsFilePath = new WeakMap(), _KnapsackRendererWebpackBase_entryString = new WeakMap();
500
+ exports.RendererWebpackBase = RendererWebpackBase;
501
+ _RendererWebpackBase_webpackAssetsPaths = new WeakMap(), _RendererWebpackBase_webpackAssetsPathsFilePath = new WeakMap(), _RendererWebpackBase_entryString = new WeakMap();
494
502
  //# sourceMappingURL=renderer-webpack-base.js.map
@@ -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AAI,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;gBAC9C,IAAI,EAAE,cAAc;aACrB,CAAC;YACF,YAAY;YACZ,oBAAoB,EAAE,IAAA,8BAAsB,EAAC,YAAY,CAAC;YAC1D,cAAc,EAAE,IAAA,oCAA4B,EAAC,YAAY,CAAC;SAC3D,CAAC;IACJ,CAAC;CACF;AAxmBD,kDAwmBC"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * The shared requirements for the `rendererMeta` object that gets put in `<script>` tags in the client.
3
+ */
4
+ export type RendererMetaBase = {
5
+ neededImports: KsJsImport[];
6
+ };
7
+ /**
8
+ * Information about JS imports that can describe how to import a module in these ways:
9
+ * - `import { Foo, Bar } from './foo';`
10
+ * - `import * as Foo from './foo';`
11
+ * - `import Foo from './foo';`
12
+ *
13
+ * Used in Webpack-based renderers
14
+ */
15
+ export type KsJsImportInfo = {
16
+ type: 'default';
17
+ /** import name from 'path'; */
18
+ name: string;
19
+ path: string;
20
+ } | {
21
+ type: 'named';
22
+ path: string;
23
+ /** import { name } from 'path'; */
24
+ name: string;
25
+ } | {
26
+ type: 'all';
27
+ path: string;
28
+ /** import * as name from 'path'; */
29
+ name: string;
30
+ };
31
+ export type KsJsImport = {
32
+ type: 'pattern-template';
33
+ patternId: string;
34
+ templateId: string;
35
+ importInfo: KsJsImportInfo;
36
+ } | {
37
+ type: 'pattern-template-demo';
38
+ patternId: string;
39
+ templateId: string;
40
+ demoId: string;
41
+ importInfo: KsJsImportInfo;
42
+ } | {
43
+ type: 'extra';
44
+ importInfo: KsJsImportInfo;
45
+ };
46
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,aAAa,EAAE,UAAU,EAAE,CAAC;CAC7B,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GACtB;IACE,IAAI,EAAE,SAAS,CAAC;IAChB,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,GACD;IACE,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;CACd,GACD;IACE,IAAI,EAAE,KAAK,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEN,MAAM,MAAM,UAAU,GAClB;IACE,IAAI,EAAE,kBAAkB,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,cAAc,CAAC;CAC5B,GACD;IACE,IAAI,EAAE,uBAAuB,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,cAAc,CAAC;CAC5B,GACD;IACE,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,cAAc,CAAC;CAC5B,CAAC"}
package/dist/types.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,14 +1,16 @@
1
1
  {
2
2
  "name": "@knapsack/renderer-webpack-base",
3
3
  "description": "",
4
- "version": "4.70.0--canary.4433.133de0f.0",
4
+ "version": "4.70.0--canary.4513.12c8d13.0",
5
5
  "type": "commonjs",
6
- "main": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
6
  "exports": {
9
7
  ".": {
10
8
  "types": "./dist/index.d.ts",
11
- "require": "./dist/index.js"
9
+ "default": "./dist/index.js"
10
+ },
11
+ "./client": {
12
+ "types": "./dist/client/index.d.mts",
13
+ "default": "./dist/client/index.mjs"
12
14
  },
13
15
  "./package": "./package.json",
14
16
  "./package.json": "./package.json"
@@ -21,27 +23,25 @@
21
23
  "test": "time ava"
22
24
  },
23
25
  "dependencies": {
24
- "@knapsack/app": "4.70.0--canary.4433.133de0f.0",
25
- "@knapsack/babel-config-starter": "4.70.0--canary.4433.133de0f.0",
26
- "@knapsack/file-utils": "4.70.0--canary.4433.133de0f.0",
27
- "@knapsack/types": "4.70.0--canary.4433.133de0f.0",
28
- "@knapsack/utils": "4.70.0--canary.4433.133de0f.0",
29
- "babel-loader": "^9.1.3",
30
- "webpack": "^5.91.0",
31
- "webpack-manifest-plugin": "^4.0.2"
26
+ "@knapsack/app": "4.70.0--canary.4513.12c8d13.0",
27
+ "@knapsack/babel-config-starter": "4.70.0--canary.4513.12c8d13.0",
28
+ "@knapsack/file-utils": "4.70.0--canary.4513.12c8d13.0",
29
+ "@knapsack/types": "4.70.0--canary.4513.12c8d13.0",
30
+ "@knapsack/utils": "4.70.0--canary.4513.12c8d13.0",
31
+ "babel-loader": "^9.2.1",
32
+ "webpack": "^5.94.0",
33
+ "webpack-manifest-plugin": "^4.1.1"
32
34
  },
33
35
  "devDependencies": {
34
- "@knapsack/eslint-config-starter": "4.70.0--canary.4433.133de0f.0",
35
- "@knapsack/prettier-config": "4.70.0--canary.4433.133de0f.0",
36
- "@knapsack/test-ava": "4.70.0--canary.4433.133de0f.0",
37
- "@knapsack/typescript-config-starter": "4.70.0--canary.4433.133de0f.0",
38
- "@types/estree": "^1.0.5",
39
- "@types/node": "^20.16.5",
36
+ "@knapsack/eslint-config-starter": "4.70.0--canary.4513.12c8d13.0",
37
+ "@knapsack/prettier-config": "4.70.0--canary.4513.12c8d13.0",
38
+ "@knapsack/test-ava": "4.70.0--canary.4513.12c8d13.0",
39
+ "@knapsack/typescript-config-starter": "4.70.0--canary.4513.12c8d13.0",
40
+ "@types/node": "^20.16.6",
40
41
  "@types/webpack": "^5.28.5",
41
42
  "@types/webpack-manifest-plugin": "^3.0.8",
42
43
  "ava": "^6.1.3",
43
44
  "eslint": "^8.57.0",
44
- "execa": "^5.1.1",
45
45
  "typescript": "^5.5.4"
46
46
  },
47
47
  "license": "GPL-2.0-or-later",
@@ -53,5 +53,5 @@
53
53
  "directory": "apps/client/libs/renderer-webpack-base",
54
54
  "type": "git"
55
55
  },
56
- "gitHead": "133de0f024277534b2d012833b847030e6dcc099"
56
+ "gitHead": "12c8d1378411614ad6f84e50e3721e5eb58243f4"
57
57
  }