@aventusjs/storybook 0.0.9 → 0.0.11
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/dist/Meta.d.ts +11 -2
- package/dist/Render.d.ts +1 -0
- package/dist/StoryExport.d.ts +1 -1
- package/dist/main.d.ts +1 -1
- package/dist/storybook.js +44 -16
- package/package.json +2 -1
package/dist/Meta.d.ts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
import { Meta as MetaWC } from '@storybook/web-components';
|
|
1
|
+
import { Args as ArgsWC, Meta as MetaWC } from '@storybook/web-components';
|
|
2
2
|
import { IStoryExport } from './StoryExport';
|
|
3
|
+
import { InputType as InputTypeIntenal, SBScalarType, SBType } from 'storybook/internal/types';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
type InputType = Omit<InputTypeIntenal, 'type'> & {
|
|
6
|
+
type?: SBType | SBScalarType['name'] | 'color';
|
|
7
|
+
};
|
|
8
|
+
type ArgTypes<TArgs = ArgsWC> = {
|
|
9
|
+
[name in keyof TArgs]: InputType;
|
|
10
|
+
};
|
|
11
|
+
export type Meta<TArgs = ArgsWC> = Omit<MetaWC<TArgs>, 'argTypes'> & {
|
|
5
12
|
aventus: IStoryExport;
|
|
13
|
+
argTypes: Partial<ArgTypes<TArgs>>;
|
|
6
14
|
};
|
|
15
|
+
export {};
|
package/dist/Render.d.ts
CHANGED
package/dist/StoryExport.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export interface IStoryContentObjectProperty {
|
|
|
28
28
|
name: string;
|
|
29
29
|
documentation?: string;
|
|
30
30
|
accessibility: 'public' | 'protected' | 'private';
|
|
31
|
-
modifiers?: ('override' | 'abstract' | 'readonly' | 'writeonly' | 'static')[];
|
|
31
|
+
modifiers?: ('override' | 'abstract' | 'readonly' | 'writeonly' | 'static' | 'Attribute' | 'Property' | 'Signal' | 'Watch' | 'ViewElement')[];
|
|
32
32
|
type?: IStoryContentTypeResult;
|
|
33
33
|
}
|
|
34
34
|
export interface IStoryContentInterface extends IStoryContentObject {
|
package/dist/main.d.ts
CHANGED
package/dist/storybook.js
CHANGED
|
@@ -1,22 +1,50 @@
|
|
|
1
|
-
function
|
|
1
|
+
function m(e, i) {
|
|
2
2
|
const t = new i();
|
|
3
|
-
for (let
|
|
4
|
-
const
|
|
5
|
-
if (
|
|
6
|
-
t.style.setProperty(
|
|
7
|
-
else if (
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
let
|
|
11
|
-
if (
|
|
12
|
-
for (let
|
|
13
|
-
|
|
14
|
-
t.appendChild(
|
|
3
|
+
for (let n in e) {
|
|
4
|
+
const d = e[n];
|
|
5
|
+
if (n.startsWith("--"))
|
|
6
|
+
t.style.setProperty(n, d);
|
|
7
|
+
else if (n.startsWith("@")) {
|
|
8
|
+
const f = document.createElement("template");
|
|
9
|
+
f.innerHTML = d;
|
|
10
|
+
let r = f.content.cloneNode(!0), o = n.slice(1);
|
|
11
|
+
if (o != "default")
|
|
12
|
+
for (let l of r.children)
|
|
13
|
+
l.setAttribute("slot", o);
|
|
14
|
+
t.appendChild(r);
|
|
15
15
|
} else
|
|
16
|
-
t[
|
|
16
|
+
t[n] = d;
|
|
17
17
|
}
|
|
18
|
-
return t;
|
|
18
|
+
return c(t), t;
|
|
19
|
+
}
|
|
20
|
+
function a(e, i, t = 0) {
|
|
21
|
+
const n = (r) => {
|
|
22
|
+
let o = `
|
|
23
|
+
`;
|
|
24
|
+
for (let l = 0; l < r; l++)
|
|
25
|
+
o += i;
|
|
26
|
+
return document.createTextNode(o);
|
|
27
|
+
};
|
|
28
|
+
e.parentElement && (e.parentElement.insertBefore(n(t), e), e.parentElement.lastElementChild == e && e.parentElement.appendChild(n(t - 1)));
|
|
29
|
+
const d = () => {
|
|
30
|
+
var o;
|
|
31
|
+
let r = Array.from(e.childNodes);
|
|
32
|
+
for (let l of r)
|
|
33
|
+
l.nodeType == 3 && (((o = l.textContent) == null ? void 0 : o.trim()) ?? "") == "" && e.removeChild(l);
|
|
34
|
+
}, f = () => {
|
|
35
|
+
let r = Array.from(e.children);
|
|
36
|
+
for (let o = 0; o < r.length; o++)
|
|
37
|
+
a(r[o], i, t + 1);
|
|
38
|
+
};
|
|
39
|
+
d(), f();
|
|
40
|
+
}
|
|
41
|
+
function c(e, i = 2) {
|
|
42
|
+
let t = "";
|
|
43
|
+
for (let n = 0; n < i; n++)
|
|
44
|
+
t += " ";
|
|
45
|
+
a(e, t);
|
|
19
46
|
}
|
|
20
47
|
export {
|
|
21
|
-
|
|
48
|
+
c as autoIndent,
|
|
49
|
+
m as render
|
|
22
50
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aventusjs/storybook",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Storybook type extension for aventusjs",
|
|
6
6
|
"scripts": {
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@types/node": "^20.14.9",
|
|
18
|
+
"storybook": "^8.2.9",
|
|
18
19
|
"vite": "^5.3.3",
|
|
19
20
|
"vite-plugin-dts": "^3.9.1"
|
|
20
21
|
},
|