@dxos/react-ui-editor 0.8.4-main.a4bbb77 → 0.8.4-main.ae835ea

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 (194) hide show
  1. package/dist/lib/browser/{chunk-22UMM3QJ.mjs → chunk-HL3YF6WC.mjs} +2 -2
  2. package/dist/lib/browser/chunk-HL3YF6WC.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +4577 -4832
  4. package/dist/lib/browser/index.mjs.map +4 -4
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/testing/index.mjs.map +2 -2
  7. package/dist/lib/browser/types/index.mjs +1 -1
  8. package/dist/lib/node-esm/{chunk-YXYQPV6R.mjs → chunk-YJZGD3LY.mjs} +2 -2
  9. package/dist/lib/node-esm/chunk-YJZGD3LY.mjs.map +7 -0
  10. package/dist/lib/node-esm/index.mjs +4577 -4832
  11. package/dist/lib/node-esm/index.mjs.map +4 -4
  12. package/dist/lib/node-esm/meta.json +1 -1
  13. package/dist/lib/node-esm/testing/index.mjs.map +2 -2
  14. package/dist/lib/node-esm/types/index.mjs +1 -1
  15. package/dist/types/src/components/Editor/Editor.d.ts +13 -4
  16. package/dist/types/src/components/Editor/Editor.d.ts.map +1 -1
  17. package/dist/types/src/components/Editor/Editor.stories.d.ts +27 -0
  18. package/dist/types/src/components/Editor/Editor.stories.d.ts.map +1 -0
  19. package/dist/types/src/components/EditorToolbar/EditorToolbar.d.ts +17 -2
  20. package/dist/types/src/components/EditorToolbar/EditorToolbar.d.ts.map +1 -1
  21. package/dist/types/src/components/EditorToolbar/headings.d.ts.map +1 -1
  22. package/dist/types/src/components/EditorToolbar/util.d.ts +5 -19
  23. package/dist/types/src/components/EditorToolbar/util.d.ts.map +1 -1
  24. package/dist/types/src/components/index.d.ts +0 -1
  25. package/dist/types/src/components/index.d.ts.map +1 -1
  26. package/dist/types/src/extensions/autocomplete/autocomplete.d.ts.map +1 -0
  27. package/dist/types/src/extensions/autocomplete/index.d.ts +5 -0
  28. package/dist/types/src/extensions/autocomplete/index.d.ts.map +1 -0
  29. package/dist/types/src/extensions/autocomplete/match.d.ts +13 -0
  30. package/dist/types/src/extensions/autocomplete/match.d.ts.map +1 -0
  31. package/dist/types/src/extensions/autocomplete/placeholder.d.ts +20 -0
  32. package/dist/types/src/extensions/autocomplete/placeholder.d.ts.map +1 -0
  33. package/dist/types/src/extensions/autocomplete/typeahead.d.ts +10 -0
  34. package/dist/types/src/extensions/autocomplete/typeahead.d.ts.map +1 -0
  35. package/dist/types/src/extensions/automerge/automerge.d.ts +1 -1
  36. package/dist/types/src/extensions/automerge/automerge.d.ts.map +1 -1
  37. package/dist/types/src/extensions/automerge/cursor.d.ts +1 -1
  38. package/dist/types/src/extensions/automerge/cursor.d.ts.map +1 -1
  39. package/dist/types/src/extensions/automerge/sync.d.ts +3 -3
  40. package/dist/types/src/extensions/automerge/sync.d.ts.map +1 -1
  41. package/dist/types/src/extensions/automerge/update-automerge.d.ts +1 -1
  42. package/dist/types/src/extensions/automerge/update-automerge.d.ts.map +1 -1
  43. package/dist/types/src/extensions/autoscroll.d.ts +2 -2
  44. package/dist/types/src/extensions/autoscroll.d.ts.map +1 -1
  45. package/dist/types/src/extensions/awareness/awareness-provider.d.ts +1 -1
  46. package/dist/types/src/extensions/awareness/awareness-provider.d.ts.map +1 -1
  47. package/dist/types/src/extensions/factories.d.ts +9 -4
  48. package/dist/types/src/extensions/factories.d.ts.map +1 -1
  49. package/dist/types/src/extensions/index.d.ts +2 -3
  50. package/dist/types/src/extensions/index.d.ts.map +1 -1
  51. package/dist/types/src/extensions/json.d.ts +1 -1
  52. package/dist/types/src/extensions/json.d.ts.map +1 -1
  53. package/dist/types/src/extensions/listener.d.ts +8 -6
  54. package/dist/types/src/extensions/listener.d.ts.map +1 -1
  55. package/dist/types/src/extensions/markdown/bundle.d.ts.map +1 -1
  56. package/dist/types/src/extensions/markdown/formatting.d.ts +1 -2
  57. package/dist/types/src/extensions/markdown/formatting.d.ts.map +1 -1
  58. package/dist/types/src/extensions/modes.d.ts +1 -1
  59. package/dist/types/src/extensions/modes.d.ts.map +1 -1
  60. package/dist/types/src/extensions/outliner/menu.d.ts +8 -0
  61. package/dist/types/src/extensions/outliner/menu.d.ts.map +1 -0
  62. package/dist/types/src/extensions/popover/PopoverMenuProvider.d.ts +36 -0
  63. package/dist/types/src/extensions/popover/PopoverMenuProvider.d.ts.map +1 -0
  64. package/dist/types/src/extensions/popover/index.d.ts +8 -0
  65. package/dist/types/src/extensions/popover/index.d.ts.map +1 -0
  66. package/dist/types/src/extensions/popover/menu-presets.d.ts +4 -0
  67. package/dist/types/src/extensions/popover/menu-presets.d.ts.map +1 -0
  68. package/dist/types/src/extensions/popover/menu.d.ts +24 -0
  69. package/dist/types/src/extensions/popover/menu.d.ts.map +1 -0
  70. package/dist/types/src/extensions/popover/modal.d.ts +7 -0
  71. package/dist/types/src/extensions/popover/modal.d.ts.map +1 -0
  72. package/dist/types/src/extensions/popover/popover.d.ts +47 -0
  73. package/dist/types/src/extensions/popover/popover.d.ts.map +1 -0
  74. package/dist/types/src/extensions/popover/usePopoverMenu.d.ts +34 -0
  75. package/dist/types/src/extensions/popover/usePopoverMenu.d.ts.map +1 -0
  76. package/dist/types/src/extensions/popover/util.d.ts +8 -0
  77. package/dist/types/src/extensions/popover/util.d.ts.map +1 -0
  78. package/dist/types/src/extensions/preview/preview.d.ts +6 -3
  79. package/dist/types/src/extensions/preview/preview.d.ts.map +1 -1
  80. package/dist/types/src/extensions/state.d.ts +2 -0
  81. package/dist/types/src/extensions/state.d.ts.map +1 -0
  82. package/dist/types/src/hooks/useTextEditor.d.ts +2 -6
  83. package/dist/types/src/hooks/useTextEditor.d.ts.map +1 -1
  84. package/dist/types/src/stories/CommandDialog.stories.d.ts.map +1 -1
  85. package/dist/types/src/stories/Comments.stories.d.ts +2 -2
  86. package/dist/types/src/stories/EditorToolbar.stories.d.ts.map +1 -1
  87. package/dist/types/src/stories/Experimental.stories.d.ts +2 -2
  88. package/dist/types/src/stories/Markdown.stories.d.ts +2 -2
  89. package/dist/types/src/stories/Outliner.stories.d.ts.map +1 -1
  90. package/dist/types/src/stories/{CommandMenu.stories.d.ts → Popover.stories.d.ts} +6 -5
  91. package/dist/types/src/stories/Popover.stories.d.ts.map +1 -0
  92. package/dist/types/src/stories/Preview.stories.d.ts +2 -2
  93. package/dist/types/src/stories/Preview.stories.d.ts.map +1 -1
  94. package/dist/types/src/stories/TextEditor.stories.d.ts +2 -3
  95. package/dist/types/src/stories/TextEditor.stories.d.ts.map +1 -1
  96. package/dist/types/src/stories/components/EditorStory.d.ts +3 -3
  97. package/dist/types/src/stories/components/EditorStory.d.ts.map +1 -1
  98. package/dist/types/src/styles/theme.d.ts.map +1 -1
  99. package/dist/types/src/testing/PreviewPopover.d.ts.map +1 -1
  100. package/dist/types/src/types/types.d.ts +1 -1
  101. package/dist/types/src/types/types.d.ts.map +1 -1
  102. package/dist/types/tsconfig.tsbuildinfo +1 -1
  103. package/package.json +41 -38
  104. package/src/components/Editor/Editor.stories.tsx +69 -0
  105. package/src/components/Editor/Editor.tsx +25 -17
  106. package/src/components/EditorToolbar/EditorToolbar.tsx +88 -87
  107. package/src/components/EditorToolbar/headings.ts +6 -4
  108. package/src/components/EditorToolbar/util.ts +2 -18
  109. package/src/components/index.ts +0 -1
  110. package/src/extensions/{autocomplete.ts → autocomplete/autocomplete.ts} +1 -0
  111. package/src/extensions/autocomplete/index.ts +8 -0
  112. package/src/extensions/autocomplete/match.ts +46 -0
  113. package/src/extensions/{command-menu → autocomplete}/placeholder.ts +21 -17
  114. package/src/extensions/{command-dialog → autocomplete}/typeahead.ts +6 -48
  115. package/src/extensions/automerge/automerge.ts +28 -9
  116. package/src/extensions/automerge/cursor.ts +1 -1
  117. package/src/extensions/automerge/sync.ts +8 -4
  118. package/src/extensions/automerge/update-automerge.ts +1 -1
  119. package/src/extensions/autoscroll.ts +3 -3
  120. package/src/extensions/awareness/awareness-provider.ts +2 -2
  121. package/src/extensions/factories.ts +18 -10
  122. package/src/extensions/hashtag.tsx +2 -2
  123. package/src/extensions/index.ts +2 -3
  124. package/src/extensions/json.ts +1 -1
  125. package/src/extensions/listener.ts +14 -20
  126. package/src/extensions/markdown/bundle.ts +14 -2
  127. package/src/extensions/markdown/formatting.ts +8 -8
  128. package/src/extensions/modes.ts +2 -2
  129. package/src/extensions/{floating-menu.ts → outliner/menu.ts} +7 -5
  130. package/src/extensions/outliner/outliner.ts +2 -2
  131. package/src/extensions/popover/PopoverMenuProvider.tsx +220 -0
  132. package/src/extensions/popover/index.ts +12 -0
  133. package/src/extensions/popover/menu-presets.ts +124 -0
  134. package/src/extensions/popover/menu.ts +67 -0
  135. package/src/extensions/popover/modal.ts +24 -0
  136. package/src/extensions/popover/popover.ts +289 -0
  137. package/src/extensions/popover/usePopoverMenu.ts +173 -0
  138. package/src/extensions/popover/util.ts +29 -0
  139. package/src/extensions/preview/index.ts +1 -1
  140. package/src/extensions/preview/preview.ts +10 -7
  141. package/src/extensions/state.ts +7 -0
  142. package/src/hooks/useTextEditor.ts +21 -21
  143. package/src/stories/CommandDialog.stories.tsx +3 -14
  144. package/src/stories/EditorToolbar.stories.tsx +4 -5
  145. package/src/stories/Outliner.stories.tsx +16 -9
  146. package/src/stories/Popover.stories.tsx +163 -0
  147. package/src/stories/Preview.stories.tsx +15 -8
  148. package/src/stories/TextEditor.stories.tsx +3 -29
  149. package/src/stories/components/EditorStory.tsx +5 -3
  150. package/src/styles/theme.ts +2 -1
  151. package/src/testing/PreviewPopover.tsx +2 -0
  152. package/src/types/types.ts +1 -1
  153. package/dist/lib/browser/chunk-22UMM3QJ.mjs.map +0 -7
  154. package/dist/lib/node-esm/chunk-YXYQPV6R.mjs.map +0 -7
  155. package/dist/types/src/components/CommandMenu/CommandMenu.d.ts +0 -38
  156. package/dist/types/src/components/CommandMenu/CommandMenu.d.ts.map +0 -1
  157. package/dist/types/src/components/CommandMenu/index.d.ts +0 -2
  158. package/dist/types/src/components/CommandMenu/index.d.ts.map +0 -1
  159. package/dist/types/src/extensions/autocomplete.d.ts.map +0 -1
  160. package/dist/types/src/extensions/command-dialog/action.d.ts +0 -17
  161. package/dist/types/src/extensions/command-dialog/action.d.ts.map +0 -1
  162. package/dist/types/src/extensions/command-dialog/command-dialog.d.ts +0 -6
  163. package/dist/types/src/extensions/command-dialog/command-dialog.d.ts.map +0 -1
  164. package/dist/types/src/extensions/command-dialog/hint.d.ts +0 -19
  165. package/dist/types/src/extensions/command-dialog/hint.d.ts.map +0 -1
  166. package/dist/types/src/extensions/command-dialog/index.d.ts +0 -4
  167. package/dist/types/src/extensions/command-dialog/index.d.ts.map +0 -1
  168. package/dist/types/src/extensions/command-dialog/state.d.ts +0 -16
  169. package/dist/types/src/extensions/command-dialog/state.d.ts.map +0 -1
  170. package/dist/types/src/extensions/command-dialog/typeahead.d.ts +0 -22
  171. package/dist/types/src/extensions/command-dialog/typeahead.d.ts.map +0 -1
  172. package/dist/types/src/extensions/command-menu/command-menu.d.ts +0 -20
  173. package/dist/types/src/extensions/command-menu/command-menu.d.ts.map +0 -1
  174. package/dist/types/src/extensions/command-menu/index.d.ts +0 -3
  175. package/dist/types/src/extensions/command-menu/index.d.ts.map +0 -1
  176. package/dist/types/src/extensions/command-menu/placeholder.d.ts +0 -10
  177. package/dist/types/src/extensions/command-menu/placeholder.d.ts.map +0 -1
  178. package/dist/types/src/extensions/command-menu/useCommandMenu.d.ts +0 -24
  179. package/dist/types/src/extensions/command-menu/useCommandMenu.d.ts.map +0 -1
  180. package/dist/types/src/extensions/floating-menu.d.ts +0 -7
  181. package/dist/types/src/extensions/floating-menu.d.ts.map +0 -1
  182. package/dist/types/src/stories/CommandMenu.stories.d.ts.map +0 -1
  183. package/src/components/CommandMenu/CommandMenu.tsx +0 -348
  184. package/src/components/CommandMenu/index.ts +0 -5
  185. package/src/extensions/command-dialog/action.ts +0 -55
  186. package/src/extensions/command-dialog/command-dialog.ts +0 -34
  187. package/src/extensions/command-dialog/hint.ts +0 -103
  188. package/src/extensions/command-dialog/index.ts +0 -7
  189. package/src/extensions/command-dialog/state.ts +0 -90
  190. package/src/extensions/command-menu/command-menu.ts +0 -210
  191. package/src/extensions/command-menu/index.ts +0 -6
  192. package/src/extensions/command-menu/useCommandMenu.ts +0 -134
  193. package/src/stories/CommandMenu.stories.tsx +0 -158
  194. /package/dist/types/src/extensions/{autocomplete.d.ts → autocomplete/autocomplete.d.ts} +0 -0
