@kopexa/extension-controlref 1.0.0 → 2.0.0
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/chunk-4C72VBLP.mjs +52 -0
- package/dist/chunk-A7FWOQDN.mjs +210 -0
- package/dist/chunk-AQTNFDGA.mjs +57 -0
- package/dist/chunk-D53W4HWR.mjs +245 -0
- package/dist/chunk-FTEE5U3H.mjs +37 -0
- package/dist/chunk-GYDJVHHG.mjs +250 -0
- package/dist/chunk-IMHLTRZJ.mjs +29 -0
- package/dist/chunk-JM66CQVD.mjs +10 -0
- package/dist/chunk-LMKP3DDN.mjs +189 -0
- package/dist/chunk-RTBFRPB3.mjs +186 -0
- package/dist/chunk-TEDXYIGO.mjs +38 -0
- package/dist/chunk-WIS7ZNTO.mjs +4 -0
- package/dist/chunk-X46EFFCE.mjs +148 -0
- package/dist/chunk-XHD2KFKQ.mjs +16 -0
- package/dist/chunk-ZRKYAFRY.mjs +46 -0
- package/dist/chunk-ZUR6XKMG.mjs +21 -0
- package/dist/components/control-block-view.d.mts +6 -0
- package/dist/components/control-block-view.d.ts +6 -0
- package/dist/components/control-block-view.js +789 -0
- package/dist/components/control-block-view.mjs +11 -0
- package/dist/components/control-implementation-view.d.mts +6 -0
- package/dist/components/control-implementation-view.d.ts +6 -0
- package/dist/components/control-implementation-view.js +52 -0
- package/dist/components/control-implementation-view.mjs +7 -0
- package/dist/components/control-picker.d.mts +25 -0
- package/dist/components/control-picker.d.ts +25 -0
- package/dist/components/control-picker.js +522 -0
- package/dist/components/control-picker.mjs +10 -0
- package/dist/components/control-view.js +677 -122
- package/dist/components/control-view.mjs +5 -5
- package/dist/components/use-control.d.mts +20 -0
- package/dist/components/use-control.d.ts +20 -0
- package/dist/components/use-control.js +127 -0
- package/dist/components/use-control.mjs +9 -0
- package/dist/control-block.d.mts +35 -0
- package/dist/control-block.d.ts +35 -0
- package/dist/control-block.js +1012 -0
- package/dist/control-block.mjs +17 -0
- package/dist/control-implementation.d.mts +7 -0
- package/dist/control-implementation.d.ts +7 -0
- package/dist/control-implementation.js +92 -0
- package/dist/control-implementation.mjs +9 -0
- package/dist/control.d.mts +31 -1
- package/dist/control.d.ts +31 -1
- package/dist/control.js +819 -136
- package/dist/control.mjs +7 -6
- package/dist/defaults.d.mts +3 -9
- package/dist/defaults.d.ts +3 -9
- package/dist/defaults.js +3 -20
- package/dist/defaults.mjs +3 -6
- package/dist/index.d.mts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.js +1229 -569
- package/dist/index.mjs +58 -21
- package/dist/messages/index.d.mts +135 -0
- package/dist/messages/index.d.ts +135 -0
- package/dist/messages/index.js +137 -2
- package/dist/messages/index.mjs +1 -2
- package/dist/role.d.mts +17 -0
- package/dist/role.d.ts +17 -0
- package/dist/role.js +5 -0
- package/dist/role.mjs +2 -0
- package/dist/types.d.mts +23 -16
- package/dist/types.d.ts +23 -16
- package/dist/utils/create-control-block.d.mts +7 -0
- package/dist/utils/create-control-block.d.ts +7 -0
- package/dist/utils/create-control-block.js +85 -0
- package/dist/utils/create-control-block.mjs +10 -0
- package/dist/utils/create-control-implementation.d.mts +8 -0
- package/dist/utils/create-control-implementation.d.ts +8 -0
- package/dist/utils/create-control-implementation.js +39 -0
- package/dist/utils/create-control-implementation.mjs +7 -0
- package/dist/utils/getControlNodeTypes.d.mts +5 -0
- package/dist/utils/getControlNodeTypes.d.ts +5 -0
- package/dist/utils/getControlNodeTypes.js +44 -0
- package/dist/utils/getControlNodeTypes.mjs +7 -0
- package/dist/utils/index.d.mts +7 -2
- package/dist/utils/index.d.ts +7 -2
- package/dist/utils/index.js +35 -3
- package/dist/utils/index.mjs +7 -4
- package/dist/utils/status-indicator.d.mts +18 -0
- package/dist/utils/status-indicator.d.ts +18 -0
- package/dist/utils/status-indicator.js +80 -0
- package/dist/utils/status-indicator.mjs +7 -0
- package/package.json +9 -9
- package/dist/card-variant.d.mts +0 -12
- package/dist/card-variant.d.ts +0 -12
- package/dist/card-variant.js +0 -66
- package/dist/card-variant.mjs +0 -8
- package/dist/chunk-AC4KL3WX.mjs +0 -29
- package/dist/chunk-AZ5M5MVC.mjs +0 -36
- package/dist/chunk-DTFR234X.mjs +0 -244
- package/dist/chunk-EDD7DYLE.mjs +0 -29
- package/dist/chunk-GC5EBQ7G.mjs +0 -10
- package/dist/chunk-H2ECPGOG.mjs +0 -81
- package/dist/chunk-KLX7Q3HL.mjs +0 -109
- package/dist/chunk-LKRTUIEV.mjs +0 -46
- package/dist/chunk-NAJ6IC4Y.mjs +0 -43
- package/dist/chunk-QI3ZPZTR.mjs +0 -26
- package/dist/chunk-SNRVOTF5.mjs +0 -8
- package/dist/chunk-VP5POY44.mjs +0 -57
- package/dist/chunk-WIR5FCIC.mjs +0 -110
- package/dist/control-ref-view.d.mts +0 -6
- package/dist/control-ref-view.d.ts +0 -6
- package/dist/control-ref-view.js +0 -615
- package/dist/control-ref-view.mjs +0 -15
- package/dist/control-ref.d.mts +0 -28
- package/dist/control-ref.d.ts +0 -28
- package/dist/control-ref.js +0 -687
- package/dist/control-ref.mjs +0 -16
- package/dist/i18n.d.mts +0 -4
- package/dist/i18n.d.ts +0 -4
- package/dist/i18n.js +0 -128
- package/dist/i18n.mjs +0 -10
- package/dist/lang/de.d.mts +0 -24
- package/dist/lang/de.d.ts +0 -24
- package/dist/lang/de.js +0 -25
- package/dist/lang/de.mjs +0 -8
- package/dist/lang/en.d.mts +0 -24
- package/dist/lang/en.d.ts +0 -24
- package/dist/lang/en.js +0 -25
- package/dist/lang/en.mjs +0 -8
- package/dist/settings-dialog.d.mts +0 -19
- package/dist/settings-dialog.d.ts +0 -19
- package/dist/settings-dialog.js +0 -371
- package/dist/settings-dialog.mjs +0 -9
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
ControlBlock
|
|
4
|
+
} from "./chunk-RTBFRPB3.mjs";
|
|
5
|
+
import "./chunk-FTEE5U3H.mjs";
|
|
6
|
+
import "./chunk-XHD2KFKQ.mjs";
|
|
7
|
+
import "./chunk-ZUR6XKMG.mjs";
|
|
8
|
+
import "./chunk-JM66CQVD.mjs";
|
|
9
|
+
import "./chunk-WIS7ZNTO.mjs";
|
|
10
|
+
import "./chunk-GYDJVHHG.mjs";
|
|
11
|
+
import "./chunk-A7FWOQDN.mjs";
|
|
12
|
+
import "./chunk-4C72VBLP.mjs";
|
|
13
|
+
import "./chunk-AQTNFDGA.mjs";
|
|
14
|
+
import "./chunk-D53W4HWR.mjs";
|
|
15
|
+
export {
|
|
16
|
+
ControlBlock
|
|
17
|
+
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/control-implementation.ts
|
|
22
|
+
var control_implementation_exports = {};
|
|
23
|
+
__export(control_implementation_exports, {
|
|
24
|
+
ControlImplementation: () => ControlImplementation
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(control_implementation_exports);
|
|
27
|
+
var import_core = require("@tiptap/core");
|
|
28
|
+
var import_react2 = require("@tiptap/react");
|
|
29
|
+
|
|
30
|
+
// src/components/control-implementation-view.tsx
|
|
31
|
+
var import_react = require("@tiptap/react");
|
|
32
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
33
|
+
var ControlImplementationView = (props) => {
|
|
34
|
+
var _a;
|
|
35
|
+
const { node } = props;
|
|
36
|
+
const a = node.attrs;
|
|
37
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
38
|
+
import_react.NodeViewWrapper,
|
|
39
|
+
{
|
|
40
|
+
as: "div",
|
|
41
|
+
role: "listitem",
|
|
42
|
+
"data-type": "control-implementation",
|
|
43
|
+
"data-id": a.id,
|
|
44
|
+
className: "flex items-start justify-between gap-3 py-3",
|
|
45
|
+
contentEditable: false,
|
|
46
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
47
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-sm font-medium text-foreground truncate", children: (_a = a.title) != null ? _a : a.id }),
|
|
48
|
+
a.description ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-sm text-muted-foreground mt-0.5", children: a.description }) : null
|
|
49
|
+
] })
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
// src/control-implementation.ts
|
|
55
|
+
var ControlImplementation = import_core.Node.create({
|
|
56
|
+
name: "controlImplementation",
|
|
57
|
+
controlRole: "controlImplementation",
|
|
58
|
+
group: "block",
|
|
59
|
+
content: "",
|
|
60
|
+
// keine Kinder, Zeile ist atomar
|
|
61
|
+
atom: true,
|
|
62
|
+
// Row als unteilbarer Block
|
|
63
|
+
selectable: true,
|
|
64
|
+
draggable: false,
|
|
65
|
+
addAttributes() {
|
|
66
|
+
return {
|
|
67
|
+
id: { default: null },
|
|
68
|
+
title: { default: "" },
|
|
69
|
+
status: { default: null },
|
|
70
|
+
updatedAt: { default: null }
|
|
71
|
+
};
|
|
72
|
+
},
|
|
73
|
+
parseHTML() {
|
|
74
|
+
return [{ tag: 'div[data-type="control-implementation"]' }];
|
|
75
|
+
},
|
|
76
|
+
renderHTML({ node, HTMLAttributes }) {
|
|
77
|
+
return [
|
|
78
|
+
"div",
|
|
79
|
+
(0, import_core.mergeAttributes)(HTMLAttributes, {
|
|
80
|
+
"data-type": "control-implementation",
|
|
81
|
+
"data-id": node.attrs.id
|
|
82
|
+
})
|
|
83
|
+
];
|
|
84
|
+
},
|
|
85
|
+
addNodeView() {
|
|
86
|
+
return (0, import_react2.ReactNodeViewRenderer)(ControlImplementationView, { as: "div" });
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
90
|
+
0 && (module.exports = {
|
|
91
|
+
ControlImplementation
|
|
92
|
+
});
|
package/dist/control.d.mts
CHANGED
|
@@ -1,6 +1,36 @@
|
|
|
1
1
|
import { Node } from '@tiptap/core';
|
|
2
|
+
import { ControlNodeAttrs, ControlResolver } from './types.mjs';
|
|
3
|
+
import '@kopexa/theme';
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
declare module "@tiptap/core" {
|
|
6
|
+
interface Commands<ReturnType> {
|
|
7
|
+
control: {
|
|
8
|
+
/**
|
|
9
|
+
* Insert a control at the current selection.
|
|
10
|
+
*/
|
|
11
|
+
insertControl: (attrs: Partial<ControlNodeAttrs> & Pick<ControlNodeAttrs, "id">) => ReturnType;
|
|
12
|
+
/**
|
|
13
|
+
* Update attributes of the selected control node.
|
|
14
|
+
*/
|
|
15
|
+
updateControl: (attrs: Partial<ControlNodeAttrs>) => ReturnType;
|
|
16
|
+
/**
|
|
17
|
+
* Remove the selected control node.
|
|
18
|
+
*/
|
|
19
|
+
unsetControl: () => ReturnType;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
type ControlOptions = {
|
|
24
|
+
/**
|
|
25
|
+
* Optional resolver used by the node view for live lookups.
|
|
26
|
+
* The node still renders purely from attributes if this is absent.
|
|
27
|
+
*/
|
|
28
|
+
resolver?: ControlResolver;
|
|
29
|
+
/**
|
|
30
|
+
* Placeholder text used when no title is present.
|
|
31
|
+
*/
|
|
32
|
+
fallbackLabel?: string;
|
|
33
|
+
};
|
|
4
34
|
/**
|
|
5
35
|
* Inline Control
|
|
6
36
|
*/
|
package/dist/control.d.ts
CHANGED
|
@@ -1,6 +1,36 @@
|
|
|
1
1
|
import { Node } from '@tiptap/core';
|
|
2
|
+
import { ControlNodeAttrs, ControlResolver } from './types.js';
|
|
3
|
+
import '@kopexa/theme';
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
declare module "@tiptap/core" {
|
|
6
|
+
interface Commands<ReturnType> {
|
|
7
|
+
control: {
|
|
8
|
+
/**
|
|
9
|
+
* Insert a control at the current selection.
|
|
10
|
+
*/
|
|
11
|
+
insertControl: (attrs: Partial<ControlNodeAttrs> & Pick<ControlNodeAttrs, "id">) => ReturnType;
|
|
12
|
+
/**
|
|
13
|
+
* Update attributes of the selected control node.
|
|
14
|
+
*/
|
|
15
|
+
updateControl: (attrs: Partial<ControlNodeAttrs>) => ReturnType;
|
|
16
|
+
/**
|
|
17
|
+
* Remove the selected control node.
|
|
18
|
+
*/
|
|
19
|
+
unsetControl: () => ReturnType;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
type ControlOptions = {
|
|
24
|
+
/**
|
|
25
|
+
* Optional resolver used by the node view for live lookups.
|
|
26
|
+
* The node still renders purely from attributes if this is absent.
|
|
27
|
+
*/
|
|
28
|
+
resolver?: ControlResolver;
|
|
29
|
+
/**
|
|
30
|
+
* Placeholder text used when no title is present.
|
|
31
|
+
*/
|
|
32
|
+
fallbackLabel?: string;
|
|
33
|
+
};
|
|
4
34
|
/**
|
|
5
35
|
* Inline Control
|
|
6
36
|
*/
|