@knapsack/renderer-vue 4.69.9--canary.4739.3a8c6f1.0 → 4.69.9--canary.4768.997c53b.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=init.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.mts","sourceRoot":"","sources":["../../src/client/init.mts"],"names":[],"mappings":""}
@@ -1,11 +1,16 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const types_1 = require("@knapsack/types");
4
- const vue_1 = require("vue");
5
- const { importedModules, allAvailableImports, getPatternImport } = (0, types_1.getKsRendererClientGlobal)();
1
+ import { getKsRendererClientGlobal } from '@knapsack/renderer-webpack-base/client';
2
+ import {
3
+ // https://vuejs.org/guide/essentials/application.html
4
+ createApp,
5
+ // https://vuejs.org/guide/components/async.html
6
+ defineAsyncComponent, } from 'vue';
7
+ import { rendererMetaScriptTagId } from '../types.js';
8
+ const { importedModules, allAvailableImports } = getKsRendererClientGlobal({
9
+ rendererMetaScriptTagId,
10
+ });
6
11
  const components = allAvailableImports.reduce((cur, { importInfo: { name, path } }) => {
7
12
  const it = importedModules[path];
8
- cur[name] = (0, vue_1.defineAsyncComponent)(it);
13
+ cur[name] = defineAsyncComponent(it);
9
14
  return cur;
10
15
  }, {});
11
16
  const el = document.getElementById('render-root');
@@ -17,7 +22,7 @@ if (!el) {
17
22
  document.body.appendChild(msgEl);
18
23
  }