@@ -0,0 +1,27 @@
1
+ import { type StoryObj } from '@storybook/react-vite';
2
+ import React from 'react';
3
+ declare const meta: {
4
+ title: string;
5
+ component: React.ForwardRefExoticComponent<Omit<{
6
+ moveToEnd?: boolean;
7
+ value?: string;
8
+ onChange?: (value: string) => void;
9
+ } & Pick<import("@codemirror/state").EditorStateConfig, "extensions"> & {
10
+ id?: string;
11
+ doc?: import("@codemirror/state").Text;
12
+ initialValue?: string;
13
+ autoFocus?: boolean;
14
+ scrollTo?: number;
15
+ selection?: import("../..").EditorSelection;
16
+ moveToEndOfLine?: boolean;
17
+ debug?: boolean;
18
+ }, "className"> & {
19
+ classNames?: import("@dxos/react-ui-types").ClassNameValue;
20
+ } & React.RefAttributes<import("./Editor").EditorController>>;
21
+ decorators: import("@storybook/react").Decorator[];
22
+ };
23
+ export default meta;
24
+ type Story = StoryObj<typeof meta>;
25
+ export declare const Default: Story;
26
+ export declare const Automerge: Story;
27
+ //# sourceMappingURL=Editor.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Editor.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Editor/Editor.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;CAIqB,CAAC;AAEhC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAmBrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAqBvB,CAAC"}
@@ -1,4 +1,19 @@
1
1
  import React from 'react';
