@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 .flex{width:100%;height:100%;gap:.7rem}.d-layout__content{width:100%}
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 d } from "react/jsx-runtime";
1
+ import { jsx as u } from "react/jsx-runtime";
2
2
  import { c as f } from "../../_virtual/compiler-runtime.js";
3
- import o from "react";
4
- import { mergeCode0Props as h } from "../../utils/utils.js";
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 a = (r) => {
7
- const e = f.c(7), t = o.useRef(null);
8
- let n, l;
9
- e[0] === Symbol.for("react.memo_cache_sentinel") ? (n = () => {
10
- t.current && (window.addEventListener("resize", () => {
11
- t.current.style.height = window.innerHeight + "px", t.current.style.width = window.innerWidth + "px";
12
- }), t.current.style.height = window.innerHeight + "px", t.current.style.width = window.innerWidth + "px");
13
- }, l = [t], e[0] = n, e[1] = l) : (n = e[0], l = e[1]), o.useEffect(n, l);
14
- let i;
15
- e[2] !== r ? (i = h("d-full-screen", r), e[2] = r, e[3] = i) : i = e[3];
16
- let c;
17
- return e[4] !== r.children || e[5] !== i ? (c = /* @__PURE__ */ d("div", { ...i, ref: t, children: r.children }), e[4] = r.children, e[5] = i, e[6] = c) : c = e[6], c;
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
- a as DFullScreen
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>, initial?: InitialArg<K, S>): [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 a, { startTransition as i } from "react";
2
- function u(r, e, t) {
3
- return (e = f(e)) in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r;
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 f(r) {
6
- var e = v(r, "string");
5
+ function y(t) {
6
+ var e = h(t, "string");
7
7
  return typeof e == "symbol" ? e : e + "";
8
8
  }
9
- function v(r, e) {
10
- if (typeof r != "object" || !r) return r;
11
- var t = r[Symbol.toPrimitive];
12
- if (t !== void 0) {
13
- var s = t.call(r, e);
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)(r);
17
+ return (e === "string" ? String : Number)(t);
18
18
  }
19
- class y {
19
+ class b {
20
20
  constructor(e) {
21
- u(this, "access", void 0), this.access = e;
21
+ v(this, "access", void 0), this.access = e;
22
22
  }
23
23
  delete(e) {
24
- i(() => {
25
- this.access.setState((t) => t.filter((s, c) => c !== e));
24
+ a(() => {
25
+ this.access.setState((r) => r.filter((s, c) => c !== e));
26
26
  });
27
27
  }
28
28
  add(e) {
29
- i(() => {
30
- this.access.setState((t) => [...t, e]);
29
+ a(() => {
30
+ this.access.setState((r) => [...r, e]);
31
31
  });
32
32
  }
33
- set(e, t) {
34
- i(() => {
33
+ set(e, r) {
34
+ a(() => {
35
35
  this.access.setState((s) => {
36
36
  const c = s.slice();
37
- return c[e] = t, c;
37
+ return c[e] = r, c;
38
38
  });
39
39
  });
40
40
  }
41
41
  has(e) {
42
- const t = this.access.getState();
43
- return e >= 0 && e < t.length;
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
- i(() => {
52
+ a(() => {
53
53
  this.access.setState((e) => e.slice());
54
54
  });
55
55
  }
56
56
  clear() {
57
- i(() => {
57
+ a(() => {
58
58
  this.access.setState(() => []);
59
59
  });
60
60
  }
61
61
  }
62
- function S(r, e = []) {
63
- const [t, s] = a.useState(
64
- Array.isArray(e) ? e : []
65
- // Platzhalter; Callback folgt in Effect
66
- ), c = a.useRef(t);
67
- a.useEffect(() => {
68
- c.current = t;
69
- }, [t]);
70
- const o = a.useCallback(() => c.current, []), n = a.useMemo(() => new r({
71
- getState: o,
72
- setState: s
73
- }), [r, o, s]);
74
- return a.useEffect(() => {
75
- typeof e == "function" && s(e(n));
76
- }, [n]), [t, n];
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
- y as ReactiveArrayService,
80
- S as useReactiveArrayService
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.5",
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.5",
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": "^28.0.9",
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",