@dxos/react-ui-editor 0.3.10-main.8fd45da → 0.3.10-main.90b298e

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 (41) hide show
  1. package/dist/lib/browser/index.mjs +117 -31
  2. package/dist/lib/browser/index.mjs.map +4 -4
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/types/src/components/TextEditor/MarkdownEditor.stories.d.ts.map +1 -1
  5. package/dist/types/src/components/TextEditor/TextEditor.d.ts.map +1 -1
  6. package/dist/types/src/components/TextEditor/extensions/comments.d.ts +10 -6
  7. package/dist/types/src/components/TextEditor/extensions/comments.d.ts.map +1 -1
  8. package/dist/types/src/components/TextEditor/extensions/demo.d.ts +10 -0
  9. package/dist/types/src/components/TextEditor/extensions/demo.d.ts.map +1 -0
  10. package/dist/types/src/components/TextEditor/extensions/index.d.ts +1 -0
  11. package/dist/types/src/components/TextEditor/extensions/index.d.ts.map +1 -1
  12. package/dist/types/src/components/TextEditor/extensions/listener.d.ts +4 -2
  13. package/dist/types/src/components/TextEditor/extensions/listener.d.ts.map +1 -1
  14. package/dist/types/src/hooks/automerge/PatchSemaphore.d.ts +3 -0
  15. package/dist/types/src/hooks/automerge/PatchSemaphore.d.ts.map +1 -1
  16. package/dist/types/src/hooks/automerge/index.d.ts +1 -1
  17. package/dist/types/src/hooks/automerge/index.d.ts.map +1 -1
  18. package/dist/types/src/hooks/automerge/plugin.d.ts.map +1 -1
  19. package/dist/types/src/hooks/automerge/translation/automerge-to-codemirror.d.ts +5 -0
  20. package/dist/types/src/hooks/automerge/translation/automerge-to-codemirror.d.ts.map +1 -0
  21. package/dist/types/src/hooks/automerge/translation/codemirror-to-automerge.d.ts +6 -0
  22. package/dist/types/src/hooks/automerge/translation/codemirror-to-automerge.d.ts.map +1 -0
  23. package/dist/types/src/hooks/automerge/translation/index.d.ts +3 -0
  24. package/dist/types/src/hooks/automerge/translation/index.d.ts.map +1 -0
  25. package/package.json +20 -19
  26. package/src/components/TextEditor/MarkdownEditor.stories.tsx +4 -2
  27. package/src/components/TextEditor/TextEditor.tsx +18 -4
  28. package/src/components/TextEditor/extensions/comments.ts +48 -31
  29. package/src/components/TextEditor/extensions/demo.ts +66 -0
  30. package/src/components/TextEditor/extensions/index.ts +1 -0
  31. package/src/components/TextEditor/extensions/listener.ts +2 -2
  32. package/src/hooks/automerge/PatchSemaphore.ts +12 -9
  33. package/src/hooks/automerge/index.ts +1 -1
  34. package/src/hooks/automerge/plugin.ts +1 -0
  35. package/src/hooks/automerge/{amToCodemirror.ts → translation/automerge-to-codemirror.ts} +10 -2
  36. package/src/hooks/automerge/{codeMirrorToAm.ts → translation/codemirror-to-automerge.ts} +7 -4
  37. package/src/hooks/automerge/translation/index.ts +6 -0
  38. package/dist/types/src/hooks/automerge/amToCodemirror.d.ts +0 -6
  39. package/dist/types/src/hooks/automerge/amToCodemirror.d.ts.map +0 -1
  40. package/dist/types/src/hooks/automerge/codeMirrorToAm.d.ts +0 -7
  41. package/dist/types/src/hooks/automerge/codeMirrorToAm.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"inputs":{"packages/ui/react-ui-editor/src/components/TextEditor/extensions/autocomplete.ts":{"bytes":7096,"imports":[{"path":"@codemirror/autocomplete","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/basic.ts":{"bytes":3373,"imports":[{"path":"@codemirror/autocomplete","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/theme-one-dark","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/comments.ts":{"bytes":16512,"imports":[{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/link.ts":{"bytes":19200,"imports":[{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/listener.ts":{"bytes":2046,"imports":[{"path":"@codemirror/state","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-editor/src/styles/markdown.ts":{"bytes":6320,"imports":[{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-editor/src/styles/tokens.ts":{"bytes":1192,"imports":[{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-editor/src/styles/index.ts":{"bytes":560,"imports":[{"path":"packages/ui/react-ui-editor/src/styles/markdown.ts","kind":"import-statement","original":"./markdown"},{"path":"packages/ui/react-ui-editor/src/styles/tokens.ts","kind":"import-statement","original":"./tokens"}],"format":"esm"},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/markdown/highlight.ts":{"bytes":15930,"imports":[{"path":"@codemirror/lang-markdown","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@lezer/highlight","kind":"import-statement","external":true},{"path":"lodash.get","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-editor/src/styles/index.ts","kind":"import-statement","original":"../../../../styles"}],"format":"esm"},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/markdown/bundle.ts":{"bytes":10072,"imports":[{"path":"@codemirror/autocomplete","kind":"import-statement","external":true},{"path":"@codemirror/commands","kind":"import-statement","external":true},{"path":"@codemirror/lang-markdown","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/language-data","kind":"import-statement","external":true},{"path":"@codemirror/search","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/theme-one-dark","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-editor/src/components/TextEditor/extensions/markdown/highlight.ts","kind":"import-statement","original":"./highlight"}],"format":"esm"},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/markdown/index.ts":{"bytes":596,"imports":[{"path":"packages/ui/react-ui-editor/src/components/TextEditor/extensions/markdown/bundle.ts","kind":"import-statement","original":"./bundle"},{"path":"packages/ui/react-ui-editor/src/components/TextEditor/extensions/markdown/highlight.ts","kind":"import-statement","original":"./highlight"}],"format":"esm"},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/tasklist.ts":{"bytes":10575,"imports":[{"path":"@codemirror/view","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/tooltip.tsx":{"bytes":5580,"imports":[{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/index.ts":{"bytes":1112,"imports":[{"path":"packages/ui/react-ui-editor/src/components/TextEditor/extensions/autocomplete.ts","kind":"import-statement","original":"./autocomplete"},{"path":"packages/ui/react-ui-editor/src/components/TextEditor/extensions/basic.ts","kind":"import-statement","original":"./basic"},{"path":"packages/ui/react-ui-editor/src/components/TextEditor/extensions/comments.ts","kind":"import-statement","original":"./comments"},{"path":"packages/ui/react-ui-editor/src/components/TextEditor/extensions/link.ts","kind":"import-statement","original":"./link"},{"path":"packages/ui/react-ui-editor/src/components/TextEditor/extensions/listener.ts","kind":"import-statement","original":"./listener"},{"path":"packages/ui/react-ui-editor/src/components/TextEditor/extensions/markdown/index.ts","kind":"import-statement","original":"./markdown"},{"path":"packages/ui/react-ui-editor/src/components/TextEditor/extensions/tasklist.ts","kind":"import-statement","original":"./tasklist"},{"path":"packages/ui/react-ui-editor/src/components/TextEditor/extensions/tooltip.tsx","kind":"import-statement","original":"./tooltip"}],"format":"esm"},"packages/ui/react-ui-editor/src/components/TextEditor/themes/default.ts":{"bytes":15385,"imports":[{"path":"lodash.get","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-editor/src/styles/index.ts","kind":"import-statement","original":"../../../styles"}],"format":"esm"},"packages/ui/react-ui-editor/src/components/TextEditor/themes/index.ts":{"bytes":495,"imports":[{"path":"packages/ui/react-ui-editor/src/components/TextEditor/themes/default.ts","kind":"import-statement","original":"./default"}],"format":"esm"},"packages/ui/react-ui-editor/src/components/TextEditor/TextEditor.tsx":{"bytes":19485,"imports":[{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@replit/codemirror-vim","kind":"import-statement","external":true},{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-editor/src/components/TextEditor/extensions/index.ts","kind":"import-statement","original":"./extensions"},{"path":"packages/ui/react-ui-editor/src/components/TextEditor/themes/index.ts","kind":"import-statement","original":"./themes"}],"format":"esm"},"packages/ui/react-ui-editor/src/components/TextEditor/index.ts":{"bytes":892,"imports":[{"path":"@lezer/highlight","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-editor/src/components/TextEditor/extensions/index.ts","kind":"import-statement","original":"./extensions"},{"path":"packages/ui/react-ui-editor/src/components/TextEditor/themes/index.ts","kind":"import-statement","original":"./themes"},{"path":"packages/ui/react-ui-editor/src/components/TextEditor/TextEditor.tsx","kind":"import-statement","original":"./TextEditor"}],"format":"esm"},"packages/ui/react-ui-editor/src/components/index.ts":{"bytes":484,"imports":[{"path":"packages/ui/react-ui-editor/src/components/TextEditor/index.ts","kind":"import-statement","original":"./TextEditor"}],"format":"esm"},"packages/ui/react-ui-editor/src/hooks/automerge/amToCodemirror.ts":{"bytes":11060,"imports":[{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-editor/src/hooks/automerge/plugin.ts","kind":"import-statement","original":"./plugin"}],"format":"esm"},"packages/ui/react-ui-editor/src/hooks/automerge/codeMirrorToAm.ts":{"bytes":3912,"imports":[{"path":"@dxos/automerge/automerge","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-editor/src/hooks/automerge/PatchSemaphore.ts":{"bytes":8482,"imports":[{"path":"@dxos/automerge/automerge","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-editor/src/hooks/automerge/amToCodemirror.ts","kind":"import-statement","original":"./amToCodemirror"},{"path":"packages/ui/react-ui-editor/src/hooks/automerge/codeMirrorToAm.ts","kind":"import-statement","original":"./codeMirrorToAm"},{"path":"packages/ui/react-ui-editor/src/hooks/automerge/plugin.ts","kind":"import-statement","original":"./plugin"}],"format":"esm"},"packages/ui/react-ui-editor/src/hooks/automerge/plugin.ts":{"bytes":13082,"imports":[{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@dxos/automerge/automerge","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-editor/src/hooks/automerge/PatchSemaphore.ts","kind":"import-statement","original":"./PatchSemaphore"}],"format":"esm"},"packages/ui/react-ui-editor/src/hooks/automerge/index.ts":{"bytes":651,"imports":[{"path":"packages/ui/react-ui-editor/src/hooks/automerge/plugin.ts","kind":"import-statement","original":"./plugin"}],"format":"esm"},"packages/ui/react-ui-editor/src/hooks/yjs/cursors.ts":{"bytes":2636,"imports":[{"path":"lib0/random","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-editor/src/hooks/yjs/space-provider.ts":{"bytes":15639,"imports":[{"path":"lib0/decoding","kind":"import-statement","external":true},{"path":"lib0/encoding","kind":"import-statement","external":true},{"path":"lib0/observable","kind":"import-statement","external":true},{"path":"y-protocols/awareness","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-editor/src/hooks/yjs/index.ts":{"bytes":582,"imports":[{"path":"packages/ui/react-ui-editor/src/hooks/yjs/cursors.ts","kind":"import-statement","original":"./cursors"},{"path":"packages/ui/react-ui-editor/src/hooks/yjs/space-provider.ts","kind":"import-statement","original":"./space-provider"}],"format":"esm"},"packages/ui/react-ui-editor/src/hooks/useTextModel.ts":{"bytes":9937,"imports":[{"path":"lodash.get","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"y-codemirror.next","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-editor/src/hooks/automerge/index.ts","kind":"import-statement","original":"./automerge"},{"path":"packages/ui/react-ui-editor/src/hooks/yjs/index.ts","kind":"import-statement","original":"./yjs"}],"format":"esm"},"packages/ui/react-ui-editor/src/hooks/index.ts":{"bytes":564,"imports":[{"path":"packages/ui/react-ui-editor/src/hooks/useTextModel.ts","kind":"import-statement","original":"./useTextModel"},{"path":"packages/ui/react-ui-editor/src/hooks/yjs/index.ts","kind":"import-statement","original":"./yjs"}],"format":"esm"},"packages/ui/react-ui-editor/src/index.ts":{"bytes":1026,"imports":[{"path":"@dxos/protocols/proto/dxos/echo/model/text","kind":"import-statement","external":true},{"path":"@dxos/text-model","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-editor/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/ui/react-ui-editor/src/hooks/index.ts","kind":"import-statement","original":"./hooks"}],"format":"esm"}},"outputs":{"packages/ui/react-ui-editor/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":98508},"packages/ui/react-ui-editor/dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/protocols/proto/dxos/echo/model/text","kind":"import-statement","external":true},{"path":"@dxos/text-model","kind":"import-statement","external":true},{"path":"@lezer/highlight","kind":"import-statement","external":true},{"path":"@codemirror/autocomplete","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@codemirror/autocomplete","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/theme-one-dark","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/autocomplete","kind":"import-statement","external":true},{"path":"@codemirror/commands","kind":"import-statement","external":true},{"path":"@codemirror/lang-markdown","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/language-data","kind":"import-statement","external":true},{"path":"@codemirror/search","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/theme-one-dark","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@codemirror/lang-markdown","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@lezer/highlight","kind":"import-statement","external":true},{"path":"lodash.get","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"lodash.get","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@replit/codemirror-vim","kind":"import-statement","external":true},{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"lodash.get","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"y-codemirror.next","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@dxos/automerge/automerge","kind":"import-statement","external":true},{"path":"@dxos/automerge/automerge","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@dxos/automerge/automerge","kind":"import-statement","external":true},{"path":"lib0/random","kind":"import-statement","external":true},{"path":"lib0/decoding","kind":"import-statement","external":true},{"path":"lib0/encoding","kind":"import-statement","external":true},{"path":"lib0/observable","kind":"import-statement","external":true},{"path":"y-protocols/awareness","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["BaseTextEditor","Doc","EditorModes","MarkdownEditor","SpaceAwarenessProvider","TextEditor","TextKind","YText","YXmlFragment","autocomplete","basicBundle","codeTheme","comments","cursorColor","defaultMarkdownSlots","defaultSlots","defaultTextSlots","defaultTheme","link","listener","markdownBundle","markdownHighlightStyle","markdownTags","markdownTagsExtension","markdownTheme","tags","tasklist","textTheme","tooltip","useTextModel"],"entryPoint":"packages/ui/react-ui-editor/src/index.ts","inputs":{"packages/ui/react-ui-editor/src/index.ts":{"bytesInOutput":132},"packages/ui/react-ui-editor/src/components/TextEditor/index.ts":{"bytesInOutput":50},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/autocomplete.ts":{"bytesInOutput":1098},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/basic.ts":{"bytesInOutput":738},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/comments.ts":{"bytesInOutput":3165},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/link.ts":{"bytesInOutput":2573},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/listener.ts":{"bytesInOutput":296},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/markdown/bundle.ts":{"bytesInOutput":2731},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/markdown/highlight.ts":{"bytesInOutput":3415},"packages/ui/react-ui-editor/src/styles/markdown.ts":{"bytesInOutput":1029},"packages/ui/react-ui-editor/src/styles/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-editor/src/styles/tokens.ts":{"bytesInOutput":94},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/markdown/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/tasklist.ts":{"bytesInOutput":2416},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/tooltip.tsx":{"bytesInOutput":1033},"packages/ui/react-ui-editor/src/components/TextEditor/themes/default.ts":{"bytesInOutput":4060},"packages/ui/react-ui-editor/src/components/TextEditor/themes/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-editor/src/components/TextEditor/TextEditor.tsx":{"bytesInOutput":4276},"packages/ui/react-ui-editor/src/components/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-editor/src/hooks/useTextModel.ts":{"bytesInOutput":2039},"packages/ui/react-ui-editor/src/hooks/automerge/plugin.ts":{"bytesInOutput":2340},"packages/ui/react-ui-editor/src/hooks/automerge/PatchSemaphore.ts":{"bytesInOutput":1519},"packages/ui/react-ui-editor/src/hooks/automerge/amToCodemirror.ts":{"bytesInOutput":2412},"packages/ui/react-ui-editor/src/hooks/automerge/codeMirrorToAm.ts":{"bytesInOutput":644},"packages/ui/react-ui-editor/src/hooks/automerge/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-editor/src/hooks/yjs/cursors.ts":{"bytesInOutput":565},"packages/ui/react-ui-editor/src/hooks/yjs/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-editor/src/hooks/yjs/space-provider.ts":{"bytesInOutput":3769},"packages/ui/react-ui-editor/src/hooks/index.ts":{"bytesInOutput":0}},"bytes":42844}}}
1
+ {"inputs":{"packages/ui/react-ui-editor/src/components/TextEditor/extensions/autocomplete.ts":{"bytes":7096,"imports":[{"path":"@codemirror/autocomplete","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/basic.ts":{"bytes":3373,"imports":[{"path":"@codemirror/autocomplete","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/theme-one-dark","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/demo.ts":{"bytes":6009,"imports":[{"path":"@codemirror/view","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/comments.ts":{"bytes":18590,"imports":[{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/link.ts":{"bytes":19200,"imports":[{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/listener.ts":{"bytes":2106,"imports":[{"path":"@codemirror/state","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-editor/src/styles/markdown.ts":{"bytes":6320,"imports":[{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-editor/src/styles/tokens.ts":{"bytes":1192,"imports":[{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-editor/src/styles/index.ts":{"bytes":560,"imports":[{"path":"packages/ui/react-ui-editor/src/styles/markdown.ts","kind":"import-statement","original":"./markdown"},{"path":"packages/ui/react-ui-editor/src/styles/tokens.ts","kind":"import-statement","original":"./tokens"}],"format":"esm"},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/markdown/highlight.ts":{"bytes":15930,"imports":[{"path":"@codemirror/lang-markdown","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@lezer/highlight","kind":"import-statement","external":true},{"path":"lodash.get","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-editor/src/styles/index.ts","kind":"import-statement","original":"../../../../styles"}],"format":"esm"},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/markdown/bundle.ts":{"bytes":10072,"imports":[{"path":"@codemirror/autocomplete","kind":"import-statement","external":true},{"path":"@codemirror/commands","kind":"import-statement","external":true},{"path":"@codemirror/lang-markdown","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/language-data","kind":"import-statement","external":true},{"path":"@codemirror/search","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/theme-one-dark","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-editor/src/components/TextEditor/extensions/markdown/highlight.ts","kind":"import-statement","original":"./highlight"}],"format":"esm"},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/markdown/index.ts":{"bytes":596,"imports":[{"path":"packages/ui/react-ui-editor/src/components/TextEditor/extensions/markdown/bundle.ts","kind":"import-statement","original":"./bundle"},{"path":"packages/ui/react-ui-editor/src/components/TextEditor/extensions/markdown/highlight.ts","kind":"import-statement","original":"./highlight"}],"format":"esm"},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/tasklist.ts":{"bytes":10575,"imports":[{"path":"@codemirror/view","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/tooltip.tsx":{"bytes":5580,"imports":[{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/index.ts":{"bytes":1188,"imports":[{"path":"packages/ui/react-ui-editor/src/components/TextEditor/extensions/autocomplete.ts","kind":"import-statement","original":"./autocomplete"},{"path":"packages/ui/react-ui-editor/src/components/TextEditor/extensions/basic.ts","kind":"import-statement","original":"./basic"},{"path":"packages/ui/react-ui-editor/src/components/TextEditor/extensions/demo.ts","kind":"import-statement","original":"./demo"},{"path":"packages/ui/react-ui-editor/src/components/TextEditor/extensions/comments.ts","kind":"import-statement","original":"./comments"},{"path":"packages/ui/react-ui-editor/src/components/TextEditor/extensions/link.ts","kind":"import-statement","original":"./link"},{"path":"packages/ui/react-ui-editor/src/components/TextEditor/extensions/listener.ts","kind":"import-statement","original":"./listener"},{"path":"packages/ui/react-ui-editor/src/components/TextEditor/extensions/markdown/index.ts","kind":"import-statement","original":"./markdown"},{"path":"packages/ui/react-ui-editor/src/components/TextEditor/extensions/tasklist.ts","kind":"import-statement","original":"./tasklist"},{"path":"packages/ui/react-ui-editor/src/components/TextEditor/extensions/tooltip.tsx","kind":"import-statement","original":"./tooltip"}],"format":"esm"},"packages/ui/react-ui-editor/src/components/TextEditor/themes/default.ts":{"bytes":15385,"imports":[{"path":"lodash.get","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-editor/src/styles/index.ts","kind":"import-statement","original":"../../../styles"}],"format":"esm"},"packages/ui/react-ui-editor/src/components/TextEditor/themes/index.ts":{"bytes":495,"imports":[{"path":"packages/ui/react-ui-editor/src/components/TextEditor/themes/default.ts","kind":"import-statement","original":"./default"}],"format":"esm"},"packages/ui/react-ui-editor/src/components/TextEditor/TextEditor.tsx":{"bytes":20623,"imports":[{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@replit/codemirror-vim","kind":"import-statement","external":true},{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-editor/src/components/TextEditor/extensions/index.ts","kind":"import-statement","original":"./extensions"},{"path":"packages/ui/react-ui-editor/src/components/TextEditor/themes/index.ts","kind":"import-statement","original":"./themes"}],"format":"esm"},"packages/ui/react-ui-editor/src/components/TextEditor/index.ts":{"bytes":892,"imports":[{"path":"@lezer/highlight","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-editor/src/components/TextEditor/extensions/index.ts","kind":"import-statement","original":"./extensions"},{"path":"packages/ui/react-ui-editor/src/components/TextEditor/themes/index.ts","kind":"import-statement","original":"./themes"},{"path":"packages/ui/react-ui-editor/src/components/TextEditor/TextEditor.tsx","kind":"import-statement","original":"./TextEditor"}],"format":"esm"},"packages/ui/react-ui-editor/src/components/index.ts":{"bytes":484,"imports":[{"path":"packages/ui/react-ui-editor/src/components/TextEditor/index.ts","kind":"import-statement","original":"./TextEditor"}],"format":"esm"},"packages/ui/react-ui-editor/src/hooks/automerge/translation/automerge-to-codemirror.ts":{"bytes":11313,"imports":[{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-editor/src/hooks/automerge/plugin.ts","kind":"import-statement","original":"../plugin"}],"format":"esm"},"packages/ui/react-ui-editor/src/hooks/automerge/translation/codemirror-to-automerge.ts":{"bytes":4153,"imports":[{"path":"@dxos/automerge/automerge","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-editor/src/hooks/automerge/translation/index.ts":{"bytes":661,"imports":[{"path":"packages/ui/react-ui-editor/src/hooks/automerge/translation/automerge-to-codemirror.ts","kind":"import-statement","original":"./automerge-to-codemirror"},{"path":"packages/ui/react-ui-editor/src/hooks/automerge/translation/codemirror-to-automerge.ts","kind":"import-statement","original":"./codemirror-to-automerge"}],"format":"esm"},"packages/ui/react-ui-editor/src/hooks/automerge/PatchSemaphore.ts":{"bytes":8662,"imports":[{"path":"@dxos/automerge/automerge","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-editor/src/hooks/automerge/plugin.ts","kind":"import-statement","original":"./plugin"},{"path":"packages/ui/react-ui-editor/src/hooks/automerge/translation/index.ts","kind":"import-statement","original":"./translation"}],"format":"esm"},"packages/ui/react-ui-editor/src/hooks/automerge/plugin.ts":{"bytes":13086,"imports":[{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@dxos/automerge/automerge","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-editor/src/hooks/automerge/PatchSemaphore.ts","kind":"import-statement","original":"./PatchSemaphore"}],"format":"esm"},"packages/ui/react-ui-editor/src/hooks/automerge/index.ts":{"bytes":651,"imports":[{"path":"packages/ui/react-ui-editor/src/hooks/automerge/plugin.ts","kind":"import-statement","original":"./plugin"}],"format":"esm"},"packages/ui/react-ui-editor/src/hooks/yjs/cursors.ts":{"bytes":2636,"imports":[{"path":"lib0/random","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-editor/src/hooks/yjs/space-provider.ts":{"bytes":15639,"imports":[{"path":"lib0/decoding","kind":"import-statement","external":true},{"path":"lib0/encoding","kind":"import-statement","external":true},{"path":"lib0/observable","kind":"import-statement","external":true},{"path":"y-protocols/awareness","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-editor/src/hooks/yjs/index.ts":{"bytes":582,"imports":[{"path":"packages/ui/react-ui-editor/src/hooks/yjs/cursors.ts","kind":"import-statement","original":"./cursors"},{"path":"packages/ui/react-ui-editor/src/hooks/yjs/space-provider.ts","kind":"import-statement","original":"./space-provider"}],"format":"esm"},"packages/ui/react-ui-editor/src/hooks/useTextModel.ts":{"bytes":9937,"imports":[{"path":"lodash.get","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"y-codemirror.next","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-editor/src/hooks/automerge/index.ts","kind":"import-statement","original":"./automerge"},{"path":"packages/ui/react-ui-editor/src/hooks/yjs/index.ts","kind":"import-statement","original":"./yjs"}],"format":"esm"},"packages/ui/react-ui-editor/src/hooks/index.ts":{"bytes":564,"imports":[{"path":"packages/ui/react-ui-editor/src/hooks/useTextModel.ts","kind":"import-statement","original":"./useTextModel"},{"path":"packages/ui/react-ui-editor/src/hooks/yjs/index.ts","kind":"import-statement","original":"./yjs"}],"format":"esm"},"packages/ui/react-ui-editor/src/index.ts":{"bytes":1026,"imports":[{"path":"@dxos/protocols/proto/dxos/echo/model/text","kind":"import-statement","external":true},{"path":"@dxos/text-model","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-editor/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/ui/react-ui-editor/src/hooks/index.ts","kind":"import-statement","original":"./hooks"}],"format":"esm"}},"outputs":{"packages/ui/react-ui-editor/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":103257},"packages/ui/react-ui-editor/dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/protocols/proto/dxos/echo/model/text","kind":"import-statement","external":true},{"path":"@dxos/text-model","kind":"import-statement","external":true},{"path":"@lezer/highlight","kind":"import-statement","external":true},{"path":"@codemirror/autocomplete","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@codemirror/autocomplete","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/theme-one-dark","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/autocomplete","kind":"import-statement","external":true},{"path":"@codemirror/commands","kind":"import-statement","external":true},{"path":"@codemirror/lang-markdown","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/language-data","kind":"import-statement","external":true},{"path":"@codemirror/search","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/theme-one-dark","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@codemirror/lang-markdown","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@lezer/highlight","kind":"import-statement","external":true},{"path":"lodash.get","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"lodash.get","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@replit/codemirror-vim","kind":"import-statement","external":true},{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"lodash.get","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"y-codemirror.next","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@dxos/automerge/automerge","kind":"import-statement","external":true},{"path":"@dxos/automerge/automerge","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@dxos/automerge/automerge","kind":"import-statement","external":true},{"path":"lib0/random","kind":"import-statement","external":true},{"path":"lib0/decoding","kind":"import-statement","external":true},{"path":"lib0/encoding","kind":"import-statement","external":true},{"path":"lib0/observable","kind":"import-statement","external":true},{"path":"y-protocols/awareness","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["BaseTextEditor","Doc","EditorModes","MarkdownEditor","SpaceAwarenessProvider","TextEditor","TextKind","YText","YXmlFragment","autocomplete","basicBundle","codeTheme","comments","cursorColor","defaultMarkdownSlots","defaultSlots","defaultTextSlots","defaultTheme","demo","link","listener","markdownBundle","markdownHighlightStyle","markdownTags","markdownTagsExtension","markdownTheme","tags","tasklist","textTheme","tooltip","useTextModel"],"entryPoint":"packages/ui/react-ui-editor/src/index.ts","inputs":{"packages/ui/react-ui-editor/src/index.ts":{"bytesInOutput":132},"packages/ui/react-ui-editor/src/components/TextEditor/index.ts":{"bytesInOutput":50},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/autocomplete.ts":{"bytesInOutput":1098},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/basic.ts":{"bytesInOutput":738},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/demo.ts":{"bytesInOutput":1335},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/comments.ts":{"bytesInOutput":3575},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/link.ts":{"bytesInOutput":2573},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/listener.ts":{"bytesInOutput":300},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/markdown/bundle.ts":{"bytesInOutput":2731},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/markdown/highlight.ts":{"bytesInOutput":3415},"packages/ui/react-ui-editor/src/styles/markdown.ts":{"bytesInOutput":1029},"packages/ui/react-ui-editor/src/styles/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-editor/src/styles/tokens.ts":{"bytesInOutput":94},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/markdown/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/tasklist.ts":{"bytesInOutput":2416},"packages/ui/react-ui-editor/src/components/TextEditor/extensions/tooltip.tsx":{"bytesInOutput":1033},"packages/ui/react-ui-editor/src/components/TextEditor/themes/default.ts":{"bytesInOutput":4060},"packages/ui/react-ui-editor/src/components/TextEditor/themes/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-editor/src/components/TextEditor/TextEditor.tsx":{"bytesInOutput":4492},"packages/ui/react-ui-editor/src/components/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-editor/src/hooks/useTextModel.ts":{"bytesInOutput":2039},"packages/ui/react-ui-editor/src/hooks/automerge/plugin.ts":{"bytesInOutput":2340},"packages/ui/react-ui-editor/src/hooks/automerge/PatchSemaphore.ts":{"bytesInOutput":1517},"packages/ui/react-ui-editor/src/hooks/automerge/translation/automerge-to-codemirror.ts":{"bytesInOutput":2411},"packages/ui/react-ui-editor/src/hooks/automerge/translation/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-editor/src/hooks/automerge/translation/codemirror-to-automerge.ts":{"bytesInOutput":643},"packages/ui/react-ui-editor/src/hooks/automerge/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-editor/src/hooks/yjs/cursors.ts":{"bytesInOutput":565},"packages/ui/react-ui-editor/src/hooks/yjs/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-editor/src/hooks/yjs/space-provider.ts":{"bytesInOutput":3769},"packages/ui/react-ui-editor/src/hooks/index.ts":{"bytesInOutput":0}},"bytes":44932}}}
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownEditor.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/TextEditor/MarkdownEditor.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;AAIpB,OAAO,KAAuC,MAAM,OAAO,CAAC;AAQ5D,OAAO,EAAkB,KAAK,eAAe,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;;;;;;;;;;AAoKxF,wBAKE;AAEF,eAAO,MAAM,OAAO;;CAcnB,CAAC;AAEF,eAAO,MAAM,MAAM;;CAElB,CAAC;AAEF,eAAO,MAAM,QAAQ;;CAEpB,CAAC;AAEF,eAAO,MAAM,KAAK;;CAEjB,CAAC;AAEF,eAAO,MAAM,QAAQ;;CAYpB,CAAC;AAEF,eAAO,MAAM,YAAY;;CAYxB,CAAC;AAGF,eAAO,MAAM,QAAQ;;CAcpB,CAAC;AAEF,eAAO,MAAM,WAAW;;CAYvB,CAAC"}
1
+ {"version":3,"file":"MarkdownEditor.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/TextEditor/MarkdownEditor.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;AAIpB,OAAO,KAAuC,MAAM,OAAO,CAAC;AAQ5D,OAAO,EAAkB,KAAK,eAAe,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;;;;;;;;;;AAoKxF,wBAKE;AAEF,eAAO,MAAM,OAAO;;CAcnB,CAAC;AAEF,eAAO,MAAM,MAAM;;CAElB,CAAC;AAEF,eAAO,MAAM,QAAQ;;CAEpB,CAAC;AAEF,eAAO,MAAM,KAAK;;CAEjB,CAAC;AAEF,eAAO,MAAM,QAAQ;;CAcpB,CAAC;AAEF,eAAO,MAAM,YAAY;;CAYxB,CAAC;AAGF,eAAO,MAAM,QAAQ;;CAcpB,CAAC;AAEF,eAAO,MAAM,WAAW;;CAYvB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/TextEditor/TextEditor.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAI9C,OAAO,KAAK,EAAE,EACZ,KAAK,cAAc,EAOpB,MAAM,OAAO,CAAC;AAQf,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,eAAO,MAAM,WAAW,6BAA8B,CAAC;AACvD,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtD,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,cAAc,GAAG,IAAI,CAAC;IAC5B,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC;IAC1C,MAAM,CAAC,EAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,WAAW,CAAC;KACrB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,WAAW,CAAC;IACnB,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IACzB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,uFA0F1B,CAAC;AAGF,eAAO,MAAM,UAAU,uFAatB,CAAC;AAEF,eAAO,MAAM,cAAc,uFAa1B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,eAI1B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,eAK9B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,eAKlC,CAAC"}
1
+ {"version":3,"file":"TextEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/TextEditor/TextEditor.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAI9C,OAAO,KAAK,EAAE,EACZ,KAAK,cAAc,EAOpB,MAAM,OAAO,CAAC;AAQf,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,eAAO,MAAM,WAAW,6BAA8B,CAAC;AACvD,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtD,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,cAAc,GAAG,IAAI,CAAC;IAC5B,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC;IAC1C,MAAM,CAAC,EAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,WAAW,CAAC;KACrB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,WAAW,CAAC;IACnB,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IACzB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,uFA0F1B,CAAC;AAaF,eAAO,MAAM,UAAU,uFAatB,CAAC;AAEF,eAAO,MAAM,cAAc,uFAiB1B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,eAI1B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,eAK9B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,eAKlC,CAAC"}
@@ -1,14 +1,18 @@
1
1
  import { type Extension } from '@codemirror/state';
2
2
  import { type Rect } from '@codemirror/view';
3
+ type CommentsInfo = {
4
+ active?: string;
5
+ items: {
6
+ id: string;
7
+ pos: number;
8
+ location: Rect | null;
9
+ }[];
10
+ };
3
11
  export type CommentsOptions = {
4
12
  key?: string;
5
13
  onCreate?: () => string | void;
6
- onUpdate?: (info: {
7
- items: string[];
8
- active: string;
9
- pos: number;
10
- location: Rect;
11
- }) => void;
14
+ onUpdate?: (info: CommentsInfo) => void;
12
15
  };
13
16
  export declare const comments: (options?: CommentsOptions) => Extension;
17
+ export {};
14
18
  //# sourceMappingURL=comments.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"comments.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TextEditor/extensions/comments.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAML,KAAK,IAAI,EAIV,MAAM,kBAAkB,CAAC;AAmD1B,MAAM,MAAM,eAAe,GAAG;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,EAAE,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE,KAAK,IAAI,CAAC;CAC7F,CAAC;AAKF,eAAO,MAAM,QAAQ,aAAa,eAAe,KAAQ,SAiGxD,CAAC"}
1
+ {"version":3,"file":"comments.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TextEditor/extensions/comments.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAGL,KAAK,IAAI,EAOV,MAAM,kBAAkB,CAAC;AAuD1B,KAAK,YAAY,GAAG;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAA;KAAE,EAAE,CAAC;CAC7D,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;CACzC,CAAC;AAKF,eAAO,MAAM,QAAQ,aAAa,eAAe,KAAQ,SAyGxD,CAAC"}
@@ -0,0 +1,10 @@
1
+ export type DemoOptions = {
2
+ delay?: number;
3
+ items?: string[];
4
+ };
5
+ /**
6
+ * Demo script.
7
+ * Configurable plugin that let's user cycle through pre-configured input script.
8
+ */
9
+ export declare const demo: ({ delay, items }?: DemoOptions) => import("@codemirror/state").Extension[];
10
+ //# sourceMappingURL=demo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"demo.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TextEditor/extensions/demo.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,IAAI,sBAA0C,WAAW,4CAgDrE,CAAC"}
@@ -1,5 +1,6 @@
1
1
  export * from './autocomplete';
2
2
  export * from './basic';
3
+ export * from './demo';
3
4
  export * from './comments';
4
5
  export * from './link';
5
6
  export * from './listener';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TextEditor/extensions/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TextEditor/extensions/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
@@ -1,7 +1,9 @@
1
1
  import { StateField } from '@codemirror/state';
2
- export type TextListener = (text: string) => void;
2
+ export type ListenerOptions = {
3
+ onChange: (text: string) => void;
4
+ };
3
5
  /**
4
6
  * Based on https://github.com/codemirror/dev/issues/44#issuecomment-789093799
5
7
  */
6
- export declare const listener: (onChange: TextListener) => StateField<null>;
8
+ export declare const listener: ({ onChange }: ListenerOptions) => StateField<null>;
7
9
  //# sourceMappingURL=listener.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"listener.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TextEditor/extensions/listener.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;AAElD;;GAEG;AAEH,eAAO,MAAM,QAAQ,aAAc,YAAY,qBAU3C,CAAC"}
1
+ {"version":3,"file":"listener.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TextEditor/extensions/listener.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,MAAM,eAAe,GAAG;IAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,CAAC;AAEnE;;GAEG;AAEH,eAAO,MAAM,QAAQ,iBAAkB,eAAe,qBAUlD,CAAC"}
@@ -5,6 +5,9 @@ import { type Field } from './plugin';
5
5
  type Doc<T> = automerge.Doc<T>;
6
6
  type Heads = automerge.Heads;
7
7
  type ChangeFn = (atHeads: Heads, change: (doc: Doc<unknown>) => void) => Heads | undefined;
8
+ /**
9
+ * TODO(burdon): Comment.
10
+ */
8
11
  export declare class PatchSemaphore {
9
12
  _field: Field;
10
13
  _inReconcile: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"PatchSemaphore.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/automerge/PatchSemaphore.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAI9D,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,KAAK,KAAK,EAA8E,MAAM,UAAU,CAAC;AAElH,KAAK,GAAG,CAAC,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAC/B,KAAK,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC;AAE7B,KAAK,QAAQ,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,OAAO,CAAC,KAAK,IAAI,KAAK,KAAK,GAAG,SAAS,CAAC;AAE3F,qBAAa,cAAc;IACzB,MAAM,EAAG,KAAK,CAAC;IACf,YAAY,UAAS;IACrB,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAM;gBAEjB,KAAK,CAAC,EAAE,KAAK;IAMzB,SAAS,WAAY,UAAU,QAAQ,UAAU,UA2C/C;CACH"}
1
+ {"version":3,"file":"PatchSemaphore.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/automerge/PatchSemaphore.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE9D,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,KAAK,KAAK,EAA8E,MAAM,UAAU,CAAC;AAGlH,KAAK,GAAG,CAAC,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAC/B,KAAK,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC;AAE7B,KAAK,QAAQ,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,OAAO,CAAC,KAAK,IAAI,KAAK,KAAK,GAAG,SAAS,CAAC;AAE3F;;GAEG;AACH,qBAAa,cAAc;IACzB,MAAM,EAAG,KAAK,CAAC;IACf,YAAY,UAAS;IACrB,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAM;gBAEjB,KAAK,CAAC,EAAE,KAAK;IAMzB,SAAS,WAAY,UAAU,QAAQ,UAAU,UA0C/C;CACH"}
@@ -1,3 +1,3 @@
1
- export { automergePlugin, type AutomergePlugin } from './plugin';
2
1
  export { type IDocHandle } from './handle';
2
+ export { automergePlugin, type AutomergePlugin } from './plugin';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/automerge/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/automerge/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/automerge/plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,SAAS,EAEd,WAAW,EACX,UAAU,EACV,KAAK,WAAW,EAChB,KAAK,eAAe,EACrB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAGlE,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,MAAM,KAAK,GAAG;IAClB,SAAS,EAAE,KAAK,CAAC;IACjB,IAAI,EAAE,IAAI,EAAE,CAAC;IACb,wBAAwB,EAAE,WAAW,EAAE,CAAC;CACzC,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,KAAK,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,UAAU,0DAAsC,CAAC;AAE9D,eAAO,MAAM,WAAW,sCAAsB,YAAY,WAAW,CAAgC,CAAC;AAEtG,eAAO,MAAM,YAAY,UAAW,WAAW,uCAAsD,CAAC;AAEtG,eAAO,MAAM,OAAO,UAAW,WAAW,mBAAiB,IAAI,EAA6B,CAAC;AAE7F,MAAM,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;AAMtC,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,eAAe,WAAY,UAAU,QAAQ,IAAI,EAAE,KAAG,eA8DlE,CAAC;AAEF,eAAO,MAAM,uBAAuB,qDAA+B,CAAC;AAEpE,eAAO,MAAM,aAAa,OAAQ,WAAW,KAAG,OAAmD,CAAC;AAEpG,eAAO,MAAM,aAAa,OAAQ,eAAe,SAchD,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/automerge/plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,SAAS,EAEd,WAAW,EACX,UAAU,EACV,KAAK,WAAW,EAChB,KAAK,eAAe,EACrB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAGlE,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,MAAM,KAAK,GAAG;IAClB,SAAS,EAAE,KAAK,CAAC;IACjB,IAAI,EAAE,IAAI,EAAE,CAAC;IACb,wBAAwB,EAAE,WAAW,EAAE,CAAC;CACzC,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,KAAK,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,UAAU,0DAAsC,CAAC;AAE9D,eAAO,MAAM,WAAW,sCAAsB,YAAY,WAAW,CAAgC,CAAC;AAEtG,eAAO,MAAM,YAAY,UAAW,WAAW,uCAAsD,CAAC;AAEtG,eAAO,MAAM,OAAO,UAAW,WAAW,mBAAiB,IAAI,EAA6B,CAAC;AAE7F,MAAM,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;AAMtC,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,eAAe,WAAY,UAAU,QAAQ,IAAI,EAAE,KAAG,eA+DlE,CAAC;AAEF,eAAO,MAAM,uBAAuB,qDAA+B,CAAC;AAEpE,eAAO,MAAM,aAAa,OAAQ,WAAW,KAAG,OAAmD,CAAC;AAEpG,eAAO,MAAM,aAAa,OAAQ,eAAe,SAchD,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { type EditorSelection } from '@codemirror/state';
2
+ import { type EditorView } from '@codemirror/view';
3
+ import { type Patch, type Prop } from '@dxos/automerge/automerge';
4
+ export declare const automergeToCodemirror: (view: EditorView, selection: EditorSelection, target: Prop[], patches: Patch[]) => void;
5
+ //# sourceMappingURL=automerge-to-codemirror.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"automerge-to-codemirror.d.ts","sourceRoot":"","sources":["../../../../../../src/hooks/automerge/translation/automerge-to-codemirror.ts"],"names":[],"mappings":"AAMA,OAAO,EAA8B,KAAK,eAAe,EAAoB,MAAM,mBAAmB,CAAC;AACvG,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAGL,KAAK,KAAK,EACV,KAAK,IAAI,EAGV,MAAM,2BAA2B,CAAC;AAInC,eAAO,MAAM,qBAAqB,SAC1B,UAAU,aACL,eAAe,UAClB,IAAI,EAAE,WACL,KAAK,EAAE,SAkBjB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type EditorState, type Transaction } from '@codemirror/state';
2
+ import { type Heads } from '@dxos/automerge/automerge';
3
+ import { type IDocHandle } from '../handle';
4
+ import { type Field } from '../plugin';
5
+ export declare const codemirrorToAutomerge: (field: Field, handle: IDocHandle, transactions: Transaction[], state: EditorState) => Heads | undefined;
6
+ //# sourceMappingURL=codemirror-to-automerge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codemirror-to-automerge.d.ts","sourceRoot":"","sources":["../../../../../../src/hooks/automerge/translation/codemirror-to-automerge.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,WAAW,EAAa,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAElF,OAAO,EAAc,KAAK,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEnE,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,WAAW,CAAC;AAEvC,eAAO,MAAM,qBAAqB,yBAExB,UAAU,gBACJ,WAAW,EAAE,SACpB,WAAW,KACjB,KAAK,GAAG,SAyBV,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './automerge-to-codemirror';
2
+ export * from './codemirror-to-automerge';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/hooks/automerge/translation/index.ts"],"names":[],"mappings":"AAIA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/react-ui-editor",
3
- "version": "0.3.10-main.8fd45da",
3
+ "version": "0.3.10-main.90b298e",
4
4
  "description": "Document editing experience within a DXOS shell.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -36,18 +36,19 @@
36
36
  "y-codemirror.next": "^0.3.2",
37
37
  "y-protocols": "^1.0.5",
38
38
  "yjs": "^13.6.10",
39
- "@dxos/debug": "0.3.10-main.8fd45da",
40
- "@dxos/display-name": "0.3.10-main.8fd45da",
41
- "@dxos/echo-schema": "0.3.10-main.8fd45da",
42
- "@dxos/invariant": "0.3.10-main.8fd45da",
43
- "@dxos/protocols": "0.3.10-main.8fd45da",
44
- "@dxos/react-ui": "0.3.10-main.8fd45da",
45
- "@dxos/react-ui-theme": "0.3.10-main.8fd45da",
46
- "@dxos/text-model": "0.3.10-main.8fd45da",
47
- "@dxos/log": "0.3.10-main.8fd45da",
48
- "@dxos/react-async": "0.3.10-main.8fd45da",
49
- "@dxos/util": "0.3.10-main.8fd45da",
50
- "@dxos/automerge": "0.3.10-main.8fd45da"
39
+ "@dxos/automerge": "0.3.10-main.90b298e",
40
+ "@dxos/async": "0.3.10-main.90b298e",
41
+ "@dxos/display-name": "0.3.10-main.90b298e",
42
+ "@dxos/debug": "0.3.10-main.90b298e",
43
+ "@dxos/echo-schema": "0.3.10-main.90b298e",
44
+ "@dxos/invariant": "0.3.10-main.90b298e",
45
+ "@dxos/react-async": "0.3.10-main.90b298e",
46
+ "@dxos/log": "0.3.10-main.90b298e",
47
+ "@dxos/protocols": "0.3.10-main.90b298e",
48
+ "@dxos/react-ui": "0.3.10-main.90b298e",
49
+ "@dxos/react-ui-theme": "0.3.10-main.90b298e",
50
+ "@dxos/text-model": "0.3.10-main.90b298e",
51
+ "@dxos/util": "0.3.10-main.90b298e"
51
52
  },
52
53
  "devDependencies": {
53
54
  "@automerge/automerge-repo-network-broadcastchannel": "^1.0.19",
@@ -60,17 +61,17 @@
60
61
  "@types/react-dom": "^18.0.6",
61
62
  "react": "^18.2.0",
62
63
  "react-dom": "^18.2.0",
63
- "@dxos/config": "0.3.10-main.8fd45da",
64
- "@dxos/echo-typegen": "0.3.10-main.8fd45da",
65
- "@dxos/react-client": "0.3.10-main.8fd45da",
66
- "@dxos/storybook-utils": "0.3.10-main.8fd45da",
67
- "@dxos/react-ui": "0.3.10-main.8fd45da"
64
+ "@dxos/config": "0.3.10-main.90b298e",
65
+ "@dxos/react-client": "0.3.10-main.90b298e",
66
+ "@dxos/echo-typegen": "0.3.10-main.90b298e",
67
+ "@dxos/storybook-utils": "0.3.10-main.90b298e",
68
+ "@dxos/react-ui": "0.3.10-main.90b298e"
68
69
  },
69
70
  "peerDependencies": {
70
71
  "@phosphor-icons/react": "^2.0.5",
71
72
  "react": "^18.2.0",
72
73
  "react-dom": "^18.2.0",
73
- "@dxos/react-client": "0.3.10-main.8fd45da"
74
+ "@dxos/react-client": "0.3.10-main.90b298e"
74
75
  },
75
76
  "publishConfig": {
76
77
  "access": "public"
@@ -219,8 +219,10 @@ export const TaskList = {
219
219
  text={str(text.tasks, '', text.list)}
220
220
  extensions={[
221
221
  tasklist(),
222
- listener((text) => {
223
- console.log(text);
222
+ listener({
223
+ onChange: (text) => {
224
+ console.log(text);
225
+ },
224
226
  }),
225
227
  ]}
226
228
  />
@@ -21,7 +21,7 @@ import { generateName } from '@dxos/display-name';
21
21
  import { useThemeContext } from '@dxos/react-ui';
22
22
  import { getColorForValue, inputSurface, mx } from '@dxos/react-ui-theme';
23
23
 
24
- import { basicBundle, markdownBundle } from './extensions';
24
+ import { basicBundle, demo, markdownBundle } from './extensions';
25
25
  import { defaultTheme, markdownTheme, textTheme } from './themes';
26
26
  import { type EditorModel } from '../../hooks';
27
27
  import { type ThemeStyles } from '../../styles';
@@ -157,7 +157,17 @@ export const BaseTextEditor = forwardRef<TextEditorRef, TextEditorProps>(
157
157
  },
158
158
  );
159
159
 
160
- // TODO(burdon): Set default text theme?
160
+ // TODO(burdon): Allow plugins to set extensions (factory).
161
+ const maybeDebug = (): Extension => {
162
+ // TODO(burdon): Parse JSON script format (with key bindings?)
163
+ const items = localStorage.getItem('dxos.composer.demo');
164
+ if (items) {
165
+ return demo({ items: items.split(',') });
166
+ }
167
+
168
+ return [];
169
+ };
170
+
161
171
  export const TextEditor = forwardRef<TextEditorRef, TextEditorProps>(
162
172
  ({ extensions = [], slots: _slots, ...props }, forwardedRef) => {
163
173
  const { themeMode } = useThemeContext();
@@ -165,7 +175,7 @@ export const TextEditor = forwardRef<TextEditorRef, TextEditorProps>(
165
175
  return (
166
176
  <BaseTextEditor
167
177
  ref={forwardedRef}
168
- extensions={[basicBundle({ themeMode, placeholder: slots?.editor?.placeholder }), ...extensions]}
178
+ extensions={[basicBundle({ themeMode, placeholder: slots?.editor?.placeholder }), maybeDebug(), ...extensions]}
169
179
  slots={slots}
170
180
  {...props}
171
181
  />
@@ -180,7 +190,11 @@ export const MarkdownEditor = forwardRef<TextEditorRef, TextEditorProps>(
180
190
  return (
181
191
  <BaseTextEditor
182
192
  ref={forwardedRef}
183
- extensions={[markdownBundle({ themeMode, placeholder: slots?.editor?.placeholder }), ...extensions]}
193
+ extensions={[
194
+ markdownBundle({ themeMode, placeholder: slots?.editor?.placeholder }),
195
+ maybeDebug(),
196
+ ...extensions,
197
+ ]}
184
198
  slots={slots}
185
199
  {...props}
186
200
  />
@@ -4,17 +4,18 @@
4
4
 
5
5
  import { type Extension } from '@codemirror/state';
6
6
  import {
7
- Decoration,
7
+ keymap,
8
8
  type DecorationSet,
9
+ type Rect,
10
+ type ViewUpdate,
11
+ Decoration,
9
12
  EditorView,
10
- keymap,
11
13
  MatchDecorator,
12
- type Rect,
13
14
  ViewPlugin,
14
- type ViewUpdate,
15
15
  WidgetType,
16
16
  } from '@codemirror/view';
17
17
 
18
+ import { debounce } from '@dxos/async';
18
19
  import { invariant } from '@dxos/invariant';
19
20
 
20
21
  // 1. TODO(burdon): Make atomic (for tasklist also).
@@ -44,10 +45,10 @@ class BookmarkWidget extends WidgetType {
44
45
  return this._id === other._id;
45
46
  }
46
47
 
47
- // TODO(burdon): Click to select.
48
48
  override toDOM() {
49
49
  const span = document.createElement('span');
50
50
  span.className = 'cm-bookmark';
51
+ // TODO(burdon): Call out to react?
51
52
  // https://emojifinder.com/comment
52
53
  span.textContent = '💬';
53
54
  return span;
@@ -62,18 +63,28 @@ const styles = EditorView.baseTheme({
62
63
  padding: '4px',
63
64
  backgroundColor: 'yellow',
64
65
  },
66
+ '& .cm-bookmark-selected': {
67
+ backgroundColor: 'orange',
68
+ },
65
69
  });
66
70
 
71
+ type CommentsInfo = {
72
+ active?: string;
73
+ items: { id: string; pos: number; location: Rect | null }[];
74
+ };
75
+
67
76
  export type CommentsOptions = {
68
77
  key?: string;
69
78
  onCreate?: () => string | void;
70
- onUpdate?: (info: { items: string[]; active: string; pos: number; location: Rect }) => void;
79
+ onUpdate?: (info: CommentsInfo) => void;
71
80
  };
72
81
 
73
82
  // https://www.markdownguide.org/extended-syntax/#footnotes
74
83
  // TODO(burdon): Record span in automerge model?
75
84
  // TODO(burdon): Extended markdown: https://www.markdownguide.org/extended-syntax
76
85
  export const comments = (options: CommentsOptions = {}): Extension => {
86
+ let active: string | undefined;
87
+
77
88
  const bookmarkMatcher = new MatchDecorator({
78
89
  regexp: /\[\^(\w+)\]/g,
79
90
  decoration: (match, view, pos) => {
@@ -105,10 +116,14 @@ export const comments = (options: CommentsOptions = {}): Extension => {
105
116
  },
106
117
  );
107
118
 
119
+ const doUpdate = debounce((data: CommentsInfo) => {
120
+ options.onUpdate?.(data);
121
+ }, 200);
122
+
108
123
  return [
109
124
  keymap.of([
110
125
  {
111
- key: options?.key ?? 'alt-meta-c',
126
+ key: options?.key ?? 'shift-meta-c',
112
127
  run: (view) => {
113
128
  // Insert footnote.
114
129
  const id = options.onCreate?.();
@@ -132,39 +147,41 @@ export const comments = (options: CommentsOptions = {}): Extension => {
132
147
 
133
148
  // Monitor cursor movement.
134
149
  EditorView.updateListener.of((update) => {
150
+ active = undefined;
151
+ if (!options.onUpdate) {
152
+ return;
153
+ }
154
+
135
155
  const view = update.view;
136
156
  const pos = view.state.selection.main.head;
137
157
 
138
158
  const decorations: { from: number; to: number; value: Decoration }[] = [];
139
159
  const rangeSet = view.plugin(bookmarks)?.bookmarks;
140
- rangeSet?.between(pos, pos + 1, (from, to, value) => {
141
- if (value.spec.widget) {
142
- decorations.push({ from, to, value });
160
+ let closest = Infinity;
161
+ // TODO(burdon): Always shows entire document?
162
+ const { from, to } = view.visibleRanges?.[0] ?? { from: 0, to: view.state.doc.length };
163
+ rangeSet?.between(from, to, (from, to, value) => {
164
+ decorations.push({ from, to, value });
165
+ const d = Math.min(Math.abs(pos - from), Math.abs(pos - to));
166
+ if (d < closest) {
167
+ // TODO(burdon): Update class of selected.
168
+ active = value.spec.id;
169
+ closest = d;
143
170
  }
144
171
  });
145
172
 
146
173
  if (decorations.length) {
147
- const {
148
- from,
149
- value: {
150
- spec: { id },
151
- },
152
- } = decorations[0];
153
- const location = view.coordsAtPos(from);
154
- if (location) {
155
- options.onUpdate?.({
156
- items: decorations.map(
157
- ({
158
- value: {
159
- spec: { id },
160
- },
161
- }) => id,
162
- ),
163
- active: id,
164
- pos,
165
- location,
166
- });
167
- }
174
+ doUpdate({
175
+ active,
176
+ items: decorations.map(
177
+ ({
178
+ from,
179
+ value: {
180
+ spec: { id },
181
+ },
182
+ }) => ({ id: id as string, pos: from, location: view.coordsAtPos(from) }),
183
+ ),
184
+ });
168
185
  }
169
186
  }),
170
187