@arbidocs/react 0.4.69 → 0.4.70

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 (70) hide show
  1. package/README.md +8 -0
  2. package/dist/annotations/index.cjs +186 -2450
  3. package/dist/annotations/index.cjs.map +1 -1
  4. package/dist/annotations/index.d.cts +3 -33
  5. package/dist/annotations/index.d.ts +3 -33
  6. package/dist/annotations/index.js +4 -2411
  7. package/dist/annotations/index.js.map +1 -1
  8. package/dist/artifacts/index.cjs +88 -112
  9. package/dist/artifacts/index.cjs.map +1 -1
  10. package/dist/artifacts/index.js +12 -61
  11. package/dist/artifacts/index.js.map +1 -1
  12. package/dist/artifacts/redline-core.cjs +8 -7
  13. package/dist/artifacts/redline-core.js +2 -1
  14. package/dist/{chunk-PATLJSAO.cjs → chunk-3AADNIOK.cjs} +9 -52
  15. package/dist/chunk-3AADNIOK.cjs.map +1 -0
  16. package/dist/chunk-3QF5DNAP.js +2413 -0
  17. package/dist/chunk-3QF5DNAP.js.map +1 -0
  18. package/dist/chunk-5DCRIWCA.cjs +243 -0
  19. package/dist/chunk-5DCRIWCA.cjs.map +1 -0
  20. package/dist/{chunk-NA3FOYSF.cjs → chunk-5SZ2J2WT.cjs} +5 -177
  21. package/dist/chunk-5SZ2J2WT.cjs.map +1 -0
  22. package/dist/{chunk-43AKLNBC.js → chunk-74N436VK.js} +4 -40
  23. package/dist/chunk-74N436VK.js.map +1 -0
  24. package/dist/{chunk-Z3RRZ3KV.cjs → chunk-7CL7QHT6.cjs} +2 -240
  25. package/dist/chunk-7CL7QHT6.cjs.map +1 -0
  26. package/dist/{chunk-BWVIAATD.cjs → chunk-BTRIS3HY.cjs} +4 -4
  27. package/dist/{chunk-BWVIAATD.cjs.map → chunk-BTRIS3HY.cjs.map} +1 -1
  28. package/dist/chunk-G6FHNURH.js +234 -0
  29. package/dist/chunk-G6FHNURH.js.map +1 -0
  30. package/dist/chunk-HKUD2NZN.js +61 -0
  31. package/dist/chunk-HKUD2NZN.js.map +1 -0
  32. package/dist/chunk-QRCMKEE6.js +173 -0
  33. package/dist/chunk-QRCMKEE6.js.map +1 -0
  34. package/dist/{chunk-PFKLOVGQ.js → chunk-SYPUFZGA.js} +3 -233
  35. package/dist/chunk-SYPUFZGA.js.map +1 -0
  36. package/dist/chunk-T4IJHRRD.cjs +71 -0
  37. package/dist/chunk-T4IJHRRD.cjs.map +1 -0
  38. package/dist/chunk-ULU5LEWF.cjs +2460 -0
  39. package/dist/chunk-ULU5LEWF.cjs.map +1 -0
  40. package/dist/{chunk-TQ6FRVAH.js → chunk-V4CXOPLB.js} +3 -3
  41. package/dist/{chunk-TQ6FRVAH.js.map → chunk-V4CXOPLB.js.map} +1 -1
  42. package/dist/chunk-VOFNX4P6.cjs +50 -0
  43. package/dist/chunk-VOFNX4P6.cjs.map +1 -0
  44. package/dist/chunk-WUTL62MC.js +42 -0
  45. package/dist/chunk-WUTL62MC.js.map +1 -0
  46. package/dist/{chunk-JPGV7NMY.js → chunk-YXSXGTYQ.js} +4 -173
  47. package/dist/chunk-YXSXGTYQ.js.map +1 -0
  48. package/dist/chunk-Z3LLUO32.cjs +177 -0
  49. package/dist/chunk-Z3LLUO32.cjs.map +1 -0
  50. package/dist/document-tools/index.cjs +683 -0
  51. package/dist/document-tools/index.cjs.map +1 -0
  52. package/dist/document-tools/index.d.cts +392 -0
  53. package/dist/document-tools/index.d.ts +392 -0
  54. package/dist/document-tools/index.js +639 -0
  55. package/dist/document-tools/index.js.map +1 -0
  56. package/dist/index.cjs +320 -318
  57. package/dist/index.cjs.map +1 -1
  58. package/dist/index.js +9 -6
  59. package/dist/index.js.map +1 -1
  60. package/dist/store-CqkkD7Ho.d.cts +35 -0
  61. package/dist/store-D1nhbkgk.d.ts +35 -0
  62. package/dist/ui/index.cjs +138 -137
  63. package/dist/ui/index.js +3 -2
  64. package/package.json +11 -3
  65. package/dist/chunk-43AKLNBC.js.map +0 -1
  66. package/dist/chunk-JPGV7NMY.js.map +0 -1
  67. package/dist/chunk-NA3FOYSF.cjs.map +0 -1
  68. package/dist/chunk-PATLJSAO.cjs.map +0 -1
  69. package/dist/chunk-PFKLOVGQ.js.map +0 -1
  70. package/dist/chunk-Z3RRZ3KV.cjs.map +0 -1
