@reacteditor/core 0.0.6 → 0.0.8
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/{Editor-YNFB7B6Z.mjs → Editor-KXEVJBNG.mjs} +9 -9
- package/dist/{actions-CQmL3wwa.d.mts → actions-2L-1hQ7r.d.mts} +7 -2
- package/dist/{actions-CQmL3wwa.d.ts → actions-2L-1hQ7r.d.ts} +7 -2
- package/dist/{chunk-6LG4Q4HO.mjs → chunk-AD7BMXAA.mjs} +1 -1
- package/dist/{chunk-DB4R5IWG.mjs → chunk-AJWRDM22.mjs} +3 -3
- package/dist/{chunk-WGPCLAZR.mjs → chunk-FT6UFK7G.mjs} +1 -1
- package/dist/{chunk-VOLQMQPK.mjs → chunk-IIRJMJFU.mjs} +1 -1
- package/dist/{chunk-CRF2GWQA.mjs → chunk-LRFRIIKG.mjs} +6 -4
- package/dist/{chunk-UB2DES2O.mjs → chunk-M4JDRFYB.mjs} +8 -6
- package/dist/{chunk-Z6IIVDFY.mjs → chunk-OIFPBVSF.mjs} +1 -1
- package/dist/{chunk-HCFEY5Y7.mjs → chunk-R5DQGUQS.mjs} +949 -610
- package/dist/{chunk-275EJPEB.mjs → chunk-TI3KC54Y.mjs} +18 -18
- package/dist/{chunk-BRDUM7MJ.mjs → chunk-U7VW3V3W.mjs} +7 -7
- package/dist/{full-24FOTNTB.mjs → full-ZFZZ626B.mjs} +8 -8
- package/dist/{index-BOP2qNVA.d.mts → index-BNsSzMCj.d.ts} +2 -1
- package/dist/{index-_G46lHpL.d.ts → index-BXuSeNez.d.mts} +2 -1
- package/dist/index.css +99 -26
- package/dist/index.d.mts +36 -8
- package/dist/index.d.ts +36 -8
- package/dist/index.js +1448 -1097
- package/dist/index.mjs +14 -14
- package/dist/internal.d.mts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/internal.js +7 -5
- package/dist/internal.mjs +2 -2
- package/dist/{loaded-BQVZGQG2.mjs → loaded-GLBLMTBL.mjs} +5 -5
- package/dist/{loaded-6IBSSOXD.mjs → loaded-O4QHGE26.mjs} +5 -5
- package/dist/{loaded-6NPDD7SF.mjs → loaded-R34BR6I5.mjs} +5 -5
- package/dist/no-external.css +99 -26
- package/dist/no-external.d.mts +4 -4
- package/dist/no-external.d.ts +4 -4
- package/dist/no-external.js +1448 -1097
- package/dist/no-external.mjs +14 -14
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/rsc.mjs +3 -3
- package/dist/{walk-tree-Dwv3c_9M.d.mts → walk-tree-4C3ODO3X.d.mts} +1 -1
- package/dist/{walk-tree-DxSkPLnl.d.ts → walk-tree-C9GrSWsR.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/{chunk-GAUBBDIR.mjs → chunk-JIXMPJZA.mjs} +37 -37
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
defaultAppState,
|
|
6
6
|
resolveComponentData
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IIRJMJFU.mjs";
|
|
8
8
|
import {
|
|
9
9
|
get_class_name_factory_default
|
|
10
10
|
} from "./chunk-Y2EFNT5P.mjs";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
toComponent,
|
|
16
16
|
walkAppState,
|
|
17
17
|
walkTree
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-JIXMPJZA.mjs";
|
|
19
19
|
import {
|
|
20
20
|
__async,
|
|
21
21
|
__objRest,
|
|
@@ -263,22 +263,6 @@ function resolveAllData(_0, _1) {
|
|
|
263
263
|
});
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
-
// lib/field-transforms/default-transforms/slot-transform.tsx
|
|
267
|
-
init_react_import();
|
|
268
|
-
var getSlotTransform = (renderSlotEdit, renderSlotRender = renderSlotEdit) => ({
|
|
269
|
-
slot: ({ value: content, propName, field, isReadOnly }) => {
|
|
270
|
-
const render = isReadOnly ? renderSlotRender : renderSlotEdit;
|
|
271
|
-
const Slot = (dzProps) => render(__spreadProps(__spreadValues({
|
|
272
|
-
allow: (field == null ? void 0 : field.type) === "slot" ? field.allow : [],
|
|
273
|
-
disallow: (field == null ? void 0 : field.type) === "slot" ? field.disallow : []
|
|
274
|
-
}, dzProps), {
|
|
275
|
-
zone: propName,
|
|
276
|
-
content
|
|
277
|
-
}));
|
|
278
|
-
return Slot;
|
|
279
|
-
}
|
|
280
|
-
});
|
|
281
|
-
|
|
282
266
|
// lib/use-slots.tsx
|
|
283
267
|
init_react_import();
|
|
284
268
|
|
|
@@ -326,6 +310,22 @@ function useFieldTransforms(config, item, transforms, readOnly, forceReadOnly) {
|
|
|
326
310
|
return mergedProps;
|
|
327
311
|
}
|
|
328
312
|
|
|
313
|
+
// lib/field-transforms/default-transforms/slot-transform.tsx
|
|
314
|
+
init_react_import();
|
|
315
|
+
var getSlotTransform = (renderSlotEdit, renderSlotRender = renderSlotEdit) => ({
|
|
316
|
+
slot: ({ value: content, propName, field, isReadOnly }) => {
|
|
317
|
+
const render = isReadOnly ? renderSlotRender : renderSlotEdit;
|
|
318
|
+
const Slot = (dzProps) => render(__spreadProps(__spreadValues({
|
|
319
|
+
allow: (field == null ? void 0 : field.type) === "slot" ? field.allow : [],
|
|
320
|
+
disallow: (field == null ? void 0 : field.type) === "slot" ? field.disallow : []
|
|
321
|
+
}, dzProps), {
|
|
322
|
+
zone: propName,
|
|
323
|
+
content
|
|
324
|
+
}));
|
|
325
|
+
return Slot;
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
|
|
329
329
|
// lib/use-slots.tsx
|
|
330
330
|
function useSlots(config, item, renderSlotEdit, renderSlotRender = renderSlotEdit, readOnly, forceReadOnly) {
|
|
331
331
|
return useFieldTransforms(
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useAlignOptions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OIFPBVSF.mjs";
|
|
4
4
|
import {
|
|
5
5
|
useHeadingOptions
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AD7BMXAA.mjs";
|
|
7
7
|
import {
|
|
8
8
|
useListOptions
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FT6UFK7G.mjs";
|
|
10
10
|
import {
|
|
11
11
|
AlignCenter,
|
|
12
12
|
AlignJustify,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
Strikethrough,
|
|
27
27
|
Underline,
|
|
28
28
|
useControlContext
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-LRFRIIKG.mjs";
|
|
30
30
|
import {
|
|
31
31
|
get_class_name_factory_default
|
|
32
32
|
} from "./chunk-Y2EFNT5P.mjs";
|
|
@@ -349,7 +349,7 @@ function AlignSelectFallback() {
|
|
|
349
349
|
// components/RichTextMenu/controls/AlignSelect/index.tsx
|
|
350
350
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
351
351
|
var AlignSelectLoaded = lazy(
|
|
352
|
-
() => import("./loaded-
|
|
352
|
+
() => import("./loaded-GLBLMTBL.mjs").then((m) => ({
|
|
353
353
|
default: m.AlignSelectLoaded
|
|
354
354
|
}))
|
|
355
355
|
);
|
|
@@ -580,7 +580,7 @@ function HeadingSelectFallback() {
|
|
|
580
580
|
// components/RichTextMenu/controls/HeadingSelect/index.tsx
|
|
581
581
|
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
582
582
|
var HeadingSelectLoaded = lazy2(
|
|
583
|
-
() => import("./loaded-
|
|
583
|
+
() => import("./loaded-R34BR6I5.mjs").then((m) => ({
|
|
584
584
|
default: m.HeadingSelectLoaded
|
|
585
585
|
}))
|
|
586
586
|
);
|
|
@@ -612,7 +612,7 @@ function ListSelectFallback() {
|
|
|
612
612
|
// components/RichTextMenu/controls/ListSelect/index.tsx
|
|
613
613
|
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
614
614
|
var ListSelectLoaded = lazy3(
|
|
615
|
-
() => import("./loaded-
|
|
615
|
+
() => import("./loaded-O4QHGE26.mjs").then((m) => ({
|
|
616
616
|
default: m.ListSelectLoaded
|
|
617
617
|
}))
|
|
618
618
|
);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LoadedRichTextMenuInner
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-U7VW3V3W.mjs";
|
|
4
|
+
import "./chunk-OIFPBVSF.mjs";
|
|
5
|
+
import "./chunk-AD7BMXAA.mjs";
|
|
6
|
+
import "./chunk-FT6UFK7G.mjs";
|
|
7
|
+
import "./chunk-LRFRIIKG.mjs";
|
|
8
|
+
import "./chunk-M4JDRFYB.mjs";
|
|
9
|
+
import "./chunk-IIRJMJFU.mjs";
|
|
10
10
|
import "./chunk-Y2EFNT5P.mjs";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-JIXMPJZA.mjs";
|
|
12
12
|
import {
|
|
13
13
|
__spreadValues,
|
|
14
14
|
init_react_import
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as History, f as Permissions, b as ComponentData, C as Config, U as UserGenerics, F as Fields, E as EditorAction, g as RootDataWithProps, h as ResolveDataTrigger, i as Plugin, j as Overrides, V as Viewports, I as IframeConfig, k as UiState, l as ComponentConfig, A as AppState, M as Metadata, m as FieldTransforms, n as RichtextField } from './actions-
|
|
1
|
+
import { H as History, f as Permissions, b as ComponentData, C as Config, U as UserGenerics, F as Fields, E as EditorAction, g as RootDataWithProps, h as ResolveDataTrigger, i as Plugin, j as Overrides, V as Viewports, I as IframeConfig, k as UiState, l as ComponentConfig, A as AppState, M as Metadata, m as FieldTransforms, n as RichtextField } from './actions-2L-1hQ7r.js';
|
|
2
2
|
import { Editor } from '@tiptap/react';
|
|
3
3
|
|
|
4
4
|
type HistorySlice<D = any> = {
|
|
@@ -112,6 +112,7 @@ type AppStore<UserConfig extends Config = Config, G extends UserGenerics<UserCon
|
|
|
112
112
|
editor: Editor;
|
|
113
113
|
id: string;
|
|
114
114
|
} | null;
|
|
115
|
+
scrollToComponent: (id: string) => void;
|
|
115
116
|
};
|
|
116
117
|
|
|
117
118
|
export type { AppStore as A, GetPermissions as G, HistorySlice as H, RefreshPermissions as R };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as History, f as Permissions, b as ComponentData, C as Config, U as UserGenerics, F as Fields, E as EditorAction, g as RootDataWithProps, h as ResolveDataTrigger, i as Plugin, j as Overrides, V as Viewports, I as IframeConfig, k as UiState, l as ComponentConfig, A as AppState, M as Metadata, m as FieldTransforms, n as RichtextField } from './actions-
|
|
1
|
+
import { H as History, f as Permissions, b as ComponentData, C as Config, U as UserGenerics, F as Fields, E as EditorAction, g as RootDataWithProps, h as ResolveDataTrigger, i as Plugin, j as Overrides, V as Viewports, I as IframeConfig, k as UiState, l as ComponentConfig, A as AppState, M as Metadata, m as FieldTransforms, n as RichtextField } from './actions-2L-1hQ7r.mjs';
|
|
2
2
|
import { Editor } from '@tiptap/react';
|
|
3
3
|
|
|
4
4
|
type HistorySlice<D = any> = {
|
|
@@ -112,6 +112,7 @@ type AppStore<UserConfig extends Config = Config, G extends UserGenerics<UserCon
|
|
|
112
112
|
editor: Editor;
|
|
113
113
|
id: string;
|
|
114
114
|
} | null;
|
|
115
|
+
scrollToComponent: (id: string) => void;
|
|
115
116
|
};
|
|
116
117
|
|
|
117
118
|
export type { AppStore as A, GetPermissions as G, HistorySlice as H, RefreshPermissions as R };
|
package/dist/index.css
CHANGED
|
@@ -363,10 +363,10 @@ html:not(:has(.Editor)) {
|
|
|
363
363
|
}
|
|
364
364
|
|
|
365
365
|
/* css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/AutoField/styles.module.css/#css-module-data */
|
|
366
|
-
.
|
|
366
|
+
._InputWrapper_zwh6e_1 + ._InputWrapper_zwh6e_1 {
|
|
367
367
|
margin-top: 12px;
|
|
368
368
|
}
|
|
369
|
-
._Input-
|
|
369
|
+
._Input-label_zwh6e_5 {
|
|
370
370
|
align-items: center;
|
|
371
371
|
color: var(--editor-text-secondary);
|
|
372
372
|
display: flex;
|
|
@@ -375,17 +375,17 @@ html:not(:has(.Editor)) {
|
|
|
375
375
|
font-weight: 500;
|
|
376
376
|
letter-spacing: 0.005em;
|
|
377
377
|
}
|
|
378
|
-
._Input-
|
|
378
|
+
._Input-labelIcon_zwh6e_15 {
|
|
379
379
|
color: var(--editor-text-tertiary);
|
|
380
380
|
display: flex;
|
|
381
381
|
margin-inline-end: 4px;
|
|
382
382
|
padding-inline-start: 4px;
|
|
383
383
|
}
|
|
384
|
-
._Input-
|
|
384
|
+
._Input-disabledIcon_zwh6e_22 {
|
|
385
385
|
color: var(--editor-text-tertiary);
|
|
386
386
|
margin-inline-start: auto;
|
|
387
387
|
}
|
|
388
|
-
._Input-
|
|
388
|
+
._Input-input_zwh6e_27 {
|
|
389
389
|
background: var(--editor-surface-panel);
|
|
390
390
|
border-width: 1px;
|
|
391
391
|
border-style: solid;
|
|
@@ -395,7 +395,7 @@ html:not(:has(.Editor)) {
|
|
|
395
395
|
color: var(--editor-text-primary);
|
|
396
396
|
font-family: inherit;
|
|
397
397
|
font-size: 16px;
|
|
398
|
-
padding:
|
|
398
|
+
padding: 11px 12px;
|
|
399
399
|
transition:
|
|
400
400
|
border-color var(--editor-motion-fast) var(--editor-ease),
|
|
401
401
|
box-shadow var(--editor-motion-fast) var(--editor-ease),
|
|
@@ -404,11 +404,11 @@ html:not(:has(.Editor)) {
|
|
|
404
404
|
max-width: 100%;
|
|
405
405
|
}
|
|
406
406
|
@media (min-width: 458px) {
|
|
407
|
-
._Input-
|
|
407
|
+
._Input-input_zwh6e_27 {
|
|
408
408
|
font-size: 13px;
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
|
-
select._Input-
|
|
411
|
+
select._Input-input_zwh6e_27 {
|
|
412
412
|
appearance: none;
|
|
413
413
|
background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23878a93'><polygon points='0,0 100,0 50,50'/></svg>") no-repeat;
|
|
414
414
|
background-size: 10px;
|
|
@@ -417,30 +417,30 @@ select._Input-input_1hd99_27 {
|
|
|
417
417
|
background-color: var(--editor-surface-panel);
|
|
418
418
|
cursor: pointer;
|
|
419
419
|
}
|
|
420
|
-
select._Input-
|
|
420
|
+
select._Input-input_zwh6e_27:dir(rtl) {
|
|
421
421
|
background-position: 12px calc(50% + 3px);
|
|
422
422
|
}
|
|
423
423
|
@media (hover: hover) and (pointer: fine) {
|
|
424
|
-
.
|
|
425
|
-
.
|
|
424
|
+
._Input_zwh6e_1:has(> input):hover ._Input-input_zwh6e_27:not([readonly]),
|
|
425
|
+
._Input_zwh6e_1:has(> textarea):hover ._Input-input_zwh6e_27:not([readonly]) {
|
|
426
426
|
border-color: var(--editor-border-strong);
|
|
427
427
|
transition: none;
|
|
428
428
|
}
|
|
429
|
-
.
|
|
429
|
+
._Input_zwh6e_1:has(> select):hover ._Input-input_zwh6e_27:not([disabled]) {
|
|
430
430
|
background-color: var(--editor-surface-hover);
|
|
431
431
|
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%235a5a5a'><polygon points='0,0 100,0 50,50'/></svg>");
|
|
432
432
|
border-color: var(--editor-border-strong);
|
|
433
433
|
transition: none;
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
._Input-
|
|
436
|
+
._Input-input_zwh6e_27:focus {
|
|
437
437
|
border-color: var(--editor-accent);
|
|
438
438
|
outline: none;
|
|
439
439
|
box-shadow: var(--editor-ring);
|
|
440
440
|
transition: none;
|
|
441
441
|
}
|
|
442
|
-
._Input--
|
|
443
|
-
._Input--
|
|
442
|
+
._Input--readOnly_zwh6e_87 > ._Input-input_zwh6e_27,
|
|
443
|
+
._Input--readOnly_zwh6e_87 > select._Input-input_zwh6e_27 {
|
|
444
444
|
background-color: var(--editor-surface-sunken);
|
|
445
445
|
border-color: var(--editor-border-subtle);
|
|
446
446
|
color: var(--editor-text-secondary);
|
|
@@ -449,21 +449,21 @@ select._Input-input_1hd99_27:dir(rtl) {
|
|
|
449
449
|
outline: 0;
|
|
450
450
|
transition: none;
|
|
451
451
|
}
|
|
452
|
-
._Input-
|
|
452
|
+
._Input-radioGroupItems_zwh6e_98 {
|
|
453
453
|
display: flex;
|
|
454
454
|
border: 1px solid var(--editor-border-default);
|
|
455
455
|
border-radius: var(--editor-radius-md);
|
|
456
456
|
flex-wrap: wrap;
|
|
457
457
|
overflow: hidden;
|
|
458
458
|
}
|
|
459
|
-
._Input-
|
|
459
|
+
._Input-radio_zwh6e_98 {
|
|
460
460
|
border-inline-end: 1px solid var(--editor-border-default);
|
|
461
461
|
flex-grow: 1;
|
|
462
462
|
}
|
|
463
|
-
._Input-
|
|
463
|
+
._Input-radio_zwh6e_98:last-of-type {
|
|
464
464
|
border-inline-end: 0;
|
|
465
465
|
}
|
|
466
|
-
._Input-
|
|
466
|
+
._Input-radioInner_zwh6e_115 {
|
|
467
467
|
background-color: var(--editor-surface-panel);
|
|
468
468
|
color: var(--editor-text-secondary);
|
|
469
469
|
cursor: pointer;
|
|
@@ -472,34 +472,34 @@ select._Input-input_1hd99_27:dir(rtl) {
|
|
|
472
472
|
text-align: center;
|
|
473
473
|
transition: background-color var(--editor-motion-fast) var(--editor-ease), color var(--editor-motion-fast) var(--editor-ease);
|
|
474
474
|
}
|
|
475
|
-
._Input-
|
|
475
|
+
._Input-radio_zwh6e_98:has(:focus-visible) {
|
|
476
476
|
outline: none;
|
|
477
477
|
box-shadow: var(--editor-ring);
|
|
478
478
|
position: relative;
|
|
479
479
|
z-index: 1;
|
|
480
480
|
}
|
|
481
481
|
@media (hover: hover) and (pointer: fine) {
|
|
482
|
-
._Input-
|
|
482
|
+
._Input-radioInner_zwh6e_115:hover {
|
|
483
483
|
background-color: var(--editor-surface-hover);
|
|
484
484
|
color: var(--editor-text-primary);
|
|
485
485
|
transition: none;
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
|
-
._Input--
|
|
488
|
+
._Input--readOnly_zwh6e_87 ._Input-radioInner_zwh6e_115 {
|
|
489
489
|
background-color: var(--editor-surface-sunken);
|
|
490
490
|
color: var(--editor-text-secondary);
|
|
491
491
|
cursor: default;
|
|
492
492
|
}
|
|
493
|
-
._Input-
|
|
493
|
+
._Input-radio_zwh6e_98 ._Input-radioInput_zwh6e_147:checked ~ ._Input-radioInner_zwh6e_115 {
|
|
494
494
|
background-color: var(--editor-accent-soft);
|
|
495
495
|
color: var(--editor-text-accent);
|
|
496
496
|
font-weight: 500;
|
|
497
497
|
}
|
|
498
|
-
._Input--
|
|
498
|
+
._Input--readOnly_zwh6e_87 ._Input-radioInput_zwh6e_147:checked ~ ._Input-radioInner_zwh6e_115 {
|
|
499
499
|
background-color: var(--editor-surface-sunken);
|
|
500
500
|
color: var(--editor-text-secondary);
|
|
501
501
|
}
|
|
502
|
-
._Input-
|
|
502
|
+
._Input-radio_zwh6e_98 ._Input-radioInput_zwh6e_147 {
|
|
503
503
|
clip: rect(0 0 0 0);
|
|
504
504
|
clip-path: inset(100%);
|
|
505
505
|
height: 1px;
|
|
@@ -508,7 +508,7 @@ select._Input-input_1hd99_27:dir(rtl) {
|
|
|
508
508
|
white-space: nowrap;
|
|
509
509
|
width: 1px;
|
|
510
510
|
}
|
|
511
|
-
textarea._Input-
|
|
511
|
+
textarea._Input-input_zwh6e_27 {
|
|
512
512
|
margin-bottom: -4px;
|
|
513
513
|
}
|
|
514
514
|
|
|
@@ -757,6 +757,79 @@ textarea._Input-input_1hd99_27 {
|
|
|
757
757
|
transition: none !important;
|
|
758
758
|
}
|
|
759
759
|
|
|
760
|
+
/* css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/AutoField/fields/ColorField/styles.module.css/#css-module-data */
|
|
761
|
+
._ColorField_1nsbe_1 {
|
|
762
|
+
align-items: center;
|
|
763
|
+
background: var(--editor-surface-panel);
|
|
764
|
+
border: 1px solid var(--editor-border-default);
|
|
765
|
+
border-radius: var(--editor-radius-md);
|
|
766
|
+
box-sizing: border-box;
|
|
767
|
+
display: flex;
|
|
768
|
+
gap: 10px;
|
|
769
|
+
padding: 4px 12px 4px 4px;
|
|
770
|
+
transition: border-color var(--editor-motion-fast) var(--editor-ease), box-shadow var(--editor-motion-fast) var(--editor-ease);
|
|
771
|
+
width: 100%;
|
|
772
|
+
}
|
|
773
|
+
._ColorField_1nsbe_1:focus-within {
|
|
774
|
+
border-color: var(--editor-accent);
|
|
775
|
+
box-shadow: var(--editor-ring);
|
|
776
|
+
outline: none;
|
|
777
|
+
}
|
|
778
|
+
@media (hover: hover) and (pointer: fine) {
|
|
779
|
+
._ColorField_1nsbe_1:hover:not(._ColorField--readOnly_1nsbe_24) {
|
|
780
|
+
border-color: var(--editor-border-strong);
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
._ColorField--readOnly_1nsbe_24 {
|
|
784
|
+
background-color: var(--editor-surface-sunken);
|
|
785
|
+
border-color: var(--editor-border-subtle);
|
|
786
|
+
}
|
|
787
|
+
._ColorField-swatch_1nsbe_34 {
|
|
788
|
+
background-color: currentColor;
|
|
789
|
+
border: 1px solid var(--editor-border-default);
|
|
790
|
+
border-radius: 6px;
|
|
791
|
+
cursor: pointer;
|
|
792
|
+
flex-shrink: 0;
|
|
793
|
+
height: 28px;
|
|
794
|
+
padding: 0;
|
|
795
|
+
position: relative;
|
|
796
|
+
width: 28px;
|
|
797
|
+
}
|
|
798
|
+
._ColorField-swatch_1nsbe_34:focus-visible {
|
|
799
|
+
outline: none;
|
|
800
|
+
box-shadow: var(--editor-ring);
|
|
801
|
+
}
|
|
802
|
+
._ColorField--readOnly_1nsbe_24 ._ColorField-swatch_1nsbe_34 {
|
|
803
|
+
cursor: default;
|
|
804
|
+
}
|
|
805
|
+
._ColorField-picker_1nsbe_57 {
|
|
806
|
+
inset: 0;
|
|
807
|
+
opacity: 0;
|
|
808
|
+
position: absolute;
|
|
809
|
+
pointer-events: none;
|
|
810
|
+
}
|
|
811
|
+
._ColorField-text_1nsbe_64 {
|
|
812
|
+
background: transparent;
|
|
813
|
+
border: 0;
|
|
814
|
+
color: var(--editor-text-primary);
|
|
815
|
+
flex: 1;
|
|
816
|
+
font-family: inherit;
|
|
817
|
+
font-size: 16px;
|
|
818
|
+
min-width: 0;
|
|
819
|
+
outline: none;
|
|
820
|
+
padding: 0;
|
|
821
|
+
}
|
|
822
|
+
@media (min-width: 458px) {
|
|
823
|
+
._ColorField-text_1nsbe_64 {
|
|
824
|
+
font-size: 13px;
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
._ColorField-text_1nsbe_64:disabled,
|
|
828
|
+
._ColorField-text_1nsbe_64[readonly] {
|
|
829
|
+
color: var(--editor-text-secondary);
|
|
830
|
+
cursor: default;
|
|
831
|
+
}
|
|
832
|
+
|
|
760
833
|
/* css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/ExternalInput/styles.module.css/#css-module-data */
|
|
761
834
|
._ExternalInput-actions_142hz_1 {
|
|
762
835
|
display: flex;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { D as Data, o as Field, p as FieldProps,
|
|
2
|
-
export {
|
|
3
|
-
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
1
|
+
import { D as Data, o as Field, p as FieldProps, C as Config, U as UserGenerics, k as UiState, O as OnAction, f as Permissions, i as Plugin, j as Overrides, m as FieldTransforms, E as EditorAction, V as Viewports, I as IframeConfig, q as InitialHistory, M as Metadata, b as ComponentData, d as DefaultComponentProps, e as DefaultRootFieldProps, h as ResolveDataTrigger, r as ItemSelector, s as PluginInternal } from './actions-2L-1hQ7r.mjs';
|
|
2
|
+
export { t as Adaptor, A as AppState, u as ArrayField, v as ArrayState, w as AsFieldProps, B as BaseData, x as BaseField, y as CacheOpts, z as ColorField, l as ComponentConfig, G as ComponentConfigExtensions, J as ComponentConfigParams, K as ComponentDataMap, L as ComponentDataOptionalId, N as ComponentMetadata, Q as ConfigParams, a as Content, S as CustomField, T as CustomFieldRender, c as DefaultComponents, X as DefaultRootProps, Y as DefaultRootRenderProps, Z as Direction, _ as DragAxis, $ as EditorComponent, a0 as EditorContext, a1 as EditorMetadata, a2 as ExternalField, a3 as ExternalFieldWithAdaptor, a4 as ExtractConfigParams, a5 as ExtractField, a6 as FieldMetadata, a7 as FieldRenderFunctions, a8 as FieldTransformFn, a9 as FieldTransformFnParams, F as Fields, H as History, aa as ItemWithId, ab as MappedItem, ac as NumberField, ad as ObjectField, ae as OverrideKey, af as RadioField, ag as RichText, n as RichtextField, ah as RootConfig, R as RootData, g as RootDataWithProps, ai as RootDataWithoutProps, aj as SelectField, ak as Slot, al as SlotComponent, am as SlotField, an as TextField, ao as TextareaField, ap as Viewport, aq as WithChildren, ar as WithEditorProps, W as WithId, as as WithSlotProps, at as overrideKeys } from './actions-2L-1hQ7r.mjs';
|
|
3
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-4C3ODO3X.mjs';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as react from 'react';
|
|
6
6
|
import react__default, { ReactNode, SyntheticEvent, ReactElement, CSSProperties } from 'react';
|
|
7
|
-
import { A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-
|
|
7
|
+
import { A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-BXuSeNez.mjs';
|
|
8
8
|
import '@tiptap/react';
|
|
9
9
|
import '@tiptap/extension-blockquote';
|
|
10
10
|
import '@tiptap/extension-bold';
|
|
@@ -141,8 +141,6 @@ declare const Drawer: {
|
|
|
141
141
|
}) => react_jsx_runtime.JSX.Element;
|
|
142
142
|
};
|
|
143
143
|
|
|
144
|
-
declare const DropZone: react.ForwardRefExoticComponent<Omit<DropZoneProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
145
|
-
|
|
146
144
|
declare const IconButton: ({ active, children, href, onClick, type, disabled, tabIndex, newTab, fullWidth, title, suppressHydrationWarning, }: {
|
|
147
145
|
active?: boolean;
|
|
148
146
|
children: ReactNode;
|
|
@@ -196,6 +194,7 @@ type EditorProps<UserConfig extends Config = Config, G extends UserGenerics<User
|
|
|
196
194
|
disableZoomControls?: boolean;
|
|
197
195
|
_experimentalVirtualization?: boolean;
|
|
198
196
|
};
|
|
197
|
+
declare const usePropsContext: () => EditorProps<Config, UserGenerics<Config>>;
|
|
199
198
|
declare function Editor<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(props: EditorProps<UserConfig>): react_jsx_runtime.JSX.Element;
|
|
200
199
|
declare namespace Editor {
|
|
201
200
|
var Components: () => react_jsx_runtime.JSX.Element;
|
|
@@ -331,7 +330,36 @@ declare const registerOverlayPortal: (el: HTMLElement | null | undefined, opts?:
|
|
|
331
330
|
*/
|
|
332
331
|
declare function setDeep<T extends Record<string, any>>(node: T, path: string, newVal: any): T;
|
|
333
332
|
|
|
334
|
-
type
|
|
333
|
+
type Parent = {
|
|
334
|
+
id: string;
|
|
335
|
+
slot: string;
|
|
336
|
+
};
|
|
337
|
+
type InsertComponentArgs = {
|
|
338
|
+
type: string;
|
|
339
|
+
parent?: Parent;
|
|
340
|
+
index?: number;
|
|
341
|
+
data?: ComponentData;
|
|
342
|
+
select?: boolean;
|
|
343
|
+
};
|
|
344
|
+
type MoveDestination = {
|
|
345
|
+
parent?: Parent;
|
|
346
|
+
index: number;
|
|
347
|
+
};
|
|
348
|
+
type EditorCommands = {
|
|
349
|
+
insertComponent: (args: InsertComponentArgs) => {
|
|
350
|
+
id: string;
|
|
351
|
+
};
|
|
352
|
+
removeComponent: (id: string) => void;
|
|
353
|
+
duplicateComponent: (id: string) => void;
|
|
354
|
+
moveComponent: (id: string, to: MoveDestination) => void;
|
|
355
|
+
replaceComponent: (id: string, data: ComponentData) => void;
|
|
356
|
+
updateProps: (id: string, updater: Partial<DefaultComponentProps> | ((prev: DefaultComponentProps) => Partial<DefaultComponentProps>)) => void;
|
|
357
|
+
updateRoot: (updater: Partial<DefaultRootFieldProps> | ((prev: DefaultRootFieldProps) => Partial<DefaultRootFieldProps>)) => void;
|
|
358
|
+
selectComponent: (id: string | null) => void;
|
|
359
|
+
scrollToComponent: (id: string) => void;
|
|
360
|
+
};
|
|
361
|
+
|
|
362
|
+
type UseEditorData<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = EditorCommands & {
|
|
335
363
|
appState: G["UserPublicAppState"];
|
|
336
364
|
config: UserConfig;
|
|
337
365
|
dispatch: AppStore["dispatch"];
|
|
@@ -385,4 +413,4 @@ declare const outlinePlugin: () => Plugin;
|
|
|
385
413
|
|
|
386
414
|
declare const legacySideBarPlugin: () => Plugin;
|
|
387
415
|
|
|
388
|
-
export { Action, ActionBar, AutoField, Button, ComponentData, ComponentList, Config, Data,
|
|
416
|
+
export { Action, ActionBar, AutoField, Button, ComponentData, ComponentList, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, Editor, EditorAction, type EditorApi, type EditorCommands, Field, FieldLabel, FieldProps, FieldTransforms, type GlobalsMap, Group, IconButton, IframeConfig, InitialHistory, type InsertComponentArgs, Label, Metadata, type MoveDestination, OnAction, Overrides, type PageMetadata, type Parent, Permissions, Plugin, Render, ResolveDataTrigger, RichTextMenu, type Route, Separator, UiState, type UseEditorData, UserGenerics, Viewports, blocksPlugin, createUseEditor, fieldsPlugin, legacySideBarPlugin, outlinePlugin, pageMetadata, registerOverlayPortal, renderContext, setDeep, useEditor, useGetEditor, usePropsContext };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { D as Data, o as Field, p as FieldProps,
|
|
2
|
-
export {
|
|
3
|
-
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
1
|
+
import { D as Data, o as Field, p as FieldProps, C as Config, U as UserGenerics, k as UiState, O as OnAction, f as Permissions, i as Plugin, j as Overrides, m as FieldTransforms, E as EditorAction, V as Viewports, I as IframeConfig, q as InitialHistory, M as Metadata, b as ComponentData, d as DefaultComponentProps, e as DefaultRootFieldProps, h as ResolveDataTrigger, r as ItemSelector, s as PluginInternal } from './actions-2L-1hQ7r.js';
|
|
2
|
+
export { t as Adaptor, A as AppState, u as ArrayField, v as ArrayState, w as AsFieldProps, B as BaseData, x as BaseField, y as CacheOpts, z as ColorField, l as ComponentConfig, G as ComponentConfigExtensions, J as ComponentConfigParams, K as ComponentDataMap, L as ComponentDataOptionalId, N as ComponentMetadata, Q as ConfigParams, a as Content, S as CustomField, T as CustomFieldRender, c as DefaultComponents, X as DefaultRootProps, Y as DefaultRootRenderProps, Z as Direction, _ as DragAxis, $ as EditorComponent, a0 as EditorContext, a1 as EditorMetadata, a2 as ExternalField, a3 as ExternalFieldWithAdaptor, a4 as ExtractConfigParams, a5 as ExtractField, a6 as FieldMetadata, a7 as FieldRenderFunctions, a8 as FieldTransformFn, a9 as FieldTransformFnParams, F as Fields, H as History, aa as ItemWithId, ab as MappedItem, ac as NumberField, ad as ObjectField, ae as OverrideKey, af as RadioField, ag as RichText, n as RichtextField, ah as RootConfig, R as RootData, g as RootDataWithProps, ai as RootDataWithoutProps, aj as SelectField, ak as Slot, al as SlotComponent, am as SlotField, an as TextField, ao as TextareaField, ap as Viewport, aq as WithChildren, ar as WithEditorProps, W as WithId, as as WithSlotProps, at as overrideKeys } from './actions-2L-1hQ7r.js';
|
|
3
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-C9GrSWsR.js';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as react from 'react';
|
|
6
6
|
import react__default, { ReactNode, SyntheticEvent, ReactElement, CSSProperties } from 'react';
|
|
7
|
-
import { A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-
|
|
7
|
+
import { A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-BNsSzMCj.js';
|
|
8
8
|
import '@tiptap/react';
|
|
9
9
|
import '@tiptap/extension-blockquote';
|
|
10
10
|
import '@tiptap/extension-bold';
|
|
@@ -141,8 +141,6 @@ declare const Drawer: {
|
|
|
141
141
|
}) => react_jsx_runtime.JSX.Element;
|
|
142
142
|
};
|
|
143
143
|
|
|
144
|
-
declare const DropZone: react.ForwardRefExoticComponent<Omit<DropZoneProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
145
|
-
|
|
146
144
|
declare const IconButton: ({ active, children, href, onClick, type, disabled, tabIndex, newTab, fullWidth, title, suppressHydrationWarning, }: {
|
|
147
145
|
active?: boolean;
|
|
148
146
|
children: ReactNode;
|
|
@@ -196,6 +194,7 @@ type EditorProps<UserConfig extends Config = Config, G extends UserGenerics<User
|
|
|
196
194
|
disableZoomControls?: boolean;
|
|
197
195
|
_experimentalVirtualization?: boolean;
|
|
198
196
|
};
|
|
197
|
+
declare const usePropsContext: () => EditorProps<Config, UserGenerics<Config>>;
|
|
199
198
|
declare function Editor<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(props: EditorProps<UserConfig>): react_jsx_runtime.JSX.Element;
|
|
200
199
|
declare namespace Editor {
|
|
201
200
|
var Components: () => react_jsx_runtime.JSX.Element;
|
|
@@ -331,7 +330,36 @@ declare const registerOverlayPortal: (el: HTMLElement | null | undefined, opts?:
|
|
|
331
330
|
*/
|
|
332
331
|
declare function setDeep<T extends Record<string, any>>(node: T, path: string, newVal: any): T;
|
|
333
332
|
|
|
334
|
-
type
|
|
333
|
+
type Parent = {
|
|
334
|
+
id: string;
|
|
335
|
+
slot: string;
|
|
336
|
+
};
|
|
337
|
+
type InsertComponentArgs = {
|
|
338
|
+
type: string;
|
|
339
|
+
parent?: Parent;
|
|
340
|
+
index?: number;
|
|
341
|
+
data?: ComponentData;
|
|
342
|
+
select?: boolean;
|
|
343
|
+
};
|
|
344
|
+
type MoveDestination = {
|
|
345
|
+
parent?: Parent;
|
|
346
|
+
index: number;
|
|
347
|
+
};
|
|
348
|
+
type EditorCommands = {
|
|
349
|
+
insertComponent: (args: InsertComponentArgs) => {
|
|
350
|
+
id: string;
|
|
351
|
+
};
|
|
352
|
+
removeComponent: (id: string) => void;
|
|
353
|
+
duplicateComponent: (id: string) => void;
|
|
354
|
+
moveComponent: (id: string, to: MoveDestination) => void;
|
|
355
|
+
replaceComponent: (id: string, data: ComponentData) => void;
|
|
356
|
+
updateProps: (id: string, updater: Partial<DefaultComponentProps> | ((prev: DefaultComponentProps) => Partial<DefaultComponentProps>)) => void;
|
|
357
|
+
updateRoot: (updater: Partial<DefaultRootFieldProps> | ((prev: DefaultRootFieldProps) => Partial<DefaultRootFieldProps>)) => void;
|
|
358
|
+
selectComponent: (id: string | null) => void;
|
|
359
|
+
scrollToComponent: (id: string) => void;
|
|
360
|
+
};
|
|
361
|
+
|
|
362
|
+
type UseEditorData<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = EditorCommands & {
|
|
335
363
|
appState: G["UserPublicAppState"];
|
|
336
364
|
config: UserConfig;
|
|
337
365
|
dispatch: AppStore["dispatch"];
|
|
@@ -385,4 +413,4 @@ declare const outlinePlugin: () => Plugin;
|
|
|
385
413
|
|
|
386
414
|
declare const legacySideBarPlugin: () => Plugin;
|
|
387
415
|
|
|
388
|
-
export { Action, ActionBar, AutoField, Button, ComponentData, ComponentList, Config, Data,
|
|
416
|
+
export { Action, ActionBar, AutoField, Button, ComponentData, ComponentList, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, Editor, EditorAction, type EditorApi, type EditorCommands, Field, FieldLabel, FieldProps, FieldTransforms, type GlobalsMap, Group, IconButton, IframeConfig, InitialHistory, type InsertComponentArgs, Label, Metadata, type MoveDestination, OnAction, Overrides, type PageMetadata, type Parent, Permissions, Plugin, Render, ResolveDataTrigger, RichTextMenu, type Route, Separator, UiState, type UseEditorData, UserGenerics, Viewports, blocksPlugin, createUseEditor, fieldsPlugin, legacySideBarPlugin, outlinePlugin, pageMetadata, registerOverlayPortal, renderContext, setDeep, useEditor, useGetEditor, usePropsContext };
|