@scayle/storefront-devtools 0.2.0-alpha.1 → 0.2.0-alpha.2
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/CHANGELOG.md +10 -0
- package/README.md +113 -83
- package/dist/_chunks/coalesce-cmmfn4qq.mjs +1585 -0
- package/dist/group.d.ts +29 -21
- package/dist/group.d.ts.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +40 -65
- package/dist/inertia/channel.d.ts +54 -0
- package/dist/inertia/channel.d.ts.map +1 -0
- package/dist/inertia/client/index.d.ts +1 -6
- package/dist/inertia/client/index.d.ts.map +1 -1
- package/dist/inertia/client/index.mjs +246 -109
- package/dist/inertia/client/publish.d.ts +24 -0
- package/dist/inertia/client/publish.d.ts.map +1 -0
- package/dist/inertia/core/network.d.ts +1 -1
- package/dist/inertia/core/network.d.ts.map +1 -1
- package/dist/inertia/core/response.d.ts +3 -3
- package/dist/inertia/core/response.d.ts.map +1 -1
- package/dist/inertia/plugin.d.ts +8 -6
- package/dist/inertia/plugin.d.ts.map +1 -1
- package/dist/orpc/channel.d.ts +29 -0
- package/dist/orpc/channel.d.ts.map +1 -0
- package/dist/orpc/client/index.d.ts +1 -6
- package/dist/orpc/client/index.d.ts.map +1 -1
- package/dist/orpc/client/index.mjs +152 -137
- package/dist/orpc/client/publish.d.ts +15 -0
- package/dist/orpc/client/publish.d.ts.map +1 -0
- package/dist/orpc/core/serialize.d.ts +1 -1
- package/dist/orpc/core/stats.d.ts +10 -0
- package/dist/orpc/core/stats.d.ts.map +1 -0
- package/dist/orpc/core/store.d.ts +1 -2
- package/dist/orpc/core/store.d.ts.map +1 -1
- package/dist/orpc/plugin.d.ts +8 -5
- package/dist/orpc/plugin.d.ts.map +1 -1
- package/dist/shared/clipboard.d.ts +2 -3
- package/dist/shared/clipboard.d.ts.map +1 -1
- package/dist/shared/coalesce.d.ts +14 -0
- package/dist/shared/coalesce.d.ts.map +1 -0
- package/dist/shared/panel-channel.d.ts +49 -0
- package/dist/shared/panel-channel.d.ts.map +1 -0
- package/dist/shared/publish-options.d.ts +13 -0
- package/dist/shared/publish-options.d.ts.map +1 -0
- package/dist/shared/safe-clone.d.ts +2 -1
- package/dist/shared/safe-clone.d.ts.map +1 -1
- package/dist/storefront/plugin.d.ts +6 -4
- package/dist/storefront/plugin.d.ts.map +1 -1
- package/dist/ui/assets/App-BlEKD1MK.js +4 -0
- package/dist/ui/assets/App-C1rr07m5.js +1 -0
- package/dist/ui/assets/App-C5-JscO0.css +1 -0
- package/dist/ui/assets/App-M0iU7c4p.css +1 -0
- package/dist/ui/assets/App-VElUrn9P.js +5 -0
- package/dist/ui/assets/App-jiQKInbo.css +1 -0
- package/dist/ui/assets/_plugin-vue_export-helper-BDNMzG2s.js +1 -0
- package/dist/ui/assets/channel-D7V7aU79.js +1 -0
- package/dist/ui/assets/clipboard-BnEeWyfh.css +1 -0
- package/dist/ui/assets/clipboard-n-T06WI3.js +1 -0
- package/dist/ui/assets/panel-channel-DjMENemf.js +2 -0
- package/dist/ui/assets/panels-B4LTsmli.css +1 -0
- package/dist/ui/assets/panels-BLV_p6Kz.js +2 -0
- package/dist/ui/assets/preload-helper-J6bGWMBq.js +2 -0
- package/dist/{vue-devtools/ui/assets/index-Dby9TIQH.js → ui/assets/vue-BAMMushd.js} +19 -20
- package/dist/{vue-devtools/ui/assets/index-sSkqWPzY.css → ui/assets/vue-Kq4tvBbL.css} +1 -1
- package/dist/ui/panels/index.html +15 -0
- package/dist/{vue-devtools/ui → ui/vue}/index.html +4 -2
- package/dist/vue-devtools/client/index.mjs +0 -1
- package/dist/vue-devtools/plugin.d.ts +10 -9
- package/dist/vue-devtools/plugin.d.ts.map +1 -1
- package/package.json +11 -29
- package/dist/_chunks/clipboard-DrVHc2QA.mjs +0 -61
- package/dist/_chunks/diff-DzJ5arJj.mjs +0 -169
- package/dist/_chunks/panel-uV5ITqhY.mjs +0 -51
- package/dist/_chunks/redact-DmIF-iyk.mjs +0 -96
- package/dist/_chunks/useStore-Db8RZW8T.mjs +0 -10
- package/dist/inertia/client/index.d.mts +0 -13
- package/dist/inertia/renderer/index.d.mts +0 -16
- package/dist/inertia/renderer/index.mjs +0 -771
- package/dist/orpc/client/index.d.mts +0 -13
- package/dist/orpc/renderer/index.d.mts +0 -16
- package/dist/orpc/renderer/index.mjs +0 -457
- package/dist/resource-center/client/index.mjs +0 -21
- package/dist/resource-center/client.d.ts +0 -3
- package/dist/resource-center/client.d.ts.map +0 -1
- package/dist/resource-center/plugin.d.ts +0 -12
- package/dist/resource-center/plugin.d.ts.map +0 -1
- package/dist/shared/use-window-store.d.ts +0 -18
- package/dist/shared/use-window-store.d.ts.map +0 -1
- package/dist/storefront/renderer/index.d.mts +0 -16
- package/dist/storefront/renderer/index.mjs +0 -124
- /package/dist/{vue-devtools/ui → ui}/assets/css-8QJvnqUH.js +0 -0
- /package/dist/{vue-devtools/ui → ui}/assets/css-CaJ9TzKE.js +0 -0
- /package/dist/{vue-devtools/ui → ui}/assets/diff-woXpYk--.js +0 -0
- /package/dist/{vue-devtools/ui → ui}/assets/html-BHDw6EPc.js +0 -0
- /package/dist/{vue-devtools/ui → ui}/assets/html-GueGcY0x.js +0 -0
- /package/dist/{vue-devtools/ui → ui}/assets/javascript-BzbQS41l.js +0 -0
- /package/dist/{vue-devtools/ui → ui}/assets/javascript-Yelw-5ZN.js +0 -0
- /package/dist/{vue-devtools/ui → ui}/assets/json-B88Oqtu5.js +0 -0
- /package/dist/{vue-devtools/ui → ui}/assets/json-CaljABEy.js +0 -0
- /package/dist/{vue-devtools/ui → ui}/assets/shellscript-CLZ0U2zV.js +0 -0
- /package/dist/{vue-devtools/ui → ui}/assets/typescript-Utq2Cl8c.js +0 -0
- /package/dist/{vue-devtools/ui → ui}/assets/typescript-j_1H8WHN.js +0 -0
- /package/dist/{vue-devtools/ui → ui}/assets/vitesse-dark-BZCL-v6S.js +0 -0
- /package/dist/{vue-devtools/ui → ui}/assets/vitesse-light-VbXTXTou.js +0 -0
- /package/dist/{vue-devtools/ui → ui}/assets/vue-B1Tf5CHw.js +0 -0
- /package/dist/{vue-devtools/ui → ui}/assets/vue-html-CGMs_6qn.js +0 -0
- /package/dist/{vue-devtools/ui → ui}/assets/yaml-rwi0_p6S.js +0 -0
package/dist/group.d.ts
CHANGED
|
@@ -1,27 +1,33 @@
|
|
|
1
1
|
import { Plugin } from 'vite';
|
|
2
|
-
/**
|
|
3
|
-
* Dock group ID that every SCAYLE Storefront devtools panel attaches to via
|
|
4
|
-
* `groupId`. Panels register as independent entries and the dock collapses them
|
|
5
|
-
* under this group's single launcher button.
|
|
6
|
-
*/
|
|
7
|
-
export declare const STOREFRONT_GROUP_ID = "scayle-storefront";
|
|
8
2
|
/** SCAYLE brand purple. Drives the dock's primary ramp and tints the group launcher. */
|
|
9
3
|
export declare const SCAYLE_PRIMARY_COLOR: string;
|
|
10
4
|
/**
|
|
11
|
-
* The V3
|
|
12
|
-
* the dock icon resolves without depending on an app-served path
|
|
13
|
-
* country-prefix redirect would rewrite it). Keep in sync with the
|
|
14
|
-
*
|
|
5
|
+
* The Storefront Application V3 favicon (`public/logo.svg`), inlined as a
|
|
6
|
+
* data URI so the dock icon resolves without depending on an app-served path
|
|
7
|
+
* (the country-prefix redirect would rewrite it). Keep in sync with the
|
|
8
|
+
* Storefront Application V3 favicon if it changes.
|
|
15
9
|
*/
|
|
16
10
|
export declare const STOREFRONT_GROUP_ICON: string;
|
|
17
11
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
* Route the dock loads every iframe page from. `@scayle/storefront-build`
|
|
13
|
+
* excludes it from the Hono dev server, so the country redirect leaves it alone.
|
|
14
|
+
*/
|
|
15
|
+
export declare const UI_ROUTE = "/__storefront-devtools/";
|
|
16
|
+
/**
|
|
17
|
+
* Creates the Vite plugin that registers the "SCAYLE Storefront" dock group
|
|
18
|
+
* and serves the iframe pages under {@link UI_ROUTE}. Panels (Inertia, oRPC,
|
|
19
|
+
* Storefront) attach to the group through {@link createPanelPlugin}, so the
|
|
20
|
+
* dock renders a single grouped launcher instead of one button per panel.
|
|
21
|
+
*
|
|
22
|
+
* @returns A Vite plugin with a `devtools.setup` hook.
|
|
22
23
|
*/
|
|
23
24
|
export declare function createGroupPlugin(): Plugin;
|
|
24
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Views the panel app can mount. `VIEWS` in `src/ui/panels/main.ts` is typed
|
|
27
|
+
* from this union, so the compiler flags a view added to one but not the other.
|
|
28
|
+
*/
|
|
29
|
+
export type PanelView = 'inertia' | 'orpc' | 'storefront';
|
|
30
|
+
/** Options for an iframe panel registered via {@link createPanelPlugin}. */
|
|
25
31
|
export interface PanelPluginOptions {
|
|
26
32
|
/** Dock entry id, e.g. `storefront-devtools:inertia`. */
|
|
27
33
|
id: string;
|
|
@@ -29,14 +35,16 @@ export interface PanelPluginOptions {
|
|
|
29
35
|
title: string;
|
|
30
36
|
/** Dock launcher icon, a data URI or Iconify name. */
|
|
31
37
|
icon: string;
|
|
32
|
-
/**
|
|
33
|
-
|
|
38
|
+
/** The `?view=` value the panel app mounts for this entry. */
|
|
39
|
+
view: PanelView;
|
|
34
40
|
}
|
|
35
41
|
/**
|
|
36
|
-
* Creates the Vite plugin that registers one
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
42
|
+
* Creates the Vite plugin that registers one iframe dock entry, attached to the
|
|
43
|
+
* "SCAYLE Storefront" group. The iframe loads the panel app served under
|
|
44
|
+
* {@link UI_ROUTE} and mounts the view named in `options.view`.
|
|
45
|
+
*
|
|
46
|
+
* @param options - The entry's id, title, icon, and view.
|
|
47
|
+
* @returns A Vite plugin with a `devtools.setup` hook.
|
|
40
48
|
*/
|
|
41
49
|
export declare function createPanelPlugin(options: PanelPluginOptions): Plugin;
|
|
42
50
|
//# sourceMappingURL=group.d.ts.map
|
package/dist/group.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../src/group.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../src/group.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAWlC,wFAAwF;AACxF,eAAO,MAAM,oBAAoB,EAAE,MAAkB,CAAA;AAErD;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAEjC,CAAA;AAEH;;;GAGG;AACH,eAAO,MAAM,QAAQ,4BAA4B,CAAA;AAOjD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAyB1C;AAED;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,YAAY,CAAA;AAEzD,4EAA4E;AAC5E,MAAM,WAAW,kBAAkB;IACjC,yDAAyD;IACzD,EAAE,EAAE,MAAM,CAAA;IACV,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAA;IACb,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAA;IACZ,8DAA8D;IAC9D,IAAI,EAAE,SAAS,CAAA;CAChB;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,CAgBrE"}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { PluginOption } from 'vite';
|
|
|
7
7
|
* application entry, so no app code changes are needed.
|
|
8
8
|
*
|
|
9
9
|
* This owns the full Vue DevTools integration (backend bridge and applet UI)
|
|
10
|
-
* and surfaces it as the dock's "Vue" entry, so the app does not
|
|
10
|
+
* and surfaces it as the dock's "Vue" entry, so the app does not add
|
|
11
11
|
* `vite-plugin-vue-devtools` separately.
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
@@ -18,6 +18,9 @@ import { PluginOption } from 'vite';
|
|
|
18
18
|
* plugins: [storefront(config), ...storefrontDevtools()],
|
|
19
19
|
* })
|
|
20
20
|
* ```
|
|
21
|
+
*
|
|
22
|
+
* @returns The dock host, the inject plugin, and every panel plugin, to
|
|
23
|
+
* spread into the Vite `plugins` array.
|
|
21
24
|
*/
|
|
22
25
|
export default function storefrontDevtools(): PluginOption[];
|
|
23
26
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAaxC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,IAAI,YAAY,EAAE,CAkD3D"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DevTools as e } from "@vitejs/devtools";
|
|
2
2
|
import { DEVTOOLS_MOUNT_PATH as t } from "@vitejs/devtools-kit/constants";
|
|
3
|
-
import {
|
|
4
|
-
import r from "
|
|
3
|
+
import { existsSync as n } from "node:fs";
|
|
4
|
+
import { fileURLToPath as r } from "node:url";
|
|
5
5
|
//#region src/inject.ts
|
|
6
6
|
var i = `${t}embedded.js`, a = /src\/client\/main\.ts$/;
|
|
7
7
|
function o(e) {
|
|
@@ -24,12 +24,16 @@ if (typeof document !== 'undefined') {
|
|
|
24
24
|
}
|
|
25
25
|
//#endregion
|
|
26
26
|
//#region src/group.ts
|
|
27
|
-
var s = "scayle-storefront", c = "#5328e1", l = "data:image/svg+xml,%3Csvg%20width%3D%2228%22%20height%3D%2228%22%20viewBox%3D%220%200%2028%2028%22%20fill%3D%22%235328E1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%2228%22%20height%3D%2228%22%20rx%3D%227%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M14%207a7%207%200%201%201%200%2014%207%207%200%200%201%200-14Zm0%202.051c-2.625%200-4.755%202.216-4.755%204.948s2.13%204.948%204.755%204.948c2.628%200%204.755-2.215%204.755-4.948%200-.948-.255-1.834-.7-2.587l-2.106%202.15-1.518-1.55%202.137-2.178A4.6%204.6%200%200%200%2014%209.05Z%22%20fill%3D%22%23fff%22%20stroke%3D%22%23fff%22%20stroke-width%3D%22.2%22%2F%3E%3C%2Fsvg%3E"
|
|
28
|
-
|
|
27
|
+
var s = "scayle-storefront", c = "#5328e1", l = "data:image/svg+xml,%3Csvg%20width%3D%2228%22%20height%3D%2228%22%20viewBox%3D%220%200%2028%2028%22%20fill%3D%22%235328E1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%2228%22%20height%3D%2228%22%20rx%3D%227%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M14%207a7%207%200%201%201%200%2014%207%207%200%200%201%200-14Zm0%202.051c-2.625%200-4.755%202.216-4.755%204.948s2.13%204.948%204.755%204.948c2.628%200%204.755-2.215%204.755-4.948%200-.948-.255-1.834-.7-2.587l-2.106%202.15-1.518-1.55%202.137-2.178A4.6%204.6%200%200%200%2014%209.05Z%22%20fill%3D%22%23fff%22%20stroke%3D%22%23fff%22%20stroke-width%3D%22.2%22%2F%3E%3C%2Fsvg%3E", u = "/__storefront-devtools/", d = r(new URL(
|
|
28
|
+
/* @vite-ignore */
|
|
29
|
+
"./ui",
|
|
30
|
+
import.meta.url
|
|
31
|
+
));
|
|
32
|
+
function f() {
|
|
29
33
|
return {
|
|
30
34
|
name: "storefront-devtools:group",
|
|
31
35
|
devtools: { setup(e) {
|
|
32
|
-
e.docks.register({
|
|
36
|
+
n(d) ? e.views.hostStatic(u, d) : console.warn(`[storefront-devtools] Panel UI not found at ${d}. Build @scayle/storefront-devtools and restart the dev server to serve the panels.`), e.docks.register({
|
|
33
37
|
id: s,
|
|
34
38
|
title: "SCAYLE Storefront",
|
|
35
39
|
icon: l,
|
|
@@ -39,7 +43,7 @@ function u() {
|
|
|
39
43
|
} }
|
|
40
44
|
};
|
|
41
45
|
}
|
|
42
|
-
function
|
|
46
|
+
function p(e) {
|
|
43
47
|
return {
|
|
44
48
|
name: `storefront-devtools:${e.id}`,
|
|
45
49
|
devtools: { setup(t) {
|
|
@@ -47,11 +51,8 @@ function d(e) {
|
|
|
47
51
|
id: e.id,
|
|
48
52
|
title: e.title,
|
|
49
53
|
icon: e.icon,
|
|
50
|
-
type: "
|
|
51
|
-
|
|
52
|
-
importFrom: e.rendererImportFrom,
|
|
53
|
-
importName: "default"
|
|
54
|
-
},
|
|
54
|
+
type: "iframe",
|
|
55
|
+
url: `${u}panels/?view=${e.view}`,
|
|
55
56
|
groupId: s
|
|
56
57
|
});
|
|
57
58
|
} }
|
|
@@ -59,90 +60,66 @@ function d(e) {
|
|
|
59
60
|
}
|
|
60
61
|
//#endregion
|
|
61
62
|
//#region src/inertia/plugin.ts
|
|
62
|
-
var
|
|
63
|
-
function
|
|
64
|
-
return
|
|
63
|
+
var m = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22128%22%20height%3D%22128%22%20viewBox%3D%220%200%20128%20128%22%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M92.433%2028.433H55.625L91.192%2064L55.625%2099.567h36.808L128%2064zm-55.625%200H0L35.567%2064L0%2099.567h36.808L72.375%2064z%22%2F%3E%3C%2Fsvg%3E";
|
|
64
|
+
function h() {
|
|
65
|
+
return p({
|
|
65
66
|
id: "storefront-devtools:inertia",
|
|
66
67
|
title: "Inertia.js",
|
|
67
|
-
icon:
|
|
68
|
-
|
|
68
|
+
icon: m,
|
|
69
|
+
view: "inertia"
|
|
69
70
|
});
|
|
70
71
|
}
|
|
71
72
|
//#endregion
|
|
72
73
|
//#region src/orpc/plugin.ts
|
|
73
|
-
var
|
|
74
|
-
function
|
|
75
|
-
return
|
|
74
|
+
var g = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%207h16M4%2012h16M4%2017h10%22%2F%3E%3C%2Fsvg%3E";
|
|
75
|
+
function _() {
|
|
76
|
+
return p({
|
|
76
77
|
id: "storefront-devtools:orpc",
|
|
77
78
|
title: "oRPC",
|
|
78
|
-
icon:
|
|
79
|
-
|
|
79
|
+
icon: g,
|
|
80
|
+
view: "orpc"
|
|
80
81
|
});
|
|
81
82
|
}
|
|
82
83
|
//#endregion
|
|
83
|
-
//#region src/resource-center/plugin.ts
|
|
84
|
-
var g = "https://scayle.dev/documentation/storefront/storefront-application/getting-started/what-is-storefront", _ = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M11.07%2012.85c.77-1.39%202.25-2.21%203.11-3.44c.91-1.29.4-3.7-2.18-3.7c-1.69%200-2.52%201.28-2.87%202.34L6.54%206.96C7.25%204.83%209.18%203%2011.99%203c2.35%200%203.96%201.07%204.78%202.41c.7%201.15%201.11%203.3.03%204.9c-1.2%201.77-2.35%202.31-2.97%203.45c-.25.46-.35.76-.35%202.24h-2.89c-.01-.78-.13-2.05.48-3.15M14%2020c0%201.1-.9%202-2%202s-2-.9-2-2s.9-2%202-2s2%20.9%202%202%22%2F%3E%3C%2Fsvg%3E";
|
|
85
|
-
function v() {
|
|
86
|
-
return {
|
|
87
|
-
name: "storefront-devtools:resource-center",
|
|
88
|
-
devtools: { setup(e) {
|
|
89
|
-
e.docks.register({
|
|
90
|
-
id: "storefront-devtools:resource-center",
|
|
91
|
-
title: "Resource Center",
|
|
92
|
-
icon: _,
|
|
93
|
-
type: "iframe",
|
|
94
|
-
url: g,
|
|
95
|
-
groupId: s
|
|
96
|
-
});
|
|
97
|
-
} }
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
//#endregion
|
|
101
84
|
//#region src/storefront/plugin.ts
|
|
102
|
-
var
|
|
103
|
-
function
|
|
104
|
-
return
|
|
85
|
+
var v = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%209l1.5-5h15L21%209M4%209h16v10a1%201%200%200%201-1%201H5a1%201%200%200%201-1-1V9zM9%2020v-6h6v6%22%2F%3E%3C%2Fsvg%3E";
|
|
86
|
+
function y() {
|
|
87
|
+
return p({
|
|
105
88
|
id: "storefront-devtools:storefront",
|
|
106
89
|
title: "Storefront",
|
|
107
|
-
icon:
|
|
108
|
-
|
|
90
|
+
icon: v,
|
|
91
|
+
view: "storefront"
|
|
109
92
|
});
|
|
110
93
|
}
|
|
111
94
|
//#endregion
|
|
112
95
|
//#region src/vue-devtools/plugin.ts
|
|
113
|
-
var
|
|
114
|
-
function
|
|
96
|
+
var b = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20fill%3D%22%2341b883%22%20d%3D%22M12%202%201%2021h22z%22%20opacity%3D%22.4%22%2F%3E%3Cpath%20fill%3D%22%2341b883%22%20d%3D%22M2%203h4l6%2010.5L18%203h4L12%2021z%22%2F%3E%3Cpath%20fill%3D%22%2335495e%22%20d%3D%22M6%203h3l3%205%203-5h3l-6%2010z%22%2F%3E%3C%2Fsvg%3E", x = `${u}vue/`;
|
|
97
|
+
function S() {
|
|
115
98
|
return {
|
|
116
99
|
name: "storefront-devtools:vue-panel",
|
|
117
100
|
apply: "serve",
|
|
118
|
-
configureServer(e) {
|
|
119
|
-
e.middlewares.use(S, r(C, {
|
|
120
|
-
dev: !0,
|
|
121
|
-
single: !0
|
|
122
|
-
}));
|
|
123
|
-
},
|
|
124
101
|
devtools: { setup(e) {
|
|
125
102
|
let t = "storefront-devtools:vue";
|
|
126
103
|
e.docks.register({
|
|
127
104
|
id: t,
|
|
128
105
|
title: "Vue",
|
|
129
|
-
icon:
|
|
106
|
+
icon: b,
|
|
130
107
|
type: "group",
|
|
131
108
|
accentColor: "#41b883",
|
|
132
109
|
defaultChildId: "storefront-devtools:vue-components"
|
|
133
110
|
}), e.docks.register({
|
|
134
111
|
id: "storefront-devtools:vue-components",
|
|
135
112
|
title: "Components",
|
|
136
|
-
icon:
|
|
113
|
+
icon: b,
|
|
137
114
|
type: "iframe",
|
|
138
|
-
url: `${
|
|
115
|
+
url: `${x}?view=components`,
|
|
139
116
|
groupId: t
|
|
140
117
|
}), e.docks.register({
|
|
141
118
|
id: "storefront-devtools:vue-timeline",
|
|
142
119
|
title: "Timeline",
|
|
143
|
-
icon:
|
|
120
|
+
icon: b,
|
|
144
121
|
type: "iframe",
|
|
145
|
-
url: `${
|
|
122
|
+
url: `${x}?view=timeline`,
|
|
146
123
|
groupId: t
|
|
147
124
|
});
|
|
148
125
|
} }
|
|
@@ -150,7 +127,7 @@ function w() {
|
|
|
150
127
|
}
|
|
151
128
|
//#endregion
|
|
152
129
|
//#region src/index.ts
|
|
153
|
-
function
|
|
130
|
+
function C() {
|
|
154
131
|
return [
|
|
155
132
|
e({
|
|
156
133
|
builtinDevTools: !1,
|
|
@@ -163,16 +140,14 @@ function T() {
|
|
|
163
140
|
o([
|
|
164
141
|
"@scayle/storefront-devtools/vue-devtools/client",
|
|
165
142
|
"@scayle/storefront-devtools/orpc/client",
|
|
166
|
-
"@scayle/storefront-devtools/resource-center/client",
|
|
167
143
|
"@scayle/storefront-devtools/inertia/client"
|
|
168
144
|
]),
|
|
169
|
-
|
|
170
|
-
p(),
|
|
171
|
-
v(),
|
|
145
|
+
f(),
|
|
172
146
|
h(),
|
|
173
|
-
|
|
174
|
-
|
|
147
|
+
_(),
|
|
148
|
+
y(),
|
|
149
|
+
S()
|
|
175
150
|
];
|
|
176
151
|
}
|
|
177
152
|
//#endregion
|
|
178
|
-
export {
|
|
153
|
+
export { C as default };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { InPageChannelProtocol } from 'devframe/in-page-channel';
|
|
2
|
+
import { InertiaPage } from './core/protocol';
|
|
3
|
+
import { RequestRecord, SessionRequestSummary } from './core/types';
|
|
4
|
+
/** Channel between the Inertia page script and the Inertia panel. */
|
|
5
|
+
export declare const INERTIA_CHANNEL = "storefront-devtools:inertia";
|
|
6
|
+
/** Channel between the Inertia page script and the Storefront context panel. */
|
|
7
|
+
export declare const STOREFRONT_CHANNEL = "storefront-devtools:storefront";
|
|
8
|
+
/** Snapshot of the Inertia capture that the page script sends to the Inertia panel. */
|
|
9
|
+
export interface InertiaPanelState {
|
|
10
|
+
/** Captured requests, oldest first. */
|
|
11
|
+
requests: RequestRecord[];
|
|
12
|
+
/** The page Inertia currently shows, `null` before the first page loads. */
|
|
13
|
+
currentPage: InertiaPage | null;
|
|
14
|
+
/** Number of requests dropped because the capture hit its record limit. */
|
|
15
|
+
evictedCount: number;
|
|
16
|
+
/** Whether capture is paused. */
|
|
17
|
+
paused: boolean;
|
|
18
|
+
/** Summaries from the previous page load, empty after Clear or when none were saved. */
|
|
19
|
+
previousSession: SessionRequestSummary[];
|
|
20
|
+
}
|
|
21
|
+
/** Contract of {@link INERTIA_CHANNEL}. */
|
|
22
|
+
export interface InertiaChannelProtocol extends InPageChannelProtocol {
|
|
23
|
+
functions: {
|
|
24
|
+
pageScript: {
|
|
25
|
+
getState: () => InertiaPanelState;
|
|
26
|
+
clear: () => void;
|
|
27
|
+
setPaused: (paused: boolean) => void;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
events: {
|
|
31
|
+
panel: {
|
|
32
|
+
state: (state: InertiaPanelState) => void;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/** Snapshot that the page script sends to the Storefront context panel. */
|
|
37
|
+
export interface StorefrontPanelState {
|
|
38
|
+
/** The page Inertia currently shows, `null` before the first page loads. */
|
|
39
|
+
currentPage: InertiaPage | null;
|
|
40
|
+
}
|
|
41
|
+
/** Contract of {@link STOREFRONT_CHANNEL}. */
|
|
42
|
+
export interface StorefrontChannelProtocol extends InPageChannelProtocol {
|
|
43
|
+
functions: {
|
|
44
|
+
pageScript: {
|
|
45
|
+
getState: () => StorefrontPanelState;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
events: {
|
|
49
|
+
panel: {
|
|
50
|
+
state: (state: StorefrontPanelState) => void;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=channel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../src/inertia/channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAExE,qEAAqE;AACrE,eAAO,MAAM,eAAe,gCAAgC,CAAA;AAE5D,gFAAgF;AAChF,eAAO,MAAM,kBAAkB,mCAAmC,CAAA;AAElE,uFAAuF;AACvF,MAAM,WAAW,iBAAiB;IAChC,uCAAuC;IACvC,QAAQ,EAAE,aAAa,EAAE,CAAA;IACzB,4EAA4E;IAC5E,WAAW,EAAE,WAAW,GAAG,IAAI,CAAA;IAC/B,2EAA2E;IAC3E,YAAY,EAAE,MAAM,CAAA;IACpB,iCAAiC;IACjC,MAAM,EAAE,OAAO,CAAA;IACf,wFAAwF;IACxF,eAAe,EAAE,qBAAqB,EAAE,CAAA;CACzC;AAED,2CAA2C;AAC3C,MAAM,WAAW,sBAAuB,SAAQ,qBAAqB;IACnE,SAAS,EAAE;QACT,UAAU,EAAE;YACV,QAAQ,EAAE,MAAM,iBAAiB,CAAA;YACjC,KAAK,EAAE,MAAM,IAAI,CAAA;YACjB,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAA;SACrC,CAAA;KACF,CAAA;IACD,MAAM,EAAE;QACN,KAAK,EAAE;YACL,KAAK,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAA;SAC1C,CAAA;KACF,CAAA;CACF;AAED,2EAA2E;AAC3E,MAAM,WAAW,oBAAoB;IACnC,4EAA4E;IAC5E,WAAW,EAAE,WAAW,GAAG,IAAI,CAAA;CAChC;AAED,8CAA8C;AAC9C,MAAM,WAAW,yBAA0B,SAAQ,qBAAqB;IACtE,SAAS,EAAE;QACT,UAAU,EAAE;YACV,QAAQ,EAAE,MAAM,oBAAoB,CAAA;SACrC,CAAA;KACF,CAAA;IACD,MAAM,EAAE;QACN,KAAK,EAAE;YACL,KAAK,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAA;SAC7C,CAAA;KACF,CAAA;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/inertia/client/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/inertia/client/index.ts"],"names":[],"mappings":""}
|