storybook-framework-qwik 0.0.1
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/README.md +11 -0
- package/dist/index.js +1 -0
- package/dist/preset.js +25 -0
- package/dist/preview.js +13 -0
- package/package.json +80 -0
package/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Storybook for framework
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Storybook for framework is a UI development environment for your plain framework snippets.
|
|
6
|
+
With it, you can visualize different states of your UI components and develop them interactively.
|
|
7
|
+
|
|
8
|
+

|
|
9
|
+
|
|
10
|
+
Storybook runs outside of your app.
|
|
11
|
+
So you can develop UI components in isolation without worrying about app specific dependencies and requirements.
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/preset.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { mergeConfig } from 'vite';
|
|
2
|
+
import { QWIK_LOADER } from '@builder.io/qwik/loader';
|
|
3
|
+
export const core = {
|
|
4
|
+
builder: '@storybook/builder-vite',
|
|
5
|
+
renderer: '@storybook/html',
|
|
6
|
+
};
|
|
7
|
+
export const viteFinal = async (defaultConfig, options) => {
|
|
8
|
+
console.log('VITE THING');
|
|
9
|
+
const config = mergeConfig(defaultConfig, {
|
|
10
|
+
build: {
|
|
11
|
+
target: 'es2020',
|
|
12
|
+
rollupOptions: {
|
|
13
|
+
external: ['@qwik-city-sw-register', '@qwik-city-plan'],
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
return config;
|
|
18
|
+
};
|
|
19
|
+
export const previewAnnotations = (entry = []) => [
|
|
20
|
+
...entry,
|
|
21
|
+
require.resolve('storybook-framework-qwik/preview.js'),
|
|
22
|
+
];
|
|
23
|
+
export const previewHead = (head) => {
|
|
24
|
+
return `${head} <script>${QWIK_LOADER}</script>`;
|
|
25
|
+
};
|
package/dist/preview.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { render } from '@builder.io/qwik';
|
|
2
|
+
import { QwikCityMockProvider } from '@builder.io/qwik-city';
|
|
3
|
+
import { jsx as _jsx } from '@builder.io/qwik/jsx-runtime';
|
|
4
|
+
const qwikCityDecorator = (Story) => {
|
|
5
|
+
const parent = document.createElement('div');
|
|
6
|
+
const jsxNode = Story();
|
|
7
|
+
const tree = _jsx(QwikCityMockProvider, {
|
|
8
|
+
children: jsxNode,
|
|
9
|
+
}, 'QwikCityMockProvider');
|
|
10
|
+
render(parent, tree);
|
|
11
|
+
return parent;
|
|
12
|
+
};
|
|
13
|
+
export const decorators = [qwikCityDecorator];
|
package/package.json
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "storybook-framework-qwik",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Storybook for Qwik: View Qwik components in isolation.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"storybook",
|
|
7
|
+
"qwik"
|
|
8
|
+
],
|
|
9
|
+
"type": "module",
|
|
10
|
+
"//": "not sure why dist/preview is needed, but it is",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"require": "./dist/index.js",
|
|
14
|
+
"import": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts"
|
|
16
|
+
},
|
|
17
|
+
"./preset": {
|
|
18
|
+
"require": "./dist/preset.js",
|
|
19
|
+
"import": "./dist/preset.js",
|
|
20
|
+
"types": "./dist/preset.d.ts"
|
|
21
|
+
},
|
|
22
|
+
"./dist/preview.js": {
|
|
23
|
+
"require": "./dist/preview.js",
|
|
24
|
+
"import": "./dist/preview.js",
|
|
25
|
+
"types": "./dist/preview.d.ts"
|
|
26
|
+
},
|
|
27
|
+
"./preview.js": {
|
|
28
|
+
"require": "./dist/preview.js",
|
|
29
|
+
"import": "./dist/preview.js",
|
|
30
|
+
"types": "./dist/preview.d.ts"
|
|
31
|
+
},
|
|
32
|
+
"./package.json": "./package.json"
|
|
33
|
+
},
|
|
34
|
+
"homepage": "TODO",
|
|
35
|
+
"bugs": {
|
|
36
|
+
"//": "TODO"
|
|
37
|
+
},
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"directory": "app/qwik"
|
|
41
|
+
},
|
|
42
|
+
"license": "MIT",
|
|
43
|
+
"files": [
|
|
44
|
+
"README.md",
|
|
45
|
+
"./dist/*.js",
|
|
46
|
+
"*.js",
|
|
47
|
+
"*.d.ts"
|
|
48
|
+
],
|
|
49
|
+
"main": "dist/index.js",
|
|
50
|
+
"module": "dist/index.js",
|
|
51
|
+
"types": "dist/index.d.ts",
|
|
52
|
+
"scripts": {
|
|
53
|
+
"watch": "tsc --watch --outDir ./dist --listEmittedFiles",
|
|
54
|
+
"build": "tsc --outDir ./dist --listEmittedFiles"
|
|
55
|
+
},
|
|
56
|
+
"dependencies": {
|
|
57
|
+
"@builder.io/qwik": "^0.15.2",
|
|
58
|
+
"@builder.io/qwik-city": "^0.0.128",
|
|
59
|
+
"@storybook/addons": "7.0.0-beta.9",
|
|
60
|
+
"@storybook/builder-vite": "7.0.0-beta.9",
|
|
61
|
+
"@storybook/channel-postmessage": "7.0.0-beta.9",
|
|
62
|
+
"@storybook/channel-websocket": "7.0.0-beta.9",
|
|
63
|
+
"@storybook/client-api": "7.0.0-beta.9",
|
|
64
|
+
"@storybook/core-server": "7.0.0-beta.9",
|
|
65
|
+
"@storybook/html": "7.0.0-beta.9",
|
|
66
|
+
"@storybook/node-logger": "7.0.0-beta.9",
|
|
67
|
+
"@storybook/preview-web": "7.0.0-beta.9",
|
|
68
|
+
"magic-string": "^0.26.1"
|
|
69
|
+
},
|
|
70
|
+
"devDependencies": {
|
|
71
|
+
"@types/node": "^16.0.0",
|
|
72
|
+
"typescript": "~4.9.3"
|
|
73
|
+
},
|
|
74
|
+
"engines": {
|
|
75
|
+
"node": "^14.18 || >=16"
|
|
76
|
+
},
|
|
77
|
+
"publishConfig": {
|
|
78
|
+
"access": "public"
|
|
79
|
+
}
|
|
80
|
+
}
|