@storybook/addon-onboarding 0.0.0-pr-31819-sha-6f08cc58 → 0.0.0-pr-31819-sha-b1c88d51
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/_browser-chunks/Onboarding-YLDFOYKQ.js +5616 -0
- package/dist/_browser-chunks/chunk-HTQMOF6O.js +7 -0
- package/dist/_browser-chunks/chunk-J5TRTLII.js +27 -0
- package/dist/index.js +6 -4
- package/dist/manager.js +29 -6
- package/dist/preset.js +38 -5
- package/package.json +7 -21
- package/dist/Onboarding-GWBU6EQN.js +0 -137
- package/dist/chunk-OKKTQZOH.js +0 -3
- package/dist/index.mjs +0 -3
- package/preset.js +0 -8
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var g = Object.create;
|
|
2
|
+
var e = Object.defineProperty;
|
|
3
|
+
var h = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var i = Object.getOwnPropertyNames;
|
|
5
|
+
var j = Object.getPrototypeOf, k = Object.prototype.hasOwnProperty;
|
|
6
|
+
var m = (b, a) => e(b, "name", { value: a, configurable: !0 });
|
|
7
|
+
var n = (b, a) => () => (a || b((a = { exports: {} }).exports, a), a.exports);
|
|
8
|
+
var l = (b, a, c, f) => {
|
|
9
|
+
if (a && typeof a == "object" || typeof a == "function")
|
|
10
|
+
for (let d of i(a))
|
|
11
|
+
!k.call(b, d) && d !== c && e(b, d, { get: () => a[d], enumerable: !(f = h(a, d)) || f.enumerable });
|
|
12
|
+
return b;
|
|
13
|
+
};
|
|
14
|
+
var o = (b, a, c) => (c = b != null ? g(j(b)) : {}, l(
|
|
15
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
16
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
17
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
18
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
19
|
+
a || !b || !b.__esModule ? e(c, "default", { value: b, enumerable: !0 }) : c,
|
|
20
|
+
b
|
|
21
|
+
));
|
|
22
|
+
|
|
23
|
+
export {
|
|
24
|
+
m as a,
|
|
25
|
+
n as b,
|
|
26
|
+
o as c
|
|
27
|
+
};
|
package/dist/index.js
CHANGED
package/dist/manager.js
CHANGED
|
@@ -1,7 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import { addons } from 'storybook/manager-api';
|
|
1
|
+
import {
|
|
2
|
+
b as r
|
|
3
|
+
} from "./_browser-chunks/chunk-HTQMOF6O.js";
|
|
4
|
+
import "./_browser-chunks/chunk-J5TRTLII.js";
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
// src/manager.tsx
|
|
7
|
+
import n, { Suspense as i, lazy as a } from "react";
|
|
8
|
+
import s from "react-dom";
|
|
9
|
+
import { STORY_SPECIFIED as m } from "storybook/internal/core-events";
|
|
10
|
+
import { addons as l } from "storybook/manager-api";
|
|
11
|
+
var b = a(() => import("./_browser-chunks/Onboarding-YLDFOYKQ.js"));
|
|
12
|
+
l.register("@storybook/addon-onboarding", async (o) => {
|
|
13
|
+
let t = o.getUrlState(), d = t.path === "/onboarding" || t.queryParams.onboarding === "true";
|
|
14
|
+
o.once(m, () => {
|
|
15
|
+
if (!(!!o.getData("example-button--primary") || !!document.getElementById("example-button--primary"))) {
|
|
16
|
+
console.warn(
|
|
17
|
+
"[@storybook/addon-onboarding] It seems like you have finished the onboarding experience in Storybook! Therefore this addon is not necessary anymore and will not be loaded. You are free to remove it from your project. More info: https://github.com/storybookjs/storybook/tree/next/code/addons/onboarding#uninstalling"
|
|
18
|
+
);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
if (!d || window.innerWidth < 730)
|
|
22
|
+
return;
|
|
23
|
+
o.togglePanel(!0), o.togglePanelPosition("bottom"), o.setSelectedPanel(r);
|
|
24
|
+
let e = document.createElement("div");
|
|
25
|
+
e.id = "storybook-addon-onboarding", document.body.appendChild(e), s.render(
|
|
26
|
+
n.createElement(i, { fallback: n.createElement("div", null) }, n.createElement(b, { api: o })),
|
|
27
|
+
e
|
|
28
|
+
);
|
|
29
|
+
});
|
|
30
|
+
});
|
package/dist/preset.js
CHANGED
|
@@ -1,8 +1,41 @@
|
|
|
1
|
-
|
|
1
|
+
import CJS_COMPAT_NODE_URL from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE from "node:module";
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
+
const __filename = CJS_COMPAT_NODE_URL.fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = CJS_COMPAT_NODE_PATH.dirname(__filename);
|
|
7
|
+
const require = CJS_COMPAT_NODE_MODULE.createRequire(import.meta.url);
|
|
8
|
+
// ------------------------------------------------------------
|
|
9
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
10
|
+
// ------------------------------------------------------------
|
|
11
|
+
var N = Object.defineProperty;
|
|
12
|
+
var a = (o, e) => N(o, "name", { value: e, configurable: !0 }), O = /* @__PURE__ */ ((o) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(o, {
|
|
13
|
+
get: (e, r) => (typeof require < "u" ? require : e)[r]
|
|
14
|
+
}) : o)(function(o) {
|
|
15
|
+
if (typeof require < "u") return require.apply(this, arguments);
|
|
16
|
+
throw Error('Dynamic require of "' + o + '" is not supported');
|
|
17
|
+
});
|
|
5
18
|
|
|
6
|
-
|
|
19
|
+
// src/preset.ts
|
|
20
|
+
import { readFileSync as l } from "node:fs";
|
|
21
|
+
import { telemetry as p } from "storybook/internal/telemetry";
|
|
7
22
|
|
|
8
|
-
|
|
23
|
+
// src/constants.ts
|
|
24
|
+
var i = "STORYBOOK_ADDON_ONBOARDING_CHANNEL";
|
|
25
|
+
|
|
26
|
+
// src/preset.ts
|
|
27
|
+
var _ = /* @__PURE__ */ a(async (o, e) => {
|
|
28
|
+
let { disableTelemetry: r } = await e.presets.apply("core", {});
|
|
29
|
+
if (!r) {
|
|
30
|
+
let y = O.resolve("@storybook/addon-onboarding/package.json"), { version: n } = JSON.parse(
|
|
31
|
+
l(y, { encoding: "utf-8" })
|
|
32
|
+
);
|
|
33
|
+
o.on(i, ({ type: t, ...s }) => {
|
|
34
|
+
t === "telemetry" ? p("addon-onboarding", { ...s, addonVersion: n }) : t === "survey" && p("onboarding-survey", { ...s, addonVersion: n });
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
return o;
|
|
38
|
+
}, "experimental_serverChannel");
|
|
39
|
+
export {
|
|
40
|
+
_ as experimental_serverChannel
|
|
41
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/addon-onboarding",
|
|
3
|
-
"version": "0.0.0-pr-31819-sha-
|
|
3
|
+
"version": "0.0.0-pr-31819-sha-b1c88d51",
|
|
4
4
|
"description": "Storybook Addon Onboarding - Introduces a new onboarding experience",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook-addons",
|
|
@@ -20,19 +20,16 @@
|
|
|
20
20
|
"url": "https://opencollective.com/storybook"
|
|
21
21
|
},
|
|
22
22
|
"license": "MIT",
|
|
23
|
+
"type": "module",
|
|
23
24
|
"exports": {
|
|
24
25
|
".": {
|
|
25
26
|
"types": "./dist/index.d.ts",
|
|
26
|
-
"
|
|
27
|
-
"require": "./dist/index.js"
|
|
27
|
+
"default": "./dist/index.js"
|
|
28
28
|
},
|
|
29
29
|
"./manager": "./dist/manager.js",
|
|
30
|
-
"./
|
|
31
|
-
"./
|
|
30
|
+
"./package.json": "./package.json",
|
|
31
|
+
"./preset": "./dist/preset.js"
|
|
32
32
|
},
|
|
33
|
-
"main": "dist/index.js",
|
|
34
|
-
"module": "dist/index.mjs",
|
|
35
|
-
"types": "dist/index.d.ts",
|
|
36
33
|
"files": [
|
|
37
34
|
"dist/**/*",
|
|
38
35
|
"README.md",
|
|
@@ -42,7 +39,7 @@
|
|
|
42
39
|
],
|
|
43
40
|
"scripts": {
|
|
44
41
|
"check": "jiti ../../../scripts/check/check-package.ts",
|
|
45
|
-
"prep": "jiti ../../../scripts/
|
|
42
|
+
"prep": "jiti ../../../scripts/build/build-package.ts"
|
|
46
43
|
},
|
|
47
44
|
"devDependencies": {
|
|
48
45
|
"@neoconfetti/react": "^1.0.0",
|
|
@@ -53,20 +50,9 @@
|
|
|
53
50
|
"typescript": "^5.8.3"
|
|
54
51
|
},
|
|
55
52
|
"peerDependencies": {
|
|
56
|
-
"storybook": "^0.0.0-pr-31819-sha-
|
|
53
|
+
"storybook": "^0.0.0-pr-31819-sha-b1c88d51"
|
|
57
54
|
},
|
|
58
55
|
"publishConfig": {
|
|
59
56
|
"access": "public"
|
|
60
|
-
},
|
|
61
|
-
"bundler": {
|
|
62
|
-
"exportEntries": [
|
|
63
|
-
"./src/index.ts"
|
|
64
|
-
],
|
|
65
|
-
"managerEntries": [
|
|
66
|
-
"./src/manager.tsx"
|
|
67
|
-
],
|
|
68
|
-
"nodeEntries": [
|
|
69
|
-
"./src/preset.ts"
|
|
70
|
-
]
|
|
71
57
|
}
|
|
72
58
|
}
|