2
- import { type EditorToolbarProps } from './util';
3
- export declare const EditorToolbar: React.MemoExoticComponent<({ classNames, attendableId, role, ...props }: EditorToolbarProps) => React.JSX.Element>;
2
+ import { type ThemedClassName } from '@dxos/react-ui';
3
+ import { type EditorViewMode } from '../../types';
4
+ import { type EditorToolbarActionGraphProps } from './util';
5
+ export type EditorToolbarFeatureFlags = Partial<{
6
+ showHeadings: boolean;
7
+ showFormatting: boolean;
8
+ showLists: boolean;
9
+ showBlocks: boolean;
10
+ showSearch: boolean;
11
+ onImageUpload: () => void;
12
+ onViewModeChange: (mode: EditorViewMode) => void;
13
+ }>;
14
+ export type EditorToolbarProps = ThemedClassName<{
15
+ role?: string;
16
+ attendableId?: string;
17
+ } & (EditorToolbarActionGraphProps & EditorToolbarFeatureFlags)>;
18
+ export declare const EditorToolbar: React.MemoExoticComponent<({ classNames, role, attendableId, ...props }: EditorToolbarProps) => React.JSX.Element>;
4
19
  //# sourceMappingURL=EditorToolbar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EditorToolbar.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorToolbar/EditorToolbar.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAkB7C,OAAO,EAAsE,KAAK,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAqGrH,eAAO,MAAM,aAAa,2EAAuD,kBAAkB,uBASjG,CAAC"}
