@storybook/web-components 6.5.0-beta.6 → 6.5.0-rc.0
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.
|
@@ -16,6 +16,9 @@ var _addons = require("@storybook/addons");
|
|
|
16
16
|
var _docsTools = require("@storybook/docs-tools");
|
|
17
17
|
|
|
18
18
|
/* global window */
|
|
19
|
+
// Taken from https://github.com/lit/lit/blob/main/packages/lit-html/src/test/test-utils/strip-markers.ts
|
|
20
|
+
var LIT_EXPRESSION_COMMENTS = /<!--\?lit\$[0-9]+\$-->|<!--\??-->/g;
|
|
21
|
+
|
|
19
22
|
function skipSourceRender(context) {
|
|
20
23
|
var _context$parameters$d;
|
|
21
24
|
|
|
@@ -53,7 +56,7 @@ function sourceDecorator(storyFn, context) {
|
|
|
53
56
|
if (!skipSourceRender(context)) {
|
|
54
57
|
var container = window.document.createElement('div');
|
|
55
58
|
(0, _litHtml.render)(story, container);
|
|
56
|
-
source = applyTransformSource(container.innerHTML.replace(
|
|
59
|
+
source = applyTransformSource(container.innerHTML.replace(LIT_EXPRESSION_COMMENTS, ''), context);
|
|
57
60
|
}
|
|
58
61
|
|
|
59
62
|
return story;
|
|
@@ -5,6 +5,8 @@ import "core-js/modules/es.string.replace.js";
|
|
|
5
5
|
import { render } from 'lit-html';
|
|
6
6
|
import { addons, useEffect } from '@storybook/addons';
|
|
7
7
|
import { SNIPPET_RENDERED, SourceType } from '@storybook/docs-tools';
|
|
8
|
+
// Taken from https://github.com/lit/lit/blob/main/packages/lit-html/src/test/test-utils/strip-markers.ts
|
|
9
|
+
var LIT_EXPRESSION_COMMENTS = /<!--\?lit\$[0-9]+\$-->|<!--\??-->/g;
|
|
8
10
|
|
|
9
11
|
function skipSourceRender(context) {
|
|
10
12
|
var _context$parameters$d;
|
|
@@ -43,7 +45,7 @@ export function sourceDecorator(storyFn, context) {
|
|
|
43
45
|
if (!skipSourceRender(context)) {
|
|
44
46
|
var container = window.document.createElement('div');
|
|
45
47
|
render(story, container);
|
|
46
|
-
source = applyTransformSource(container.innerHTML.replace(
|
|
48
|
+
source = applyTransformSource(container.innerHTML.replace(LIT_EXPRESSION_COMMENTS, ''), context);
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
return story;
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
import { render } from 'lit-html';
|
|
3
3
|
import { addons, useEffect } from '@storybook/addons';
|
|
4
4
|
import { SNIPPET_RENDERED, SourceType } from '@storybook/docs-tools';
|
|
5
|
+
// Taken from https://github.com/lit/lit/blob/main/packages/lit-html/src/test/test-utils/strip-markers.ts
|
|
6
|
+
const LIT_EXPRESSION_COMMENTS = /<!--\?lit\$[0-9]+\$-->|<!--\??-->/g;
|
|
5
7
|
|
|
6
8
|
function skipSourceRender(context) {
|
|
7
9
|
var _context$parameters$d;
|
|
@@ -40,7 +42,7 @@ export function sourceDecorator(storyFn, context) {
|
|
|
40
42
|
if (!skipSourceRender(context)) {
|
|
41
43
|
const container = window.document.createElement('div');
|
|
42
44
|
render(story, container);
|
|
43
|
-
source = applyTransformSource(container.innerHTML.replace(
|
|
45
|
+
source = applyTransformSource(container.innerHTML.replace(LIT_EXPRESSION_COMMENTS, ''), context);
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
return story;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/web-components",
|
|
3
|
-
"version": "6.5.0-
|
|
3
|
+
"version": "6.5.0-rc.0",
|
|
4
4
|
"description": "Storybook for web-components: View web components snippets in isolation with Hot Reloading.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lit-html",
|
|
@@ -50,15 +50,15 @@
|
|
|
50
50
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
51
51
|
"@babel/plugin-syntax-import-meta": "^7.10.4",
|
|
52
52
|
"@babel/preset-env": "^7.12.11",
|
|
53
|
-
"@storybook/addons": "6.5.0-
|
|
54
|
-
"@storybook/client-api": "6.5.0-
|
|
55
|
-
"@storybook/client-logger": "6.5.0-
|
|
56
|
-
"@storybook/core": "6.5.0-
|
|
57
|
-
"@storybook/core-common": "6.5.0-
|
|
53
|
+
"@storybook/addons": "6.5.0-rc.0",
|
|
54
|
+
"@storybook/client-api": "6.5.0-rc.0",
|
|
55
|
+
"@storybook/client-logger": "6.5.0-rc.0",
|
|
56
|
+
"@storybook/core": "6.5.0-rc.0",
|
|
57
|
+
"@storybook/core-common": "6.5.0-rc.0",
|
|
58
58
|
"@storybook/csf": "0.0.2--canary.4566f4d.1",
|
|
59
|
-
"@storybook/docs-tools": "6.5.0-
|
|
60
|
-
"@storybook/preview-web": "6.5.0-
|
|
61
|
-
"@storybook/store": "6.5.0-
|
|
59
|
+
"@storybook/docs-tools": "6.5.0-rc.0",
|
|
60
|
+
"@storybook/preview-web": "6.5.0-rc.0",
|
|
61
|
+
"@storybook/store": "6.5.0-rc.0",
|
|
62
62
|
"@types/node": "^14.14.20 || ^16.0.0",
|
|
63
63
|
"@types/webpack-env": "^1.16.0",
|
|
64
64
|
"babel-plugin-bundled-import-meta": "^0.3.1",
|
|
@@ -82,6 +82,6 @@
|
|
|
82
82
|
"publishConfig": {
|
|
83
83
|
"access": "public"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "c27fd9eebc4c6db5c50f28c36b204d76c2f9e123",
|
|
86
86
|
"sbmodern": "dist/modern/client/index.js"
|
|
87
87
|
}
|