@plitzi/sdk-dev-tools 0.38.5 → 0.38.6
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 +18 -0
- package/dist/DevToolsContainer.d.ts +6 -1
- package/dist/DevToolsContainer.mjs +47 -43
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @plitzi/sdk-dev-tools
|
|
2
2
|
|
|
3
|
+
## 0.38.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 3bce653: ## Fixes
|
|
8
|
+
|
|
9
|
+
- **The dev tools draw their icons again.** The panel lives in a shadow root of its own, which the page's stylesheets
|
|
10
|
+
never reach, and Font Awesome moved to a sheet of its own in 0.38.5 (`plitzi-sdk-icons.css`): the badge and every tab
|
|
11
|
+
lost their icons. The panel now links that sheet inside its root, beside its own. Where it is served is the SDK's
|
|
12
|
+
new `sdkIconsStylePath` — the page server sends `/sdk-assets/plitzi-sdk-icons.css`, the same sheet the document
|
|
13
|
+
links — which the `iframe` and `shadow` render modes read too: they had `/plitzi-sdk-icons.css` hard-coded, a path a
|
|
14
|
+
page server does not serve.
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [3bce653]
|
|
17
|
+
- @plitzi/sdk-plugins@0.38.6
|
|
18
|
+
- @plitzi/sdk-schema@0.38.6
|
|
19
|
+
- @plitzi/sdk-shared@0.38.6
|
|
20
|
+
|
|
3
21
|
## 0.38.5
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -8,6 +8,11 @@ export type DevToolsContainerProps = {
|
|
|
8
8
|
instanceId?: string;
|
|
9
9
|
devToolsStyle?: string;
|
|
10
10
|
devToolsStyleLink?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Font Awesome's sheet, linked inside the panel's shadow root beside its own: a page's stylesheets stop at the root,
|
|
13
|
+
* and the panel's icons are classes of that sheet (its fonts are the page's, declared by the same sheet there).
|
|
14
|
+
*/
|
|
15
|
+
devToolsIconsLink?: string;
|
|
11
16
|
renderMode?: 'default' | 'shadow';
|
|
12
17
|
/**
|
|
13
18
|
* What scrolls while the panel is folded away.
|
|
@@ -26,5 +31,5 @@ export type DevToolsContainerProps = {
|
|
|
26
31
|
*/
|
|
27
32
|
qa?: boolean;
|
|
28
33
|
};
|
|
29
|
-
declare const DevToolsContainer: ({ children, className, innerClassName, enabled, instanceId, renderMode, scroll, qa, devToolsStyle, devToolsStyleLink }: DevToolsContainerProps) => string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
|
|
34
|
+
declare const DevToolsContainer: ({ children, className, innerClassName, enabled, instanceId, renderMode, scroll, qa, devToolsStyle, devToolsStyleLink, devToolsIconsLink }: DevToolsContainerProps) => string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
|
|
30
35
|
export default DevToolsContainer;
|
|
@@ -13,62 +13,66 @@ import { DevStoreScopeContext as h } from "@plitzi/nexus/react";
|
|
|
13
13
|
import g from "@plitzi/sdk-shared/theme/useTheme";
|
|
14
14
|
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
15
15
|
//#region src/DevToolsContainer.tsx
|
|
16
|
-
var y = d(() => import("./components/DevToolsOverlay/index.mjs")), b = "horizontal", x = 0, S = ({ children: d, className: S, innerClassName: C, enabled: w = !1, instanceId: T, renderMode: E = "default", scroll: D = "container", qa: O = !1, devToolsStyle: k = "", devToolsStyleLink: A = "" }) => {
|
|
17
|
-
let { resolvedTheme:
|
|
18
|
-
|
|
19
|
-
let
|
|
20
|
-
o(w), a(
|
|
21
|
-
let
|
|
22
|
-
e &&
|
|
23
|
-
}, [
|
|
24
|
-
|
|
25
|
-
}, [
|
|
16
|
+
var y = d(() => import("./components/DevToolsOverlay/index.mjs")), b = "horizontal", x = 0, S = ({ children: d, className: S, innerClassName: C, enabled: w = !1, instanceId: T, renderMode: E = "default", scroll: D = "container", qa: O = !1, devToolsStyle: k = "", devToolsStyleLink: A = "", devToolsIconsLink: j = "" }) => {
|
|
17
|
+
let { resolvedTheme: M } = g(), [N, P] = c("plitzi-sdk.dev-tools.orientation", b), [F, I] = c("plitzi-sdk.dev-tools.collapsed", !0), [L, R] = c("plitzi-sdk.dev-tools.tab", "logs"), [z, B] = m(), V = p(void 0), H = p(null);
|
|
18
|
+
V.current ||= `sdk-instance-${++x}`;
|
|
19
|
+
let U = T || V.current, W = i(), G = W ? N : b, K = r(U, w);
|
|
20
|
+
o(w), a(K, U), e(K);
|
|
21
|
+
let q = f((e) => P(e), [P]), J = f((e) => {
|
|
22
|
+
e && R("logs"), B(e), I(!1);
|
|
23
|
+
}, [I, R]), Y = f(() => I(!0), [I]), X = f((e) => {
|
|
24
|
+
B(void 0), R(e);
|
|
25
|
+
}, [R]);
|
|
26
26
|
if (!w) return d;
|
|
27
|
-
let
|
|
27
|
+
let Z = D === "document" && (!W || F), Q = K && W && /* @__PURE__ */ _(n, { children: /* @__PURE__ */ _(t, { children: /* @__PURE__ */ v(u, {
|
|
28
28
|
fallback: null,
|
|
29
29
|
children: [E === "default" && /* @__PURE__ */ _(y, {
|
|
30
|
-
className: l({ dark:
|
|
31
|
-
collapsed:
|
|
32
|
-
orientation:
|
|
33
|
-
tabSelected:
|
|
34
|
-
logTypeFilter:
|
|
35
|
-
onOpen:
|
|
36
|
-
onCollapse:
|
|
37
|
-
onTabSelect:
|
|
38
|
-
onChangeOrientation:
|
|
39
|
-
pageRef:
|
|
30
|
+
className: l({ dark: M === "dark" }),
|
|
31
|
+
collapsed: F,
|
|
32
|
+
orientation: G,
|
|
33
|
+
tabSelected: L,
|
|
34
|
+
logTypeFilter: z,
|
|
35
|
+
onOpen: J,
|
|
36
|
+
onCollapse: Y,
|
|
37
|
+
onTabSelect: X,
|
|
38
|
+
onChangeOrientation: q,
|
|
39
|
+
pageRef: H,
|
|
40
40
|
qa: O
|
|
41
|
-
}), E === "shadow" && /* @__PURE__ */ v(s, { children: [
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
41
|
+
}), E === "shadow" && /* @__PURE__ */ v(s, { children: [
|
|
42
|
+
j && /* @__PURE__ */ _(s.Link, { href: j }),
|
|
43
|
+
A && /* @__PURE__ */ _(s.Link, { href: A }),
|
|
44
|
+
/* @__PURE__ */ v(s.Content, { children: [/* @__PURE__ */ _("style", { dangerouslySetInnerHTML: { __html: k } }), /* @__PURE__ */ _(y, {
|
|
45
|
+
className: l({ dark: M === "dark" }),
|
|
46
|
+
collapsed: F,
|
|
47
|
+
orientation: G,
|
|
48
|
+
tabSelected: L,
|
|
49
|
+
logTypeFilter: z,
|
|
50
|
+
onOpen: J,
|
|
51
|
+
onCollapse: Y,
|
|
52
|
+
onTabSelect: X,
|
|
53
|
+
onChangeOrientation: q,
|
|
54
|
+
pageRef: H,
|
|
55
|
+
qa: O
|
|
56
|
+
})] })
|
|
57
|
+
] })]
|
|
54
58
|
}) }) });
|
|
55
59
|
return /* @__PURE__ */ v("div", {
|
|
56
60
|
className: l("relative flex min-w-0 grow", {
|
|
57
|
-
"overflow-auto": !
|
|
58
|
-
"flex-col":
|
|
59
|
-
"h-screen": !
|
|
61
|
+
"overflow-auto": !Z,
|
|
62
|
+
"flex-col": Z || G === "horizontal",
|
|
63
|
+
"h-screen": !Z && G === "vertical"
|
|
60
64
|
}, S),
|
|
61
65
|
children: [/* @__PURE__ */ _(h, {
|
|
62
|
-
value:
|
|
66
|
+
value: U,
|
|
63
67
|
children: /* @__PURE__ */ _("div", {
|
|
64
|
-
ref:
|
|
65
|
-
className: l("grow", { "basis-0 flex-col overflow-auto": !
|
|
68
|
+
ref: H,
|
|
69
|
+
className: l("grow", { "basis-0 flex-col overflow-auto": !Z }, C),
|
|
66
70
|
children: d
|
|
67
71
|
})
|
|
68
|
-
}),
|
|
72
|
+
}), Z ? /* @__PURE__ */ _("div", {
|
|
69
73
|
className: "sticky bottom-0 h-0",
|
|
70
|
-
children:
|
|
71
|
-
}) :
|
|
74
|
+
children: Q
|
|
75
|
+
}) : Q]
|
|
72
76
|
});
|
|
73
77
|
};
|
|
74
78
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plitzi/sdk-dev-tools",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.6",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -1211,9 +1211,9 @@
|
|
|
1211
1211
|
"dependencies": {
|
|
1212
1212
|
"@plitzi/nexus": "^1.4.0",
|
|
1213
1213
|
"@plitzi/plitzi-ui": "^1.6.31",
|
|
1214
|
-
"@plitzi/sdk-plugins": "0.38.
|
|
1215
|
-
"@plitzi/sdk-schema": "0.38.
|
|
1216
|
-
"@plitzi/sdk-shared": "0.38.
|
|
1214
|
+
"@plitzi/sdk-plugins": "0.38.6",
|
|
1215
|
+
"@plitzi/sdk-schema": "0.38.6",
|
|
1216
|
+
"@plitzi/sdk-shared": "0.38.6",
|
|
1217
1217
|
"@uiw/react-json-view": "^2.0.0-alpha.43",
|
|
1218
1218
|
"clsx": "^2.1.1"
|
|
1219
1219
|
}
|