@htmlbricks/hb-sidenav-link 0.8.37 → 0.8.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/extra/docs.ts CHANGED
@@ -1,4 +1,5 @@
1
- import type { CssPart, CssVar, HtmlSlot, i18nLang, StyleSetup } from "@htmlbricks/hb-jsutils/main";
1
+ import type { CssPart, CssVar, HtmlSlot, i18nLang, StyleSetup, ComponentSetup } from "@htmlbricks/hb-jsutils/main";
2
+ import type { Component } from "../app/types/webcomponent.type";
2
3
 
3
4
  export const storybookArgs = {
4
5
  navpage: { control: { type: "text" } },
@@ -15,14 +16,28 @@ export const styleSetup: StyleSetup = {
15
16
  parts: cssParts,
16
17
  };
17
18
 
18
- export const componentSetup = {
19
+ const examples: Component[] = [
20
+ {
21
+ navpage: "home",
22
+ navlink: {
23
+ label: "Home",
24
+ key: "home",
25
+ icon: "house-door",
26
+ badge: {
27
+ text: "bbb",
28
+ },
29
+ },
30
+ },
31
+ ];
32
+ export const componentSetup: ComponentSetup & { examples: Component[] } = {
33
+ definitions: null,
19
34
  storybookArgs,
20
35
  styleSetup,
21
36
  htmlSlots,
22
37
  i18n: i18nLanguages,
23
- examples: [],
24
- name: "",
25
- category: "",
26
- tags: [],
38
+ examples,
39
+ name: "hb-sidenav-link",
40
+ category: "basic",
41
+ tags: ["basic"],
27
42
  size: {},
28
43
  };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@htmlbricks/hb-sidenav-link",
3
3
  "displayName": "Svelte Boostrap sidenavlink",
4
4
  "description": "Svelte Boostrap sidenavlink",
5
- "version": "0.8.37",
5
+ "version": "0.8.43",
6
6
  "main": "release/release.js",
7
7
  "publishConfig": {
8
8
  "access": "public"
@@ -20,15 +20,18 @@
20
20
  "start": "sirv dist",
21
21
  "dev": "rm -rf ./dist && rollup -c -w",
22
22
  "build": "rm -rf ./dist && rollup -c",
23
- "generate-docs": "cp $PWD/dist/docs.js $PWD/dist/docs.mjs && generate-json-from-js-object --input $PWD/dist/docs.mjs --var componentSetup --output $PWD/dist/docs.type.d.json && rm $PWD/dist/docs.mjs",
24
- "generate-schema": "ts-json-schema-generator --path 'app/types/webcomponent.type.d.ts' > dist/webcomponent.type.d.json",
23
+ "generate-manifest": "npm run generate-schemes && manifester --dir $PWD",
24
+ "generate-component-schema": "ts-json-schema-generator --type 'Component' --path 'app/types/webcomponent.type.d.ts' > dist/webcomponent.type.d.json",
25
+ "generate-events-schema": "ts-json-schema-generator --type 'Events' --path 'app/types/webcomponent.type.d.ts' > dist/webcomponent_events.type.d.json",
26
+ "generate-schemes": "npm run generate-events-schema && npm run generate-component-schema",
25
27
  "copydest": "rm -rf release && mkdir -p release && mkdir -p release && cp dist/* ./release/",
26
28
  "build-extra": "tsc --moduleResolution node --module es2020 --esModuleInterop true --outDir dist --sourceMap --skipLibCheck extra/*",
27
- "build:release": "PRODUCTION=true npm run build && npm run build-extra && npm run generate-schema && npm run generate-docs && npm run copydest",
29
+ "build:release": "PRODUCTION=true npm run build && npm run build-extra && npm run generate-manifest && npm run copydest",
28
30
  "prepublish": "npm run build:release"
29
31
  },
30
32
  "devDependencies": {
31
- "@htmlbricks/hb-jsutils": "^0.8.37",
33
+ "@htmlbricks/hb-jsutils": "^0.8.43",
34
+ "@htmlbricks/manifester": "^0.0.5",
32
35
  "@rollup/plugin-alias": "^3.1.2",
33
36
  "@rollup/plugin-commonjs": "^18.0.0",
34
37
  "@rollup/plugin-json": "^4.1.0",
@@ -42,7 +45,6 @@
42
45
  "eslint": "^7.25.0",
43
46
  "eslint-plugin-jsdoc": "^33.0.0",
44
47
  "eslint-plugin-svelte3": "^3.2.0",
45
- "generate-json-from-js-object": "^0.0.17",
46
48
  "node-sass": "^6.0.1",
47
49
  "postcss": "^8.2.13",
48
50
  "postcss-load-config": "^3.0.1",
@@ -74,5 +76,5 @@
74
76
  "html5-webcomponents"
75
77
  ],
76
78
  "contributors": [],
77
- "gitHead": "1a737cc2f90ff5f9c3bd06a155743e47329e8861"
79
+ "gitHead": "00bfec0d080db03f42972124577a880c9bf2570e"
78
80
  }
package/release/docs.js CHANGED
@@ -10,15 +10,29 @@ export var styleSetup = {
10
10
  vars: cssVars,
11
11
  parts: cssParts
12
12
  };
13
+ var examples = [
14
+ {
15
+ navpage: "home",
16
+ navlink: {
17
+ label: "Home",
18
+ key: "home",
19
+ icon: "house-door",
20
+ badge: {
21
+ text: "bbb"
22
+ }
23
+ }
24
+ },
25
+ ];
13
26
  export var componentSetup = {
27
+ definitions: null,
14
28
  storybookArgs: storybookArgs,
15
29
  styleSetup: styleSetup,
16
30
  htmlSlots: htmlSlots,
17
31
  i18n: i18nLanguages,
18
- examples: [],
19
- name: "",
20
- category: "",
21
- tags: [],
32
+ examples: examples,
33
+ name: "hb-sidenav-link",
34
+ category: "basic",
35
+ tags: ["basic"],
22
36
  size: {}
23
37
  };
24
38
  //# sourceMappingURL=docs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"docs.js","sourceRoot":"","sources":["../extra/docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,IAAM,aAAa,GAAG;IAC5B,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACtC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;CACxC,CAAC;AAEF,IAAM,OAAO,GAAa,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC;AACtH,MAAM,CAAC,IAAM,QAAQ,GAAc,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;AACjF,MAAM,CAAC,IAAM,SAAS,GAAe,EAAE,CAAC;AACxC,MAAM,CAAC,IAAM,aAAa,GAAe,EAAE,CAAC;AAE5C,MAAM,CAAC,IAAM,UA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F,MAAM,CAAC,IAAM,cAAc,GAA+C;IACzE,WAAW,EAAE,IAAI;IACjB,aAAa,eAAA;IACb,UAAU,YAAA;IACV,SAAS,WAAA;IACT,IAAI,EAAE,aAAa;IACnB,QAAQ,UAAA;IACR,IAAI,EAAE,iBAAiB;IACvB,QAAQ,EAAE,OAAO;IACjB,IAAI,EAAE,CAAC,OAAO,CAAC;IACf,IAAI,EAAE,EAAE;CACR,CAAC"}
@@ -0,0 +1,38 @@
1
+ export var storybookArgs = {
2
+ navpage: { control: { type: "text" } },
3
+ navlink: { control: { type: "object" } }
4
+ };
5
+ var cssVars = [{ name: "--bs-primary", defaultValue: "#07689f", valueType: "color", theme: "bootstrap" }];
6
+ export var cssParts = [{ name: "li", description: "list element" }];
7
+ export var htmlSlots = [];
8
+ export var i18nLanguages = [];
9
+ export var styleSetup = {
10
+ vars: cssVars,
11
+ parts: cssParts
12
+ };
13
+ var examples = [
14
+ {
15
+ navpage: "home",
16
+ navlink: {
17
+ label: "Home",
18
+ key: "home",
19
+ icon: "house-door",
20
+ badge: {
21
+ text: "bbb"
22
+ }
23
+ }
24
+ },
25
+ ];
26
+ export var componentSetup = {
27
+ definitions: null,
28
+ storybookArgs: storybookArgs,
29
+ styleSetup: styleSetup,
30
+ htmlSlots: htmlSlots,
31
+ i18n: i18nLanguages,
32
+ examples: examples,
33
+ name: "hb-sidenav-link",
34
+ category: "basic",
35
+ tags: ["basic"],
36
+ size: {}
37
+ };
38
+ //# sourceMappingURL=docs.js.map
package/release/docs.ts CHANGED
@@ -1,4 +1,5 @@
1
- import type { CssPart, CssVar, HtmlSlot, i18nLang, StyleSetup } from "@htmlbricks/hb-jsutils/main";
1
+ import type { CssPart, CssVar, HtmlSlot, i18nLang, StyleSetup, ComponentSetup } from "@htmlbricks/hb-jsutils/main";
2
+ import type { Component } from "../app/types/webcomponent.type";
2
3
 
3
4
  export const storybookArgs = {
4
5
  navpage: { control: { type: "text" } },
@@ -15,14 +16,28 @@ export const styleSetup: StyleSetup = {
15
16
  parts: cssParts,
16
17
  };
17
18
 
18
- export const componentSetup = {
19
+ const examples: Component[] = [
20
+ {
21
+ navpage: "home",
22
+ navlink: {
23
+ label: "Home",
24
+ key: "home",
25
+ icon: "house-door",
26
+ badge: {
27
+ text: "bbb",
28
+ },
29
+ },
30
+ },
31
+ ];
32
+ export const componentSetup: ComponentSetup & { examples: Component[] } = {
33
+ definitions: null,
19
34
  storybookArgs,
20
35
  styleSetup,
21
36
  htmlSlots,
22
37
  i18n: i18nLanguages,
23
- examples: [],
24
- name: "",
25
- category: "",
26
- tags: [],
38
+ examples,
39
+ name: "hb-sidenav-link",
40
+ category: "basic",
41
+ tags: ["basic"],
27
42
  size: {},
28
43
  };
@@ -0,0 +1,159 @@
1
+ {
2
+ "definitions": {
3
+ "events": {
4
+ "$ref": "#/definitions/Events",
5
+ "$schema": "http://json-schema.org/draft-07/schema#",
6
+ "definitions": {
7
+ "Events": {
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "pagechange": {
11
+ "additionalProperties": false,
12
+ "properties": {
13
+ "page": {
14
+ "type": "string"
15
+ }
16
+ },
17
+ "required": [
18
+ "page"
19
+ ],
20
+ "type": "object"
21
+ }
22
+ },
23
+ "required": [
24
+ "pagechange"
25
+ ],
26
+ "type": "object"
27
+ }
28
+ }
29
+ },
30
+ "component": {
31
+ "$ref": "#/definitions/Component",
32
+ "$schema": "http://json-schema.org/draft-07/schema#",
33
+ "definitions": {
34
+ "Component": {
35
+ "additionalProperties": false,
36
+ "properties": {
37
+ "id": {
38
+ "type": "string"
39
+ },
40
+ "navlink": {
41
+ "$ref": "#/definitions/INavLink"
42
+ },
43
+ "navpage": {
44
+ "type": "string"
45
+ },
46
+ "style": {
47
+ "type": "string"
48
+ }
49
+ },
50
+ "required": [
51
+ "navlink"
52
+ ],
53
+ "type": "object"
54
+ },
55
+ "INavLink": {
56
+ "additionalProperties": false,
57
+ "properties": {
58
+ "active": {
59
+ "type": "boolean"
60
+ },
61
+ "badge": {
62
+ "additionalProperties": false,
63
+ "properties": {
64
+ "class": {
65
+ "type": "string"
66
+ },
67
+ "classcolor": {
68
+ "type": "string"
69
+ },
70
+ "text": {
71
+ "type": "string"
72
+ }
73
+ },
74
+ "required": [
75
+ "text"
76
+ ],
77
+ "type": "object"
78
+ },
79
+ "group": {
80
+ "type": "string"
81
+ },
82
+ "icon": {
83
+ "type": "string"
84
+ },
85
+ "key": {
86
+ "type": "string"
87
+ },
88
+ "label": {
89
+ "type": "string"
90
+ },
91
+ "open": {
92
+ "type": "boolean"
93
+ },
94
+ "subLinks": {
95
+ "items": {
96
+ "$ref": "#/definitions/INavLink"
97
+ },
98
+ "type": "array"
99
+ }
100
+ },
101
+ "required": [
102
+ "key",
103
+ "label"
104
+ ],
105
+ "type": "object"
106
+ }
107
+ }
108
+ }
109
+ },
110
+ "storybookArgs": {
111
+ "navpage": {
112
+ "control": {
113
+ "type": "text"
114
+ }
115
+ },
116
+ "navlink": {
117
+ "control": {
118
+ "type": "object"
119
+ }
120
+ }
121
+ },
122
+ "styleSetup": {
123
+ "vars": [
124
+ {
125
+ "name": "--bs-primary",
126
+ "defaultValue": "#07689f",
127
+ "valueType": "color",
128
+ "theme": "bootstrap"
129
+ }
130
+ ],
131
+ "parts": [
132
+ {
133
+ "name": "li",
134
+ "description": "list element"
135
+ }
136
+ ]
137
+ },
138
+ "htmlSlots": [],
139
+ "i18n": [],
140
+ "examples": [
141
+ {
142
+ "navpage": "home",
143
+ "navlink": {
144
+ "label": "Home",
145
+ "key": "home",
146
+ "icon": "house-door",
147
+ "badge": {
148
+ "text": "bbb"
149
+ }
150
+ }
151
+ }
152
+ ],
153
+ "name": "hb-sidenav-link",
154
+ "category": "basic",
155
+ "tags": [
156
+ "basic"
157
+ ],
158
+ "size": {}
159
+ }
@@ -1,4 +1,5 @@
1
1
  {
2
+ "$ref": "#/definitions/Component",
2
3
  "$schema": "http://json-schema.org/draft-07/schema#",
3
4
  "definitions": {
4
5
  "Component": {
@@ -22,27 +23,6 @@
22
23
  ],
23
24
  "type": "object"
24
25
  },
25
- "Events": {
26
- "additionalProperties": false,
27
- "properties": {
28
- "pagechange": {
29
- "additionalProperties": false,
30
- "properties": {
31
- "page": {
32
- "type": "string"
33
- }
34
- },
35
- "required": [
36
- "page"
37
- ],
38
- "type": "object"
39
- }
40
- },
41
- "required": [
42
- "pagechange"
43
- ],
44
- "type": "object"
45
- },
46
26
  "INavLink": {
47
27
  "additionalProperties": false,
48
28
  "properties": {
@@ -0,0 +1,27 @@
1
+ {
2
+ "$ref": "#/definitions/Events",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "definitions": {
5
+ "Events": {
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "pagechange": {
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "page": {
12
+ "type": "string"
13
+ }
14
+ },
15
+ "required": [
16
+ "page"
17
+ ],
18
+ "type": "object"
19
+ }
20
+ },
21
+ "required": [
22
+ "pagechange"
23
+ ],
24
+ "type": "object"
25
+ }
26
+ }
27
+ }
@@ -1,37 +0,0 @@
1
- {
2
- "storybookArgs": {
3
- "navpage": {
4
- "control": {
5
- "type": "text"
6
- }
7
- },
8
- "navlink": {
9
- "control": {
10
- "type": "object"
11
- }
12
- }
13
- },
14
- "styleSetup": {
15
- "vars": [
16
- {
17
- "name": "--bs-primary",
18
- "defaultValue": "#07689f",
19
- "valueType": "color",
20
- "theme": "bootstrap"
21
- }
22
- ],
23
- "parts": [
24
- {
25
- "name": "li",
26
- "description": "list element"
27
- }
28
- ]
29
- },
30
- "htmlSlots": [],
31
- "i18n": [],
32
- "examples": [],
33
- "name": "",
34
- "category": "",
35
- "tags": [],
36
- "size": {}
37
- }