@dxos/react-ui-editor 0.8.3-main.7f5a14c → 0.8.3-staging.0fa589b

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 (76) hide show
  1. package/dist/lib/browser/index.mjs +371 -375
  2. package/dist/lib/browser/index.mjs.map +4 -4
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/lib/node/index.cjs +502 -511
  5. package/dist/lib/node/index.cjs.map +4 -4
  6. package/dist/lib/node/meta.json +1 -1
  7. package/dist/lib/node-esm/index.mjs +371 -375
  8. package/dist/lib/node-esm/index.mjs.map +4 -4
  9. package/dist/lib/node-esm/meta.json +1 -1
  10. package/dist/types/src/components/EditorToolbar/EditorToolbar.d.ts.map +1 -1
  11. package/dist/types/src/components/Popover/RefDropdownMenu.d.ts.map +1 -1
  12. package/dist/types/src/components/Popover/RefPopover.d.ts.map +1 -1
  13. package/dist/types/src/defaults.d.ts +0 -1
  14. package/dist/types/src/defaults.d.ts.map +1 -1
  15. package/dist/types/src/extensions/automerge/automerge.stories.d.ts.map +1 -1
  16. package/dist/types/src/extensions/command/action.d.ts.map +1 -1
  17. package/dist/types/src/extensions/command/command-menu.d.ts +20 -0
  18. package/dist/types/src/extensions/command/command-menu.d.ts.map +1 -0
  19. package/dist/types/src/extensions/command/command.d.ts.map +1 -1
  20. package/dist/types/src/extensions/command/floating-menu.d.ts +7 -0
  21. package/dist/types/src/extensions/command/floating-menu.d.ts.map +1 -0
  22. package/dist/types/src/extensions/command/hint.d.ts +5 -2
  23. package/dist/types/src/extensions/command/hint.d.ts.map +1 -1
  24. package/dist/types/src/extensions/command/index.d.ts +3 -1
  25. package/dist/types/src/extensions/command/index.d.ts.map +1 -1
  26. package/dist/types/src/extensions/command/placeholder.d.ts +10 -0
  27. package/dist/types/src/extensions/command/placeholder.d.ts.map +1 -0
  28. package/dist/types/src/extensions/command/state.d.ts +1 -1
  29. package/dist/types/src/extensions/command/state.d.ts.map +1 -1
  30. package/dist/types/src/extensions/command/useCommandMenu.d.ts +26 -0
  31. package/dist/types/src/extensions/command/useCommandMenu.d.ts.map +1 -0
  32. package/dist/types/src/extensions/index.d.ts +0 -1
  33. package/dist/types/src/extensions/index.d.ts.map +1 -1
  34. package/dist/types/src/extensions/markdown/bundle.d.ts.map +1 -1
  35. package/dist/types/src/extensions/outliner/tree.d.ts.map +1 -1
  36. package/dist/types/src/extensions/preview/preview.d.ts +12 -19
  37. package/dist/types/src/extensions/preview/preview.d.ts.map +1 -1
  38. package/dist/types/src/stories/CommandMenu.stories.d.ts +5 -4
  39. package/dist/types/src/stories/CommandMenu.stories.d.ts.map +1 -1
  40. package/dist/types/src/stories/Preview.stories.d.ts.map +1 -1
  41. package/dist/types/src/util/dom.d.ts +5 -0
  42. package/dist/types/src/util/dom.d.ts.map +1 -1
  43. package/dist/types/src/util/react.d.ts +2 -4
  44. package/dist/types/src/util/react.d.ts.map +1 -1
  45. package/package.json +31 -31
  46. package/src/components/EditorToolbar/EditorToolbar.tsx +5 -9
  47. package/src/components/Popover/RefDropdownMenu.tsx +5 -3
  48. package/src/components/Popover/RefPopover.tsx +5 -3
  49. package/src/defaults.ts +0 -6
  50. package/src/extensions/automerge/automerge.stories.tsx +5 -5
  51. package/src/extensions/command/action.ts +9 -2
  52. package/src/extensions/command/command-menu.ts +210 -0
  53. package/src/extensions/command/command.ts +8 -8
  54. package/src/extensions/command/floating-menu.ts +133 -0
  55. package/src/extensions/command/hint.ts +29 -9
  56. package/src/extensions/command/index.ts +3 -1
  57. package/src/extensions/command/placeholder.ts +113 -0
  58. package/src/extensions/command/state.ts +1 -2
  59. package/src/extensions/command/useCommandMenu.ts +118 -0
  60. package/src/extensions/index.ts +0 -1
  61. package/src/extensions/markdown/bundle.ts +0 -2
  62. package/src/extensions/outliner/tree.test.ts +13 -10
  63. package/src/extensions/outliner/tree.ts +5 -3
  64. package/src/extensions/preview/preview.ts +11 -86
  65. package/src/stories/Command.stories.tsx +1 -1
  66. package/src/stories/CommandMenu.stories.tsx +35 -19
  67. package/src/stories/Preview.stories.tsx +134 -57
  68. package/src/stories/components/util.tsx +2 -2
  69. package/src/util/dom.ts +20 -0
  70. package/src/util/react.tsx +3 -20
  71. package/dist/types/src/extensions/command/menu.d.ts +0 -47
  72. package/dist/types/src/extensions/command/menu.d.ts.map +0 -1
  73. package/dist/types/src/extensions/placeholder.d.ts +0 -4
  74. package/dist/types/src/extensions/placeholder.d.ts.map +0 -1
  75. package/src/extensions/command/menu.ts +0 -439
  76. package/src/extensions/placeholder.ts +0 -82
