@ixo/editor 1.0.0 → 1.1.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/README.md +160 -136
- package/dist/chunk-57TP5N42.mjs +1784 -0
- package/dist/chunk-57TP5N42.mjs.map +1 -0
- package/dist/chunk-MXVDN3FO.mjs +169 -0
- package/dist/chunk-MXVDN3FO.mjs.map +1 -0
- package/dist/graphql-client-BmODcqPE.d.mts +135 -0
- package/dist/index.d.mts +1328 -0
- package/dist/index.mjs +27 -0
- package/dist/index.mjs.map +1 -0
- package/dist/mantine/index.d.mts +1253 -0
- package/dist/mantine/index.mjs +413 -0
- package/dist/mantine/index.mjs.map +1 -0
- package/dist/shadcn/index.d.mts +6 -0
- package/dist/shadcn/index.mjs +27 -0
- package/dist/shadcn/index.mjs.map +1 -0
- package/fonts/inter-v12-latin/inter-v12-latin-100.woff +0 -0
- package/fonts/inter-v12-latin/inter-v12-latin-100.woff2 +0 -0
- package/fonts/inter-v12-latin/inter-v12-latin-200.woff +0 -0
- package/fonts/inter-v12-latin/inter-v12-latin-200.woff2 +0 -0
- package/fonts/inter-v12-latin/inter-v12-latin-300.woff +0 -0
- package/fonts/inter-v12-latin/inter-v12-latin-300.woff2 +0 -0
- package/fonts/inter-v12-latin/inter-v12-latin-500.woff +0 -0
- package/fonts/inter-v12-latin/inter-v12-latin-500.woff2 +0 -0
- package/fonts/inter-v12-latin/inter-v12-latin-600.woff +0 -0
- package/fonts/inter-v12-latin/inter-v12-latin-600.woff2 +0 -0
- package/fonts/inter-v12-latin/inter-v12-latin-700.woff +0 -0
- package/fonts/inter-v12-latin/inter-v12-latin-700.woff2 +0 -0
- package/fonts/inter-v12-latin/inter-v12-latin-800.woff +0 -0
- package/fonts/inter-v12-latin/inter-v12-latin-800.woff2 +0 -0
- package/fonts/inter-v12-latin/inter-v12-latin-900.woff +0 -0
- package/fonts/inter-v12-latin/inter-v12-latin-900.woff2 +0 -0
- package/fonts/inter-v12-latin/inter-v12-latin-regular.woff +0 -0
- package/fonts/inter-v12-latin/inter-v12-latin-regular.woff2 +0 -0
- package/package.json +32 -9
- package/style-core.css +243 -0
- package/style-mantine.css +340 -0
- package/style-shadcn.css +340 -0
- package/style.css +94 -0
- package/dist/blocks/index.d.ts +0 -85
- package/dist/blocks/index.d.ts.map +0 -1
- package/dist/blocks/index.js +0 -50
- package/dist/blocks/list/ListBlock.d.ts +0 -59
- package/dist/blocks/list/ListBlock.d.ts.map +0 -1
- package/dist/blocks/list/ListBlock.js +0 -51
- package/dist/blocks/list/ListBlockToolbar.d.ts +0 -9
- package/dist/blocks/list/ListBlockToolbar.d.ts.map +0 -1
- package/dist/blocks/list/ListBlockToolbar.js +0 -26
- package/dist/blocks/list/ListContainer.d.ts +0 -5
- package/dist/blocks/list/ListContainer.d.ts.map +0 -1
- package/dist/blocks/list/ListContainer.js +0 -10
- package/dist/blocks/list/ListGeneralTab.d.ts +0 -11
- package/dist/blocks/list/ListGeneralTab.d.ts.map +0 -1
- package/dist/blocks/list/ListGeneralTab.js +0 -134
- package/dist/blocks/list/ListItem.d.ts +0 -8
- package/dist/blocks/list/ListItem.d.ts.map +0 -1
- package/dist/blocks/list/ListItem.js +0 -24
- package/dist/blocks/list/ListPreviewTab.d.ts +0 -9
- package/dist/blocks/list/ListPreviewTab.d.ts.map +0 -1
- package/dist/blocks/list/ListPreviewTab.js +0 -51
- package/dist/blocks/list/ListSettings.d.ts +0 -3
- package/dist/blocks/list/ListSettings.d.ts.map +0 -1
- package/dist/blocks/list/ListSettings.js +0 -115
- package/dist/blocks/list/ListSettingsTab.d.ts +0 -10
- package/dist/blocks/list/ListSettingsTab.d.ts.map +0 -1
- package/dist/blocks/list/ListSettingsTab.js +0 -64
- package/dist/blocks/list/index.d.ts +0 -3
- package/dist/blocks/list/index.d.ts.map +0 -1
- package/dist/blocks/list/index.js +0 -5
- package/dist/blocks/list/useList.d.ts +0 -5
- package/dist/blocks/list/useList.d.ts.map +0 -1
- package/dist/blocks/list/useList.js +0 -11
- package/dist/blocks/overview/OverviewBlock.d.ts +0 -33
- package/dist/blocks/overview/OverviewBlock.d.ts.map +0 -1
- package/dist/blocks/overview/OverviewBlock.js +0 -34
- package/dist/blocks/overview/OverviewBlockToolbar.d.ts +0 -8
- package/dist/blocks/overview/OverviewBlockToolbar.d.ts.map +0 -1
- package/dist/blocks/overview/OverviewBlockToolbar.js +0 -16
- package/dist/blocks/overview/OverviewGeneralTab.d.ts +0 -11
- package/dist/blocks/overview/OverviewGeneralTab.d.ts.map +0 -1
- package/dist/blocks/overview/OverviewGeneralTab.js +0 -134
- package/dist/blocks/overview/OverviewPreviewTab.d.ts +0 -10
- package/dist/blocks/overview/OverviewPreviewTab.d.ts.map +0 -1
- package/dist/blocks/overview/OverviewPreviewTab.js +0 -30
- package/dist/blocks/overview/OverviewSettings.d.ts +0 -3
- package/dist/blocks/overview/OverviewSettings.d.ts.map +0 -1
- package/dist/blocks/overview/OverviewSettings.js +0 -114
- package/dist/blocks/overview/index.d.ts +0 -3
- package/dist/blocks/overview/index.d.ts.map +0 -1
- package/dist/blocks/overview/index.js +0 -5
- package/dist/blocks/overview/useOverview.d.ts +0 -11
- package/dist/blocks/overview/useOverview.d.ts.map +0 -1
- package/dist/blocks/overview/useOverview.js +0 -61
- package/dist/components/GlobeIcon.d.ts +0 -9
- package/dist/components/GlobeIcon.d.ts.map +0 -1
- package/dist/components/GlobeIcon.js +0 -20
- package/dist/components/IxoEditor.d.ts +0 -14
- package/dist/components/IxoEditor.d.ts.map +0 -1
- package/dist/components/IxoEditor.js +0 -41
- package/dist/components/PenIcon.d.ts +0 -9
- package/dist/components/PenIcon.d.ts.map +0 -1
- package/dist/components/PenIcon.js +0 -20
- package/dist/components/SettingsIcon.d.ts +0 -9
- package/dist/components/SettingsIcon.d.ts.map +0 -1
- package/dist/components/SettingsIcon.js +0 -21
- package/dist/components/SettingsModal/AdvancedTab.d.ts +0 -8
- package/dist/components/SettingsModal/AdvancedTab.d.ts.map +0 -1
- package/dist/components/SettingsModal/AdvancedTab.js +0 -14
- package/dist/components/SettingsModal/DomainPreview.d.ts +0 -7
- package/dist/components/SettingsModal/DomainPreview.d.ts.map +0 -1
- package/dist/components/SettingsModal/DomainPreview.js +0 -22
- package/dist/components/SettingsModal/FeatureASettings.d.ts +0 -3
- package/dist/components/SettingsModal/FeatureASettings.d.ts.map +0 -1
- package/dist/components/SettingsModal/FeatureASettings.js +0 -74
- package/dist/components/SettingsModal/GeneralTab.d.ts +0 -10
- package/dist/components/SettingsModal/GeneralTab.d.ts.map +0 -1
- package/dist/components/SettingsModal/GeneralTab.js +0 -111
- package/dist/components/SettingsModal/PreviewTab.d.ts +0 -8
- package/dist/components/SettingsModal/PreviewTab.d.ts.map +0 -1
- package/dist/components/SettingsModal/PreviewTab.js +0 -14
- package/dist/components/SettingsModal/SettingsModal.d.ts +0 -16
- package/dist/components/SettingsModal/SettingsModal.d.ts.map +0 -1
- package/dist/components/SettingsModal/SettingsModal.js +0 -61
- package/dist/components/SettingsModal/SettingsNavigation.d.ts +0 -15
- package/dist/components/SettingsModal/SettingsNavigation.d.ts.map +0 -1
- package/dist/components/SettingsModal/SettingsNavigation.js +0 -21
- package/dist/components/SettingsModal/index.d.ts +0 -8
- package/dist/components/SettingsModal/index.d.ts.map +0 -1
- package/dist/components/SettingsModal/index.js +0 -17
- package/dist/components/SwitchOption.d.ts +0 -9
- package/dist/components/SwitchOption.d.ts.map +0 -1
- package/dist/components/SwitchOption.js +0 -45
- package/dist/components/icons/ArchiveIcon.d.ts +0 -9
- package/dist/components/icons/ArchiveIcon.d.ts.map +0 -1
- package/dist/components/icons/ArchiveIcon.js +0 -18
- package/dist/components/icons/AudioIcon.d.ts +0 -9
- package/dist/components/icons/AudioIcon.d.ts.map +0 -1
- package/dist/components/icons/AudioIcon.js +0 -17
- package/dist/components/icons/DefaultIcon.d.ts +0 -9
- package/dist/components/icons/DefaultIcon.d.ts.map +0 -1
- package/dist/components/icons/DefaultIcon.js +0 -17
- package/dist/components/icons/DocumentIcon.d.ts +0 -9
- package/dist/components/icons/DocumentIcon.d.ts.map +0 -1
- package/dist/components/icons/DocumentIcon.js +0 -20
- package/dist/components/icons/ImageIcon.d.ts +0 -9
- package/dist/components/icons/ImageIcon.d.ts.map +0 -1
- package/dist/components/icons/ImageIcon.js +0 -18
- package/dist/components/icons/JsonIcon.d.ts +0 -9
- package/dist/components/icons/JsonIcon.d.ts.map +0 -1
- package/dist/components/icons/JsonIcon.js +0 -19
- package/dist/components/icons/PdfIcon.d.ts +0 -9
- package/dist/components/icons/PdfIcon.d.ts.map +0 -1
- package/dist/components/icons/PdfIcon.js +0 -20
- package/dist/components/icons/VideoIcon.d.ts +0 -9
- package/dist/components/icons/VideoIcon.d.ts.map +0 -1
- package/dist/components/icons/VideoIcon.js +0 -17
- package/dist/components/icons/XmlIcon.d.ts +0 -9
- package/dist/components/icons/XmlIcon.d.ts.map +0 -1
- package/dist/components/icons/XmlIcon.js +0 -19
- package/dist/components/icons/index.d.ts +0 -10
- package/dist/components/icons/index.d.ts.map +0 -1
- package/dist/components/icons/index.js +0 -24
- package/dist/components/ui/button.d.ts +0 -11
- package/dist/components/ui/button.d.ts.map +0 -1
- package/dist/components/ui/button.js +0 -68
- package/dist/components/ui/card.d.ts +0 -9
- package/dist/components/ui/card.d.ts.map +0 -1
- package/dist/components/ui/card.js +0 -56
- package/dist/components/ui/dialog.d.ts +0 -16
- package/dist/components/ui/dialog.d.ts.map +0 -1
- package/dist/components/ui/dialog.js +0 -85
- package/dist/components/ui/dropdown-menu.d.ts +0 -26
- package/dist/components/ui/dropdown-menu.d.ts.map +0 -1
- package/dist/components/ui/dropdown-menu.js +0 -110
- package/dist/components/ui/input.d.ts +0 -4
- package/dist/components/ui/input.d.ts.map +0 -1
- package/dist/components/ui/input.js +0 -41
- package/dist/components/ui/label.d.ts +0 -5
- package/dist/components/ui/label.d.ts.map +0 -1
- package/dist/components/ui/label.js +0 -42
- package/dist/components/ui/switch.d.ts +0 -5
- package/dist/components/ui/switch.d.ts.map +0 -1
- package/dist/components/ui/switch.js +0 -44
- package/dist/components/ui/tabs.d.ts +0 -8
- package/dist/components/ui/tabs.d.ts.map +0 -1
- package/dist/components/ui/tabs.js +0 -54
- package/dist/components/ui/toggle-group.d.ts +0 -8
- package/dist/components/ui/toggle-group.d.ts.map +0 -1
- package/dist/components/ui/toggle-group.js +0 -57
- package/dist/components/ui/toggle.d.ts +0 -10
- package/dist/components/ui/toggle.d.ts.map +0 -1
- package/dist/components/ui/toggle.js +0 -62
- package/dist/hooks/useCollaborativeIxoEditor.d.ts +0 -571
- package/dist/hooks/useCollaborativeIxoEditor.d.ts.map +0 -1
- package/dist/hooks/useCollaborativeIxoEditor.js +0 -127
- package/dist/hooks/useCreateIxoEditor.d.ts +0 -568
- package/dist/hooks/useCreateIxoEditor.d.ts.map +0 -1
- package/dist/hooks/useCreateIxoEditor.js +0 -62
- package/dist/hooks/useMatrixProvider.d.ts +0 -13
- package/dist/hooks/useMatrixProvider.d.ts.map +0 -1
- package/dist/hooks/useMatrixProvider.js +0 -147
- package/dist/index.d.ts +0 -12
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -24
- package/dist/lib/graphql-client.d.ts +0 -27
- package/dist/lib/graphql-client.d.ts.map +0 -1
- package/dist/lib/graphql-client.js +0 -36
- package/dist/lib/graphql-queries.d.ts +0 -31
- package/dist/lib/graphql-queries.d.ts.map +0 -1
- package/dist/lib/graphql-queries.js +0 -40
- package/dist/lib/utils/getMediaTypeIcon.d.ts +0 -20
- package/dist/lib/utils/getMediaTypeIcon.d.ts.map +0 -1
- package/dist/lib/utils/getMediaTypeIcon.js +0 -96
- package/dist/lib/utils/index.d.ts +0 -4
- package/dist/lib/utils/index.d.ts.map +0 -1
- package/dist/lib/utils/index.js +0 -12
- package/dist/lib/utils.d.ts +0 -3
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js +0 -8
- package/dist/types/Domain.d.ts +0 -18
- package/dist/types/Domain.d.ts.map +0 -1
- package/dist/types/Domain.js +0 -2
- package/dist/types/index.d.ts +0 -77
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -2
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.useMatrixProvider = useMatrixProvider;
|
|
37
|
-
const react_1 = require("react");
|
|
38
|
-
const ixo_matrix_crdt_1 = require("ixo-matrix-crdt");
|
|
39
|
-
const sdk = __importStar(require("matrix-js-sdk"));
|
|
40
|
-
function useMatrixProvider({ userId, accessToken, baseUrl, roomId, yDoc, }) {
|
|
41
|
-
const [matrixProvider, setProvider] = (0, react_1.useState)(null);
|
|
42
|
-
const [status, setStatus] = (0, react_1.useState)("disconnected");
|
|
43
|
-
// Use refs to track cleanup and prevent memory leaks
|
|
44
|
-
const isMountedRef = (0, react_1.useRef)(true);
|
|
45
|
-
const providerRef = (0, react_1.useRef)(null);
|
|
46
|
-
const retryTimeoutRef = (0, react_1.useRef)(null);
|
|
47
|
-
// Memoize client options to prevent recreation
|
|
48
|
-
const clientOptions = (0, react_1.useMemo)(() => ({
|
|
49
|
-
baseUrl,
|
|
50
|
-
accessToken,
|
|
51
|
-
userId,
|
|
52
|
-
timelineSupport: true,
|
|
53
|
-
}), [baseUrl, accessToken, userId]);
|
|
54
|
-
// Memoize provider options to prevent recreation
|
|
55
|
-
const providerOptions = (0, react_1.useMemo)(() => ({
|
|
56
|
-
translator: {
|
|
57
|
-
updateEventType: "matrix-crdt.doc_update",
|
|
58
|
-
snapshotEventType: "matrix-crdt.doc_snapshot",
|
|
59
|
-
},
|
|
60
|
-
enableExperimentalWebrtcSync: true,
|
|
61
|
-
enableAwareness: true,
|
|
62
|
-
reader: { snapshotInterval: 10 },
|
|
63
|
-
writer: { flushInterval: 300, retryIfForbiddenInterval: 30000 },
|
|
64
|
-
}), []);
|
|
65
|
-
// Memoized status update callbacks to prevent recreation
|
|
66
|
-
const handleDocumentAvailable = (0, react_1.useCallback)(() => {
|
|
67
|
-
if (isMountedRef.current) {
|
|
68
|
-
setStatus("connected");
|
|
69
|
-
}
|
|
70
|
-
}, []);
|
|
71
|
-
const handleDocumentUnavailable = (0, react_1.useCallback)(() => {
|
|
72
|
-
if (isMountedRef.current) {
|
|
73
|
-
setStatus("failed");
|
|
74
|
-
}
|
|
75
|
-
}, []);
|
|
76
|
-
const handleCanWriteChanged = (0, react_1.useCallback)(() => {
|
|
77
|
-
if (isMountedRef.current && providerRef.current) {
|
|
78
|
-
setStatus(providerRef.current.canWrite ? "connected" : "failed");
|
|
79
|
-
}
|
|
80
|
-
}, []);
|
|
81
|
-
const initProvider = (0, react_1.useCallback)(async () => {
|
|
82
|
-
if (!isMountedRef.current)
|
|
83
|
-
return;
|
|
84
|
-
// Clear any existing retry timeout
|
|
85
|
-
if (retryTimeoutRef.current) {
|
|
86
|
-
clearTimeout(retryTimeoutRef.current);
|
|
87
|
-
retryTimeoutRef.current = null;
|
|
88
|
-
}
|
|
89
|
-
setStatus("connecting");
|
|
90
|
-
try {
|
|
91
|
-
const client = sdk.createClient(clientOptions);
|
|
92
|
-
client.canSupportVoip = false;
|
|
93
|
-
client.clientOpts = { lazyLoadMembers: true };
|
|
94
|
-
const provider = new ixo_matrix_crdt_1.MatrixProvider(yDoc, client, { type: "id", id: roomId }, providerOptions);
|
|
95
|
-
providerRef.current = provider;
|
|
96
|
-
provider.onDocumentAvailable(handleDocumentAvailable);
|
|
97
|
-
provider.onDocumentUnavailable(handleDocumentUnavailable);
|
|
98
|
-
provider.onCanWriteChanged(handleCanWriteChanged);
|
|
99
|
-
await provider.initialize();
|
|
100
|
-
if (isMountedRef.current) {
|
|
101
|
-
setProvider(provider);
|
|
102
|
-
}
|
|
103
|
-
else {
|
|
104
|
-
// Component was unmounted during initialization
|
|
105
|
-
provider.dispose();
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
catch (err) {
|
|
109
|
-
console.error("Matrix setup failed", err);
|
|
110
|
-
if (isMountedRef.current) {
|
|
111
|
-
setStatus("failed");
|
|
112
|
-
// Retry with exponential backoff, but only if component is still mounted
|
|
113
|
-
retryTimeoutRef.current = setTimeout(() => {
|
|
114
|
-
if (isMountedRef.current && !providerRef.current) {
|
|
115
|
-
initProvider();
|
|
116
|
-
}
|
|
117
|
-
}, 5000);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}, [clientOptions, roomId, providerOptions, handleDocumentAvailable, handleDocumentUnavailable, handleCanWriteChanged]);
|
|
121
|
-
(0, react_1.useEffect)(() => {
|
|
122
|
-
isMountedRef.current = true;
|
|
123
|
-
initProvider();
|
|
124
|
-
return () => {
|
|
125
|
-
isMountedRef.current = false;
|
|
126
|
-
// Clear retry timeout
|
|
127
|
-
if (retryTimeoutRef.current) {
|
|
128
|
-
clearTimeout(retryTimeoutRef.current);
|
|
129
|
-
retryTimeoutRef.current = null;
|
|
130
|
-
}
|
|
131
|
-
// Cleanup provider
|
|
132
|
-
if (providerRef.current) {
|
|
133
|
-
providerRef.current.dispose();
|
|
134
|
-
providerRef.current = null;
|
|
135
|
-
}
|
|
136
|
-
setProvider(null);
|
|
137
|
-
setStatus("disconnected");
|
|
138
|
-
};
|
|
139
|
-
}, [initProvider]);
|
|
140
|
-
// Cleanup effect to ensure refs are reset on unmount
|
|
141
|
-
(0, react_1.useEffect)(() => {
|
|
142
|
-
return () => {
|
|
143
|
-
isMountedRef.current = false;
|
|
144
|
-
};
|
|
145
|
-
}, []);
|
|
146
|
-
return { matrixProvider, connectionStatus: status };
|
|
147
|
-
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export { useCreateIxoEditor } from "./hooks/useCreateIxoEditor";
|
|
2
|
-
export { useCreateCollaborativeIxoEditor } from "./hooks/useCollaborativeIxoEditor";
|
|
3
|
-
export { IxoEditor, type IxoEditorProps } from "./components/IxoEditor";
|
|
4
|
-
export type { IxoEditorOptions, IxoEditorTheme, IxoEditorConfig, } from "./types";
|
|
5
|
-
export { ListBlock, blockSpecs, getExtraSlashMenuItems } from "./blocks";
|
|
6
|
-
export type { ListBlockSettings, ListBlockProps } from "./blocks";
|
|
7
|
-
export { getEntity } from "./lib/graphql-queries";
|
|
8
|
-
export type { Entity, EntityResponse, EntityVariables, } from "./lib/graphql-queries";
|
|
9
|
-
export { GraphQLClient, ixoGraphQLClient } from "./lib/graphql-client";
|
|
10
|
-
export type { GraphQLResponse, GraphQLRequest } from "./lib/graphql-client";
|
|
11
|
-
export type { BlockNoteEditor, BlockNoteSchema, DefaultBlockSchema, DefaultInlineContentSchema, DefaultStyleSchema, PartialBlock, Block, } from "@blocknote/core";
|
|
12
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AAGpF,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxE,YAAY,EACV,gBAAgB,EAChB,cAAc,EACd,eAAe,GAChB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AACzE,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAGlE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,YAAY,EACV,MAAM,EACN,cAAc,EACd,eAAe,GAChB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACvE,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG5E,YAAY,EACV,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,0BAA0B,EAC1B,kBAAkB,EAClB,YAAY,EACZ,KAAK,GACN,MAAM,iBAAiB,CAAC"}
|
package/dist/index.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Main exports for ixo-editor package
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.ixoGraphQLClient = exports.GraphQLClient = exports.getEntity = exports.getExtraSlashMenuItems = exports.blockSpecs = exports.ListBlock = exports.IxoEditor = exports.useCreateCollaborativeIxoEditor = exports.useCreateIxoEditor = void 0;
|
|
5
|
-
// Export the main hook
|
|
6
|
-
var useCreateIxoEditor_1 = require("./hooks/useCreateIxoEditor");
|
|
7
|
-
Object.defineProperty(exports, "useCreateIxoEditor", { enumerable: true, get: function () { return useCreateIxoEditor_1.useCreateIxoEditor; } });
|
|
8
|
-
var useCollaborativeIxoEditor_1 = require("./hooks/useCollaborativeIxoEditor");
|
|
9
|
-
Object.defineProperty(exports, "useCreateCollaborativeIxoEditor", { enumerable: true, get: function () { return useCollaborativeIxoEditor_1.useCreateCollaborativeIxoEditor; } });
|
|
10
|
-
// Export the main component
|
|
11
|
-
var IxoEditor_1 = require("./components/IxoEditor");
|
|
12
|
-
Object.defineProperty(exports, "IxoEditor", { enumerable: true, get: function () { return IxoEditor_1.IxoEditor; } });
|
|
13
|
-
// Export custom blocks
|
|
14
|
-
var blocks_1 = require("./blocks");
|
|
15
|
-
Object.defineProperty(exports, "ListBlock", { enumerable: true, get: function () { return blocks_1.ListBlock; } });
|
|
16
|
-
Object.defineProperty(exports, "blockSpecs", { enumerable: true, get: function () { return blocks_1.blockSpecs; } });
|
|
17
|
-
Object.defineProperty(exports, "getExtraSlashMenuItems", { enumerable: true, get: function () { return blocks_1.getExtraSlashMenuItems; } });
|
|
18
|
-
// Export GraphQL client and queries
|
|
19
|
-
var graphql_queries_1 = require("./lib/graphql-queries");
|
|
20
|
-
Object.defineProperty(exports, "getEntity", { enumerable: true, get: function () { return graphql_queries_1.getEntity; } });
|
|
21
|
-
var graphql_client_1 = require("./lib/graphql-client");
|
|
22
|
-
Object.defineProperty(exports, "GraphQLClient", { enumerable: true, get: function () { return graphql_client_1.GraphQLClient; } });
|
|
23
|
-
Object.defineProperty(exports, "ixoGraphQLClient", { enumerable: true, get: function () { return graphql_client_1.ixoGraphQLClient; } });
|
|
24
|
-
// Note: Additional BlockNote utilities can be imported directly from @blocknote/react if needed
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Lightweight GraphQL client for IXO network queries
|
|
3
|
-
*/
|
|
4
|
-
export interface GraphQLResponse<T = any> {
|
|
5
|
-
data?: T;
|
|
6
|
-
errors?: Array<{
|
|
7
|
-
message: string;
|
|
8
|
-
locations?: Array<{
|
|
9
|
-
line: number;
|
|
10
|
-
column: number;
|
|
11
|
-
}>;
|
|
12
|
-
path?: Array<string | number>;
|
|
13
|
-
}>;
|
|
14
|
-
}
|
|
15
|
-
export interface GraphQLRequest {
|
|
16
|
-
query: string;
|
|
17
|
-
variables?: Record<string, any>;
|
|
18
|
-
operationName?: string;
|
|
19
|
-
}
|
|
20
|
-
export declare class GraphQLClient {
|
|
21
|
-
private endpoint;
|
|
22
|
-
private headers;
|
|
23
|
-
constructor(endpoint: string, headers?: Record<string, string>);
|
|
24
|
-
request<T = any>(request: GraphQLRequest): Promise<T>;
|
|
25
|
-
}
|
|
26
|
-
export declare const ixoGraphQLClient: GraphQLClient;
|
|
27
|
-
//# sourceMappingURL=graphql-client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"graphql-client.d.ts","sourceRoot":"","sources":["../../src/lib/graphql-client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,eAAe,CAAC,CAAC,GAAG,GAAG;IACtC,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,MAAM,CAAC,EAAE,KAAK,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;QACpD,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;KAC/B,CAAC,CAAC;CACJ;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,OAAO,CAAyB;gBAE5B,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM;IAQ5D,OAAO,CAAC,CAAC,GAAG,GAAG,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,CAAC,CAAC;CAuB5D;AAGD,eAAO,MAAM,gBAAgB,eAE5B,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Lightweight GraphQL client for IXO network queries
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ixoGraphQLClient = exports.GraphQLClient = void 0;
|
|
7
|
-
class GraphQLClient {
|
|
8
|
-
constructor(endpoint, headers = {}) {
|
|
9
|
-
this.endpoint = endpoint;
|
|
10
|
-
this.headers = {
|
|
11
|
-
"Content-Type": "application/json",
|
|
12
|
-
...headers,
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
async request(request) {
|
|
16
|
-
const response = await fetch(this.endpoint, {
|
|
17
|
-
method: "POST",
|
|
18
|
-
headers: this.headers,
|
|
19
|
-
body: JSON.stringify(request),
|
|
20
|
-
});
|
|
21
|
-
if (!response.ok) {
|
|
22
|
-
throw new Error(`HTTP error! status: ${response.status}`);
|
|
23
|
-
}
|
|
24
|
-
const result = await response.json();
|
|
25
|
-
if (result.errors && result.errors.length > 0) {
|
|
26
|
-
throw new Error(`GraphQL error: ${result.errors[0].message}`);
|
|
27
|
-
}
|
|
28
|
-
if (!result.data) {
|
|
29
|
-
throw new Error("No data returned from GraphQL query");
|
|
30
|
-
}
|
|
31
|
-
return result.data;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
exports.GraphQLClient = GraphQLClient;
|
|
35
|
-
// Default client instance for IXO network
|
|
36
|
-
exports.ixoGraphQLClient = new GraphQLClient("https://devnet-blocksync-graphql.ixo.earth/graphql");
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GraphQL queries and types for IXO network
|
|
3
|
-
*/
|
|
4
|
-
export interface Entity {
|
|
5
|
-
context: string;
|
|
6
|
-
relayerNode: string;
|
|
7
|
-
controller: string;
|
|
8
|
-
id: string;
|
|
9
|
-
type: string;
|
|
10
|
-
startDate: string;
|
|
11
|
-
endDate: string;
|
|
12
|
-
metadata: string;
|
|
13
|
-
linkedResource: any[];
|
|
14
|
-
settings: Record<string, Record<string, any>>;
|
|
15
|
-
service: string;
|
|
16
|
-
externalId: string;
|
|
17
|
-
}
|
|
18
|
-
export interface EntityResponse {
|
|
19
|
-
entity: Entity;
|
|
20
|
-
}
|
|
21
|
-
export interface EntityVariables {
|
|
22
|
-
entityId: string;
|
|
23
|
-
}
|
|
24
|
-
export declare const ENTITY_QUERY = "\n query Entity($entityId: String!) {\n entity(id: $entityId) {\n context\n relayerNode\n controller\n id\n type\n startDate\n endDate\n metadata\n linkedResource\n settings\n service\n externalId\n }\n }\n";
|
|
25
|
-
/**
|
|
26
|
-
* Fetches entity data by ID from the IXO network
|
|
27
|
-
* @param entityId - The unique identifier for the entity
|
|
28
|
-
* @returns Promise resolving to the entity data
|
|
29
|
-
*/
|
|
30
|
-
export declare function getEntity(entityId: string): Promise<Entity>;
|
|
31
|
-
//# sourceMappingURL=graphql-queries.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"graphql-queries.d.ts","sourceRoot":"","sources":["../../src/lib/graphql-queries.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,MAAM,WAAW,MAAM;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,GAAG,EAAE,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAGD,eAAO,MAAM,YAAY,uRAiBxB,CAAC;AAEF;;;;GAIG;AACH,wBAAsB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAQjE"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* GraphQL queries and types for IXO network
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ENTITY_QUERY = void 0;
|
|
7
|
-
exports.getEntity = getEntity;
|
|
8
|
-
const graphql_client_1 = require("./graphql-client");
|
|
9
|
-
// GraphQL query for fetching entity data
|
|
10
|
-
exports.ENTITY_QUERY = `
|
|
11
|
-
query Entity($entityId: String!) {
|
|
12
|
-
entity(id: $entityId) {
|
|
13
|
-
context
|
|
14
|
-
relayerNode
|
|
15
|
-
controller
|
|
16
|
-
id
|
|
17
|
-
type
|
|
18
|
-
startDate
|
|
19
|
-
endDate
|
|
20
|
-
metadata
|
|
21
|
-
linkedResource
|
|
22
|
-
settings
|
|
23
|
-
service
|
|
24
|
-
externalId
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
`;
|
|
28
|
-
/**
|
|
29
|
-
* Fetches entity data by ID from the IXO network
|
|
30
|
-
* @param entityId - The unique identifier for the entity
|
|
31
|
-
* @returns Promise resolving to the entity data
|
|
32
|
-
*/
|
|
33
|
-
async function getEntity(entityId) {
|
|
34
|
-
const response = await graphql_client_1.ixoGraphQLClient.request({
|
|
35
|
-
query: exports.ENTITY_QUERY,
|
|
36
|
-
variables: { entityId },
|
|
37
|
-
operationName: "Entity",
|
|
38
|
-
});
|
|
39
|
-
return response.entity;
|
|
40
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
interface IconProps {
|
|
3
|
-
size?: number;
|
|
4
|
-
className?: string;
|
|
5
|
-
color?: "primary" | "secondary" | "accent";
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Returns the appropriate icon component based on media type
|
|
9
|
-
* @param mediaType - The MIME type or media type string
|
|
10
|
-
* @param props - Icon props (size, className, color)
|
|
11
|
-
* @returns React component for the appropriate icon
|
|
12
|
-
*/
|
|
13
|
-
export declare function getMediaTypeIcon(mediaType: string, props?: IconProps): React.JSX.Element;
|
|
14
|
-
/**
|
|
15
|
-
* Get a list of all supported media type categories
|
|
16
|
-
* @returns Array of supported media type categories
|
|
17
|
-
*/
|
|
18
|
-
export declare function getSupportedMediaTypes(): string[];
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=getMediaTypeIcon.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getMediaTypeIcon.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/getMediaTypeIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,UAAU,SAAS;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;CAC5C;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,GAAE,SAAc,qBAwExE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,EAAE,CAYjD"}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getMediaTypeIcon = getMediaTypeIcon;
|
|
7
|
-
exports.getSupportedMediaTypes = getSupportedMediaTypes;
|
|
8
|
-
const react_1 = __importDefault(require("react"));
|
|
9
|
-
const DocumentIcon_1 = __importDefault(require("../../components/icons/DocumentIcon"));
|
|
10
|
-
const ImageIcon_1 = __importDefault(require("../../components/icons/ImageIcon"));
|
|
11
|
-
const VideoIcon_1 = __importDefault(require("../../components/icons/VideoIcon"));
|
|
12
|
-
const AudioIcon_1 = __importDefault(require("../../components/icons/AudioIcon"));
|
|
13
|
-
const PdfIcon_1 = __importDefault(require("../../components/icons/PdfIcon"));
|
|
14
|
-
const JsonIcon_1 = __importDefault(require("../../components/icons/JsonIcon"));
|
|
15
|
-
const XmlIcon_1 = __importDefault(require("../../components/icons/XmlIcon"));
|
|
16
|
-
const ArchiveIcon_1 = __importDefault(require("../../components/icons/ArchiveIcon"));
|
|
17
|
-
const DefaultIcon_1 = __importDefault(require("../../components/icons/DefaultIcon"));
|
|
18
|
-
/**
|
|
19
|
-
* Returns the appropriate icon component based on media type
|
|
20
|
-
* @param mediaType - The MIME type or media type string
|
|
21
|
-
* @param props - Icon props (size, className, color)
|
|
22
|
-
* @returns React component for the appropriate icon
|
|
23
|
-
*/
|
|
24
|
-
function getMediaTypeIcon(mediaType, props = {}) {
|
|
25
|
-
const normalizedType = mediaType?.toLowerCase() || "";
|
|
26
|
-
// Image types
|
|
27
|
-
if (normalizedType.startsWith("image/")) {
|
|
28
|
-
return react_1.default.createElement(ImageIcon_1.default, { ...props });
|
|
29
|
-
}
|
|
30
|
-
// Video types
|
|
31
|
-
if (normalizedType.startsWith("video/")) {
|
|
32
|
-
return react_1.default.createElement(VideoIcon_1.default, { ...props });
|
|
33
|
-
}
|
|
34
|
-
// Audio types
|
|
35
|
-
if (normalizedType.startsWith("audio/")) {
|
|
36
|
-
return react_1.default.createElement(AudioIcon_1.default, { ...props });
|
|
37
|
-
}
|
|
38
|
-
// PDF
|
|
39
|
-
if (normalizedType.includes("pdf") || normalizedType === "application/pdf") {
|
|
40
|
-
return react_1.default.createElement(PdfIcon_1.default, { ...props });
|
|
41
|
-
}
|
|
42
|
-
// JSON
|
|
43
|
-
if (normalizedType.includes("json") ||
|
|
44
|
-
normalizedType === "application/json" ||
|
|
45
|
-
normalizedType === "text/json") {
|
|
46
|
-
return react_1.default.createElement(JsonIcon_1.default, { ...props });
|
|
47
|
-
}
|
|
48
|
-
// XML
|
|
49
|
-
if (normalizedType.includes("xml") ||
|
|
50
|
-
normalizedType === "application/xml" ||
|
|
51
|
-
normalizedType === "text/xml" ||
|
|
52
|
-
normalizedType === "application/rss+xml" ||
|
|
53
|
-
normalizedType === "application/atom+xml") {
|
|
54
|
-
return react_1.default.createElement(XmlIcon_1.default, { ...props });
|
|
55
|
-
}
|
|
56
|
-
// Archive types
|
|
57
|
-
if (normalizedType.includes("zip") ||
|
|
58
|
-
normalizedType.includes("rar") ||
|
|
59
|
-
normalizedType.includes("tar") ||
|
|
60
|
-
normalizedType.includes("gzip") ||
|
|
61
|
-
normalizedType.includes("7z") ||
|
|
62
|
-
normalizedType === "application/x-compressed" ||
|
|
63
|
-
normalizedType === "application/x-zip-compressed" ||
|
|
64
|
-
normalizedType === "multipart/x-zip") {
|
|
65
|
-
return react_1.default.createElement(ArchiveIcon_1.default, { ...props });
|
|
66
|
-
}
|
|
67
|
-
// Text documents
|
|
68
|
-
if (normalizedType.startsWith("text/") ||
|
|
69
|
-
normalizedType.includes("document") ||
|
|
70
|
-
normalizedType.includes("word") ||
|
|
71
|
-
normalizedType.includes("excel") ||
|
|
72
|
-
normalizedType.includes("powerpoint") ||
|
|
73
|
-
normalizedType.includes("spreadsheet") ||
|
|
74
|
-
normalizedType.includes("presentation")) {
|
|
75
|
-
return react_1.default.createElement(DocumentIcon_1.default, { ...props });
|
|
76
|
-
}
|
|
77
|
-
// Default fallback
|
|
78
|
-
return react_1.default.createElement(DefaultIcon_1.default, { ...props });
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Get a list of all supported media type categories
|
|
82
|
-
* @returns Array of supported media type categories
|
|
83
|
-
*/
|
|
84
|
-
function getSupportedMediaTypes() {
|
|
85
|
-
return [
|
|
86
|
-
"image",
|
|
87
|
-
"video",
|
|
88
|
-
"audio",
|
|
89
|
-
"pdf",
|
|
90
|
-
"json",
|
|
91
|
-
"xml",
|
|
92
|
-
"archive",
|
|
93
|
-
"document",
|
|
94
|
-
"default",
|
|
95
|
-
];
|
|
96
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAG7C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC;AAED,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/lib/utils/index.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getSupportedMediaTypes = exports.getMediaTypeIcon = void 0;
|
|
4
|
-
exports.cn = cn;
|
|
5
|
-
const clsx_1 = require("clsx");
|
|
6
|
-
const tailwind_merge_1 = require("tailwind-merge");
|
|
7
|
-
function cn(...inputs) {
|
|
8
|
-
return (0, tailwind_merge_1.twMerge)((0, clsx_1.clsx)(inputs));
|
|
9
|
-
}
|
|
10
|
-
var getMediaTypeIcon_1 = require("./getMediaTypeIcon");
|
|
11
|
-
Object.defineProperty(exports, "getMediaTypeIcon", { enumerable: true, get: function () { return getMediaTypeIcon_1.getMediaTypeIcon; } });
|
|
12
|
-
Object.defineProperty(exports, "getSupportedMediaTypes", { enumerable: true, get: function () { return getMediaTypeIcon_1.getSupportedMediaTypes; } });
|
package/dist/lib/utils.d.ts
DELETED
package/dist/lib/utils.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAA;AAG5C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
|
package/dist/lib/utils.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.cn = cn;
|
|
4
|
-
const clsx_1 = require("clsx");
|
|
5
|
-
const tailwind_merge_1 = require("tailwind-merge");
|
|
6
|
-
function cn(...inputs) {
|
|
7
|
-
return (0, tailwind_merge_1.twMerge)((0, clsx_1.clsx)(inputs));
|
|
8
|
-
}
|
package/dist/types/Domain.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export interface Domain {
|
|
2
|
-
id: string;
|
|
3
|
-
name: string;
|
|
4
|
-
type: string;
|
|
5
|
-
linkedResource: LinkedResource[];
|
|
6
|
-
settings: Record<string, LinkedResource>;
|
|
7
|
-
}
|
|
8
|
-
export interface LinkedResource {
|
|
9
|
-
id: string;
|
|
10
|
-
type: string;
|
|
11
|
-
proof: string;
|
|
12
|
-
right: string;
|
|
13
|
-
encrypted: string;
|
|
14
|
-
mediaType: string;
|
|
15
|
-
description: string;
|
|
16
|
-
serviceEndpoint: string;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=Domain.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Domain.d.ts","sourceRoot":"","sources":["../../src/types/Domain.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,cAAc,EAAE,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;CAC1C;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;CACzB"}
|
package/dist/types/Domain.js
DELETED
package/dist/types/index.d.ts
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import type { PartialBlock } from "@blocknote/core";
|
|
2
|
-
export type IxoEditorTheme = "light" | "dark";
|
|
3
|
-
export interface IxoEditorOptions {
|
|
4
|
-
/**
|
|
5
|
-
* The color theme for the editor
|
|
6
|
-
* @default 'light'
|
|
7
|
-
*/
|
|
8
|
-
theme?: IxoEditorTheme;
|
|
9
|
-
/**
|
|
10
|
-
* Function to handle file uploads
|
|
11
|
-
*/
|
|
12
|
-
uploadFile?: (file: File) => Promise<string>;
|
|
13
|
-
/**
|
|
14
|
-
* Initial content for the editor
|
|
15
|
-
*/
|
|
16
|
-
initialContent?: PartialBlock[];
|
|
17
|
-
/**
|
|
18
|
-
* Whether the editor is editable
|
|
19
|
-
* @default true
|
|
20
|
-
*/
|
|
21
|
-
editable?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Whether to show the side menu (drag handle, plus button)
|
|
24
|
-
* @default true
|
|
25
|
-
*/
|
|
26
|
-
sideMenu?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Whether to enable the slash menu
|
|
29
|
-
* @default true
|
|
30
|
-
*/
|
|
31
|
-
slashMenu?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Whether to show the formatting toolbar
|
|
34
|
-
* @default true
|
|
35
|
-
*/
|
|
36
|
-
formattingToolbar?: boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Whether to show the link toolbar
|
|
39
|
-
* @default true
|
|
40
|
-
*/
|
|
41
|
-
linkToolbar?: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Whether to show the file panel
|
|
44
|
-
* @default true
|
|
45
|
-
*/
|
|
46
|
-
filePanel?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Whether to show table handles
|
|
49
|
-
* @default true
|
|
50
|
-
*/
|
|
51
|
-
tableHandles?: boolean;
|
|
52
|
-
}
|
|
53
|
-
export interface IxoCollaborativeUser {
|
|
54
|
-
name: string;
|
|
55
|
-
color: string;
|
|
56
|
-
accessToken: string;
|
|
57
|
-
address: string;
|
|
58
|
-
id: string;
|
|
59
|
-
}
|
|
60
|
-
export interface IxoCollaborativeEditorOptions extends IxoEditorOptions {
|
|
61
|
-
user: IxoCollaborativeUser;
|
|
62
|
-
matrix: {
|
|
63
|
-
roomId: string;
|
|
64
|
-
baseUrl: string;
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
export interface IxoEditorConfig {
|
|
68
|
-
theme: IxoEditorTheme;
|
|
69
|
-
editable: boolean;
|
|
70
|
-
sideMenu: boolean;
|
|
71
|
-
slashMenu: boolean;
|
|
72
|
-
formattingToolbar: boolean;
|
|
73
|
-
linkToolbar: boolean;
|
|
74
|
-
filePanel: boolean;
|
|
75
|
-
tableHandles: boolean;
|
|
76
|
-
}
|
|
77
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,CAAC;AAE9C,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC;IAEvB;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAE7C;;OAEG;IACH,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC;IAEhC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAA;CACX;AAED,MAAM,WAAW,6BAA8B,SAAQ,gBAAgB;IACrE,IAAI,EAAE,oBAAoB,CAAC;IAC3B,MAAM,EAAE;QACN,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,cAAc,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;CACvB"}
|
package/dist/types/index.js
DELETED