1
+ {"version":3,"file":"EditorToolbar.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorToolbar/EditorToolbar.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAG7C,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AASzE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAQlD,OAAO,EAAE,KAAK,6BAA6B,EAAE,MAAM,QAAQ,CAAC;AAG5D,MAAM,MAAM,yBAAyB,GAAG,OAAO,CAAC;IAC9C,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IAGpB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,gBAAgB,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC;CAClD,CAAC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAC9C;IACE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,CAAC,6BAA6B,GAAG,yBAAyB,CAAC,CAChE,CAAC;AAGF,eAAO,MAAM,aAAa,2EAAuD,kBAAkB,uBAUjG,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"headings.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorToolbar/headings.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAM/C,OAAO,EAAE,KAAK,kBAAkB,EAA+C,MAAM,QAAQ,CAAC;AAyC9F,eAAO,MAAM,cAAc,GAAI,OAAO,kBAAkB,EAAE,SAAS,MAAM,UAAU;;;;;;;;;;;;;;CAWlF,CAAC"}
1
+ {"version":3,"file":"headings.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorToolbar/headings.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAM/C,OAAO,EAAE,KAAK,kBAAkB,EAA+C,MAAM,QAAQ,CAAC;AA2C9F,eAAO,MAAM,cAAc,GAAI,OAAO,kBAAkB,EAAE,SAAS,MAAM,UAAU;;;;;;;;;;;;;;CAWlF,CAAC"}
@@ -2,43 +2,29 @@ import { type EditorView } from '@codemirror/view';
2
2
  import { type Rx } from '@effect-rx/rx-react';
3
3
  import { type Action } from '@dxos/app-graph';
4
4
  import { type Live } from '@dxos/live-object';
5
- import { type ThemedClassName } from '@dxos/react-ui';
6
5
  import { type ActionGraphProps, type MenuActionProperties, type MenuItemGroup, type MenuSeparator, type ToolbarMenuActionGroupProperties } from '@dxos/react-ui-menu';
7
6
  import type { EditorAction, Formatting } from '../../extensions';
8
7
  import { type EditorViewMode } from '../../types';
9
- export type EditorToolbarState = Formatting & Partial<{
10
- viewMode: EditorViewMode;
11
- }>;
8
+ export type EditorToolbarState = {
9
+ viewMode?: EditorViewMode;
10
+ } & Formatting;
12
11
  export declare const useEditorToolbarState: (initialState?: Partial<EditorToolbarState>) => Live<EditorToolbarState>;
13
- export type EditorToolbarFeatureFlags = Partial<{
14
- headings: boolean;
15
- formatting: boolean;
16
- lists: boolean;
17
- blocks: boolean;
18
- search: boolean;
19
- image: () => void;
20
- viewMode: (mode: EditorViewMode) => void;
21
- }>;
22
12
  export type EditorToolbarActionGraphProps = {
23
13
  state: Live<EditorToolbarState>;
24
14
  getView: () => EditorView;
25
15
  customActions?: Rx.Rx<ActionGraphProps>;
26
16
  };
27
- export type EditorToolbarProps = ThemedClassName<EditorToolbarActionGraphProps & EditorToolbarFeatureFlags & {
28
- attendableId?: string;
29
- role?: string;
30
- }>;
31
17
  export type EditorToolbarItem = EditorAction | MenuItemGroup | MenuSeparator;
32
18
  export declare const createEditorAction: (id: string, props: Partial<MenuActionProperties>, invoke: () => void) => Action<MenuActionProperties>;
33
19
  export declare const createEditorActionGroup: (id: string, props: Omit<ToolbarMenuActionGroupProperties, "icon">, icon?: string) => {
34
20
  id: string;
35
21
  type: string;
36
22
  properties: {
37
- disabled?: boolean | undefined;
38
23
  value: string | (string & string[]);
39
- hidden?: boolean | undefined;
40
24
  classNames?: import("@dxos/react-ui-types").ClassNameValue;
25
+ hidden?: boolean | undefined;
41
26
  variant: "dropdownMenu" | "toggleGroup";
27
+ disabled?: boolean | undefined;
42
28
  iconOnly: boolean;
43
29
  testId?: string | undefined;
44
30
  checked?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../../src/components/EditorToolbar/util.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,qBAAqB,CAAC;AAG9C,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,KAAK,IAAI,EAAQ,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,gCAAgC,EAGtC,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,OAAO,CAAC;IAAE,QAAQ,EAAE,cAAc,CAAA;CAAE,CAAC,CAAC;AAEpF,eAAO,MAAM,qBAAqB,GAAI,eAAc,OAAO,CAAC,kBAAkB,CAAM,6BAEnF,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,OAAO,CAAC;IAC9C,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;IACf,M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K,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,gCAAgC,EAGtC,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,MAAM,kBAAkB,GAAG;IAAE,QAAQ,CAAC,EAAE,cAAc,CAAA;CAAE,GAAG,UAAU,CAAC;AAE5E,eAAO,MAAM,qBAAqB,GAAI,eAAc,OAAO,CAAC,kBAAkB,CAAM,KAAG,IAAI,CAAC,kBAAkB,CAE7G,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,KAAK,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAChC,OAAO,EAAE,MAAM,UAAU,CAAC;IAE1B,aAAa,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,aAAa,GAAG,aAAa,CAAC;AAE7E,eAAO,MAAM,kBAAkB,GAAI,IAAI,MAAM,EAAE,OAAO,OAAO,CAAC,oBAAoB,CAAC,EAAE,QAAQ,MAAM,IAAI,KAK/F,MAAM,CAAC,oBAAoB,CAClC,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,IAAI,MAAM,EACV,OAAO,IAAI,CAAC,gCAAgC,EAAE,MAAM,CAAC,EACrD,OAAO,MAAM;;;;;;;;;;;;;;;;;CASd,CAAC"}
@@ -1,4 +1,3 @@
1
- export * from './CommandMenu';
2
1
  export * from './Editor';
3
2
  export * from './EditorToolbar';
4
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/autocomplete/autocomplete.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAQ,MAAM,mBAAmB,CAAC;AAWzD,MAAM,MAAM,mBAAmB,GAAG;IAChC,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,GAAG,IAAI,CAAC;IAE5C;;;;OAIG;IACH,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,EAAE,CAAC;IAEvC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF;;;GAGG;AAEH,eAAO,MAAM,YAAY,GAAI,iDAAgD,mBAAwB,KAAG,SA+JvG,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './autocomplete';
2
+ export * from './match';
3
+ export * from './placeholder';
4
+ export * from './typeahead';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/autocomplete/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC"}
@@ -0,0 +1,13 @@
1
+ export type CompoetionContext = {
2
+ line: string;
3
+ };
4
+ export type CompletionOptions = {
5
+ default?: string;
6
+ minLength?: number;
7
+ };
8
+ /**
9
+ * Util to match current line to a static list of completions.
10
+ */
11
+ export declare const staticCompletion: (completions: string[], options?: CompletionOptions) => ({ line }: CompoetionContext) => string | undefined;
12
+ export declare const matchCompletion: (completion: string, str: string, minLength?: number) => string | undefined;
13
+ //# sourceMappingURL=match.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"match.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/autocomplete/match.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,iBAAiB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAC1B,aAAa,MAAM,EAAE,EAAE,UAAS,iBAAsB,MACtD,UAAU,iBAAiB,uBAiB3B,CAAC;AAEJ,eAAO,MAAM,eAAe,GAAI,YAAY,MAAM,EAAE,KAAK,MAAM,EAAE,kBAAa,KAAG,MAAM,GAAG,SAUzF,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { type Extension } from '@codemirror/state';
2
+ import { EditorView, WidgetType } from '@codemirror/view';
3
+ type Content = string | HTMLElement | ((view: EditorView) => HTMLElement);
4
+ export type PlaceholderOptions = {
5
+ content: Content;
6
+ delay?: number;
7
+ };
8
+ /**
9
+ * Shows a transient placeholder at the current cursor position.
10
+ */
11
+ export declare const placeholder: ({ content, delay }: PlaceholderOptions) => Extension;
12
+ export declare class PlaceholderWidget extends WidgetType {
13
+ readonly content: Content;
14
+ constructor(content: Content);
15
+ toDOM(view: EditorView): HTMLSpanElement;
16
+ coordsAt(dom: HTMLElement): import("../..").Rect | null;
17
+ ignoreEvent(): boolean;
18
+ }
19
+ export {};
20
+ //# sourceMappingURL=placeholder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"placeholder.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/autocomplete/placeholder.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAc,UAAU,EAA+B,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAInG,KAAK,OAAO,GAAG,MAAM,GAAG,WAAW,GAAG,CAAC,CAAC,IAAI,EAAE,UAAU,KAAK,WAAW,CAAC,CAAC;AAE1E,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,oBAA4B,kBAAkB,KAAG,SAiD5E,CAAC;AAEF,qBAAa,iBAAkB,SAAQ,UAAU;IACnC,QAAQ,CAAC,OAAO,EAAE,OAAO;gBAAhB,OAAO,EAAE,OAAO;IAIrC,KAAK,CAAC,IAAI,EAAE,UAAU;IAgBb,QAAQ,CAAC,GAAG,EAAE,WAAW;IAqBzB,WAAW;CAGrB"}
@@ -0,0 +1,10 @@
1
+ import { type Extension } from '@codemirror/state';
2
+ import { type CompoetionContext } from './match';
3
+ export type TypeaheadOptions = {
4
+ onComplete?: (context: CompoetionContext) => string | undefined;
5
+ };
6
+ /**
7
+ * Shows a completion placeholder.
8
+ */
9
+ export declare const typeahead: ({ onComplete }?: TypeaheadOptions) => Extension;
10
+ //# sourceMappingURL=typeahead.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeahead.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/autocomplete/typeahead.ts"],"names":[],"mappings":"AAIA,OAAO,EAAmB,KAAK,SAAS,EAAyB,MAAM,mBAAmB,CAAC;AAW3F,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAIjD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,MAAM,GAAG,SAAS,CAAC;CACjE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,iBAAgB,gBAAqB,KAAG,SA4DjE,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import { type Extension } from '@codemirror/state';
2
- import { type DocAccessor } from '@dxos/react-client/echo';
2
+ import { DocAccessor } from '@dxos/client/echo';
3
3
  export declare const automerge: (accessor: DocAccessor) => Extension;
4
4
  //# sourceMappingURL=automerge.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"automerge.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/automerge/automerge.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,SAAS,EAAc,MAAM,mBAAmB,CAAC;AAG/D,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAQ3D,eAAO,MAAM,SAAS,GAAI,UAAU,WAAW,KAAG,SAmEjD,CAAC"}
1
+ {"version":3,"file":"automerge.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/automerge/automerge.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,SAAS,EAA2B,MAAM,mBAAmB,CAAC;AAG5E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAShD,eAAO,MAAM,SAAS,GAAI,UAAU,WAAW,KAAG,SAqFjD,CAAC"}
@@ -1,4 +1,4 @@
1
- import { type DocAccessor } from '@dxos/react-client/echo';
1
+ import { type DocAccessor } from '@dxos/client/echo';
2
2
  import { type CursorConverter } from '../../util';
3
3
  export declare const cursorConverter: (accessor: DocAccessor) => CursorConverter;
4
4
  //# sourceMappingURL=cursor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/automerge/cursor.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,WAAW,EAAwB,MAAM,yBAAyB,CAAC;AAEjF,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,eAAO,MAAM,eAAe,GAAI,UAAU,WAAW,KAAG,eAkBtD,CAAC"}
1
+ {"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/automerge/cursor.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,WAAW,EAAwB,MAAM,mBAAmB,CAAC;AAG3E,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,eAAO,MAAM,eAAe,GAAI,UAAU,WAAW,KAAG,eAkBtD,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { type StateField } from '@codemirror/state';
2
2
  import { type EditorView } from '@codemirror/view';
3
- import { type IDocHandle } from '@dxos/react-client/echo';
3
+ import { type IDocHandle } from '@dxos/client/echo';
4
4
  import { type State } from './defs';
5
5
  /**
6
6
  * Implements three-way merge (on each mutation).
@@ -11,7 +11,7 @@ export declare class Syncer {
11
11
  private _pending;
12
12
  constructor(_handle: IDocHandle, _state: StateField<State>);
13
13
  reconcile(view: EditorView, editor: boolean): void;
14
- onEditorChange(view: EditorView): void;
15
- onAutomergeChange(view: EditorView): void;
14
+ private onEditorChange;
15
+ private onAutomergeChange;
16
16
  }
17
17
  //# sourceMappingURL=sync.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/automerge/sync.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,KAAK,KAAK,EAAwE,MAAM,QAAQ,CAAC;AAI1G;;GAEG;AACH,qBAAa,MAAM;IAKf,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM;IALzB,OAAO,CAAC,QAAQ,CAAS;gBAIN,OAAO,EAAE,UAAU,EACnB,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC;IAG5C,SAAS,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI;IAelD,cAAc,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;IAatC,iBAAiB,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;CAkB1C"}
1
+ {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/automerge/sync.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EAAE,KAAK,KAAK,EAAwE,MAAM,QAAQ,CAAC;AAI1G;;GAEG;AACH,qBAAa,MAAM;IAKf,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM;IALzB,OAAO,CAAC,QAAQ,CAAS;gBAIN,OAAO,EAAE,UAAU,EACnB,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC;IAG5C,SAAS,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI;IAclD,OAAO,CAAC,cAAc;IAetB,OAAO,CAAC,iBAAiB;CAoB1B"}
@@ -1,6 +1,6 @@
1
1
  import { type Heads } from '@automerge/automerge';
2
2
  import { type EditorState, type StateField, type Transaction } from '@codemirror/state';
3
- import { type IDocHandle } from '@dxos/react-client/echo';
3
+ import { type IDocHandle } from '@dxos/client/echo';
4
4
  import { type State } from './defs';
5
5
  export declare const updateAutomerge: (field: StateField<State>, handle: IDocHandle, transactions: Transaction[], state: EditorState) => Heads | undefined;
6
6
  //# sourceMappingURL=update-automerge.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"update-automerge.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/automerge/update-automerge.ts"],"names":[],"mappings":"AAMA,OAAO,EAAa,KAAK,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAa,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEnG,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,QAAQ,CAAC;AAEpC,eAAO,MAAM,eAAe,GAC1B,OAAO,UAAU,CAAC,KAAK,CAAC,EACxB,QAAQ,UAAU,EAClB,cAAc,WAAW,EAAE,EAC3B,OAAO,WAAW,KACjB,KAAK,GAAG,SA+BV,CAAC"}
1
+ {"version":3,"file":"update-automerge.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/automerge/update-automerge.ts"],"names":[],"mappings":"AAMA,OAAO,EAAa,KAAK,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAa,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEnG,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,QAAQ,CAAC;AAEpC,eAAO,MAAM,eAAe,GAC1B,OAAO,UAAU,CAAC,KAAK,CAAC,EACxB,QAAQ,UAAU,EAClB,cAAc,WAAW,EAAE,EAC3B,OAAO,WAAW,KACjB,KAAK,GAAG,SA+BV,CAAC"}
@@ -1,7 +1,7 @@
1
1
  export declare const scrollToBottomEffect: import("@codemirror/state").StateEffectType<any>;
2
2
  export type AutoScrollOptions = {
3
- overscroll: number;
4
- throttle: number;
3
+ overscroll?: number;
4
+ throttle?: number;
5
5
  };
6
6
  /**
7
7
  * Extension that supports pinning the scroll position and automatically scrolls to the bottom when content is added.
@@ -1 +1 @@
1
- {"version":3,"file":"autoscroll.d.ts","sourceRoot":"","sources":["../../../../src/extensions/autoscroll.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,oBAAoB,kDAA4B,CAAC;AAE9D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AAEH,eAAO,MAAM,UAAU,GAAI,2BAAmD,OAAO,CAAC,iBAAiB,CAAM,4CA8H5G,CAAC"}
1
+ {"version":3,"file":"autoscroll.d.ts","sourceRoot":"","sources":["../../../../src/extensions/autoscroll.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,oBAAoB,kDAA4B,CAAC;AAE9D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AAEH,eAAO,MAAM,UAAU,GAAI,2BAAmD,OAAO,CAAC,iBAAiB,CAAM,4CA8H5G,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { Event } from '@dxos/async';
2
- import { type Space } from '@dxos/react-client/echo';
2
+ import { type Space } from '@dxos/client/echo';
3
3
  import { type AwarenessInfo, type AwarenessPosition, type AwarenessProvider, type AwarenessState } from './awareness';
4
4
  export type AwarenessProviderParams = {
5
5
  space: Space;
@@ -1 +1 @@
1
- {"version":3,"file":"awareness-provider.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/awareness/awareness-provider.ts"],"names":[],"mappings":"AAIA,OAAO,EAAgB,KAAK,EAAS,MAAM,aAAa,CAAC;AAIzD,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAGrD,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAatH,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,I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Q,CAAC,aAAa,CAAqC;IAEnE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAQ;IAC/B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IAEtC,OAAO,CAAC,IAAI,CAAC,CAAU;IACvB,OAAO,CAAC,SAAS,CAAC,CAAe;IACjC,OAAO,CAAC,WAAW,CAAC,CAAiB;IAErC,SAAgB,iBAAiB,cAAqB;gBAE1C,MAAM,EAAE,uBAAuB;IAO3C,IAAI,IAAI,IAAI;IAuCZ,KAAK,IAAI,IAAI;IAMb,eAAe,IAAI,cAAc,EAAE;IAInC,MAAM,CAAC,QAAQ,EAAE,iBAAiB,GAAG,SAAS,GAAG,IAAI;IAWrD,OAAO,CAAC,mBAAmB;IAK3B,OAAO,CAAC,kBAAkB;CAM3B"}
@@ -1,6 +1,6 @@
1
1
  import { type Extension } from '@codemirror/state';
2
- import { type DocAccessor, type Space } from '@dxos/react-client/echo';
3
- import { type Identity } from '@dxos/react-client/halo';
2
+ import { type DocAccessor, type Space } from '@dxos/client/echo';
3
+ import { type Identity } from '@dxos/client/halo';
4
4
  import { type ThemeMode } from '@dxos/react-ui';
5
5
  import { type ThemeStyles } from '../styles';
6
6
  export declare const filterChars: (chars: RegExp) => Extension;
@@ -25,11 +25,11 @@ export type BasicExtensionsOptions = {
25
25
  lineNumbers?: boolean;
26
26
  /** If false then do not set a max-width or side margin on the editor. */
27
27
  lineWrapping?: boolean;
28
- monospace?: boolean;
29
28
  placeholder?: string;
30
29
  /** If true user cannot edit the text, but they can still select and copy it. */
31
30
  readOnly?: boolean;
32
31
  search?: boolean;
32
+ /** NOTE: Do not use with stack sections. */
33
33
  scrollPastEnd?: boolean;
34
34
  standardKeymap?: boolean;
35
35
  tabSize?: number;
@@ -37,6 +37,7 @@ export type BasicExtensionsOptions = {
37
37
  export declare const createBasicExtensions: (_props?: BasicExtensionsOptions) => Extension;
38
38
  export type ThemeExtensionsOptions = {
39
39
  themeMode?: ThemeMode;
40
+ monospace?: boolean;
40
41
  styles?: ThemeStyles;
41
42
  syntaxHighlighting?: boolean;
42
43
  slots?: {
@@ -64,10 +65,14 @@ export declare const defaultThemeSlots: {
64
65
  className?: string;
65
66
  };
66
67
  };
68
+ export declare const defaultStyles: {
69
+ dark: import("@codemirror/language").TagStyle[];
70
+ light: import("@codemirror/language").TagStyle[];
71
+ };
67
72
  /**
68
73
  * https://codemirror.net/examples/styling
69
74
  */
70
- export declare const createThemeExtensions: ({ themeMode, styles, syntaxHighlighting: syntaxHighlightingProps, slots: _slots, }?: ThemeExtensionsOptions) => Extension;
75
+ export declare const createThemeExtensions: ({ themeMode, monospace, styles, syntaxHighlighting: syntaxHighlightingProp, slots: slotsParam, }?: ThemeExtensionsOptions) => Extension;
71
76
  export type DataExtensionsProps<T> = {
72
77
  id: string;
73
78
  text?: DocAccessor<T>;
@@ -1 +1 @@
1
- {"version":3,"file":"factories.d.ts","sourceRoot":"","sources":["../../../../src/extensions/factories.ts"],"names":[],"mappings":"AAQA,OAAO,EAAgC,KAAK,SAAS,EAAwB,MAAM,mBAAmB,CAAC;AAmBvG,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAKhD,OAAO,EAAE,KAAK,WAAW,EAAgB,MAAM,WAAW,CAAC;AAU3D,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,cAsBxC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,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CAAC;AAEX,eAAO,MAAM,SAAS,EAAE,sBAAsB,CAAC,OAAO,CAI5C,CAAC;AAEX,eAAO,MAAM,iBAAiB;aAxBjB;QACP,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB;aACQ;QACP,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB;cACS;QACR,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB;CAgBgC,CAAC;AAEtC,eAAO,MAAM,aAAa;;;CAGzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAI,mGAMnC,sBAA2B,KAAG,SAmBhC,CAAC;AAMF,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IACtB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;CAC5B,CAAC;AAGF,eAAO,MAAM,oBAAoB,GAAI,CAAC,EAAE,+BAA+B,mBAAmB,CAAC,CAAC,CAAC,KAAG,SAAS,EA0BxG,CAAC"}
@@ -4,13 +4,10 @@ export * from './autoscroll';
4
4
  export * from './automerge';
5
5
  export * from './awareness';
6
6
  export * from './blast';
7
- export * from './command-dialog';
8
- export * from './command-menu';
9
7
  export * from './comments';
10
8
  export * from './debug';
11
9
  export * from './dnd';
12
10
  export * from './factories';
13
- export * from './floating-menu';
14
11
  export * from './focus';
15
12
  export * from './folding';
16
13
  export * from './hashtag';
@@ -20,8 +17,10 @@ export * from './markdown';
20
17
  export * from './mention';
21
18
  export * from './modes';
22
19
  export * from './outliner';
20
+ export * from './popover';
23
21
  export * from './preview';
24
22
  export * from './selection';
23
+ export * from './state';
25
24
  export * from './tags';
26
25
  export * from './typewriter';
27
26
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/extensions/index.ts"],"names":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AAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { type Extension } from '@codemirror/state';
2
- import { type JsonSchemaType } from '@dxos/echo-schema';
2
+ import { type JsonSchemaType } from '@dxos/echo/internal';
3
3
  export type JsonExtensionsOptions = {
4
4
  schema?: JsonSchemaType;
5
5
  };
@@ -1 +1 @@
1
- {"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../../src/extensions/json.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAGnD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,aAAY,qBAA0B,KAAG,SAU7E,CAAC"}
1
+ {"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../../src/extensions/json.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAGnD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,aAAY,qBAA0B,KAAG,SAU7E,CAAC"}
@@ -1,11 +1,13 @@
1
1
  import { type Extension } from '@codemirror/state';
2
2
  export type ListenerOptions = {
3
- onFocus?: (focusing: boolean) => void;
4
- onChange?: (text: string, id: string) => void;
3
+ onFocus?: (event: {
4
+ id: string;
5
+ focusing: boolean;
6
+ }) => void;
7
+ onChange?: (event: {
8
+ id: string;
9
+ text: string;
10
+ }) => void;
5
11
  };
6
- /**
7
- * Event listener.
8
- * @deprecated Use EditorView.updateListener and listen for specific update events.
9
- */
10
12
  export declare const listener: ({ onFocus, onChange }: ListenerOptions) => Extension;
11
13
  //# sourceMappingURL=listener.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"listener.d.ts","sourceRoot":"","sources":["../../../../src/extensions/listener.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAKnD,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ,GAAI,uBAAuB,eAAe,KAAG,SAmBjE,CAAC"}
1
+ {"version":3,"file":"listener.d.ts","sourceRoot":"","sources":["../../../../src/extensions/listener.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAOnD,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;IAC7D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAC1D,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,uBAAuB,eAAe,KAAG,SAejE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/bundle.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAMtD,MAAM,MAAM,qBAAqB,GAAG;IAClC,UAAU,CAAC,EAAE,cAAc,EAAE,CAAC;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,GAAI,UAAS,qBAA0B,KAAG,SAAS,EAyCvF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QAAO,cAAc,EAA+B,CAAC"}
1
+ {"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/bundle.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAMtD,MAAM,MAAM,qBAAqB,GAAG;IAClC,UAAU,CAAC,EAAE,cAAc,EAAE,CAAC;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,GAAI,UAAS,qBAA0B,KAAG,SAAS,EA4CvF,CAAC;AASF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QAAO,cAAc,EAA+B,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import { type EditorState, type Extension, type StateCommand } from '@codemirror/state';
2
2
  import { EditorView } from '@codemirror/view';
3
- import { type Live } from '@dxos/live-object';
4
3
  import { type EditorToolbarState } from '../../components';
5
4
  export type Formatting = Partial<{
6
5
  blankLine: boolean;
@@ -59,5 +58,5 @@ export declare const getFormatting: (state: EditorState) => Formatting;
59
58
  /**
60
59
  * Hook provides an extension to compute the current formatting state.
61
60
  */
62
- export declare const useFormattingState: (state: Live<EditorToolbarState>) => Extension;
61
+ export declare const formattingListener: (stateProvider: () => EditorToolbarState | undefined, delay?: number) => Extension;
63
62
  //# sourceMappingURL=formatting.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"formatting.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/formatting.ts"],"names":[],"mappings":"AAMA,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,SAAS,EAEd,KAAK,YAAY,EAElB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,UAAU,EAA2B,MAAM,kBAAkB,CAAC;AAKvE,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAU3D,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC;IAC/B,SAAS,EAAE,OAAO,CAAC;IAGnB,SAAS,EACL,WAAW,GACX,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,WAAW,GACX,WAAW,GACX,IAAI,CAAC;IAET,UAAU,EAAE,OAAO,CAAC;IAEpB,MAAM,EAAE,OAAO,CAAC;IAEhB,QAAQ,EAAE,OAAO,CAAC;IAElB,aAAa,EAAE,OAAO,CAAC;IAEvB,IAAI,EAAE,OAAO,CAAC;IAEd,IAAI,EAAE,OAAO,CAAC;IAEd,SAAS,EAAE,IAAI,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;CACjD,CAAC,CAAC;AAEH,eAAO,MAAM,gBAAgB,GAAI,GAAG,UAAU,EAAE,GAAG,UAAU,YAQ9B,CAAC;AAEhC,oBAAY,MAAM;IAChB,MAAM,IAAI;IACV,QAAQ,IAAI;IACZ,aAAa,IAAI;IACjB,IAAI,IAAI;CACT;AAED,oBAAY,IAAI;IACd,OAAO,IAAA;IACP,MAAM,IAAA;IACN,IAAI,IAAA;CACL;AAMD,eAAO,MAAM,UAAU,GAAI,OAAO,MAAM,KAAG,YAmE1C,CAAC;AAMF,eAAO,MA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AM,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAEnC,eAAO,MAAM,gBAAgB,GAAI,WAAU,iBAAsB,KAAG,SAanE,CAAC;AA4CF;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,OAAO,WAAW,KAAG,UAqKlD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,eAAe,MAAM,kBAAkB,GAAG,SAAS,EAAE,cAAW,KAAG,SAerG,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { type Extension } from '@codemirror/state';
2
2
  export type EditorInputConfig = {
3
3
  type?: string;
4
- noTabster?: boolean;
4
+ ignoreEscape?: boolean;
5
5
  };
6
6
  export declare const editorInputMode: import("@codemirror/state").Facet<EditorInputConfig, EditorInputConfig>;
7
7
  export declare const InputModeExtensions: {
@@ -1 +1 @@
1
- {"version":3,"file":"modes.d.ts","sourceRoot":"","sources":["../../../../src/extensions/modes.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAOnD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,eAAe,yEAA0C,CAAC;AAEvE,eAAO,MAAM,mBAAmB,EAAE;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;CAsB5D,CAAC"}
1
+ {"version":3,"file":"modes.d.ts","sourceRoot":"","sources":["../../../../src/extensions/modes.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAOnD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,eAAe,yEAA0C,CAAC;AAEvE,eAAO,MAAM,mBAAmB,EAAE;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;CAsB5D,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { type Extension } from '@codemirror/state';
2
+ export type MenuOptions = {
3
+ icon?: string;
4
+ height?: number;
5
+ padding?: number;
6
+ };
7
+ export declare const menu: (options?: MenuOptions) => Extension;
8
+ //# sourceMappingURL=menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/outliner/menu.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAKnD,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAGF,eAAO,MAAM,IAAI,GAAI,UAAS,WAAgB,KAAG,SA+GhD,CAAC"}
@@ -0,0 +1,36 @@
1
+ import { type EditorView } from '@codemirror/view';
2
+ import React, { type PropsWithChildren } from 'react';
3
+ import { type PopoverMenuGroup, type PopoverMenuItem } from './menu';
4
+ export type PopoverMenuProviderProps = PropsWithChildren<{
5
+ view?: EditorView | null;
6
+ groups?: PopoverMenuGroup[];
7
+ currentItem?: string;
8
+ open?: boolean;
9
+ defaultOpen?: boolean;
10
+ numItems?: number;
11
+ onOpenChange?: (event: {
12
+ view: EditorView;
13
+ open: boolean;
14
+ trigger?: string;
15
+ }) => void;
16
+ onActivate?: (event: {
17
+ view: EditorView;
18
+ trigger?: string;
19
+ }) => void;
20
+ onSelect?: (event: {
21
+ view: EditorView;
22
+ item: PopoverMenuItem;
23
+ }) => void;
24
+ onCancel?: (event: {
25
+ view: EditorView;
26
+ }) => void;
27
+ }>;
28
+ /**
29
+ * Implements the Popover and listens for the `dx-anchor-activate` event from the
30
+ * `popover` extension's decoration.
31
+ *
32
+ * NOTE: We don't use DropdownMenu because the command menu needs to manage focus explicitly.
33
+ * I.e., focus must remain in the editor while displaying the menu (for type-ahead).
34
+ */
35
+ export declare const PopoverMenuProvider: ({ children, view, groups, currentItem, open: openParam, defaultOpen, numItems, onOpenChange, onActivate, onSelect, onCancel, }: PopoverMenuProviderProps) => React.JSX.Element;
36
+ //# sourceMappingURL=PopoverMenuProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PopoverMenuProvider.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/popover/PopoverMenuProvider.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,EAAE,EAAY,KAAK,iBAAiB,EAA4C,MAAM,OAAO,CAAC;AAc1G,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,QAAQ,CAAC;AAErE,MAAM,MAAM,wBAAwB,GAAG,iBAAiB,CAAC;IACvD,IAAI,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IACzB,MAAM,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,UAAU,CAAC;QAAC,IAAI,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACtF,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,UAAU,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACrE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,UAAU,CAAC;QAAC,IAAI,EAAE,eAAe,CAAA;KAAE,KAAK,IAAI,CAAC;IACxE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,UAAU,CAAA;KAAE,KAAK,IAAI,CAAC;CAClD,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,GAAI,gIAYjC,wBAAwB,sBAwF1B,CAAC"}
@@ -0,0 +1,8 @@
1
+ export * from './menu';
2
+ export * from './menu-presets';
3
+ export * from './modal';
4
+ export * from './popover';
5
+ export * from './util';
6
+ export * from './PopoverMenuProvider';
7
+ export * from './usePopoverMenu';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/popover/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AAEvB,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { type PopoverMenuGroup } from './menu';
2
+ export declare const formattingCommands: PopoverMenuGroup;
3
+ export declare const linkSlashCommands: PopoverMenuGroup;
4
+ //# sourceMappingURL=menu-presets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu-presets.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/popover/menu-presets.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAG/C,eAAO,MAAM,kBAAkB,EAAE,gBA6EhC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,gBAmC/B,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { type EditorView } from '@codemirror/view';
2
+ import { type Label } from '@dxos/react-ui';
3
+ import { type MaybePromise } from '@dxos/util';
4
+ export type PopoverMenuGroup = {
5
+ id: string;
6
+ label?: Label;
7
+ items: PopoverMenuItem[];
8
+ };
9
+ export type PopoverMenuItem = {
10
+ id: string;
11
+ label: Label;
12
+ icon?: string;
13
+ onSelect?: (view: EditorView, head: number) => MaybePromise<void>;
14
+ };
15
+ export declare const getMenuItem: (groups: PopoverMenuGroup[], id?: string) => PopoverMenuItem | undefined;
16
+ export declare const getNextMenuItem: (groups: PopoverMenuGroup[], id?: string) => PopoverMenuItem;
17
+ export declare const getPreviousMenuItem: (groups: PopoverMenuGroup[], id?: string) => PopoverMenuItem;
18
+ export declare const createMenuGroup: ({ id, label, items, }: {
19
+ id?: string;
20
+ label?: Label;
21
+ items: string[];
22
+ }) => PopoverMenuGroup;
23
+ export declare const filterMenuGroups: (groups: PopoverMenuGroup[], filter: (item: PopoverMenuItem) => boolean) => PopoverMenuGroup[];
24
+ //# sourceMappingURL=menu.d.ts.map