@@ -4,8 +4,12 @@
4
4
 
5
5
  import '@dxos-theme';
6
6
 
7
- import React, { useState, useEffect, type FC } from 'react';
7
+ import { syntaxTree } from '@codemirror/language';
8
+ import { type EditorView } from '@codemirror/view';
9
+ import React, { useState, useEffect, useMemo, useCallback } from 'react';
10
+ import { createPortal } from 'react-dom';
8
11
 
12
+ import { invariant } from '@dxos/invariant';
9
13
  import { faker } from '@dxos/random';
10
14
  import { Popover } from '@dxos/react-ui';
11
15
  import { Card } from '@dxos/react-ui-stack';
@@ -14,16 +18,8 @@ import { withLayout, withTheme, type Meta } from '@dxos/storybook-utils';
14
18
 
15
19
  import { EditorStory } from './components';
16
20
  import { PreviewProvider, useRefPopover } from '../components';
17
- import {
18
- preview,
19
- image,
20
- type PreviewOptions,
21
- type PreviewLinkRef,
22
- type PreviewLinkTarget,
23
- type PreviewRenderProps,
24
- } from '../extensions';
21
+ import { preview, image, type PreviewLinkRef, type PreviewLinkTarget, getLinkRef } from '../extensions';
25
22
  import { str } from '../testing';
26
- import { createRenderer } from '../util';
27
23
 
28
24
  const handlePreviewLookup = async ({ label, ref }: PreviewLinkRef): Promise<PreviewLinkTarget> => {
29
25
  // Random text.
@@ -37,11 +33,11 @@ const handlePreviewLookup = async ({ label, ref }: PreviewLinkRef): Promise<Prev
37
33
 
38
34
  // Async lookup.
39
35
  // TODO(burdon): Handle errors.
40
- const useRefTarget = (link: PreviewLinkRef, onLookup: PreviewOptions['onLookup']): PreviewLinkTarget | undefined => {
36
+ const useRefTarget = (link: PreviewLinkRef): PreviewLinkTarget | undefined => {
41
37
  const [target, setTarget] = useState<PreviewLinkTarget | undefined>();
42
38
  useEffect(() => {
43
- void onLookup?.(link).then((target) => setTarget(target ?? undefined));
44
- }, [link, onLookup]);
39
+ void handlePreviewLookup(link).then((target) => setTarget(target ?? undefined));
40
+ }, [link]);
45
41
 
46
42
  return target;
47
43
  };
