@knapsack/renderer-html 4.70.0--canary.4628.1068e46.0 → 4.70.0--canary.4854.b1d79a8.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +97 -0
- package/dist/index.d.ts +6 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +41 -53
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,100 @@
|
|
1
|
+
# v4.69.11 (Fri Sep 20 2024)
|
2
|
+
|
3
|
+
#### 🏠 Internal
|
4
|
+
|
5
|
+
- adds select all option to exclude patterns filters [#4803](https://github.com/knapsack-labs/app-monorepo/pull/4803) ([@GormanDesign](https://github.com/GormanDesign))
|
6
|
+
|
7
|
+
#### Authors: 1
|
8
|
+
|
9
|
+
- Matt Gorman ([@GormanDesign](https://github.com/GormanDesign))
|
10
|
+
|
11
|
+
---
|
12
|
+
|
13
|
+
# v4.69.9 (Sat Sep 14 2024)
|
14
|
+
|
15
|
+
#### 🏠 Internal
|
16
|
+
|
17
|
+
- update template stage ui [#4763](https://github.com/knapsack-labs/app-monorepo/pull/4763) ([@GormanDesign](https://github.com/GormanDesign))
|
18
|
+
- add spacing under form feedback banner [#4747](https://github.com/knapsack-labs/app-monorepo/pull/4747) ([@GormanDesign](https://github.com/GormanDesign))
|
19
|
+
|
20
|
+
#### Authors: 1
|
21
|
+
|
22
|
+
- Matt Gorman ([@GormanDesign](https://github.com/GormanDesign))
|
23
|
+
|
24
|
+
---
|
25
|
+
|
26
|
+
# v4.69.8 (Thu Sep 12 2024)
|
27
|
+
|
28
|
+
#### 🐛 Bug Fix
|
29
|
+
|
30
|
+
- refactor Renderers for cleaner types [#4746](https://github.com/knapsack-labs/app-monorepo/pull/4746) ([@EvanLovely](https://github.com/EvanLovely))
|
31
|
+
|
32
|
+
#### Authors: 1
|
33
|
+
|
34
|
+
- Evan Lovely ([@EvanLovely](https://github.com/EvanLovely))
|
35
|
+
|
36
|
+
---
|
37
|
+
|
38
|
+
# v4.69.7 (Wed Sep 11 2024)
|
39
|
+
|
40
|
+
#### 🐛 Bug Fix
|
41
|
+
|
42
|
+
- Merge branch 'latest' into feature/ksp-5497-setup-status-id-in-client ([@mabry1985](https://github.com/mabry1985))
|
43
|
+
|
44
|
+
#### 🏠 Internal
|
45
|
+
|
46
|
+
- fixes schema form select appearance [#4700](https://github.com/knapsack-labs/app-monorepo/pull/4700) ([@GormanDesign](https://github.com/GormanDesign))
|
47
|
+
- add scroll indicator to popover [#4697](https://github.com/knapsack-labs/app-monorepo/pull/4697) ([@GormanDesign](https://github.com/GormanDesign))
|
48
|
+
|
49
|
+
#### Authors: 2
|
50
|
+
|
51
|
+
- Josh Mabry ([@mabry1985](https://github.com/mabry1985))
|
52
|
+
- Matt Gorman ([@GormanDesign](https://github.com/GormanDesign))
|
53
|
+
|
54
|
+
---
|
55
|
+
|
56
|
+
# v4.69.6 (Fri Sep 06 2024)
|
57
|
+
|
58
|
+
#### 🐛 Bug Fix
|
59
|
+
|
60
|
+
- Merge branch 'latest' into feature/ksp-5458-anchor-links-not-jumping-to-the-right-spot ([@GormanDesign](https://github.com/GormanDesign))
|
61
|
+
|
62
|
+
#### 🏠 Internal
|
63
|
+
|
64
|
+
- restores hash link handling [#4637](https://github.com/knapsack-labs/app-monorepo/pull/4637) ([@GormanDesign](https://github.com/GormanDesign))
|
65
|
+
|
66
|
+
#### Authors: 1
|
67
|
+
|
68
|
+
- Matt Gorman ([@GormanDesign](https://github.com/GormanDesign))
|
69
|
+
|
70
|
+
---
|
71
|
+
|
72
|
+
# v4.69.2 (Fri Aug 30 2024)
|
73
|
+
|
74
|
+
#### 🐛 Bug Fix
|
75
|
+
|
76
|
+
- add error info [#4628](https://github.com/knapsack-labs/app-monorepo/pull/4628) ([@EvanLovely](https://github.com/EvanLovely) [@mabry1985](https://github.com/mabry1985))
|
77
|
+
- Merge branch 'latest' into EvanLovely-patch-24 ([@mabry1985](https://github.com/mabry1985))
|
78
|
+
|
79
|
+
#### Authors: 2
|
80
|
+
|
81
|
+
- Evan Lovely ([@EvanLovely](https://github.com/EvanLovely))
|
82
|
+
- Josh Mabry ([@mabry1985](https://github.com/mabry1985))
|
83
|
+
|
84
|
+
---
|
85
|
+
|
86
|
+
# v4.69.1 (Fri Aug 30 2024)
|
87
|
+
|
88
|
+
#### 🐛 Bug Fix
|
89
|
+
|
90
|
+
- Merge branch 'latest' into feature/ksp-5460-nested-menu-item-is-finicky ([@GormanDesign](https://github.com/GormanDesign))
|
91
|
+
|
92
|
+
#### Authors: 1
|
93
|
+
|
94
|
+
- Matt Gorman ([@GormanDesign](https://github.com/GormanDesign))
|
95
|
+
|
96
|
+
---
|
97
|
+
|
1
98
|
# v4.68.12 (Thu Aug 29 2024)
|
2
99
|
|
3
100
|
#### 🐛 Bug Fix
|
package/dist/index.d.ts
CHANGED
@@ -1,10 +1,9 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
export declare class KnapsackHtmlRenderer extends KnapsackRendererBase implements KnapsackTemplateRenderer {
|
1
|
+
import { Renderable, Renderer, RendererBase } from '@knapsack/app/renderers';
|
2
|
+
export declare class KnapsackHtmlRenderer extends RendererBase implements Renderable {
|
4
3
|
constructor();
|
5
|
-
render
|
6
|
-
getUsage
|
7
|
-
getTemplateSuggestions
|
8
|
-
getMeta:
|
4
|
+
render: Renderer['render'];
|
5
|
+
getUsage: Renderer['getUsage'];
|
6
|
+
getTemplateSuggestions: Renderer['getTemplateSuggestions'];
|
7
|
+
getMeta: Renderer['getMeta'];
|
9
8
|
}
|
10
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAkB7E,qBAAa,oBAAqB,SAAQ,YAAa,YAAW,UAAU;;IAS1E,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAkBxB;IAEF,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAAC,CAS5B;IAEF,sBAAsB,EAAE,QAAQ,CAAC,wBAAwB,CAAC,CASxD;IAEF,OAAO,EAAE,QAAQ,CAAC,SAAS,CAAC,CAWzB;CACJ"}
|
package/dist/index.js
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.KnapsackHtmlRenderer = void 0;
|
4
4
|
const app_1 = require("@knapsack/app");
|
5
|
+
const renderers_1 = require("@knapsack/app/renderers");
|
5
6
|
const types_1 = require("@knapsack/types");
|
6
7
|
const file_utils_1 = require("@knapsack/file-utils");
|
7
8
|
const path_1 = require("path");
|
@@ -11,13 +12,52 @@ app_1.log.setupUpdateNotifier({
|
|
11
12
|
version: pkg.version,
|
12
13
|
});
|
13
14
|
const gitRoot = (0, file_utils_1.findGitRoot)();
|
14
|
-
class KnapsackHtmlRenderer extends
|
15
|
+
class KnapsackHtmlRenderer extends renderers_1.RendererBase {
|
15
16
|
constructor() {
|
16
17
|
super({
|
17
18
|
id: types_1.rendererIds.html,
|
18
19
|
extension: '.html',
|
19
20
|
language: 'html',
|
20
21
|
});
|
22
|
+
this.render = async (opt) => {
|
23
|
+
try {
|
24
|
+
const usage = await this.getUsage(opt);
|
25
|
+
return {
|
26
|
+
ok: true,
|
27
|
+
html: await (0, file_utils_1.formatCode)({
|
28
|
+
contents: usage,
|
29
|
+
path: 'x.html',
|
30
|
+
}),
|
31
|
+
};
|
32
|
+
}
|
33
|
+
catch (e) {
|
34
|
+
return {
|
35
|
+
ok: false,
|
36
|
+
html: `<p>${e.message}</p>`,
|
37
|
+
message: e.message,
|
38
|
+
};
|
39
|
+
}
|
40
|
+
};
|
41
|
+
this.getUsage = async ({ template, demo }) => {
|
42
|
+
const { absolutePath, exists } = await (0, file_utils_1.resolvePath)({
|
43
|
+
path: demo.type === 'template' ? demo.templateInfo.path : template.path,
|
44
|
+
resolveFromDir: this.dataDir,
|
45
|
+
});
|
46
|
+
if (!exists) {
|
47
|
+
throw new Error(`File does not exist: ${absolutePath}`);
|
48
|
+
}
|
49
|
+
return (0, file_utils_1.readFile)(absolutePath);
|
50
|
+
};
|
51
|
+
this.getTemplateSuggestions = async () => {
|
52
|
+
const { unusedPaths } = await this.getUnusedTemplatePaths({
|
53
|
+
globPaths: [(0, path_1.join)(gitRoot, '**/*.html')],
|
54
|
+
});
|
55
|
+
return {
|
56
|
+
suggestions: unusedPaths.map((path) => ({
|
57
|
+
path,
|
58
|
+
})),
|
59
|
+
};
|
60
|
+
};
|
21
61
|
this.getMeta = () => ({
|
22
62
|
id: this.id,
|
23
63
|
title: 'HTML',
|
@@ -31,58 +71,6 @@ class KnapsackHtmlRenderer extends app_1.KnapsackRendererBase {
|
|
31
71
|
hasTemplateSuggestionsSupport: true,
|
32
72
|
});
|
33
73
|
}
|
34
|
-
async render(opt) {
|
35
|
-
try {
|
36
|
-
const usage = await this.getUsage(opt);
|
37
|
-
return {
|
38
|
-
ok: true,
|
39
|
-
html: await (0, file_utils_1.formatCode)({
|
40
|
-
contents: usage,
|
41
|
-
path: 'x.html',
|
42
|
-
}),
|
43
|
-
};
|
44
|
-
}
|
45
|
-
catch (e) {
|
46
|
-
return {
|
47
|
-
ok: false,
|
48
|
-
html: `<p>${e.message}</p>`,
|
49
|
-
message: e.message,
|
50
|
-
};
|
51
|
-
}
|
52
|
-
}
|
53
|
-
async getUsage({ pattern, template, demo, patternManifest, }) {
|
54
|
-
if (app_1.KnapsackRendererBase.isTemplateDemo(demo)) {
|
55
|
-
const templateDemoPath = patternManifest.getTemplateDemoAbsolutePath({
|
56
|
-
patternId: pattern.id,
|
57
|
-
templateId: template.id,
|
58
|
-
demoId: demo.id,
|
59
|
-
});
|
60
|
-
return (0, file_utils_1.readFile)(templateDemoPath);
|
61
|
-
}
|
62
|
-
try {
|
63
|
-
const templatePath = patternManifest.getTemplateAbsolutePath({
|
64
|
-
patternId: pattern.id,
|
65
|
-
templateId: template.id,
|
66
|
-
});
|
67
|
-
return (0, file_utils_1.readFile)(templatePath);
|
68
|
-
}
|
69
|
-
catch (e) {
|
70
|
-
console.log(e);
|
71
|
-
const msg = `Error getting pattern "${pattern.id}" template "${template.id}": ${e.message}`;
|
72
|
-
app_1.log.error(msg);
|
73
|
-
throw new Error(msg);
|
74
|
-
}
|
75
|
-
}
|
76
|
-
async getTemplateSuggestions() {
|
77
|
-
const { unusedPaths } = await this.getUnusedTemplatePaths({
|
78
|
-
globPaths: [(0, path_1.join)(gitRoot, '**/*.html')],
|
79
|
-
});
|
80
|
-
return {
|
81
|
-
suggestions: unusedPaths.map((path) => ({
|
82
|
-
path,
|
83
|
-
})),
|
84
|
-
};
|
85
|
-
}
|
86
74
|
}
|
87
75
|
exports.KnapsackHtmlRenderer = KnapsackHtmlRenderer;
|
88
76
|
//# 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,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,uCAAoC;AACpC,uDAA6E;AAC7E,2CAA8C;AAC9C,qDAM8B;AAC9B,+BAA4B;AAE5B,MAAM,EAAE,GAAG,EAAE,GAAG,IAAA,0BAAa,EAAC,SAAS,CAAC,CAAC;AACzC,SAAG,CAAC,mBAAmB,CAAC;IACtB,IAAI,EAAE,GAAG,CAAC,IAAI;IACd,OAAO,EAAE,GAAG,CAAC,OAAO;CACrB,CAAC,CAAC;AACH,MAAM,OAAO,GAAG,IAAA,wBAAW,GAAE,CAAC;AAE9B,MAAa,oBAAqB,SAAQ,wBAAY;IACpD;QACE,KAAK,CAAC;YACJ,EAAE,EAAE,m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,EAAE,CAAC,IAAA,WAAI,EAAC,OAAO,EAAE,WAAW,CAAC,CAAC;aACxC,CAAC,CAAC;YACH,OAAO;gBACL,WAAW,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;oBACtC,IAAI;iBACL,CAAC,CAAC;aACJ,CAAC;QACJ,CAAC,CAAC;QAEF,YAAO,GAAwB,GAAG,EAAE,CAAC,CAAC;YACpC,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,KAAK,EAAE,MAAM;YACb,0BAA0B,EAAE,MAAM;YAClC,QAAQ,EAAE,KAAK;YACf,eAAe,EAAE,KAAK;YACtB,mBAAmB,EAAE,IAAI;YACzB,eAAe,EAAE,KAAK;YACtB,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,mBAAmB,EAAE,KAAK;YAC1B,6BAA6B,EAAE,IAAI;SACpC,CAAC,CAAC;IAvDH,CAAC;CAwDF;AA/DD,oDA+DC"}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@knapsack/renderer-html",
|
3
3
|
"description": "Render HTML",
|
4
|
-
"version": "4.70.0--canary.
|
4
|
+
"version": "4.70.0--canary.4854.b1d79a8.0",
|
5
5
|
"main": "index.js",
|
6
6
|
"types": "index.d.ts",
|
7
7
|
"exports": {
|
@@ -22,13 +22,13 @@
|
|
22
22
|
},
|
23
23
|
"author": "Knapsack (https://www.knapsack.cloud)",
|
24
24
|
"dependencies": {
|
25
|
-
"@knapsack/app": "4.70.0--canary.
|
26
|
-
"@knapsack/file-utils": "4.70.0--canary.
|
27
|
-
"@knapsack/types": "4.70.0--canary.
|
25
|
+
"@knapsack/app": "4.70.0--canary.4854.b1d79a8.0",
|
26
|
+
"@knapsack/file-utils": "4.70.0--canary.4854.b1d79a8.0",
|
27
|
+
"@knapsack/types": "4.70.0--canary.4854.b1d79a8.0"
|
28
28
|
},
|
29
29
|
"devDependencies": {
|
30
|
-
"@knapsack/eslint-config-starter": "4.70.0--canary.
|
31
|
-
"@knapsack/typescript-config-starter": "4.70.0--canary.
|
30
|
+
"@knapsack/eslint-config-starter": "4.70.0--canary.4854.b1d79a8.0",
|
31
|
+
"@knapsack/typescript-config-starter": "4.70.0--canary.4854.b1d79a8.0",
|
32
32
|
"eslint": "^8.57.0",
|
33
33
|
"typescript": "^5.5.4"
|
34
34
|
},
|
@@ -40,5 +40,5 @@
|
|
40
40
|
"directory": "apps/client/renderers/renderer-html",
|
41
41
|
"type": "git"
|
42
42
|
},
|
43
|
-
"gitHead": "
|
43
|
+
"gitHead": "b1d79a8caffe3537b921ff76bae2f2e8bcabbc43"
|
44
44
|
}
|