19
24
  else {
20
- const app = (0, vue_1.createApp)({
25
+ const app = createApp({
21
26
  components,
22
27
  });
23
28
  app.mount('#render-root');
@@ -25,4 +30,4 @@ else {
25
30
  // just for debugging & curiousity
26
31
  window.ksVueApp = app;
27
32
  }
28
- //# sourceMappingURL=renderer-vue-client.js.map
33
+ //# sourceMappingURL=init.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.mjs","sourceRoot":"","sources":["../../src/client/init.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,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ault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const ava_1 = __importDefault(require("ava"));
7
7
  const path_1 = require("path");
8
- const app_1 = require("@knapsack/app");
8
+ const renderers_1 = require("@knapsack/app/renderers");
9
9
  const infer_spec_1 = require("./infer-spec");
10
10
  (0, ava_1.default)('inferSpec card.vue', async (t) => {
11
11
  const cardPath = (0, path_1.join)(__dirname, '../test-fixtures/card.vue');
@@ -65,7 +65,7 @@ const infer_spec_1 = require("./infer-spec");
65
65
  t.fail();
66
66
  return;
67
67
  }
68
- const { ok, message } = app_1.KnapsackRendererBase.validateSpec(spec);
68
+ const { ok, message } = (0, renderers_1.validateSpec)(spec);
69
69
  if (!ok) {
70
70
  console.log(message);
71
71
  }
@@ -1 +1 @@
1
- {"version":3,"file":"infer-spec.test.js","sourceRoot":"","sources":["../src/infer-spec.test.ts"],"names":[],"mappings":";;;;;AAAA,8CAAuB;AACvB,+BAA4B;AAC5B,uCAAqD;AAErD,6CAAoD;AAEpD,IAAA,aAAI,EAAC,oBAAoB,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IACrC,MAAM,QAAQ,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,2BAA2B,CAAC,CAAC;IAC9D,MAAM,IAAI,GAAG,MAAM,IAAA,iCAAoB,EAAC,QAAQ,CAAC,CAAC;IAElD,MAAM,YAAY,GAAmB;QACnC,KAAK,EAAE;YACL,OAAO,EAAE,wCAAwC;YACjD,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,CAAC,WAAW,CAAC;YACvB,UAAU,EAAE;gBACV,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,iCAAiC;oBAC9C,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC;oBACjC,OAAO,EAAE,MAAM;iBAChB;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;iBACf;gBACD,MAAM,EAAE;oBACN,IAAI,EA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EAAE,OAAO,EAAE,GAAG,IAAA,wBAAY,EAAC,IAAI,CAAC,CAAC;IAE3C,IAAI,CAAC,EAAE,EAAE,CAAC;QACR,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACvB,CAAC;IAED,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IACxB,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;AAClC,CAAC,CAAC,CAAC"}
@@ -1,10 +1,9 @@
1
- import { KnapsackRendererWebpackBase } from '@knapsack/renderer-webpack-base';
2
- import type { KnapsackRenderParams, KnapsackTemplateRenderer, KnapsackTemplateRendererResults, KnapsackTemplateRendererBase } from '@knapsack/app/types';
3
- import { KsJsImport } from '@knapsack/types';
4
- export declare class KnapsackVueRenderer extends KnapsackRendererWebpackBase implements KnapsackTemplateRenderer {
1
+ import { RendererWebpackBase, Renderer } from '@knapsack/renderer-webpack-base';
2
+ import { Renderable } from '@knapsack/app/renderers';
3
+ export declare class KnapsackVueRenderer extends RendererWebpackBase implements Renderable {
5
4
  skipWebpackAlter: boolean;
6
5
  constructor({ webpackConfig, skipWebpackAlter, }?: {
7
- webpackConfig?: ConstructorParameters<typeof KnapsackRendererWebpackBase>[0]['webpackConfig'];
6
+ webpackConfig?: ConstructorParameters<typeof RendererWebpackBase>[0]['webpackConfig'];
8
7
  /**
9
8
  * Setting to `true` prevents the Webpack config being altered in any way.
10
9
  * You are fully responsible for setting up `vue-loader` how you'd like.
@@ -12,16 +11,12 @@ export declare class KnapsackVueRenderer extends KnapsackRendererWebpackBase imp
12
11
  */
13
12
  skipWebpackAlter?: boolean;
14
13
  });
15
- createWebpackConfig(): ReturnType<KnapsackRendererWebpackBase['createWebpackConfig']>;
16
- changeCase(str: string): string;
17
- render(opt: KnapsackRenderParams): Promise<KnapsackTemplateRendererResults>;
18
- getUsage(opt: KnapsackRenderParams): Promise<string>;
19
- getUsageAndImports(opt: KnapsackRenderParams): Promise<{
20
- usage: string;
21
- imports: KsJsImport[];
22
- }>;
23
- getTemplateSuggestions(): ReturnType<KnapsackTemplateRendererBase['getTemplateSuggestions']>;
24
- getMeta: KnapsackTemplateRenderer['getMeta'];
25
- inferSpec: KnapsackTemplateRendererBase['inferSpec'];
14
+ createWebpackConfig: Renderer['createWebpackConfig'];
15
+ changeCase: Renderer['changeCase'];
16
+ render: Renderer['render'];
17
+ getUsageAndImports: RendererWebpackBase['getUsageAndImports'];
18
+ getTemplateSuggestions: Renderer['getTemplateSuggestions'];
19
+ getMeta: Renderer['getMeta'];
20
+ inferSpec: Renderer['inferSpec'];
26
21
  }
27
22
  //# sourceMappingURL=renderer-vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderer-vue.d.ts","sourceRoot":"","sources":["../src/renderer-vue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAE9E,OAAO,KAAK,EACV,oBAAoB,EACpB,wBAAwB,EACxB,+BAA+B,EAC/B,4BAA4B,EAC7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,UAAU,EAKX,MAAM,iBAAiB,CAAC;AAuBzB,qBAAa,mBACX,SAAQ,2BACR,YAAW,wBAAwB;IAEnC,gBAAgB,EAAE,OAAO,CAAC;gBACd,EACV,aAAa,EACb,gBAAwB,GACzB,GAAE;QACD,aAAa,CAAC,EAAE,qBAAqB,CACnC,OAAO,2BAA2B,CACnC,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;QACtB;;;;WAIG;QACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;KACvB;IAYN,mBAAmB,IAAI,UAAU,CAC/B,2BAA2B,CAAC,qBAAqB,CAAC,CACnD;IAsCD,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IASzB,MAAM,CACV,GAAG,EAAE,oBAAoB,GACxB,OAAO,CAAC,+BAA+B,CAAC;IAuErC,QAAQ,CAAC,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 -3,28 +3,277 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.KnapsackVueRenderer = void 0;
4
4
  const renderer_webpack_base_1 = require("@knapsack/renderer-webpack-base");
5
5
  const app_1 = require("@knapsack/app");
6
+ const renderers_1 = require("@knapsack/app/renderers");
6
7
  const types_1 = require("@knapsack/types");
7
8
  const vue_loader_1 = require("vue-loader");
8
9
  const utils_1 = require("@knapsack/utils");
9
10
  const file_utils_1 = require("@knapsack/file-utils");
11
+ const babel_config_starter_1 = require("@knapsack/babel-config-starter");
10
12
  const path_1 = require("path");
11
13
  const utils_2 = require("./utils");
12
14
  const infer_spec_1 = require("./infer-spec");
15
+ const types_2 = require("./types");
13
16
  const { pkg } = (0, file_utils_1.findUpPkgJson)(__dirname);
14
17
  const gitRoot = (0, file_utils_1.findGitRoot)();
15
18
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
16
19
  app_1.log.setupUpdateNotifier({ ...pkg, name: pkg.name, version: pkg.version });
17
- // static methods only
18
- const { createSlotOptionsHtmlTags } = app_1.KnapsackRendererBase;
19
- class KnapsackVueRenderer extends renderer_webpack_base_1.KnapsackRendererWebpackBase {
20
+ class KnapsackVueRenderer extends renderer_webpack_base_1.RendererWebpackBase {
20
21
  constructor({ webpackConfig, skipWebpackAlter = false, } = {}) {
21
22
  super({
22
23
  id: types_1.rendererIds.vue,
23
24
  language: 'vue',
24
25
  extension: '.vue',
25
26
  webpackConfig,
26
- extraScripts: [(0, path_1.join)(__dirname, './renderer-vue-client')],
27
+ extraScripts: ['@knapsack/renderer-vue/client'],
27
28
  });
29
+ this.createWebpackConfig = () => {
30
+ const config = super.createWebpackConfig();
31
+ if (this.skipWebpackAlter)
32
+ return config;
33
+ // https://vue-loader.vuejs.org/options.html
34
+ const compilerOptions = {
35
+ compilerOptions: {
36
+ compatConfig: {
37
+ MODE: 2,
38
+ },
39
+ },
40
+ };
41
+ // Parses vue files and hands script to js/ts loaders, style to css/etc loaders
42
+ config.module.rules.push({
43
+ test: /\.vue$/,
44
+ loader: require.resolve('vue-loader'),
45
+ options: compilerOptions,
46
+ });
47
+ // vue-style-loader provided by VueLoaderPlugin
48
+ // If site needs LESS/Sass, override at knapsack.config.js within project
49
+ config.module.rules.push({
50
+ test: /\.css$/,
51
+ use: [require.resolve('vue-style-loader'), require.resolve('css-loader')],
52
+ });
53
+ config.module.rules.push({
54
+ test: [/\.js$/, /\.jsx$/, /\.ts$/, /\.tsx$/],
55
+ exclude: /node_modules/,
56
+ loader: require.resolve('babel-loader'),
57
+ options: babel_config_starter_1.basicWebpackBabelConfig,
58
+ });
59
+ config.plugins.push(new vue_loader_1.VueLoaderPlugin());
60
+ config.resolve.alias = {
61
+ ...config.resolve.alias,
62
+ vue: 'vue/dist/vue.esm-bundler.js',
63
+ };
64
+ return config;
65
+ };
66
+ this.changeCase = (str) => {
67
+ const templateName = (0, utils_1.paramCase)(str);
68
+ if (templateName.split('-').length === 1) {
69
+ // vue templates (and web components) MUST contain at least one dash
70
+ return `vue-${templateName}`;
71
+ }
72
+ return templateName;
73
+ };
74
+ this.render = async (opt) => {
75
+ const { usage, imports: nonUniqueImports } = await this.getUsageAndImports(opt);
76
+ const { imports, declaredVars, nameCollisions, isDeclaredVarsUnique } = this.makeKsJsImportsUnique({
77
+ imports: nonUniqueImports,
78
+ });
79
+ if (!isDeclaredVarsUnique) {
80
+ throw new Error(`imports are not unique: ${nameCollisions.join(', ')}`);
81
+ }
82
+ const meta = {
83
+ imports,
84
+ demo: opt.demo,
85
+ patternId: opt.pattern.id,
86
+ templateId: opt.template.id,
87
+ };
88
+ let usageDocs = usage;
89
+ const code = `
90
+ <script type="application/json" id="${types_2.rendererMetaScriptTagId}">${JSON.stringify(meta)}</script>
91
+ ${this.createHtmlTagsForAssetPaths({
92
+ assets: this.getWebpackAssetPaths(),
93
+ // If we don't have `<script async>` tags and we put this below the `div#render-root` then renderering happens but the iFrame is too narrow. Not sure why using a `setTimeout` around `new Vue()` or putting this below `div#render-root` doesn't work, but this does
94
+ scriptTagsAreAsync: true,
95
+ })}
96
+ <div id="render-root" class="knapsack-pattern-direct-parent" data-dev-note="Knapsack Vue Template Wrapper" style="display: none;">${usage}</div>
97
+ `;
98
+ if ((opt === null || opt === void 0 ? void 0 : opt.demo) && opt.demo.type === 'data') {
99
+ usageDocs = await (0, file_utils_1.formatCode)({
100
+ path: 'x.vue',
101
+ contents: `
102
+ <template>
103
+ ${usage}
104
+ </template>
105
+
106
+ <script>
107
+ export default {
108
+ components: {
109
+ ${imports
110
+ .map(({ importInfo }) => `'${importInfo.name}': () => import('${importInfo.path}'),`)
111
+ .join('\n')}
112
+ }
113
+ }
114
+ </script>
115
+ `,
116
+ });
117
+ }
118
+ if ((opt === null || opt === void 0 ? void 0 : opt.demo) && opt.demo.type === 'template') {
119
+ const pathInfo = opt.patternManifest.getTemplatePath({
120
+ patternId: opt.pattern.id,
121
+ templateId: opt.template.id,
122
+ demoId: opt.demo.id,
123
+ });
124
+ const demoContents = await (0, file_utils_1.readFile)(pathInfo.absolutePath);
125
+ usageDocs = await (0, file_utils_1.formatCode)({
126
+ path: 'x.vue',
127
+ contents: demoContents,
128
+ });
129
+ }
130
+ // log.inspect({ demoType: opt.demo.type, code, imports });
131
+ return {
132
+ ok: true,
133
+ templateLanguage: 'html',
134
+ usage: usageDocs,
135
+ html: await (0, file_utils_1.formatCode)({
136
+ contents: code,
137
+ path: 'x.html',
138
+ }),
139
+ };
140
+ };
141
+ this.getUsageAndImports = async (opt) => {
142
+ const { pattern, template, demo,
143
+ /**
144
+ * The Patterns class
145
+ */
146
+ patternManifest, } = opt;
147
+ switch (demo === null || demo === void 0 ? void 0 : demo.type) {
148
+ case 'template': {
149
+ const pathInfo = opt.patternManifest.getTemplatePath({
150
+ patternId: pattern.id,
151
+ templateId: template.id,
152
+ demoId: demo.id,
153
+ });
154
+ const importInfo = this.getJsImport({
155
+ patternId: pattern.id,
156
+ templateId: template.id,
157
+ demoId: demo.id,
158
+ });
159
+ const templateName = importInfo.importInfo.name;
160
+ return {
161
+ usage: `<${templateName} />`,
162
+ imports: [importInfo],
163
+ };
164
+ }
165
+ case 'data':
166
+ default: {
167
+ const { slotsOptionsComputed, props = {}, slots = {}, } = demo.data || {};
168
+ const importInfo = this.getJsImport({
169
+ patternId: pattern.id,
170
+ templateId: template.id,
171
+ });
172
+ if (!importInfo) {
173
+ throw new Error(`Could not find import for pattern-template: ${pattern.id}-${template.id}`);
174
+ }
175
+ const { type, name: templateName } = importInfo.importInfo;
176
+ const importInfos = [importInfo];
177
+ const children = [];
178
+ await Promise.all(Object.keys(slots).map(async (slotName) => {
179
+ const slottedTemplates = slots[slotName];
180
+ await Promise.all(slottedTemplates.map(async (slottedTemplate) => {
181
+ if (slottedTemplate.type === 'text') {
182
+ return slottedTemplate.text;
183
+ }
184
+ if (slottedTemplate.type === 'template-reference') {
185
+ throw new Error(`Cannot handle slotted template references in ${JSON.stringify({
186
+ patternId: pattern.id,
187
+ templateId: template.id,
188
+ demoId: demo.id,
189
+ slottedTemplate,
190
+ })}`);
191
+ }
192
+ if (!slottedTemplate.patternId ||
193
+ !slottedTemplate.templateId ||
194
+ !slottedTemplate.demoId) {
195
+ return '';
196
+ }
197
+ const thisPattern = patternManifest.getPattern(slottedTemplate.patternId);
198
+ const thisTemplate = thisPattern.templates.find((t) => t.id === slottedTemplate.templateId);
199
+ if (!thisTemplate) {
200
+ throw new Error(`Cannot find template id "${slottedTemplate.templateId}" in "${slottedTemplate.patternId}"`);
201
+ }
202
+ const { usage, imports } = await this.getUsageAndImports({
203
+ pattern: thisPattern,
204
+ template: thisTemplate,
205
+ patternManifest,
206
+ demo: slottedTemplate.demo ||
207
+ this.patterns.demosById[slottedTemplate.demoId],
208
+ });
209
+ imports.forEach((i) => importInfos.push(i));
210
+ return usage;
211
+ })).then((usages) => {
212
+ const slotOptionsComputed = slotsOptionsComputed === null || slotsOptionsComputed === void 0 ? void 0 : slotsOptionsComputed[slotName];
213
+ const { openTag, closeTag } = (0, renderers_1.createSlotOptionsHtmlTags)({
214
+ slotOptionsComputed,
215
+ classAttributeName: 'class',
216
+ stylesValueType: 'string',
217
+ });
218
+ if (slotName === 'default') {
219
+ children.push(openTag, usages.join('\n'), closeTag);
220
+ }
221
+ else {
222
+ children.push(`<template v-slot:${slotName}>`, openTag, usages.join('\n'), closeTag, '</template>');
223
+ }
224
+ });
225
+ }));
226
+ const pathInfo = opt.patternManifest.getTemplatePath({
227
+ patternId: pattern.id,
228
+ templateId: template.id,
229
+ });
230
+ const usage = await (0, utils_2.getUsage)({
231
+ templateName,
232
+ props,
233
+ children: children.filter(Boolean).join('\n'),
234
+ });
235
+ return {
236
+ usage,
237
+ imports: importInfos,
238
+ };
239
+ }
240
+ }
241
+ };
242
+ this.getTemplateSuggestions = async () => {
243
+ const { unusedPaths } = await this.getUnusedTemplatePaths({
244
+ globPaths: [(0, path_1.join)(gitRoot, '**/*.vue')],
245
+ });
246
+ const suggestions = await Promise.all(unusedPaths.map(async (path) => {
247
+ const pkgInfo = await (0, file_utils_1.findUpPkgJsonAsync)(path);
248
+ if (!pkgInfo.exists) {
249
+ return {
250
+ path,
251
+ };
252
+ }
253
+ const { name } = pkgInfo.pkg;
254
+ const subPath = (0, path_1.relative)(pkgInfo.pkgDir, path);
255
+ const pkgSubPath = (0, path_1.join)(name, subPath);
256
+ try {
257
+ // try out the resolved path
258
+ // if the "exports" field is used in the package.json, and we have problems with it, then this will throw and we'll just use the original absolute path
259
+ const resolvedPath = require.resolve(pkgSubPath);
260
+ if (resolvedPath === path) {
261
+ return {
262
+ path: pkgSubPath,
263
+ };
264
+ }
265
+ return {
266
+ path,
267
+ };
268
+ }
269
+ catch (e) {
270
+ return {
271
+ path,
272
+ };
273
+ }
274
+ }));
275
+ return { suggestions };
276
+ };
28
277
  this.getMeta = () => ({
29
278
  id: this.id,
30
279
  title: 'Vue',
@@ -57,247 +306,6 @@ class KnapsackVueRenderer extends renderer_webpack_base_1.KnapsackRendererWebpac
57
306
  this.language = 'vue';
58
307
  this.skipWebpackAlter = skipWebpackAlter;
59
308
  }
60
- createWebpackConfig() {
61
- const config = super.createWebpackConfig();
62
- if (this.skipWebpackAlter)
63
- return config;
64
- // https://vue-loader.vuejs.org/options.html
65
- const compilerOptions = {
66
- compilerOptions: {
67
- compatConfig: {
68
- MODE: 2,
69
- },
70
- },
71
- };
72
- // Parses vue files and hands script to js/ts loaders, style to css/etc loaders
73
- config.module.rules.push({
74
- test: /\.vue$/,
75
- loader: require.resolve('vue-loader'),
76
- options: compilerOptions,
77
- });
78
- // vue-style-loader provided by VueLoaderPlugin
79
- // If site needs LESS/Sass, override at knapsack.config.js within project
80
- config.module.rules.push({
81
- test: /\.css$/,
82
- use: [require.resolve('vue-style-loader'), require.resolve('css-loader')],
83
- });
84
- config.module.rules.push({
85
- test: [/\.js$/, /\.jsx$/, /\.ts$/, /\.tsx$/],
86
- exclude: /node_modules/,
87
- loader: require.resolve('babel-loader'),
88
- options: this.basicWebpackBabelConfig,
89
- });
90
- config.plugins.push(new vue_loader_1.VueLoaderPlugin());
91
- return config;
92
- }
93
- changeCase(str) {
94
- const templateName = (0, utils_1.paramCase)(str);
95
- if (templateName.split('-').length === 1) {
96
- // vue templates (and web components) MUST contain at least one dash
97
- return `vue-${templateName}`;
98
- }
99
- return templateName;
100
- }
101
- async render(opt) {
102
- const { usage, imports: nonUniqueImports } = await this.getUsageAndImports(opt);
103
- const { imports, declaredVars, nameCollisions, isDeclaredVarsUnique } = this.makeKsJsImportsUnique({
104
- imports: nonUniqueImports,
105
- });
106
- if (!isDeclaredVarsUnique) {
107
- throw new Error(`imports are not unique: ${nameCollisions.join(', ')}`);
108
- }
109
- let usageDocs = usage;
110
- const code = `
111
- ${this.createHtmlTagsForAssetPaths({
112
- assets: this.getWebpackAssetPaths(),
113
- // If we don't have `<script async>` tags and we put this below the `div#render-root` then renderering happens but the iFrame is too narrow. Not sure why using a `setTimeout` around `new Vue()` or putting this below `div#render-root` doesn't work, but this does
114
- scriptTagsAreAsync: true,
115
- })}
116
- <div id="render-root" class="knapsack-pattern-direct-parent" data-dev-note="Knapsack Vue Template Wrapper" style="display: none;">${usage}</div>
117
- `;
118
- if ((opt === null || opt === void 0 ? void 0 : opt.demo) && KnapsackVueRenderer.isDataDemo(opt.demo)) {
119
- usageDocs = await (0, file_utils_1.formatCode)({
120
- path: 'x.vue',
121
- contents: `
122
- <template>
123
- ${usage}
124
- </template>
125
-
126
- <script>
127
- export default {
128
- components: {
129
- ${imports
130
- .map(({ importInfo }) => `'${importInfo.name}': () => import('${importInfo.path}'),`)
131
- .join('\n')}
132
- }
133
- }
134
- </script>
135
- `,
136
- });
137
- }
138
- if ((opt === null || opt === void 0 ? void 0 : opt.demo) && KnapsackVueRenderer.isTemplateDemo(opt.demo)) {
139
- const pathInfo = opt.patternManifest.getTemplatePath({
140
- patternId: opt.pattern.id,
141
- templateId: opt.template.id,
142
- demoId: opt.demo.id,
143
- });
144
- const demoContents = await (0, file_utils_1.readFile)(pathInfo.absolutePath);
145
- usageDocs = await (0, file_utils_1.formatCode)({
146
- path: 'x.vue',
147
- contents: demoContents,
148
- });
149
- }
150
- // log.inspect({ demoType: opt.demo.type, code, imports });
151
- return {
152
- ok: true,
153
- templateLanguage: 'html',
154
- usage: usageDocs,
155
- html: await (0, file_utils_1.formatCode)({
156
- contents: code,
157
- path: 'x.html',
158
- }),
159
- };
160
- }
161
- async getUsage(opt) {
162
- const { usage } = await this.getUsageAndImports(opt);
163
- return usage;
164
- }
165
- async getUsageAndImports(opt) {
166
- const { pattern, template, demo,
167
- /**
168
- * The Patterns class
169
- */
170
- patternManifest, } = opt;
171
- switch (demo === null || demo === void 0 ? void 0 : demo.type) {
172
- case 'template': {
173
- const pathInfo = opt.patternManifest.getTemplatePath({
174
- patternId: pattern.id,
175
- templateId: template.id,
176
- demoId: demo.id,
177
- });
178
- const importInfo = this.getJsImport({
179
- patternId: pattern.id,
180
- templateId: template.id,
181
- demoId: demo.id,
182
- });
183
- const templateName = importInfo.importInfo.name;
184
- return {
185
- usage: `<${templateName} />`,
186
- imports: [importInfo],
187
- };
188
- }
189
- case 'data':
190
- default: {
191
- const { slotsOptionsComputed, props = {}, slots = {}, } = demo.data || {};
192
- const importInfo = this.getJsImport({
193
- patternId: pattern.id,
194
- templateId: template.id,
195
- });
196
- if (!importInfo) {
197
- throw new Error(`Could not find import for pattern-template: ${pattern.id}-${template.id}`);
198
- }
199
- const { type, name: templateName } = importInfo.importInfo;
200
- const importInfos = [importInfo];
201
- const children = [];
202
- await Promise.all(Object.keys(slots).map(async (slotName) => {
203
- const slottedTemplates = slots[slotName];
204
- await Promise.all(slottedTemplates.map(async (slottedTemplate) => {
205
- if (app_1.KnapsackRendererBase.isSlottedText(slottedTemplate)) {
206
- return slottedTemplate.text;
207
- }
208
- if (app_1.KnapsackRendererBase.isSlottedTemplateReference(slottedTemplate)) {
209
- throw new Error(`Cannot handle slotted template references in ${JSON.stringify({
210
- patternId: pattern.id,
211
- templateId: template.id,
212
- demoId: demo.id,
213
- slottedTemplate,
214
- })}`);
215
- }
216
- if (!slottedTemplate.patternId ||
217
- !slottedTemplate.templateId ||
218
- !slottedTemplate.demoId) {
219
- return '';
220
- }
221
- const thisPattern = patternManifest.getPattern(slottedTemplate.patternId);
222
- const thisTemplate = thisPattern.templates.find((t) => t.id === slottedTemplate.templateId);
223
- if (!thisTemplate) {
224
- throw new Error(`Cannot find template id "${slottedTemplate.templateId}" in "${slottedTemplate.patternId}"`);
225
- }
226
- const { usage, imports } = await this.getUsageAndImports({
227
- pattern: thisPattern,
228
- template: thisTemplate,
229
- patternManifest,
230
- demo: slottedTemplate.demo ||
231
- this.patterns.demosById[slottedTemplate.demoId],
232
- });
233
- imports.forEach((i) => importInfos.push(i));
234
- return usage;
235
- })).then((usages) => {
236
- const slotOptionsComputed = slotsOptionsComputed === null || slotsOptionsComputed === void 0 ? void 0 : slotsOptionsComputed[slotName];
237
- const { openTag, closeTag } = createSlotOptionsHtmlTags({
238
- slotOptionsComputed,
239
- classAttributeName: 'class',
240
- stylesValueType: 'string',
241
- });
242
- if (slotName === 'default') {
243
- children.push(openTag, usages.join('\n'), closeTag);
244
- }
245
- else {
246
- children.push(`<template v-slot:${slotName}>`, openTag, usages.join('\n'), closeTag, '</template>');
247
- }
248
- });
249
- }));
250
- const pathInfo = opt.patternManifest.getTemplatePath({
251
- patternId: pattern.id,
252
- templateId: template.id,
253
- });
254
- const usage = await (0, utils_2.getUsage)({
255
- templateName,
256
- props,
257
- children: children.filter(Boolean).join('\n'),
258
- });
259
- return {
260
- usage,
261
- imports: importInfos,
262
- };
263
- }
264
- }
265
- }
266
- async getTemplateSuggestions() {
267
- const { unusedPaths } = await this.getUnusedTemplatePaths({
268
- globPaths: [(0, path_1.join)(gitRoot, '**/*.vue')],
269
- });
270
- const suggestions = await Promise.all(unusedPaths.map(async (path) => {
271
- const pkgInfo = await (0, file_utils_1.findUpPkgJsonAsync)(path);
272
- if (!pkgInfo.exists) {
273
- return {
274
- path,
275
- };
276
- }
277
- const { name } = pkgInfo.pkg;
278
- const subPath = (0, path_1.relative)(pkgInfo.pkgDir, path);
279
- const pkgSubPath = (0, path_1.join)(name, subPath);
280
- try {
281
- // try out the resolved path
282
- // if the "exports" field is used in the package.json, and we have problems with it, then this will throw and we'll just use the original absolute path
283
- const resolvedPath = require.resolve(pkgSubPath);
284
- if (resolvedPath === path) {
285
- return {
286
- path: pkgSubPath,
287
- };
288
- }
289
- return {
290
- path,
291
- };
292
- }
293
- catch (e) {
294
- return {
295
- path,
296
- };
297
- }
298
- }));
299
- return { suggestions };
300
- }
301
309
  }
302
310
  exports.KnapsackVueRenderer = KnapsackVueRenderer;
303
311
  //# sourceMappingURL=renderer-vue.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderer-vue.js","sourceRoot":"","sources":["../src/renderer-vue.ts"],"names":[],"mappings":";;;AAAA,2EAA8E;AAC9E,uCAA0D;AAO1D,2CAMyB;AACzB,2CAA+D;AAC/D,2CAA4C;AAC5C,qDAM8B;AAC9B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AAC;CAgWF;AA5XD,kDA4XC"}
@@ -0,0 +1,13 @@
1
+ import type { Demo } from '@knapsack/types';
2
+ import type { KsJsImport } from '@knapsack/renderer-webpack-base';
3
+ /**
4
+ * Found as JSON in HTML `#ks-vue-meta`
5
+ */
6
+ export type KsVueMeta = {
7
+ imports: KsJsImport[];
8
+ demo: Demo;
9
+ patternId: string;
10
+ templateId: string;
11
+ };
12
+ export declare const rendererMetaScriptTagId = "ks-vue-meta";
13
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,IAAI,EAAE,IAAI,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,uBAAuB,gBAAgB,CAAC"}
package/dist/types.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.rendererMetaScriptTagId = void 0;
4
+ exports.rendererMetaScriptTagId = 'ks-vue-meta';
5
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAaa,QAAA,uBAAuB,GAAG,aAAa,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@knapsack/renderer-vue",
3
3
  "description": "Render Vue",
4
- "version": "4.69.9--canary.4739.3a8c6f1.0",
4
+ "version": "4.69.9--canary.4768.997c53b.0",
5
5
  "main": "dist/renderer-vue.js",
6
6
  "types": "dist/renderer-vue.d.ts",
7
7
  "exports": {
@@ -9,6 +9,10 @@
9
9
  "types": "./dist/renderer-vue.d.ts",
10
10
  "require": "./dist/renderer-vue.js"
11
11
  },
12
+ "./client": {
13
+ "types": "./dist/client/init.d.mts",
14
+ "default": "./dist/client/init.mjs"
15
+ },
12
16
  "./package": "./package.json",
13
17
  "./package.json": "./package.json",
14
18
  "./prototype-template.vue": "./prototype-template.vue"
@@ -24,11 +28,12 @@
24
28
  },
25
29
  "author": "Knapsack (https://www.knapsack.cloud)",
26
30
  "dependencies": {
27
- "@knapsack/app": "4.69.9--canary.4739.3a8c6f1.0",
28
- "@knapsack/file-utils": "4.69.9--canary.4739.3a8c6f1.0",
29
- "@knapsack/renderer-webpack-base": "4.69.9--canary.4739.3a8c6f1.0",
30
- "@knapsack/types": "4.69.9--canary.4739.3a8c6f1.0",
31
- "@knapsack/utils": "4.69.9--canary.4739.3a8c6f1.0",
31
+ "@knapsack/app": "4.69.9--canary.4768.997c53b.0",
32
+ "@knapsack/babel-config-starter": "4.69.9--canary.4768.997c53b.0",
33
+ "@knapsack/file-utils": "4.69.9--canary.4768.997c53b.0",
34
+ "@knapsack/renderer-webpack-base": "4.69.9--canary.4768.997c53b.0",
35
+ "@knapsack/types": "4.69.9--canary.4768.997c53b.0",
36
+ "@knapsack/utils": "4.69.9--canary.4768.997c53b.0",
32
37
  "@vue/compiler-sfc": "^3.5.4",
33
38
  "babel-loader": "^9.1.3",
34
39
  "css-loader": "^6.11.0",
@@ -41,9 +46,9 @@
41
46
  "vue-style-loader": "^4.1.3"
42
47
  },
43
48
  "devDependencies": {
44
- "@knapsack/eslint-config-starter": "4.69.9--canary.4739.3a8c6f1.0",
45
- "@knapsack/test-ava": "4.69.9--canary.4739.3a8c6f1.0",
46
- "@knapsack/typescript-config-starter": "4.69.9--canary.4739.3a8c6f1.0",
49
+ "@knapsack/eslint-config-starter": "4.69.9--canary.4768.997c53b.0",
50
+ "@knapsack/test-ava": "4.69.9--canary.4768.997c53b.0",
51
+ "@knapsack/typescript-config-starter": "4.69.9--canary.4768.997c53b.0",
47
52
  "@types/fs-extra": "^11.0.4",
48
53
  "@types/lodash": "^4.17.5",
49
54
  "ava": "^6.1.3",
@@ -58,5 +63,5 @@
58
63
  "directory": "apps/client/renderers/renderer-vue",
59
64
  "type": "git"
60
65
  },
61
- "gitHead": "3a8c6f18de1986c14fe426336bcefb1ca8c8ca21"
66
+ "gitHead": "997c53b517d93e9800048817dbb4b781d7284977"
62
67
  }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=renderer-vue-client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderer-vue-client.d.ts","sourceRoot":"","sources":["../src/renderer-vue-client.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderer-vue-client.js","sourceRoot":"","sources":["../src/renderer-vue-client.ts"],"names":[],"mappings":";;AAAA,2CAA4D;AAC5D,6BAMa;AAEb,MAAM,EAAE,eAAe,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,GAC9D,IAAA,iCAAyB,GAAa,CAAC;AAEzC,MAAM,UAAU,GAAG,mBAAmB,CAAC,MAAM,CAC3C,CAAC,GAAG,EAAE,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE;IACtC,MAAM,EAAE,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IACjC,GAAG,CAAC,IAAI,CAAC,GAAG,IAAA,0BAAoB,EAAC,EAAE,CAAC,CAAC;IACrC,OAAO,GAAG,CAAC;AACb,CAAC,EACD,EAAiE,CAClE,CAAC;AAEF,MAAM,EAAE,GAAG,QAAQ,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;AAClD,IAAI,CAAC,EAAE,EAAE,CAAC;IACR,MAAM,GAAG,GACP,+EAA+E,CAAC;IAClF,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACnB,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC5C,KAAK,CAAC,SAAS,GAAG,GAAG,CAAC;IACtB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACnC,CAAC;KAAM,CAAC;IACN,MAAM,GAAG,GAAG,IAAA,eAAS,EAAC;QACpB,UAAU;KACX,CAAC,CAAC;IAEH,GAAG,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IAC1B,EAAE,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IAE5B,kCAAkC;IACjC,MAAc,CAAC,QAAQ,GAAG,GAAG,CAAC;AACjC,CAAC"}