@code0-tech/pictor 0.0.0-mvp.29 → 0.0.0-mvp.30
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/_virtual/_commonjsHelpers.js +6 -0
- package/dist/_virtual/index.js +4 -0
- package/dist/_virtual/index2.js +4 -0
- package/dist/_virtual/react-contenteditable.js +7 -0
- package/dist/_virtual/react-contenteditable2.js +4 -0
- package/dist/_virtual/react-dom-server-legacy.browser.development.js +4 -0
- package/dist/_virtual/react-dom-server-legacy.browser.production.js +4 -0
- package/dist/_virtual/react-dom-server.browser.development.js +4 -0
- package/dist/_virtual/react-dom-server.browser.production.js +4 -0
- package/dist/_virtual/react-is.development.js +4 -0
- package/dist/_virtual/react-is.production.min.js +4 -0
- package/dist/_virtual/server.browser.js +5 -0
- package/dist/_virtual/server.browser2.js +4 -0
- package/dist/assets/components/d-resizable/DResizable.style.css +1 -1
- package/dist/assets/components/form/Input.style.css +1 -1
- package/dist/components/breadcrumb/Breadcrumb.js +12 -12
- package/dist/components/button-group/ButtonGroup.js +12 -12
- package/dist/components/d-flow/DFlow.edges.hook.js +57 -54
- package/dist/components/d-flow/DFlow.js +304 -268
- package/dist/components/d-flow/DFlow.nodes.hook.js +60 -59
- package/dist/components/d-flow/DFlow.service.d.ts +3 -2
- package/dist/components/d-flow/DFlow.service.js +62 -47
- package/dist/components/d-flow/DFlow.util.d.ts +4 -0
- package/dist/components/d-flow/DFlow.util.js +63 -0
- package/dist/components/d-flow/DFlowEdge.js +34 -34
- package/dist/components/d-flow-data-type/DFlowDataType.service.js +17 -14
- package/dist/components/d-flow-data-type/DFlowDataType.view.d.ts +7 -4
- package/dist/components/d-flow-data-type/DFlowDataType.view.js +11 -6
- package/dist/components/d-flow-file/DFlowTabDefault.d.ts +0 -3
- package/dist/components/d-flow-file/DFlowTabDefault.js +77 -112
- package/dist/components/d-flow-file/DFlowTabTrigger.js +38 -49
- package/dist/components/d-flow-file/DFlowTabs.js +26 -27
- package/dist/components/d-flow-folder/DFlowFolder.js +170 -143
- package/dist/components/d-flow-folder/DFlowFolderContextMenu.js +18 -11
- package/dist/components/d-flow-folder/DFlowFolderItemPathInput.js +1 -0
- package/dist/components/d-flow-function/DFlowFunction.input.hook.js +4 -5
- package/dist/components/d-flow-function/DFlowFunction.return.hook.js +1 -1
- package/dist/components/d-flow-function/DFlowFunction.view.d.ts +14 -11
- package/dist/components/d-flow-function/DFlowFunction.view.js +19 -12
- package/dist/components/d-flow-function/DFlowFunctionDefaultCard.js +72 -75
- package/dist/components/d-flow-function/DFlowFunctionSuggestionCard.js +27 -32
- package/dist/components/d-flow-function/DFlowFunctionTriggerCard.js +17 -10
- package/dist/components/d-flow-input/DFlowInputDataType.js +38 -33
- package/dist/components/d-flow-input/DFlowInputDefault.d.ts +10 -0
- package/dist/components/d-flow-input/DFlowInputDefault.js +128 -0
- package/dist/components/d-flow-input/DFlowInputLiteralBadge.d.ts +7 -0
- package/dist/components/d-flow-input/DFlowInputLiteralBadge.js +24 -0
- package/dist/components/d-flow-input/DFlowInputNodeBadge.d.ts +11 -0
- package/dist/components/d-flow-input/DFlowInputNodeBadge.js +44 -0
- package/dist/components/d-flow-input/DFlowInputReferenceBadge.d.ts +11 -0
- package/dist/components/d-flow-input/DFlowInputReferenceBadge.js +33 -0
- package/dist/components/d-flow-panel/DFlowExport.js +1 -1
- package/dist/components/d-flow-panel/DFlowMiniMap.js +1 -1
- package/dist/components/d-flow-panel/DFlowPanelControl.js +34 -32
- package/dist/components/d-flow-suggestion/DFlowDataTypeSuggestions.hook.d.ts +3 -0
- package/dist/components/d-flow-suggestion/DFlowDataTypeSuggestions.hook.js +34 -0
- package/dist/components/d-flow-suggestion/DFlowFunctionSuggestions.hook.d.ts +3 -0
- package/dist/components/d-flow-suggestion/DFlowFunctionSuggestions.hook.js +50 -0
- package/dist/components/d-flow-suggestion/DFlowReferenceSuggestions.hook.d.ts +3 -0
- package/dist/components/d-flow-suggestion/DFlowReferenceSuggestions.hook.js +133 -0
- package/dist/components/d-flow-suggestion/DFlowSuggestion.hook.d.ts +3 -18
- package/dist/components/d-flow-suggestion/DFlowSuggestion.hook.js +19 -156
- package/dist/components/d-flow-suggestion/DFlowSuggestionMenu.js +47 -58
- package/dist/components/d-flow-suggestion/DFlowSuggestionMenu.util.js +5 -4
- package/dist/components/d-flow-suggestion/DFlowSuggestionSearchInput.js +6 -6
- package/dist/components/d-flow-suggestion/DFlowValueSuggestions.hook.d.ts +3 -0
- package/dist/components/d-flow-suggestion/DFlowValueSuggestions.hook.js +44 -0
- package/dist/components/d-flow-type/DFlowType.view.d.ts +5 -5
- package/dist/components/d-flow-type/DFlowType.view.js +22 -12
- package/dist/components/d-flow-validation/DFlowValidation.hook.js +1 -1
- package/dist/components/d-flow-validation/DNodeValidation.hook.js +39 -43
- package/dist/components/d-resizable/DResizable.d.ts +4 -4
- package/dist/components/d-resizable/DResizable.js +22 -21
- package/dist/components/d-user/DUserInput.js +23 -21
- package/dist/components/file-tabs/FileTabs.service.d.ts +0 -1
- package/dist/components/file-tabs/FileTabs.service.js +49 -53
- package/dist/components/form/EmailInput.js +9 -9
- package/dist/components/form/Input.d.ts +2 -1
- package/dist/components/form/Input.js +294 -397
- package/dist/components/form/Input.syntax.hook.d.ts +1 -18
- package/dist/components/form/Input.syntax.hook.js +7 -73
- package/dist/components/form/Input.utils.d.ts +1 -2
- package/dist/components/form/Input.utils.js +26 -21
- package/dist/components/form/InputContentEditable.hook.d.ts +40 -0
- package/dist/components/form/InputContentEditable.hook.js +471 -0
- package/dist/components/form/InputSuggestion.d.ts +2 -2
- package/dist/components/form/InputSuggestion.js +169 -107
- package/dist/components/form/PasswordInput.js +8 -8
- package/dist/components/form/TextInput.js +11 -11
- package/dist/components/form/useForm.d.ts +1 -0
- package/dist/components/form/useForm.js +45 -60
- package/dist/components/menu/Menu.js +4 -4
- package/dist/index.js +155 -154
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +30 -30
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +8 -8
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +8 -8
- package/dist/node_modules/fast-deep-equal/index.js +31 -0
- package/dist/node_modules/object-assign/index.js +49 -0
- package/dist/node_modules/prop-types/checkPropTypes.js +54 -0
- package/dist/node_modules/prop-types/factoryWithThrowingShims.js +52 -0
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +329 -0
- package/dist/node_modules/prop-types/index.js +17 -0
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js +10 -0
- package/dist/node_modules/prop-types/lib/has.js +7 -0
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +87 -0
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +70 -0
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +10 -0
- package/dist/node_modules/react-contenteditable/lib/react-contenteditable.js +132 -0
- package/dist/node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js +6235 -0
- package/dist/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js +4096 -0
- package/dist/node_modules/react-dom/cjs/react-dom-server.browser.development.js +6753 -0
- package/dist/node_modules/react-dom/cjs/react-dom-server.browser.production.js +4645 -0
- package/dist/node_modules/react-dom/server.browser.js +15 -0
- package/dist/utils/generics.d.ts +2 -0
- package/dist/utils/generics.js +93 -80
- package/dist/utils/index.js +22 -21
- package/dist/utils/inspection.d.ts +4 -2
- package/dist/utils/inspection.js +27 -2
- package/package.json +10 -8
- package/dist/components/form/Input.selection.hook.d.ts +0 -17
- package/dist/components/form/Input.selection.hook.js +0 -78
- package/dist/components/form/InputSyntax.d.ts +0 -19
- package/dist/components/form/InputSyntax.js +0 -52
- package/dist/components/form/inputSyntaxMapping.d.ts +0 -3
- package/dist/components/form/inputSyntaxMapping.js +0 -42
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { jsx as x, jsxs as $ } from "react/jsx-runtime";
|
|
2
|
-
import { c as b } from "../../_virtual/compiler-runtime.js";
|
|
3
|
-
const k = (v, a, l, o) => {
|
|
4
|
-
let d = !1;
|
|
5
|
-
const c = (t, n) => l ? l.start < n && l.end > t : !1, i = (t) => {
|
|
6
|
-
if (!a || l || o === null || d) return !1;
|
|
7
|
-
const n = Math.round(o) === Math.round(t);
|
|
8
|
-
return n && (d = !0), n;
|
|
9
|
-
}, s = (t) => /* @__PURE__ */ x("span", { className: "input__syntax-caret", "data-visual-index": t, "aria-hidden": !0 }, `caret-${t}`);
|
|
10
|
-
return v.map((t, n) => {
|
|
11
|
-
const e = `${t.start}-${t.end}-${n}`, r = typeof t.content == "string" ? t.content : t.content ?? null, u = [t.type === "block" ? "input__syntax-block" : "input__syntax-text", t.type === "block" && c(t.visualStart, t.visualEnd) ? "input__syntax-block--selected" : ""].filter(Boolean).join(" "), y = {
|
|
12
|
-
"data-visual-start": t.visualStart,
|
|
13
|
-
"data-visual-end": t.visualEnd,
|
|
14
|
-
"data-visual-length": t.visualLength,
|
|
15
|
-
"data-raw-start": t.start,
|
|
16
|
-
"data-raw-end": t.end
|
|
17
|
-
};
|
|
18
|
-
if (typeof r == "string" && t.type === "text") {
|
|
19
|
-
const p = [];
|
|
20
|
-
return r.split("").forEach((_, h) => {
|
|
21
|
-
const f = t.visualStart + h, S = t.start + h, E = c(f, f + 1);
|
|
22
|
-
i(f) && p.push(s(f)), p.push(/* @__PURE__ */ x("span", { "data-visual-index": f, "data-raw-index": S, className: E ? "input__syntax-char--selected" : "", "aria-hidden": !0, children: _ === " " ? " " : _ }, `${e}-char-${h}`));
|
|
23
|
-
}), i(t.visualEnd) && p.push(s(t.visualEnd)), /* @__PURE__ */ x("span", { className: u, "aria-hidden": !0, ...y, children: p }, e);
|
|
24
|
-
}
|
|
25
|
-
return /* @__PURE__ */ $("span", { className: u, "aria-hidden": !0, ...y, children: [
|
|
26
|
-
i(t.visualStart) && s(t.visualStart),
|
|
27
|
-
r,
|
|
28
|
-
i(t.visualEnd) && s(t.visualEnd)
|
|
29
|
-
] }, e);
|
|
30
|
-
});
|
|
31
|
-
}, j = (v) => {
|
|
32
|
-
const a = b.c(11), {
|
|
33
|
-
transformSyntax: l,
|
|
34
|
-
syntaxRef: o,
|
|
35
|
-
visualizedSyntaxSegments: d,
|
|
36
|
-
resolvedVisualSelectionRange: c,
|
|
37
|
-
visualCaretIndex: i,
|
|
38
|
-
isFocused: s,
|
|
39
|
-
onPointerDown: t,
|
|
40
|
-
onPointerMove: n,
|
|
41
|
-
onPointerUp: e
|
|
42
|
-
} = v;
|
|
43
|
-
if (!l)
|
|
44
|
-
return null;
|
|
45
|
-
let r;
|
|
46
|
-
a[0] !== s || a[1] !== c || a[2] !== i || a[3] !== d ? (r = k(d, s, c, i), a[0] = s, a[1] = c, a[2] = i, a[3] = d, a[4] = r) : r = a[4];
|
|
47
|
-
let u;
|
|
48
|
-
return a[5] !== t || a[6] !== n || a[7] !== e || a[8] !== o || a[9] !== r ? (u = /* @__PURE__ */ x("div", { className: "input__syntax", ref: o, onPointerDown: t, onPointerMove: n, onPointerUp: e, children: r }), a[5] = t, a[6] = n, a[7] = e, a[8] = o, a[9] = r, a[10] = u) : u = a[10], u;
|
|
49
|
-
};
|
|
50
|
-
export {
|
|
51
|
-
j as InputSyntax
|
|
52
|
-
};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { InputSyntaxSegment } from './Input.syntax.hook';
|
|
2
|
-
export declare const visualIndexToRawIndex: (visualIndex: number, segments: InputSyntaxSegment[]) => number;
|
|
3
|
-
export declare const rawIndexToVisualIndex: (rawIndex: number, segments: InputSyntaxSegment[]) => number;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
const l = (n, e, t) => Math.min(Math.max(n, e), t), u = (n) => [...n].sort((e, t) => e.start - t.start || e.end - t.end), d = (n) => u(n).reduce((e, t) => e + (t?.visualLength ?? 0), 0), h = (n) => u(n).reduce((e, t) => Math.max(e, t?.end), 0), x = (n, e, t) => {
|
|
2
|
-
const c = Math.abs(t - e), s = Math.abs(t - (e + (n?.visualLength ?? 0)));
|
|
3
|
-
return c <= s ? n?.start : n?.end;
|
|
4
|
-
}, g = (n, e, t) => {
|
|
5
|
-
const c = Math.abs(t - n?.start), s = Math.abs(n?.end - t);
|
|
6
|
-
return c <= s ? e : e + (n?.visualLength ?? 0);
|
|
7
|
-
}, v = (n, e) => {
|
|
8
|
-
if (!e.length) return 0;
|
|
9
|
-
const t = u(e), c = d(t), s = l(n, 0, c);
|
|
10
|
-
let o = 0, r = t[0].start;
|
|
11
|
-
for (const a of t) {
|
|
12
|
-
const i = o + (a?.visualLength ?? 0);
|
|
13
|
-
if (s <= i) {
|
|
14
|
-
if (a?.type === "block")
|
|
15
|
-
return x(a, o, s);
|
|
16
|
-
const f = l(s - o, 0, a?.visualLength ?? 0);
|
|
17
|
-
return l(a?.start + f, a?.start, a?.end);
|
|
18
|
-
}
|
|
19
|
-
o = i, r = a?.end;
|
|
20
|
-
}
|
|
21
|
-
return r;
|
|
22
|
-
}, L = (n, e) => {
|
|
23
|
-
if (!e.length) return 0;
|
|
24
|
-
const t = u(e), c = h(t), s = l(n, 0, c);
|
|
25
|
-
let o = 0;
|
|
26
|
-
for (const r of t) {
|
|
27
|
-
if (s < r?.start)
|
|
28
|
-
return o;
|
|
29
|
-
if (s <= r?.end) {
|
|
30
|
-
if (r?.type === "block")
|
|
31
|
-
return g(r, o, s);
|
|
32
|
-
const a = l(s - r?.start, 0, r?.visualLength ?? 0);
|
|
33
|
-
return o + a;
|
|
34
|
-
}
|
|
35
|
-
o += r?.visualLength ?? 0;
|
|
36
|
-
}
|
|
37
|
-
return d(t);
|
|
38
|
-
};
|
|
39
|
-
export {
|
|
40
|
-
L as rawIndexToVisualIndex,
|
|
41
|
-
v as visualIndexToRawIndex
|
|
42
|
-
};
|