@@ -0,0 +1,35 @@
1
+ import { b as AnnotationLayer } from './model-DIwXRuGC.cjs';
2
+
3
+ /**
4
+ * Where a layer is kept. The layer is data about a document, not part of it, so the host decides
5
+ * (backend API, IndexedDB, a file). This package ships an in-memory store and a localStorage
6
+ * store; both validate on load because stored JSON is untrusted. A store shared by several
7
+ * writers (ARBI's server-side markup) also implements the optional members: it may merge on save,
8
+ * pull others' changes, and say whether this user may write at all.
9
+ */
10
+
11
+ interface AnnotationStore {
12
+ /** The saved layer, or an empty one for a document that has none yet. */
13
+ load(documentId: string): Promise<AnnotationLayer>;
14
+ /**
15
+ * Write a layer. A store with other writers may resolve to what it actually saved — this layer
16
+ * merged with theirs (see `mergeLayers`); the caller then rebases its newer edits onto it.
17
+ */
18
+ save(layer: AnnotationLayer): Promise<AnnotationLayer | void>;
19
+ /** Others' changes since the last load or save, or null when there are none. */
20
+ pull?(documentId: string): Promise<AnnotationLayer | null>;
21
+ /** Whether this user may change the layer; false makes it view-only. Known after `load`. */
22
+ canEdit?(documentId: string): boolean;
23
+ }
24
+ /** Thrown by a store whose backend cannot be reached: the layer is kept and saved when back. */
25
+ declare class AnnotationStoreOfflineError extends Error {
26
+ constructor(message?: string);
27
+ }
28
+ declare function createMemoryStore(now?: () => string): AnnotationStore;
29
+ /**
30
+ * Per-browser store. Storage can be absent, full or blocked (private windows), so every access is
31
+ * guarded. A saved layer that no longer validates is ignored rather than crashing the viewer.
32
+ */
33
+ declare function createLocalStorageStore(storage?: Pick<Storage, 'getItem' | 'setItem'> | undefined, now?: () => string): AnnotationStore;
34
+
35
+ export { type AnnotationStore as A, AnnotationStoreOfflineError as a, createMemoryStore as b, createLocalStorageStore as c };
@@ -0,0 +1,35 @@
1
+ import { b as AnnotationLayer } from './model-DIwXRuGC.js';
2
+
3
+ /**
4
+ * Where a layer is kept. The layer is data about a document, not part of it, so the host decides
5
+ * (backend API, IndexedDB, a file). This package ships an in-memory store and a localStorage
6
+ * store; both validate on load because stored JSON is untrusted. A store shared by several
7
+ * writers (ARBI's server-side markup) also implements the optional members: it may merge on save,
8
+ * pull others' changes, and say whether this user may write at all.
9
+ */
10
+
11
+ interface AnnotationStore {
12
+ /** The saved layer, or an empty one for a document that has none yet. */
13
+ load(documentId: string): Promise<AnnotationLayer>;
14
+ /**
15
+ * Write a layer. A store with other writers may resolve to what it actually saved — this layer
16
+ * merged with theirs (see `mergeLayers`); the caller then rebases its newer edits onto it.
17
+ */
18
+ save(layer: AnnotationLayer): Promise<AnnotationLayer | void>;
19
+ /** Others' changes since the last load or save, or null when there are none. */
20
+ pull?(documentId: string): Promise<AnnotationLayer | null>;
21
+ /** Whether this user may change the layer; false makes it view-only. Known after `load`. */
22
+ canEdit?(documentId: string): boolean;
23
+ }
24
+ /** Thrown by a store whose backend cannot be reached: the layer is kept and saved when back. */
25
+ declare class AnnotationStoreOfflineError extends Error {
26
+ constructor(message?: string);
27
+ }
28
+ declare function createMemoryStore(now?: () => string): AnnotationStore;
29
+ /**
30
+ * Per-browser store. Storage can be absent, full or blocked (private windows), so every access is
31
+ * guarded. A saved layer that no longer validates is ignored rather than crashing the viewer.
32
+ */
33
+ declare function createLocalStorageStore(storage?: Pick<Storage, 'getItem' | 'setItem'> | undefined, now?: () => string): AnnotationStore;
34
+
35
+ export { type AnnotationStore as A, AnnotationStoreOfflineError as a, createMemoryStore as b, createLocalStorageStore as c };