@namroodinc/liquid-editorial 0.15.0 → 0.16.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.
Files changed (122) hide show
  1. package/README.md +283 -12
  2. package/UPGRADING.md +59 -0
  3. package/dist/chunks/EntryPicker-C7EBfpaw.cjs +2 -0
  4. package/dist/chunks/EntryPicker-C7EBfpaw.cjs.map +1 -0
  5. package/dist/chunks/{EntryPicker-BGWxiLJ_.js → EntryPicker-DBnDsgzi.js} +395 -395
  6. package/dist/chunks/EntryPicker-DBnDsgzi.js.map +1 -0
  7. package/dist/chunks/FormEditor-BG8bOXI8.js +35 -0
  8. package/dist/chunks/FormEditor-BG8bOXI8.js.map +1 -0
  9. package/dist/chunks/FormEditor-BJN0QuLI.cjs +2 -0
  10. package/dist/chunks/FormEditor-BJN0QuLI.cjs.map +1 -0
  11. package/dist/chunks/{NumberField-C90eJGny.js → NumberField-CVsK4l9P.js} +13 -13
  12. package/dist/chunks/{NumberField-C90eJGny.js.map → NumberField-CVsK4l9P.js.map} +1 -1
  13. package/dist/chunks/{NumberField-BrWFmPkW.cjs → NumberField-Ccjpa_1d.cjs} +2 -2
  14. package/dist/chunks/{NumberField-BrWFmPkW.cjs.map → NumberField-Ccjpa_1d.cjs.map} +1 -1
  15. package/dist/chunks/RichTextEditor-D4rNww9d.cjs +2 -0
  16. package/dist/chunks/RichTextEditor-D4rNww9d.cjs.map +1 -0
  17. package/dist/chunks/{RichTextEditor-CS2ED0HP.js → RichTextEditor-DSxiMLVd.js} +1147 -1017
  18. package/dist/chunks/RichTextEditor-DSxiMLVd.js.map +1 -0
  19. package/dist/components/Choice/index.cjs +1 -1
  20. package/dist/components/Choice/index.cjs.map +1 -1
  21. package/dist/components/Choice/index.js +5 -5
  22. package/dist/components/EntryPicker/index.cjs +1 -1
  23. package/dist/components/EntryPicker/index.js +1 -1
  24. package/dist/components/FormEditor/README.md +150 -161
  25. package/dist/components/FormEditor/control.d.cts +4 -4
  26. package/dist/components/FormEditor/control.d.cts.map +1 -1
  27. package/dist/components/FormEditor/control.d.ts +4 -4
  28. package/dist/components/FormEditor/control.d.ts.map +1 -1
  29. package/dist/components/FormEditor/form.d.cts +3 -3
  30. package/dist/components/FormEditor/form.d.cts.map +1 -1
  31. package/dist/components/FormEditor/form.d.ts +3 -3
  32. package/dist/components/FormEditor/form.d.ts.map +1 -1
  33. package/dist/components/FormEditor/index.cjs +1 -1
  34. package/dist/components/FormEditor/index.js +2 -2
  35. package/dist/components/FormEditor/model.d.cts +2 -0
  36. package/dist/components/FormEditor/model.d.cts.map +1 -1
  37. package/dist/components/FormEditor/model.d.ts +2 -0
  38. package/dist/components/FormEditor/model.d.ts.map +1 -1
  39. package/dist/components/FormEditor/rich-text-control.d.cts +1 -2
  40. package/dist/components/FormEditor/rich-text-control.d.cts.map +1 -1
  41. package/dist/components/FormEditor/rich-text-control.d.ts +1 -2
  42. package/dist/components/FormEditor/rich-text-control.d.ts.map +1 -1
  43. package/dist/components/ImageCropper/index.cjs +1 -1
  44. package/dist/components/ImageCropper/index.cjs.map +1 -1
  45. package/dist/components/ImageCropper/index.js +6 -6
  46. package/dist/components/NumberField/index.cjs +1 -1
  47. package/dist/components/NumberField/index.js +1 -1
  48. package/dist/components/RichTextEditor/block-plugins.d.cts +62 -0
  49. package/dist/components/RichTextEditor/block-plugins.d.cts.map +1 -0
  50. package/dist/components/RichTextEditor/block-plugins.d.ts +62 -0
  51. package/dist/components/RichTextEditor/block-plugins.d.ts.map +1 -0
  52. package/dist/components/RichTextEditor/content-block-view.d.cts +1 -1
  53. package/dist/components/RichTextEditor/content-block-view.d.cts.map +1 -1
  54. package/dist/components/RichTextEditor/content-block-view.d.ts +1 -1
  55. package/dist/components/RichTextEditor/content-block-view.d.ts.map +1 -1
  56. package/dist/components/RichTextEditor/content-block.d.cts +7 -21
  57. package/dist/components/RichTextEditor/content-block.d.cts.map +1 -1
  58. package/dist/components/RichTextEditor/content-block.d.ts +7 -21
  59. package/dist/components/RichTextEditor/content-block.d.ts.map +1 -1
  60. package/dist/components/RichTextEditor/document.d.cts +16 -3
  61. package/dist/components/RichTextEditor/document.d.cts.map +1 -1
  62. package/dist/components/RichTextEditor/document.d.ts +16 -3
  63. package/dist/components/RichTextEditor/document.d.ts.map +1 -1
  64. package/dist/components/RichTextEditor/index.cjs +1 -1
  65. package/dist/components/RichTextEditor/index.d.cts +6 -4
  66. package/dist/components/RichTextEditor/index.d.cts.map +1 -1
  67. package/dist/components/RichTextEditor/index.d.ts +6 -4
  68. package/dist/components/RichTextEditor/index.d.ts.map +1 -1
  69. package/dist/components/RichTextEditor/index.js +1 -1
  70. package/dist/components/RichTextEditor/picker-block.d.cts +25 -0
  71. package/dist/components/RichTextEditor/picker-block.d.cts.map +1 -0
  72. package/dist/components/RichTextEditor/picker-block.d.ts +25 -0
  73. package/dist/components/RichTextEditor/picker-block.d.ts.map +1 -0
  74. package/dist/components/RichTextEditor/use-blocks.d.cts +19 -0
  75. package/dist/components/RichTextEditor/use-blocks.d.cts.map +1 -0
  76. package/dist/components/RichTextEditor/use-blocks.d.ts +19 -0
  77. package/dist/components/RichTextEditor/use-blocks.d.ts.map +1 -0
  78. package/dist/components/SelectionCard/index.cjs +1 -1
  79. package/dist/components/SelectionCard/index.cjs.map +1 -1
  80. package/dist/components/SelectionCard/index.js +4 -4
  81. package/dist/components/SelectionCard/index.js.map +1 -1
  82. package/dist/index.cjs +1 -1
  83. package/dist/index.d.cts +2 -2
  84. package/dist/index.d.cts.map +1 -1
  85. package/dist/index.d.ts +2 -2
  86. package/dist/index.d.ts.map +1 -1
  87. package/dist/index.js +46 -46
  88. package/dist/internal/useStableValue.d.cts +8 -0
  89. package/dist/internal/useStableValue.d.cts.map +1 -0
  90. package/dist/internal/useStableValue.d.ts +8 -0
  91. package/dist/internal/useStableValue.d.ts.map +1 -0
  92. package/dist/rich-text-blocks.cjs +2 -0
  93. package/dist/rich-text-blocks.cjs.map +1 -0
  94. package/dist/rich-text-blocks.d.cts +20 -0
  95. package/dist/rich-text-blocks.d.cts.map +1 -0
  96. package/dist/rich-text-blocks.d.ts +20 -0
  97. package/dist/rich-text-blocks.d.ts.map +1 -0
  98. package/dist/rich-text-blocks.js +36 -0
  99. package/dist/rich-text-blocks.js.map +1 -0
  100. package/package.json +14 -1
  101. package/dist/chunks/EntryPicker-BGWxiLJ_.js.map +0 -1
  102. package/dist/chunks/EntryPicker-wVjzdlAO.cjs +0 -2
  103. package/dist/chunks/EntryPicker-wVjzdlAO.cjs.map +0 -1
  104. package/dist/chunks/FormEditor-BHVJG23r.js +0 -30
  105. package/dist/chunks/FormEditor-BHVJG23r.js.map +0 -1
  106. package/dist/chunks/FormEditor-DjUz7qQo.cjs +0 -2
  107. package/dist/chunks/FormEditor-DjUz7qQo.cjs.map +0 -1
  108. package/dist/chunks/RichTextEditor-BgfeOrEe.cjs +0 -2
  109. package/dist/chunks/RichTextEditor-BgfeOrEe.cjs.map +0 -1
  110. package/dist/chunks/RichTextEditor-CS2ED0HP.js.map +0 -1
  111. package/dist/components/RichTextEditor/embed-context.d.cts +0 -41
  112. package/dist/components/RichTextEditor/embed-context.d.cts.map +0 -1
  113. package/dist/components/RichTextEditor/embed-context.d.ts +0 -41
  114. package/dist/components/RichTextEditor/embed-context.d.ts.map +0 -1
  115. package/dist/components/RichTextEditor/embed-types.d.cts +0 -29
  116. package/dist/components/RichTextEditor/embed-types.d.cts.map +0 -1
  117. package/dist/components/RichTextEditor/embed-types.d.ts +0 -29
  118. package/dist/components/RichTextEditor/embed-types.d.ts.map +0 -1
  119. package/dist/components/RichTextEditor/use-embeds.d.cts +0 -31
  120. package/dist/components/RichTextEditor/use-embeds.d.cts.map +0 -1
  121. package/dist/components/RichTextEditor/use-embeds.d.ts +0 -31
  122. package/dist/components/RichTextEditor/use-embeds.d.ts.map +0 -1
