@code0-tech/pictor 0.0.0-mvp.5 → 0.0.0-mvp.7
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
.d-layout{position:relative;width:100%;height:100%;overflow:hidden}.d-layout
|
|
1
|
+
.d-layout{position:relative;width:100%;height:100%;overflow:hidden}.d-layout>.flex,.d-layout>.flex>.flex{width:100%;height:100%;gap:.7rem}.d-layout__content{width:100%}
|
|
@@ -1,21 +1,26 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
2
|
import { c as f } from "../../_virtual/compiler-runtime.js";
|
|
3
|
-
import
|
|
4
|
-
import { mergeCode0Props as
|
|
3
|
+
import l from "react";
|
|
4
|
+
import { mergeCode0Props as m } from "../../utils/utils.js";
|
|
5
5
|
import '../../assets/components/d-fullscreen/DFullScreen.style.css';/* empty css */
|
|
6
|
-
const
|
|
7
|
-
const e = f.c(7), t =
|
|
8
|
-
let
|
|
9
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
10
|
-
t.current
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
const y = (i) => {
|
|
7
|
+
const e = f.c(7), t = l.useRef(null);
|
|
8
|
+
let r, o;
|
|
9
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (r = () => {
|
|
10
|
+
if (!t.current)
|
|
11
|
+
return;
|
|
12
|
+
window.addEventListener("resize", () => {
|
|
13
|
+
const c = Math.round(window.visualViewport?.width ?? window.innerWidth), s = Math.round(window.visualViewport?.height ?? window.innerHeight);
|
|
14
|
+
t.current.style.height = s + "px", t.current.style.width = c + "px";
|
|
15
|
+
});
|
|
16
|
+
const w = Math.round(window.visualViewport?.width ?? window.innerWidth), h = Math.round(window.visualViewport?.height ?? window.innerHeight);
|
|
17
|
+
t.current.style.height = h + "px", t.current.style.width = w + "px";
|
|
18
|
+
}, o = [t], e[0] = r, e[1] = o) : (r = e[0], o = e[1]), l.useEffect(r, o);
|
|
19
|
+
let n;
|
|
20
|
+
e[2] !== i ? (n = m("d-full-screen", i), e[2] = i, e[3] = n) : n = e[3];
|
|
21
|
+
let d;
|
|
22
|
+
return e[4] !== i.children || e[5] !== n ? (d = /* @__PURE__ */ u("div", { ...n, ref: t, children: i.children }), e[4] = i.children, e[5] = n, e[6] = d) : d = e[6], d;
|
|
18
23
|
};
|
|
19
24
|
export {
|
|
20
|
-
|
|
25
|
+
y as DFullScreen
|
|
21
26
|
};
|
|
@@ -18,5 +18,5 @@ export declare class ReactiveArrayService<T> implements ArrayService<T> {
|
|
|
18
18
|
}
|
|
19
19
|
type ArrayServiceCtor<K, S extends ArrayService<K>> = new (access: ReactiveArrayStore<K>) => S;
|
|
20
20
|
type InitialArg<K, S extends ArrayService<K>> = K[] | ((svc: S) => K[]);
|
|
21
|
-
export declare function useReactiveArrayService<K, S extends ArrayService<K>>(Ctor: ArrayServiceCtor<K, S
|
|
21
|
+
export declare function useReactiveArrayService<K, S extends ArrayService<K>>(Ctor: ArrayServiceCtor<K, S> | ((store: ReactiveArrayStore<K>) => S), initial?: InitialArg<K, S>): [K[], S];
|
|
22
22
|
export {};
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import
|
|
2
|
-
function
|
|
3
|
-
return (e =
|
|
1
|
+
import n, { startTransition as a } from "react";
|
|
2
|
+
function v(t, e, r) {
|
|
3
|
+
return (e = y(e)) in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t;
|
|
4
4
|
}
|
|
5
|
-
function
|
|
6
|
-
var e =
|
|
5
|
+
function y(t) {
|
|
6
|
+
var e = h(t, "string");
|
|
7
7
|
return typeof e == "symbol" ? e : e + "";
|
|
8
8
|
}
|
|
9
|
-
function
|
|
10
|
-
if (typeof
|
|
11
|
-
var
|
|
12
|
-
if (
|
|
13
|
-
var s =
|
|
9
|
+
function h(t, e) {
|
|
10
|
+
if (typeof t != "object" || !t) return t;
|
|
11
|
+
var r = t[Symbol.toPrimitive];
|
|
12
|
+
if (r !== void 0) {
|
|
13
|
+
var s = r.call(t, e);
|
|
14
14
|
if (typeof s != "object") return s;
|
|
15
15
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
16
16
|
}
|
|
17
|
-
return (e === "string" ? String : Number)(
|
|
17
|
+
return (e === "string" ? String : Number)(t);
|
|
18
18
|
}
|
|
19
|
-
class
|
|
19
|
+
class b {
|
|
20
20
|
constructor(e) {
|
|
21
|
-
|
|
21
|
+
v(this, "access", void 0), this.access = e;
|
|
22
22
|
}
|
|
23
23
|
delete(e) {
|
|
24
|
-
|
|
25
|
-
this.access.setState((
|
|
24
|
+
a(() => {
|
|
25
|
+
this.access.setState((r) => r.filter((s, c) => c !== e));
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
add(e) {
|
|
29
|
-
|
|
30
|
-
this.access.setState((
|
|
29
|
+
a(() => {
|
|
30
|
+
this.access.setState((r) => [...r, e]);
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
set(e,
|
|
34
|
-
|
|
33
|
+
set(e, r) {
|
|
34
|
+
a(() => {
|
|
35
35
|
this.access.setState((s) => {
|
|
36
36
|
const c = s.slice();
|
|
37
|
-
return c[e] =
|
|
37
|
+
return c[e] = r, c;
|
|
38
38
|
});
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
has(e) {
|
|
42
|
-
const
|
|
43
|
-
return e >= 0 && e <
|
|
42
|
+
const r = this.access.getState();
|
|
43
|
+
return e >= 0 && e < r.length;
|
|
44
44
|
}
|
|
45
45
|
get(e) {
|
|
46
46
|
return this.access.getState()[e];
|
|
@@ -49,33 +49,43 @@ class y {
|
|
|
49
49
|
return this.access.getState();
|
|
50
50
|
}
|
|
51
51
|
update() {
|
|
52
|
-
|
|
52
|
+
a(() => {
|
|
53
53
|
this.access.setState((e) => e.slice());
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
56
|
clear() {
|
|
57
|
-
|
|
57
|
+
a(() => {
|
|
58
58
|
this.access.setState(() => []);
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
const [
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
62
|
+
function g(t, e = []) {
|
|
63
|
+
const [r, s] = n.useState(Array.isArray(e) ? e : []), c = n.useRef(r);
|
|
64
|
+
n.useEffect(() => {
|
|
65
|
+
c.current = r;
|
|
66
|
+
}, [r]);
|
|
67
|
+
const u = n.useCallback(() => c.current, []), o = n.useMemo(() => {
|
|
68
|
+
const i = {
|
|
69
|
+
getState: u,
|
|
70
|
+
setState: s
|
|
71
|
+
}, f = {
|
|
72
|
+
construct() {
|
|
73
|
+
return f;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
return ((l) => {
|
|
77
|
+
try {
|
|
78
|
+
return !!new new Proxy(l, f)();
|
|
79
|
+
} catch {
|
|
80
|
+
return !1;
|
|
81
|
+
}
|
|
82
|
+
})(t) ? new t(i) : t(i);
|
|
83
|
+
}, [t, u, s]);
|
|
84
|
+
return n.useEffect(() => {
|
|
85
|
+
typeof e == "function" && s(e(o));
|
|
86
|
+
}, [o, e]), [r, o];
|
|
77
87
|
}
|
|
78
88
|
export {
|
|
79
|
-
|
|
80
|
-
|
|
89
|
+
b as ReactiveArrayService,
|
|
90
|
+
g as useReactiveArrayService
|
|
81
91
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code0-tech/pictor",
|
|
3
|
-
"version": "0.0.0-mvp.
|
|
3
|
+
"version": "0.0.0-mvp.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A simple template for a custom React component library",
|
|
6
6
|
"scripts": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@babel/plugin-proposal-decorators": "^7.28.0",
|
|
23
23
|
"@babel/plugin-transform-class-properties": "^7.27.1",
|
|
24
24
|
"@code0-tech/sagittarius-graphql-types": "^0.0.0-65144a9920c6a8de3bcf24acdcb8eec4158cef73",
|
|
25
|
-
"@dagrejs/dagre": "^1.1.
|
|
25
|
+
"@dagrejs/dagre": "^1.1.8",
|
|
26
26
|
"@mdx-js/react": "^3.1.1",
|
|
27
27
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
28
28
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@radix-ui/react-tabs": "^1.1.13",
|
|
34
34
|
"@radix-ui/react-toggle-group": "^1.1.11",
|
|
35
35
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
36
|
-
"@rollup/plugin-commonjs": "^
|
|
36
|
+
"@rollup/plugin-commonjs": "^29.0.0",
|
|
37
37
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
38
38
|
"@rollup/plugin-terser": "^0.4.4",
|
|
39
39
|
"@rollup/plugin-typescript": "^12.3.0",
|