@@ -63,27 +59,86 @@ const PreviewCard = () => {
63
59
  );
64
60
  };
65
61
 
66
- // TODO(burdon): Replace with card.
67
- const PreviewBlock: FC<PreviewRenderProps> = ({ readonly, link, onAction, onLookup }) => {
68
- const target = useRefTarget(link, onLookup);
69
- return (
62
+ type PreviewAction =
63
+ | {
64
+ type: 'insert';
65
+ link: PreviewLinkRef;
66
+ target: PreviewLinkTarget;
67
+ }
68
+ | {
69
+ type: 'delete';
70
+ link: PreviewLinkRef;
71
+ };
72
+
73
+ const PreviewBlock = ({ link, el, view }: { link: PreviewLinkRef; el: HTMLElement; view?: EditorView }) => {
74
+ const target = useRefTarget(link);
75
+
76
+ const handleAction = useCallback(
77
+ (action: PreviewAction) => {
78
+ invariant(view, 'View not found');
79
+ const pos = view.posAtDOM(el);
80
+ const node = syntaxTree(view.state).resolve(pos + 1).node.parent;
81
+ if (!node) {
82
+ return;
83
+ }
84
+
85
+ const link = getLinkRef(view.state, node);
86
+ if (link?.ref !== action.link.ref) {
87
+ return;
88
+ }
89
+
90
+ switch (action.type) {
91
+ // TODO(burdon): Should we dispatch to the view or mutate the document? (i.e., handle externally?)
92
+ // Insert ref text.
93
+ case 'insert': {
94
+ view.dispatch({
95
+ changes: {
96
+ from: node.from,
97
+ to: node.to,
98
+ insert: action.target.text,
99
+ },
100
+ });
101
+ break;
102
+ }
103
+ // Remove ref.
104
+ case 'delete': {
105
+ view.dispatch({
106
+ changes: {
107
+ from: node.from,
108
+ to: node.to,
109
+ },
110
+ });
111
+ break;
112
+ }
113
+ }
114
+ },
115
+ [view, el],
116
+ );
117
+
118
+ const handleDelete = useCallback(() => {
119
+ handleAction({ type: 'delete', link });
120
+ }, [handleAction, link]);
121
+
122
+ const handleInsert = useCallback(() => {
123
+ if (target) {
124
+ handleAction({ type: 'insert', link, target });
125
+ }
126
+ }, [handleAction, link, target]);
127
+
128
+ return createPortal(
70
129
  <Card.Content classNames={hoverableControls}>
71
130
  <div className='flex items-start'>
72
- {!readonly && (
73
- <Card.Toolbar classNames='is-min p-[--dx-card-spacing-inline]'>
131
+ {!view?.state.readOnly && (
132
+ <Card.Toolbar classNames='is-min p-[--dx-cardSpacingInline]'>
74
133
  {(link.suggest && (
75
134
  <>
76
- <Card.ToolbarIconButton
77
- label='Discard'
78
- icon={'ph--x--regular'}
79
- onClick={() => onAction({ type: 'delete', link })}
80
- />
135
+ <Card.ToolbarIconButton label='Discard' icon={'ph--x--regular'} onClick={handleDelete} />
81
136
  {target && (
82
137
  <Card.ToolbarIconButton
83
138
  classNames='bg-successSurface text-successSurfaceText'
84
139
  label='Apply'
85
140
  icon='ph--check--regular'
86
- onClick={() => onAction({ type: 'insert', link, target })}
141
+ onClick={handleInsert}
87
142
  />
88
143
  )}
89
144
  </>
@@ -93,7 +148,7 @@ const PreviewBlock: FC<PreviewRenderProps> = ({ readonly, link, onAction, onLook
93
148
  label='Delete'
94
149
  icon='ph--x--regular'
95
150
  classNames={[hoverableControlItem, hoverableControlItemTransition]}
96
- onClick={() => onAction({ type: 'delete', link })}
151
+ onClick={handleDelete}
97
152
  />
98
153
  )}
99
154
  </Card.Toolbar>
@@ -104,7 +159,8 @@ const PreviewBlock: FC<PreviewRenderProps> = ({ readonly, link, onAction, onLook
104
159
  </Card.Heading>
105
160
  </div>
106
161
  {target && <Card.Text classNames='line-clamp-3 mbs-0'>{target.text}</Card.Text>}
107
- </Card.Content>
162
+ </Card.Content>,
163
+ el,
108
164
  );
109
165
  };
110
166
 
@@ -118,34 +174,55 @@ const meta: Meta<typeof EditorStory> = {
118
174
  export default meta;
119
175
 
120
176
  export const Default = {
121
- render: () => (
122
- <PreviewProvider onLookup={handlePreviewLookup}>
123
- <EditorStory
124
- text={str(
125
- '# Preview',
126
- '',
127
- 'This project is part of the [DXOS][dxn:queue:data:123] SDK.',
128
- '',
129
- '![DXOS][?dxn:queue:data:123]',
130
- '',
131
- 'It consists of [ECHO][dxn:queue:data:echo], [HALO][dxn:queue:data:halo], and [MESH][dxn:queue:data:mesh].',
132
- '',
133
- '## Deep dive',
134
- '',
135
- '![ECHO][dxn:queue:data:echo]',
136
- '',
137
- '',
138
- '',
139
- )}
140
- extensions={[
141
- image(),
142
- preview({
143
- renderBlock: createRenderer(PreviewBlock),
144
- onLookup: handlePreviewLookup,
145
- }),
146
- ]}
147
- />
148
- <PreviewCard />
149
- </PreviewProvider>
150
- ),
177
+ render: () => {
178
+ const [view, setView] = useState<EditorView>();
179
+ const [previewBlocks, setPreviewBlocks] = useState<{ link: PreviewLinkRef; el: HTMLElement }[]>([]);
180
+
181
+ const extensions = useMemo(() => {
182
+ return [
183
+ image(),
184
+ preview({
185
+ addBlockContainer: (link, el) => {
186
+ setPreviewBlocks((prev) => [...prev, { link, el }]);
187
+ },
188
+ removeBlockContainer: (link) => {
189
+ setPreviewBlocks((prev) => prev.filter(({ link: prevLink }) => prevLink.ref !== link.ref));
190
+ },
191
+ }),
192
+ ];
193
+ }, []);
194
+
195
+ const handleViewRef = useCallback((instance?: EditorView | null) => {
196
+ setView(instance ?? undefined);
197
+ }, []);
198
+
199
+ return (
200
+ <PreviewProvider onLookup={handlePreviewLookup}>
201
+ <EditorStory
202
+ ref={handleViewRef}
203
+ text={str(
204
+ '# Preview',
205
+ '',
206
+ 'This project is part of the [DXOS][dxn:queue:data:123] SDK.',
207
+ '',
208
+ '![DXOS][?dxn:queue:data:123]',
209
+ '',
210
+ 'It consists of [ECHO][dxn:queue:data:echo], [HALO][dxn:queue:data:halo], and [MESH][dxn:queue:data:mesh].',
211
+ '',
212
+ '## Deep dive',
213
+ '',
214
+ '![ECHO][dxn:queue:data:echo]',
215
+ '',
216
+ '',
217
+ '',
218
+ )}
219
+ extensions={extensions}
220
+ />
221
+ <PreviewCard />
222
+ {previewBlocks.map(({ link, el }) => (
223
+ <PreviewBlock key={link.ref} link={link} el={el} view={view} />
224
+ ))}
225
+ </PreviewProvider>
226
+ );
227
+ },
151
228
  };
@@ -196,7 +196,7 @@ const LinkButton: FC<{ url: string }> = ({ url }) => {
196
196
 
197
197
  export const renderLinkButton = createRenderer(LinkButton);
198
198
 
199
- // Shared extensions
199
+ // Shared extensions.
200
200
  export const defaultExtensions: Extension[] = [
201
201
  decorateMarkdown({ renderLinkButton, selectionChangeDelay: 100 }),
202
202
  formattingKeymap(),
@@ -212,7 +212,7 @@ export const allExtensions: Extension[] = [
212
212
  folding(),
213
213
  ];
214
214
 
215
- // Long text for scrolling stories
215
+ // Long text for scrolling stories.
216
216
  export const longText = faker.helpers
217
217
  .multiple(() => faker.lorem.paragraph({ min: 8, max: 16 }), { count: 20 })
218
218
  .join('\n\n');
package/src/util/dom.ts CHANGED
@@ -34,3 +34,23 @@ export const clientRectsFor = (dom: Node) => {
34
34
  return [] as any as DOMRectList;
35
35
  }
36
36
  };
37
+
38
+ export type ElementOptions = {
39
+ className?: string;
40
+ text?: string;
41
+ };
42
+
43
+ export const createElement = (tag: string, options?: ElementOptions, children?: HTMLElement[]): HTMLElement => {
44
+ const el = document.createElement(tag);
45
+ if (options?.className) {
46
+ el.className = options.className;
47
+ }
48
+ if (options?.text) {
49
+ el.textContent = options.text;
50
+ }
51
+ if (children) {
52
+ el.append(...(Array.isArray(children) ? children : [children]));
53
+ }
54
+
55
+ return el;
56
+ };
@@ -10,26 +10,8 @@ import { defaultTx } from '@dxos/react-ui-theme';
10
10
 
11
11
  import { type RenderCallback } from '../types';
12
12
 
13
- // TODO(burdon): Factor out.
14
-
15
- export type ElementOptions = {
16
- className?: string;
17
- };
18
-
19
- export const createElement = (tag: string, options?: ElementOptions, children?: ReactNode): HTMLElement => {
20
- const el = document.createElement(tag);
21
- if (options?.className) {
22
- el.className = options.className;
23
- }
24
- if (children) {
25
- el.append(...(Array.isArray(children) ? children : [children]));
26
- }
27
-
28
- return el;
29
- };
30
-
31
- // TODO(burdon): Remove react rendering; use DOM directly.
32
- // NOTE: CM seems to remove/detach/overwrite portals that are attached to the DOM it control.s
13
+ /** @deprecated */
14
+ // TODO(wittjosiah): Replace with portals which are lighter weight and inherit context from the main react tree.
33
15
  export const renderRoot = <T extends Element>(root: T, node: ReactNode): T => {
34
16
  createRoot(root).render(<ThemeProvider tx={defaultTx}>{node}</ThemeProvider>);
35
17
  return root;
@@ -37,6 +19,7 @@ export const renderRoot = <T extends Element>(root: T, node: ReactNode): T => {
37
19
 
38
20
  /**
39
21
  * Utility to create a renderer for a React component.
22
+ * @deprecated
40
23
  */
41
24
  export const createRenderer =
42
25
  <Props extends object>(Component: FC<Props>): RenderCallback<Props> =>
@@ -1,47 +0,0 @@
1
- import { StateField } from '@codemirror/state';
2
- import { EditorView } from '@codemirror/view';
3
- import { type RefObject } from 'react';
4
- import { type DxRefTag, type DxRefTagActivate } from '@dxos/lit-ui';
5
- import { type MaybePromise } from '@dxos/util';
6
- import { type CommandMenuGroup, type CommandMenuItem } from '../../components';
7
- import { type Range } from '../../types';
8
- import { multilinePlaceholder } from '../placeholder';
9
- export type FloatingMenuOptions = {
10
- icon?: string;
11
- height?: number;
12
- padding?: number;
13
- };
14
- export declare const floatingMenu: (options?: FloatingMenuOptions) => import("@codemirror/state").Extension[];
15
- type CommandState = {
16
- trigger: string;
17
- range: Range;
18
- };
19
- export declare const commandRangeEffect: import("@codemirror/state").StateEffectType<CommandState | null>;
20
- export type CommandMenuOptions = {
21
- trigger: string | string[];
22
- placeholder?: Parameters<typeof multilinePlaceholder>[0];
23
- onArrowDown?: () => void;
24
- onArrowUp?: () => void;
25
- onDeactivate?: () => void;
26
- onEnter?: () => void;
27
- onTextChange?: (trigger: string, text: string) => void;
28
- };
29
- export declare const commandMenu: (options: CommandMenuOptions) => (import("@codemirror/state").Extension | StateField<CommandState | null>)[];
30
- export type UseCommandMenuOptions = {
31
- viewRef: RefObject<EditorView | undefined>;
32
- trigger: string | string[];
33
- placeholder?: Parameters<typeof multilinePlaceholder>[0];
34
- getGroups: (trigger: string, query?: string) => MaybePromise<CommandMenuGroup[]>;
35
- };
36
- export declare const useCommandMenu: ({ viewRef, trigger, placeholder, getGroups }: UseCommandMenuOptions) => {
37
- commandMenu: (import("@codemirror/state").Extension | StateField<CommandState | null>)[];
38
- currentItem: string | undefined;
39
- groupsRef: import("react").MutableRefObject<CommandMenuGroup[]>;
40
- ref: import("react").MutableRefObject<DxRefTag | null>;
41
- open: boolean;
42
- onActivate: (event: DxRefTagActivate) => Promise<void>;
43
- onOpenChange: import("react").Dispatch<import("react").SetStateAction<boolean>>;
44
- onSelect: (item: CommandMenuItem) => void;
45
- };
46
- export {};
47
- //# sourceMappingURL=menu.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/command/menu.ts"],"names":[],"mappings":"AAIA,OAAO,EAAmB,UAAU,EAAqB,MAAM,mBAAmB,CAAC;AACnF,OAAO,EAAE,UAAU,EAAuE,MAAM,kBAAkB,CAAC;AACnH,OAAO,EAAE,KAAK,SAAS,EAA0C,MAAM,OAAO,CAAC;AAG/E,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EAAyC,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACtH,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,UAAS,mBAAwB,4CAqH7D,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAGF,eAAO,MAAM,kBAAkB,kEAA4C,CAAC;AAkB5E,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC3B,WAAW,CAAC,EAAE,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC;IACzD,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACxD,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,SAAS,kBAAkB,gFA2JtD,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,SAAS,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC;IAC3C,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC3B,WAAW,CAAC,EAAE,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC;IACzD,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,YAAY,CAAC,gBAAgB,EAAE,CAAC,CAAC;CAClF,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,8CAA8C,qBAAqB;;;;;;wBAwBhF,gBAAgB;;qBAeQ,eAAe;CA2DxD,CAAC"}
@@ -1,4 +0,0 @@
1
- import { type Extension } from '@codemirror/state';
2
- import { EditorView } from '@codemirror/view';
3
- export declare function multilinePlaceholder(content: string | HTMLElement | ((view: EditorView) => HTMLElement)): Extension;
4
- //# sourceMappingURL=placeholder.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"placeholder.d.ts","sourceRoot":"","sources":["../../../../src/extensions/placeholder.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAc,UAAU,EAA0B,MAAM,kBAAkB,CAAC;AA2ClF,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,GAAG,CAAC,CAAC,IAAI,EAAE,UAAU,KAAK,WAAW,CAAC,GAAG,SAAS,CA+BnH"}