@@ -1,41 +0,0 @@
1
- import type { EntryItem } from "../EntryPicker/index.cjs";
2
- import type { SeedCopy } from "../EntryPicker/use-selected-items.cjs";
3
- import type { RichTextEmbedKind, RichTextEmbedSource } from "./embed-types.cjs";
4
- /** Whether a source can offer something to embed: choices to list, or one to create. */
5
- export declare function canEmbed(source: RichTextEmbedSource | undefined): boolean;
6
- /**
7
- * Whether a source's insertion stages a batch: always, when it has choices to
8
- * list. A source that can only create offers one item, so it stays single.
9
- */
10
- export declare function canBatch(source: RichTextEmbedSource | undefined): boolean;
11
- /**
12
- * What a block's node view reads from its source. Callbacks are stable wrappers
13
- * over the latest source and the rest are plain values, so an application that
14
- * builds new sources on every render doesn't re-render every block.
15
- */
16
- export interface EmbedSourceView {
17
- resolveItem?: (id: string) => EntryItem | null | Promise<EntryItem | null>;
18
- refreshKey?: string | number;
19
- items?: EntryItem[];
20
- isDialogHidden: boolean;
21
- /** The source can list or create a replacement. */
22
- canEmbed: boolean;
23
- onEditItem?: (item: EntryItem) => void;
24
- }
25
- export declare const EmbedContext: import("react").Context<{
26
- views: Partial<Record<RichTextEmbedKind, EmbedSourceView>>;
27
- disabled: boolean;
28
- /** A picker session is suspended or creating: starting another would orphan it. */
29
- busy: boolean;
30
- replace: (kind: RichTextEmbedKind, position: number) => void;
31
- /**
32
- * Changes with each pick. Picking a block's own item again leaves an equal node
33
- * that ProseMirror doesn't re-render, so blocks re-read `seed` when it changes.
34
- */
35
- pickCount: number;
36
- /** The row a writer just picked for this item, so its new block shows it at once. */
37
- seed: (kind: RichTextEmbedKind, id: string) => SeedCopy | undefined;
38
- /** The block has shown `copy`; later blocks for the item describe it afresh. */
39
- forgetSeed: (kind: RichTextEmbedKind, id: string, copy: SeedCopy) => void;
40
- }>;
41
- //# sourceMappingURL=embed-context.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"embed-context.d.cts","sourceRoot":"","sources":["../../../src/components/RichTextEditor/embed-context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAE5E,wFAAwF;AACxF,wBAAgB,QAAQ,CAAC,MAAM,EAAE,mBAAmB,GAAG,SAAS,WAE/D;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,mBAAmB,GAAG,SAAS,WAE/D;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,SAAS,GAAG,IAAI,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IAC3E,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;IACxB,mDAAmD;IACnD,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;CACxC;AAED,eAAO,MAAM,YAAY;WAChB,OAAO,CAAC,MAAM,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC;cAChD,OAAO;IACjB,mFAAmF;UAC7E,OAAO;aACJ,CAAC,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI;IAC5D;;;OAGG;eACQ,MAAM;IACjB,qFAAqF;UAC/E,CAAC,IAAI,EAAE,iBAAiB,EAAE,EAAE,EAAE,MAAM,KAAK,QAAQ,GAAG,SAAS;IACnE,gFAAgF;gBACpE,CAAC,IAAI,EAAE,iBAAiB,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,KAAK,IAAI;EASzE,CAAC"}
@@ -1,41 +0,0 @@
1
- import type { EntryItem } from "../EntryPicker/index.js";
2
- import type { SeedCopy } from "../EntryPicker/use-selected-items.js";
3
- import type { RichTextEmbedKind, RichTextEmbedSource } from "./embed-types.js";
4
- /** Whether a source can offer something to embed: choices to list, or one to create. */
5
- export declare function canEmbed(source: RichTextEmbedSource | undefined): boolean;
6
- /**
7
- * Whether a source's insertion stages a batch: always, when it has choices to
8
- * list. A source that can only create offers one item, so it stays single.
9
- */
10
- export declare function canBatch(source: RichTextEmbedSource | undefined): boolean;
11
- /**
12
- * What a block's node view reads from its source. Callbacks are stable wrappers
13
- * over the latest source and the rest are plain values, so an application that
14
- * builds new sources on every render doesn't re-render every block.
15
- */
16
- export interface EmbedSourceView {
17
- resolveItem?: (id: string) => EntryItem | null | Promise<EntryItem | null>;
18
- refreshKey?: string | number;
19
- items?: EntryItem[];
20
- isDialogHidden: boolean;
21
- /** The source can list or create a replacement. */
22
- canEmbed: boolean;
23
- onEditItem?: (item: EntryItem) => void;
24
- }
25
- export declare const EmbedContext: import("react").Context<{
26
- views: Partial<Record<RichTextEmbedKind, EmbedSourceView>>;
27
- disabled: boolean;
28
- /** A picker session is suspended or creating: starting another would orphan it. */
29
- busy: boolean;
30
- replace: (kind: RichTextEmbedKind, position: number) => void;
31
- /**
32
- * Changes with each pick. Picking a block's own item again leaves an equal node
33
- * that ProseMirror doesn't re-render, so blocks re-read `seed` when it changes.
34
- */
35
- pickCount: number;
36
- /** The row a writer just picked for this item, so its new block shows it at once. */
37
- seed: (kind: RichTextEmbedKind, id: string) => SeedCopy | undefined;
38
- /** The block has shown `copy`; later blocks for the item describe it afresh. */
39
- forgetSeed: (kind: RichTextEmbedKind, id: string, copy: SeedCopy) => void;
40
- }>;
41
- //# sourceMappingURL=embed-context.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"embed-context.d.ts","sourceRoot":"","sources":["../../../src/components/RichTextEditor/embed-context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAE5E,wFAAwF;AACxF,wBAAgB,QAAQ,CAAC,MAAM,EAAE,mBAAmB,GAAG,SAAS,WAE/D;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,mBAAmB,GAAG,SAAS,WAE/D;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,SAAS,GAAG,IAAI,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IAC3E,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;IACxB,mDAAmD;IACnD,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;CACxC;AAED,eAAO,MAAM,YAAY;WAChB,OAAO,CAAC,MAAM,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC;cAChD,OAAO;IACjB,mFAAmF;UAC7E,OAAO;aACJ,CAAC,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI;IAC5D;;;OAGG;eACQ,MAAM;IACjB,qFAAqF;UAC/E,CAAC,IAAI,EAAE,iBAAiB,EAAE,EAAE,EAAE,MAAM,KAAK,QAAQ,GAAG,SAAS;IACnE,gFAAgF;gBACpE,CAAC,IAAI,EAAE,iBAAiB,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,KAAK,IAAI;EASzE,CAAC"}
@@ -1,29 +0,0 @@
1
- import type { EntryItem, EntryPickerSource } from "../EntryPicker/index.cjs";
2
- /** Entry rows supplied for embedding carry their model's readable API ID. */
3
- export interface RichTextEmbedItem extends EntryItem {
4
- modelId?: string;
5
- }
6
- export interface RichTextEmbedTarget {
7
- available: () => boolean;
8
- /** Returns false when the editor or bookmarked target is no longer available. */
9
- commit: (item: RichTextEmbedItem) => boolean;
10
- }
11
- /**
12
- * Embedding is offered when the source can list choices (`loadPage` or `items`)
13
- * or create one (`onCreate`); a source with only `resolveItem` displays existing blocks.
14
- * Insertion from listed choices always stages any number of items and inserts
15
- * them together; replacement and creation choose one. EntryPicker's `mode` and
16
- * `max` don't apply. Give a remote source `resolveItem`, so a refresh can
17
- * deselect staged items no longer available.
18
- */
19
- export interface RichTextEmbedSource extends Omit<EntryPickerSource, "onCreate" | "mode" | "max"> {
20
- /** Static choices, searched by title and keywords, when there is no `loadPage`. */
21
- items?: RichTextEmbedItem[];
22
- onCreate?: (target: RichTextEmbedTarget) => void;
23
- }
24
- export interface RichTextEmbedSources {
25
- entry?: RichTextEmbedSource;
26
- asset?: RichTextEmbedSource;
27
- }
28
- export type RichTextEmbedKind = keyof RichTextEmbedSources;
29
- //# sourceMappingURL=embed-types.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"embed-types.d.cts","sourceRoot":"","sources":["../../../src/components/RichTextEditor/embed-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnE,6EAA6E;AAC7E,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IAClD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,OAAO,CAAC;IACzB,iFAAiF;IACjF,MAAM,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,OAAO,CAAC;CAC9C;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,UAAU,GAAG,MAAM,GAAG,KAAK,CAAC;IAC/F,mFAAmF;IACnF,KAAK,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC5B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAC;CAClD;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B,KAAK,CAAC,EAAE,mBAAmB,CAAC;CAC7B;AAED,MAAM,MAAM,iBAAiB,GAAG,MAAM,oBAAoB,CAAC"}
@@ -1,29 +0,0 @@
1
- import type { EntryItem, EntryPickerSource } from "../EntryPicker/index.js";
2
- /** Entry rows supplied for embedding carry their model's readable API ID. */
3
- export interface RichTextEmbedItem extends EntryItem {
4
- modelId?: string;
5
- }
6
- export interface RichTextEmbedTarget {
7
- available: () => boolean;
8
- /** Returns false when the editor or bookmarked target is no longer available. */
9
- commit: (item: RichTextEmbedItem) => boolean;
10
- }
11
- /**
12
- * Embedding is offered when the source can list choices (`loadPage` or `items`)
13
- * or create one (`onCreate`); a source with only `resolveItem` displays existing blocks.
14
- * Insertion from listed choices always stages any number of items and inserts
15
- * them together; replacement and creation choose one. EntryPicker's `mode` and
16
- * `max` don't apply. Give a remote source `resolveItem`, so a refresh can
17
- * deselect staged items no longer available.
18
- */
19
- export interface RichTextEmbedSource extends Omit<EntryPickerSource, "onCreate" | "mode" | "max"> {
20
- /** Static choices, searched by title and keywords, when there is no `loadPage`. */
21
- items?: RichTextEmbedItem[];
22
- onCreate?: (target: RichTextEmbedTarget) => void;
23
- }
24
- export interface RichTextEmbedSources {
25
- entry?: RichTextEmbedSource;
26
- asset?: RichTextEmbedSource;
27
- }
28
- export type RichTextEmbedKind = keyof RichTextEmbedSources;
29
- //# sourceMappingURL=embed-types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"embed-types.d.ts","sourceRoot":"","sources":["../../../src/components/RichTextEditor/embed-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnE,6EAA6E;AAC7E,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IAClD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,OAAO,CAAC;IACzB,iFAAiF;IACjF,MAAM,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,OAAO,CAAC;CAC9C;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,UAAU,GAAG,MAAM,GAAG,KAAK,CAAC;IAC/F,mFAAmF;IACnF,KAAK,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC5B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAC;CAClD;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B,KAAK,CAAC,EAAE,mBAAmB,CAAC;CAC7B;AAED,MAAM,MAAM,iBAAiB,GAAG,MAAM,oBAAoB,CAAC"}
@@ -1,31 +0,0 @@
1
- import type { Editor } from "@tiptap/react";
2
- import type { SeedCopy } from "../EntryPicker/use-selected-items.cjs";
3
- import { type EmbedSourceView } from "./embed-context.cjs";
4
- import type { RichTextEmbedKind, RichTextEmbedSources } from "./embed-types.cjs";
5
- /**
6
- * Marks the transaction that commits an embed: the one change a disabled
7
- * editor reports, while the embed's source completes a creation.
8
- */
9
- export declare const embedCommitMeta = "ds-rte-embed-commit";
10
- export declare function useEmbeds(editor: Editor | null, sources: RichTextEmbedSources | undefined, disabled: boolean, label: string): {
11
- context: {
12
- views: {
13
- entry: EmbedSourceView | undefined;
14
- asset: EmbedSourceView | undefined;
15
- };
16
- disabled: boolean;
17
- busy: boolean;
18
- pickCount: number;
19
- replace: (kind: RichTextEmbedKind, position: number) => void;
20
- seed: (kind: RichTextEmbedKind, id: string) => SeedCopy | undefined;
21
- forgetSeed: (kind: RichTextEmbedKind, id: string, copy: SeedCopy) => void;
22
- };
23
- /**
24
- * A source is completing a creation, which its app may hold the editor read
25
- * only for, from the dialog until it clears `isCreating` after the commit.
26
- */
27
- isCreating: boolean;
28
- toolbar: false | import("react").JSX.Element;
29
- dialog: import("react").JSX.Element | null | undefined;
30
- };
31
- //# sourceMappingURL=use-embeds.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-embeds.d.cts","sourceRoot":"","sources":["../../../src/components/RichTextEditor/use-embeds.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAgB,MAAM,eAAe,CAAC;AAQ1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAElE,OAAO,EAAsB,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAE3E,OAAO,KAAK,EAEV,iBAAiB,EAEjB,oBAAoB,EAErB,MAAM,eAAe,CAAC;AAMvB;;;GAGG;AACH,eAAO,MAAM,eAAe,wBAAwB,CAAC;AAqWrD,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,OAAO,EAAE,oBAAoB,YAAY,EACzC,QAAQ,EAAE,OAAO,EACjB,KAAK,EAAE,MAAM;;;;;;;;;wBA2KK,iBAAiB,YAAY,MAAM;qBACtC,iBAAiB,MAAM,MAAM;2BAEvB,iBAAiB,MAAM,MAAM,QAAQ,QAAQ;;IAmChE;;;OAGG;;;;EAyCN"}
@@ -1,31 +0,0 @@
1
- import type { Editor } from "@tiptap/react";
2
- import type { SeedCopy } from "../EntryPicker/use-selected-items.js";
3
- import { type EmbedSourceView } from "./embed-context.js";
4
- import type { RichTextEmbedKind, RichTextEmbedSources } from "./embed-types.js";
5
- /**
6
- * Marks the transaction that commits an embed: the one change a disabled
7
- * editor reports, while the embed's source completes a creation.
8
- */
9
- export declare const embedCommitMeta = "ds-rte-embed-commit";
10
- export declare function useEmbeds(editor: Editor | null, sources: RichTextEmbedSources | undefined, disabled: boolean, label: string): {
11
- context: {
12
- views: {
13
- entry: EmbedSourceView | undefined;
14
- asset: EmbedSourceView | undefined;
15
- };
16
- disabled: boolean;
17
- busy: boolean;
18
- pickCount: number;
19
- replace: (kind: RichTextEmbedKind, position: number) => void;
20
- seed: (kind: RichTextEmbedKind, id: string) => SeedCopy | undefined;
21
- forgetSeed: (kind: RichTextEmbedKind, id: string, copy: SeedCopy) => void;
22
- };
23
- /**
24
- * A source is completing a creation, which its app may hold the editor read
25
- * only for, from the dialog until it clears `isCreating` after the commit.
26
- */
27
- isCreating: boolean;
28
- toolbar: false | import("react").JSX.Element;
29
- dialog: import("react").JSX.Element | null | undefined;
30
- };
31
- //# sourceMappingURL=use-embeds.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-embeds.d.ts","sourceRoot":"","sources":["../../../src/components/RichTextEditor/use-embeds.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAgB,MAAM,eAAe,CAAC;AAQ1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAElE,OAAO,EAAsB,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAE3E,OAAO,KAAK,EAEV,iBAAiB,EAEjB,oBAAoB,EAErB,MAAM,eAAe,CAAC;AAMvB;;;GAGG;AACH,eAAO,MAAM,eAAe,wBAAwB,CAAC;AAqWrD,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,OAAO,EAAE,oBAAoB,YAAY,EACzC,QAAQ,EAAE,OAAO,EACjB,KAAK,EAAE,MAAM;;;;;;;;;wBA2KK,iBAAiB,YAAY,MAAM;qBACtC,iBAAiB,MAAM,MAAM;2BAEvB,iBAAiB,MAAM,MAAM,QAAQ,QAAQ;;IAmChE;;;OAGG;;;;EAyCN"}