@inkbar/vue 0.0.0-stage → 0.1.1

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 (144) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +111 -2
  3. package/dist/components/InkAnnotation.js +7 -0
  4. package/dist/components/InkAnnotation.js.map +1 -0
  5. package/dist/components/InkAnnotation.vue.d.ts +22 -0
  6. package/dist/components/InkAnnotation.vue.d.ts.map +1 -0
  7. package/dist/components/InkAnnotation.vue_vue_type_script_setup_true_lang.js +48 -0
  8. package/dist/components/InkAnnotation.vue_vue_type_script_setup_true_lang.js.map +1 -0
  9. package/dist/components/InkNotePopover.js +7 -0
  10. package/dist/components/InkNotePopover.js.map +1 -0
  11. package/dist/components/InkNotePopover.vue.d.ts +15 -0
  12. package/dist/components/InkNotePopover.vue.d.ts.map +1 -0
  13. package/dist/components/InkNotePopover.vue_vue_type_script_setup_true_lang.js +132 -0
  14. package/dist/components/InkNotePopover.vue_vue_type_script_setup_true_lang.js.map +1 -0
  15. package/dist/components/InkPage.js +7 -0
  16. package/dist/components/InkPage.js.map +1 -0
  17. package/dist/components/InkPage.vue.d.ts +32 -0
  18. package/dist/components/InkPage.vue.d.ts.map +1 -0
  19. package/dist/components/InkPage.vue_vue_type_script_setup_true_lang.js +68 -0
  20. package/dist/components/InkPage.vue_vue_type_script_setup_true_lang.js.map +1 -0
  21. package/dist/components/InkPageCount.js +7 -0
  22. package/dist/components/InkPageCount.js.map +1 -0
  23. package/dist/components/InkPageCount.vue.d.ts +4 -0
  24. package/dist/components/InkPageCount.vue.d.ts.map +1 -0
  25. package/dist/components/InkPageCount.vue_vue_type_script_setup_true_lang.js +18 -0
  26. package/dist/components/InkPageCount.vue_vue_type_script_setup_true_lang.js.map +1 -0
  27. package/dist/components/InkPageInput.js +7 -0
  28. package/dist/components/InkPageInput.js.map +1 -0
  29. package/dist/components/InkPageInput.vue.d.ts +4 -0
  30. package/dist/components/InkPageInput.vue.d.ts.map +1 -0
  31. package/dist/components/InkPageInput.vue_vue_type_script_setup_true_lang.js +30 -0
  32. package/dist/components/InkPageInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
  33. package/dist/components/InkRoot.js +7 -0
  34. package/dist/components/InkRoot.js.map +1 -0
  35. package/dist/components/InkRoot.vue.d.ts +784 -0
  36. package/dist/components/InkRoot.vue.d.ts.map +1 -0
  37. package/dist/components/InkRoot.vue_vue_type_script_setup_true_lang.js +162 -0
  38. package/dist/components/InkRoot.vue_vue_type_script_setup_true_lang.js.map +1 -0
  39. package/dist/components/InkSuggestionCard.js +7 -0
  40. package/dist/components/InkSuggestionCard.js.map +1 -0
  41. package/dist/components/InkSuggestionCard.vue.d.ts +16 -0
  42. package/dist/components/InkSuggestionCard.vue.d.ts.map +1 -0
  43. package/dist/components/InkSuggestionCard.vue_vue_type_script_setup_true_lang.js +85 -0
  44. package/dist/components/InkSuggestionCard.vue_vue_type_script_setup_true_lang.js.map +1 -0
  45. package/dist/components/InkToolButton.js +7 -0
  46. package/dist/components/InkToolButton.js.map +1 -0
  47. package/dist/components/InkToolButton.vue.d.ts +26 -0
  48. package/dist/components/InkToolButton.vue.d.ts.map +1 -0
  49. package/dist/components/InkToolButton.vue_vue_type_script_setup_true_lang.js +45 -0
  50. package/dist/components/InkToolButton.vue_vue_type_script_setup_true_lang.js.map +1 -0
  51. package/dist/components/InkToolbar.js +7 -0
  52. package/dist/components/InkToolbar.js.map +1 -0
  53. package/dist/components/InkToolbar.vue.d.ts +21 -0
  54. package/dist/components/InkToolbar.vue.d.ts.map +1 -0
  55. package/dist/components/InkToolbar.vue_vue_type_script_setup_true_lang.js +29 -0
  56. package/dist/components/InkToolbar.vue_vue_type_script_setup_true_lang.js.map +1 -0
  57. package/dist/components/InkViewport.js +7 -0
  58. package/dist/components/InkViewport.js.map +1 -0
  59. package/dist/components/InkViewport.vue.d.ts +39 -0
  60. package/dist/components/InkViewport.vue.d.ts.map +1 -0
  61. package/dist/components/InkViewport.vue_vue_type_script_setup_true_lang.js +148 -0
  62. package/dist/components/InkViewport.vue_vue_type_script_setup_true_lang.js.map +1 -0
  63. package/dist/components/InkZoomIn.js +7 -0
  64. package/dist/components/InkZoomIn.js.map +1 -0
  65. package/dist/components/InkZoomIn.vue.d.ts +19 -0
  66. package/dist/components/InkZoomIn.vue.d.ts.map +1 -0
  67. package/dist/components/InkZoomIn.vue_vue_type_script_setup_true_lang.js +30 -0
  68. package/dist/components/InkZoomIn.vue_vue_type_script_setup_true_lang.js.map +1 -0
  69. package/dist/components/InkZoomOut.js +7 -0
  70. package/dist/components/InkZoomOut.js.map +1 -0
  71. package/dist/components/InkZoomOut.vue.d.ts +19 -0
  72. package/dist/components/InkZoomOut.vue.d.ts.map +1 -0
  73. package/dist/components/InkZoomOut.vue_vue_type_script_setup_true_lang.js +30 -0
  74. package/dist/components/InkZoomOut.vue_vue_type_script_setup_true_lang.js.map +1 -0
  75. package/dist/components/InkZoomSelect.js +7 -0
  76. package/dist/components/InkZoomSelect.js.map +1 -0
  77. package/dist/components/InkZoomSelect.vue.d.ts +4 -0
  78. package/dist/components/InkZoomSelect.vue.d.ts.map +1 -0
  79. package/dist/components/InkZoomSelect.vue_vue_type_script_setup_true_lang.js +39 -0
  80. package/dist/components/InkZoomSelect.vue_vue_type_script_setup_true_lang.js.map +1 -0
  81. package/dist/components/annotation-element.d.ts +5 -0
  82. package/dist/components/annotation-element.d.ts.map +1 -0
  83. package/dist/components/annotation-element.js +18 -0
  84. package/dist/components/annotation-element.js.map +1 -0
  85. package/dist/components/annotation-slot.d.ts +2 -0
  86. package/dist/components/annotation-slot.d.ts.map +1 -0
  87. package/dist/components/popover-focus.d.ts +9 -0
  88. package/dist/components/popover-focus.d.ts.map +1 -0
  89. package/dist/components/popover-focus.js +15 -0
  90. package/dist/components/popover-focus.js.map +1 -0
  91. package/dist/composables/useAnnotations.d.ts +1921 -0
  92. package/dist/composables/useAnnotations.d.ts.map +1 -0
  93. package/dist/composables/useAnnotations.js +27 -0
  94. package/dist/composables/useAnnotations.js.map +1 -0
  95. package/dist/composables/useDocument.d.ts +12 -0
  96. package/dist/composables/useDocument.d.ts.map +1 -0
  97. package/dist/composables/useDocument.js +20 -0
  98. package/dist/composables/useDocument.js.map +1 -0
  99. package/dist/composables/useEmbedded.d.ts +6 -0
  100. package/dist/composables/useEmbedded.d.ts.map +1 -0
  101. package/dist/composables/useEmbedded.js +15 -0
  102. package/dist/composables/useEmbedded.js.map +1 -0
  103. package/dist/composables/useHistory.d.ts +7 -0
  104. package/dist/composables/useHistory.d.ts.map +1 -0
  105. package/dist/composables/useHistory.js +9 -0
  106. package/dist/composables/useHistory.js.map +1 -0
  107. package/dist/composables/usePage.d.ts +10 -0
  108. package/dist/composables/usePage.d.ts.map +1 -0
  109. package/dist/composables/usePage.js +22 -0
  110. package/dist/composables/usePage.js.map +1 -0
  111. package/dist/composables/useSelection.d.ts +6 -0
  112. package/dist/composables/useSelection.d.ts.map +1 -0
  113. package/dist/composables/useSelection.js +14 -0
  114. package/dist/composables/useSelection.js.map +1 -0
  115. package/dist/composables/useTool.d.ts +6 -0
  116. package/dist/composables/useTool.d.ts.map +1 -0
  117. package/dist/composables/useTool.js +13 -0
  118. package/dist/composables/useTool.js.map +1 -0
  119. package/dist/composables/useZoom.d.ts +9 -0
  120. package/dist/composables/useZoom.d.ts.map +1 -0
  121. package/dist/composables/useZoom.js +17 -0
  122. package/dist/composables/useZoom.js.map +1 -0
  123. package/dist/compositions/DefaultToolbar.js +7 -0
  124. package/dist/compositions/DefaultToolbar.js.map +1 -0
  125. package/dist/compositions/DefaultToolbar.vue.d.ts +19 -0
  126. package/dist/compositions/DefaultToolbar.vue.d.ts.map +1 -0
  127. package/dist/compositions/DefaultToolbar.vue_vue_type_script_setup_true_lang.js +100 -0
  128. package/dist/compositions/DefaultToolbar.vue_vue_type_script_setup_true_lang.js.map +1 -0
  129. package/dist/context.d.ts +50 -0
  130. package/dist/context.d.ts.map +1 -0
  131. package/dist/context.js +13 -0
  132. package/dist/context.js.map +1 -0
  133. package/dist/index.d.ts +29 -0
  134. package/dist/index.d.ts.map +1 -0
  135. package/dist/index.js +25 -0
  136. package/dist/ref-history.d.ts +18 -0
  137. package/dist/ref-history.d.ts.map +1 -0
  138. package/dist/ref-history.js +25 -0
  139. package/dist/ref-history.js.map +1 -0
  140. package/dist/use-readable.d.ts +5 -0
  141. package/dist/use-readable.d.ts.map +1 -0
  142. package/dist/use-readable.js +16 -0
  143. package/dist/use-readable.js.map +1 -0
  144. package/package.json +52 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAnnotations.d.ts","sourceRoot":"","sources":["../../src/composables/useAnnotations.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAE/D,wBAAgB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAWX,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBACR,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBACf,MAAM,SAAS,OAAO,CAAC,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAClC,MAAM;kBACL,MAAM,EAAE;IACtB,+CAA+C;kBACjC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IACpB,sFAAsF;iBACzE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAIL,MAAM;EAEvB"}
@@ -0,0 +1,27 @@
1
+ import { useInkContext as e } from "../context.js";
2
+ import { computed as t } from "vue";
3
+ import { acceptSuggestion as n, repliesTo as r } from "@inkbar/core";
4
+ //#region src/composables/useAnnotations.ts
5
+ function i() {
6
+ let i = e("useAnnotations()"), a = () => i.document.value?.annotations;
7
+ return {
8
+ annotations: i.annotations,
9
+ selection: i.selection,
10
+ selected: t(() => i.selection.value.map((e) => i.annotations.value.find((t) => t.id === e)).filter((e) => !!e)),
11
+ byPage: (e) => i.annotations.value.filter((t) => t.page === e),
12
+ add: (e) => a()?.add(e),
13
+ update: (e, t) => a()?.update(e, t),
14
+ remove: (e) => a()?.remove(e) ?? !1,
15
+ select: (e) => a()?.select(e),
16
+ replies: (e) => r(i.annotations.value, e),
17
+ accept: (e) => {
18
+ let t = a();
19
+ return t ? n(t, e) : void 0;
20
+ },
21
+ dismiss: (e) => a()?.remove(e) ?? !1
22
+ };
23
+ }
24
+ //#endregion
25
+ export { i as useAnnotations };
26
+
27
+ //# sourceMappingURL=useAnnotations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAnnotations.js","names":["useAnnotations","ctx","useInkContext","store","computed","a","id","page","input","patch","ids","repliesTo","s","acceptSuggestion"],"sources":["../../src/composables/useAnnotations.ts"],"sourcesContent":["import { acceptSuggestion, repliesTo } from '@inkbar/core'\nimport { computed } from 'vue'\n\nimport { useInkContext } from '../context'\n\nimport type { Annotation, AnnotationInput } from '@inkbar/core'\n\nexport function useAnnotations() {\n const ctx = useInkContext('useAnnotations()')\n const store = () => ctx.document.value?.annotations\n return {\n annotations: ctx.annotations,\n selection: ctx.selection,\n selected: computed(() =>\n ctx.selection.value\n .map((id) => ctx.annotations.value.find((a) => a.id === id))\n .filter((a): a is Annotation => !!a)\n ),\n byPage: (page: number) => ctx.annotations.value.filter((a) => a.page === page),\n add: (input: AnnotationInput) => store()?.add(input),\n update: (id: string, patch: Partial<Annotation>) => store()?.update(id, patch),\n remove: (id: string) => store()?.remove(id) ?? false,\n select: (ids: string[]) => store()?.select(ids),\n /** Replies in creation order for a note id. */\n replies: (id: string) => repliesTo(ctx.annotations.value, id),\n /** Keeps a suggested redaction as the user's own, in the default redaction colour. */\n accept: (id: string) => {\n const s = store()\n return s ? acceptSuggestion(s, id) : undefined\n },\n dismiss: (id: string) => store()?.remove(id) ?? false,\n }\n}\n"],"mappings":";;;;AAOA,SAAgBA,IAAiB;CAC/B,IAAMC,IAAMC,EAAc,kBAAkB,GACtCC,UAAcF,EAAI,SAAS,OAAO;CACxC,OAAO;EACL,aAAaA,EAAI;EACjB,WAAWA,EAAI;EACf,UAAUG,QACRH,EAAI,UAAU,MACX,KAAK,MAAOA,EAAI,YAAY,MAAM,MAAM,MAAMI,EAAE,OAAOC,CAAE,CAAC,CAAC,CAC3D,QAAQ,MAAuB,CAAC,CAACD,CAAC,CACvC;EACA,SAAS,MAAiBJ,EAAI,YAAY,MAAM,QAAQ,MAAMI,EAAE,SAASE,CAAI;EAC7E,MAAM,MAA2BJ,EAAM,CAAC,EAAE,IAAIK,CAAK;EACnD,SAAS,GAAY,MAA+BL,EAAM,CAAC,EAAE,OAAOG,GAAIG,CAAK;EAC7E,SAAS,MAAeN,EAAM,CAAC,EAAE,OAAOG,CAAE,KAAK;EAC/C,SAAS,MAAkBH,EAAM,CAAC,EAAE,OAAOO,CAAG;EAE9C,UAAU,MAAeC,EAAUV,EAAI,YAAY,OAAOK,CAAE;EAE5D,SAAS,MAAe;GACtB,IAAMM,IAAIT,EAAM;GAChB,OAAOS,IAAIC,EAAiBD,GAAGN,CAAE,IAAI,KAAA;EACvC;EACA,UAAU,MAAeH,EAAM,CAAC,EAAE,OAAOG,CAAE,KAAK;CAClD;AACF"}
@@ -0,0 +1,12 @@
1
+ import { AnnotationDocument, ImportOptions } from '@inkbar/core';
2
+ export declare function useDocument(): {
3
+ document: Readonly<import('vue').ShallowRef<import('@inkbar/core').InkDocument | null>>;
4
+ status: Readonly<import('vue').Ref<import('@inkbar/core').InkStatus, import('@inkbar/core').InkStatus>>;
5
+ isReady: import('vue').ComputedRef<boolean>;
6
+ error: import('vue').ComputedRef<import('@inkbar/core').InkError | null>;
7
+ pages: import('vue').ComputedRef<readonly import('@inkbar/core').PageInfo[]>;
8
+ info: import('vue').ComputedRef<import('@inkbar/core').DocumentInfo | null>;
9
+ exportAnnotations: () => AnnotationDocument | undefined;
10
+ importAnnotations: (data: AnnotationDocument | string, opts?: ImportOptions) => import('@inkbar/core').ImportResult | undefined;
11
+ };
12
+ //# sourceMappingURL=useDocument.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDocument.d.ts","sourceRoot":"","sources":["../../src/composables/useDocument.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAErE,wBAAgB,WAAW;;;;;;;;8BAYG,kBAAkB,GAAG,MAAM,SAAS,aAAa;EAG9E"}
@@ -0,0 +1,20 @@
1
+ import { useInkContext as e } from "../context.js";
2
+ import { computed as t } from "vue";
3
+ //#region src/composables/useDocument.ts
4
+ function n() {
5
+ let n = e("useDocument()");
6
+ return {
7
+ document: n.document,
8
+ status: n.status,
9
+ isReady: t(() => n.status.value.state === "ready"),
10
+ error: t(() => n.status.value.state === "error" ? n.status.value.error : null),
11
+ pages: t(() => n.document.value?.pages ?? []),
12
+ info: t(() => n.document.value?.info ?? null),
13
+ exportAnnotations: () => n.document.value?.exportAnnotations("json"),
14
+ importAnnotations: (e, t) => n.document.value?.importAnnotations(e, t)
15
+ };
16
+ }
17
+ //#endregion
18
+ export { n as useDocument };
19
+
20
+ //# sourceMappingURL=useDocument.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDocument.js","names":["useDocument","ctx","useInkContext","computed","data","opts"],"sources":["../../src/composables/useDocument.ts"],"sourcesContent":["import { computed } from 'vue'\n\nimport { useInkContext } from '../context'\n\nimport type { AnnotationDocument, ImportOptions } from '@inkbar/core'\n\nexport function useDocument() {\n const ctx = useInkContext('useDocument()')\n return {\n document: ctx.document,\n status: ctx.status,\n isReady: computed(() => ctx.status.value.state === 'ready'),\n error: computed(() =>\n ctx.status.value.state === 'error' ? ctx.status.value.error : null\n ),\n pages: computed(() => ctx.document.value?.pages ?? []),\n info: computed(() => ctx.document.value?.info ?? null),\n exportAnnotations: () => ctx.document.value?.exportAnnotations('json'),\n importAnnotations: (data: AnnotationDocument | string, opts?: ImportOptions) =>\n ctx.document.value?.importAnnotations(data, opts),\n }\n}\n"],"mappings":";;;AAMA,SAAgBA,IAAc;CAC5B,IAAMC,IAAMC,EAAc,eAAe;CACzC,OAAO;EACL,UAAUD,EAAI;EACd,QAAQA,EAAI;EACZ,SAASE,QAAeF,EAAI,OAAO,MAAM,UAAU,OAAO;EAC1D,OAAOE,QACLF,EAAI,OAAO,MAAM,UAAU,UAAUA,EAAI,OAAO,MAAM,QAAQ,IAChE;EACA,OAAOE,QAAeF,EAAI,SAAS,OAAO,SAAS,CAAC,CAAC;EACrD,MAAME,QAAeF,EAAI,SAAS,OAAO,QAAQ,IAAI;EACrD,yBAAyBA,EAAI,SAAS,OAAO,kBAAkB,MAAM;EACrE,oBAAoB,GAAmC,MACrDA,EAAI,SAAS,OAAO,kBAAkBG,GAAMC,CAAI;CACpD;AACF"}
@@ -0,0 +1,6 @@
1
+ export declare function useEmbedded(): {
2
+ summary: import('vue').ComputedRef<readonly import('@inkbar/core').EmbeddedSummary[]>;
3
+ total: import('vue').ComputedRef<number>;
4
+ hasAny: import('vue').ComputedRef<boolean>;
5
+ };
6
+ //# sourceMappingURL=useEmbedded.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useEmbedded.d.ts","sourceRoot":"","sources":["../../src/composables/useEmbedded.ts"],"names":[],"mappings":"AAIA,wBAAgB,WAAW;;;;EAQ1B"}
@@ -0,0 +1,15 @@
1
+ import { useInkContext as e } from "../context.js";
2
+ import { computed as t } from "vue";
3
+ //#region src/composables/useEmbedded.ts
4
+ function n() {
5
+ let n = e("useEmbedded()"), r = t(() => n.document.value?.embedded ?? []);
6
+ return {
7
+ summary: r,
8
+ total: t(() => r.value.reduce((e, t) => e + t.count, 0)),
9
+ hasAny: t(() => r.value.length > 0)
10
+ };
11
+ }
12
+ //#endregion
13
+ export { n as useEmbedded };
14
+
15
+ //# sourceMappingURL=useEmbedded.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useEmbedded.js","names":["useEmbedded","ctx","useInkContext","summary","computed","n","s"],"sources":["../../src/composables/useEmbedded.ts"],"sourcesContent":["import { computed } from 'vue'\n\nimport { useInkContext } from '../context'\n\nexport function useEmbedded() {\n const ctx = useInkContext('useEmbedded()')\n const summary = computed(() => ctx.document.value?.embedded ?? [])\n return {\n summary,\n total: computed(() => summary.value.reduce((n, s) => n + s.count, 0)),\n hasAny: computed(() => summary.value.length > 0),\n }\n}\n"],"mappings":";;;AAIA,SAAgBA,IAAc;CAC5B,IAAMC,IAAMC,EAAc,eAAe,GACnCC,IAAUC,QAAeH,EAAI,SAAS,OAAO,YAAY,CAAC,CAAC;CACjE,OAAO;EACL;EACA,OAAOG,QAAeD,EAAQ,MAAM,QAAQ,GAAG,MAAME,IAAIC,EAAE,OAAO,CAAC,CAAC;EACpE,QAAQF,QAAeD,EAAQ,MAAM,SAAS,CAAC;CACjD;AACF"}
@@ -0,0 +1,7 @@
1
+ import { InkHistory } from '../context';
2
+ /**
3
+ * Undo and redo. Uncontrolled documents use the core history; controlled hosts that pass
4
+ * `history` to InkRoot get a snapshot stack over their own list, applied through v-model.
5
+ */
6
+ export declare function useHistory(): InkHistory;
7
+ //# sourceMappingURL=useHistory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useHistory.d.ts","sourceRoot":"","sources":["../../src/composables/useHistory.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C;;;GAGG;AACH,wBAAgB,UAAU,IAAI,UAAU,CAEvC"}
@@ -0,0 +1,9 @@
1
+ import { useInkContext as e } from "../context.js";
2
+ //#region src/composables/useHistory.ts
3
+ function t() {
4
+ return e("useHistory()").history;
5
+ }
6
+ //#endregion
7
+ export { t as useHistory };
8
+
9
+ //# sourceMappingURL=useHistory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useHistory.js","names":["useHistory","useInkContext"],"sources":["../../src/composables/useHistory.ts"],"sourcesContent":["import { useInkContext } from '../context'\n\nimport type { InkHistory } from '../context'\n\n/**\n * Undo and redo. Uncontrolled documents use the core history; controlled hosts that pass\n * `history` to InkRoot get a snapshot stack over their own list, applied through v-model.\n */\nexport function useHistory(): InkHistory {\n return useInkContext('useHistory()').history\n}\n"],"mappings":";;AAQA,SAAgBA,IAAyB;CACvC,OAAOC,EAAc,cAAc,CAAC,CAAC;AACvC"}
@@ -0,0 +1,10 @@
1
+ export declare function usePage(): {
2
+ /** 0-based. */
3
+ current: Readonly<import('vue').Ref<number, number>>;
4
+ count: import('vue').ComputedRef<number>;
5
+ goTo: (index: number) => void | undefined;
6
+ next: () => void | undefined;
7
+ previous: () => void | undefined;
8
+ scrollToAnnotation(id: string): void;
9
+ };
10
+ //# sourceMappingURL=usePage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePage.d.ts","sourceRoot":"","sources":["../../src/composables/usePage.ts"],"names":[],"mappings":"AAKA,wBAAgB,OAAO;IAInB,eAAe;;;kBAGD,MAAM;;;2BAGG,MAAM;EAKhC"}
@@ -0,0 +1,22 @@
1
+ import { useInkContext as e } from "../context.js";
2
+ import { useReadable as t } from "../use-readable.js";
3
+ import { computed as n } from "vue";
4
+ //#region src/composables/usePage.ts
5
+ function r() {
6
+ let r = e("usePage()"), i = t(() => r.viewport.value?.currentPage ?? null, 0);
7
+ return {
8
+ current: i,
9
+ count: n(() => r.document.value?.pages.length ?? 0),
10
+ goTo: (e) => r.viewport.value?.scrollToPage(e),
11
+ next: () => r.viewport.value?.scrollToPage(i.value + 1),
12
+ previous: () => r.viewport.value?.scrollToPage(i.value - 1),
13
+ scrollToAnnotation(e) {
14
+ let t = r.document.value?.annotations.get(e);
15
+ t && r.viewport.value?.scrollToRect(t.page, t.rect);
16
+ }
17
+ };
18
+ }
19
+ //#endregion
20
+ export { r as usePage };
21
+
22
+ //# sourceMappingURL=usePage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePage.js","names":["usePage","ctx","useInkContext","current","useReadable","computed","index","a","id"],"sources":["../../src/composables/usePage.ts"],"sourcesContent":["import { computed } from 'vue'\n\nimport { useInkContext } from '../context'\nimport { useReadable } from '../use-readable'\n\nexport function usePage() {\n const ctx = useInkContext('usePage()')\n const current = useReadable<number>(() => ctx.viewport.value?.currentPage ?? null, 0)\n return {\n /** 0-based. */\n current,\n count: computed(() => ctx.document.value?.pages.length ?? 0),\n goTo: (index: number) => ctx.viewport.value?.scrollToPage(index),\n next: () => ctx.viewport.value?.scrollToPage(current.value + 1),\n previous: () => ctx.viewport.value?.scrollToPage(current.value - 1),\n scrollToAnnotation(id: string) {\n const a = ctx.document.value?.annotations.get(id)\n if (a) ctx.viewport.value?.scrollToRect(a.page, a.rect)\n },\n }\n}\n"],"mappings":";;;;AAKA,SAAgBA,IAAU;CACxB,IAAMC,IAAMC,EAAc,WAAW,GAC/BC,IAAUC,QAA0BH,EAAI,SAAS,OAAO,eAAe,MAAM,CAAC;CACpF,OAAO;EAEL;EACA,OAAOI,QAAeJ,EAAI,SAAS,OAAO,MAAM,UAAU,CAAC;EAC3D,OAAO,MAAkBA,EAAI,SAAS,OAAO,aAAaK,CAAK;EAC/D,YAAYL,EAAI,SAAS,OAAO,aAAaE,EAAQ,QAAQ,CAAC;EAC9D,gBAAgBF,EAAI,SAAS,OAAO,aAAaE,EAAQ,QAAQ,CAAC;EAClE,mBAAmB,GAAY;GAC7B,IAAMI,IAAIN,EAAI,SAAS,OAAO,YAAY,IAAIO,CAAE;GAChD,AAAID,KAAGN,EAAI,SAAS,OAAO,aAAaM,EAAE,MAAMA,EAAE,IAAI;EACxD;CACF;AACF"}
@@ -0,0 +1,6 @@
1
+ export declare function useSelection(): {
2
+ selection: Readonly<import('vue').Ref<readonly string[], readonly string[]>>;
3
+ select: (ids: string[]) => void | undefined;
4
+ clear: () => void | undefined;
5
+ };
6
+ //# sourceMappingURL=useSelection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSelection.d.ts","sourceRoot":"","sources":["../../src/composables/useSelection.ts"],"names":[],"mappings":"AAEA,wBAAgB,YAAY;;kBAIV,MAAM,EAAE;;EAGzB"}
@@ -0,0 +1,14 @@
1
+ import { useInkContext as e } from "../context.js";
2
+ //#region src/composables/useSelection.ts
3
+ function t() {
4
+ let t = e("useSelection()");
5
+ return {
6
+ selection: t.selection,
7
+ select: (e) => t.document.value?.annotations.select(e),
8
+ clear: () => t.document.value?.annotations.select([])
9
+ };
10
+ }
11
+ //#endregion
12
+ export { t as useSelection };
13
+
14
+ //# sourceMappingURL=useSelection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSelection.js","names":["useSelection","ctx","useInkContext","ids"],"sources":["../../src/composables/useSelection.ts"],"sourcesContent":["import { useInkContext } from '../context'\n\nexport function useSelection() {\n const ctx = useInkContext('useSelection()')\n return {\n selection: ctx.selection,\n select: (ids: string[]) => ctx.document.value?.annotations.select(ids),\n clear: () => ctx.document.value?.annotations.select([]),\n }\n}\n"],"mappings":";;AAEA,SAAgBA,IAAe;CAC7B,IAAMC,IAAMC,EAAc,gBAAgB;CAC1C,OAAO;EACL,WAAWD,EAAI;EACf,SAAS,MAAkBA,EAAI,SAAS,OAAO,YAAY,OAAOE,CAAG;EACrE,aAAaF,EAAI,SAAS,OAAO,YAAY,OAAO,CAAC,CAAC;CACxD;AACF"}
@@ -0,0 +1,6 @@
1
+ import { ToolId } from '@inkbar/core/dom';
2
+ export declare function useTool(): {
3
+ tool: Readonly<import('vue').Ref<ToolId, ToolId>>;
4
+ setTool: (id: ToolId) => void;
5
+ };
6
+ //# sourceMappingURL=useTool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTool.d.ts","sourceRoot":"","sources":["../../src/composables/useTool.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAE9C,wBAAgB,OAAO;;kBAEkB,MAAM;EAC9C"}
@@ -0,0 +1,13 @@
1
+ import { useInkContext as e } from "../context.js";
2
+ //#region src/composables/useTool.ts
3
+ function t() {
4
+ let t = e("useTool()");
5
+ return {
6
+ tool: t.tool,
7
+ setTool: (e) => t.setTool(e)
8
+ };
9
+ }
10
+ //#endregion
11
+ export { t as useTool };
12
+
13
+ //# sourceMappingURL=useTool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTool.js","names":["useTool","ctx","useInkContext","id"],"sources":["../../src/composables/useTool.ts"],"sourcesContent":["import { useInkContext } from '../context'\n\nimport type { ToolId } from '@inkbar/core/dom'\n\nexport function useTool() {\n const ctx = useInkContext('useTool()')\n return { tool: ctx.tool, setTool: (id: ToolId) => ctx.setTool(id) }\n}\n"],"mappings":";;AAIA,SAAgBA,IAAU;CACxB,IAAMC,IAAMC,EAAc,WAAW;CACrC,OAAO;EAAE,MAAMD,EAAI;EAAM,UAAU,MAAeA,EAAI,QAAQE,CAAE;CAAE;AACpE"}
@@ -0,0 +1,9 @@
1
+ import { ZoomValue } from '@inkbar/core/dom';
2
+ export declare function useZoom(): {
3
+ zoom: Readonly<import('vue').Ref<ZoomValue, ZoomValue>>;
4
+ scale: Readonly<import('vue').Ref<number, number>>;
5
+ setZoom: (z: ZoomValue) => void | undefined;
6
+ zoomIn: () => void | undefined;
7
+ zoomOut: () => void | undefined;
8
+ };
9
+ //# sourceMappingURL=useZoom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useZoom.d.ts","sourceRoot":"","sources":["../../src/composables/useZoom.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAEjD,wBAAgB,OAAO;;;iBAON,SAAS;;;EAIzB"}
@@ -0,0 +1,17 @@
1
+ import { useInkContext as e } from "../context.js";
2
+ import { useReadable as t } from "../use-readable.js";
3
+ //#region src/composables/useZoom.ts
4
+ function n() {
5
+ let n = e("useZoom()");
6
+ return {
7
+ zoom: t(() => n.viewport.value?.zoom ?? null, "fit-width"),
8
+ scale: t(() => n.viewport.value?.scale ?? null, 1),
9
+ setZoom: (e) => n.viewport.value?.setZoom(e),
10
+ zoomIn: () => n.viewport.value?.zoomBy(1.25),
11
+ zoomOut: () => n.viewport.value?.zoomBy(.8)
12
+ };
13
+ }
14
+ //#endregion
15
+ export { n as useZoom };
16
+
17
+ //# sourceMappingURL=useZoom.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useZoom.js","names":["useZoom","ctx","useInkContext","useReadable","z"],"sources":["../../src/composables/useZoom.ts"],"sourcesContent":["import { useInkContext } from '../context'\nimport { useReadable } from '../use-readable'\n\nimport type { ZoomValue } from '@inkbar/core/dom'\n\nexport function useZoom() {\n const ctx = useInkContext('useZoom()')\n const zoom = useReadable<ZoomValue>(() => ctx.viewport.value?.zoom ?? null, 'fit-width')\n const scale = useReadable<number>(() => ctx.viewport.value?.scale ?? null, 1)\n return {\n zoom,\n scale,\n setZoom: (z: ZoomValue) => ctx.viewport.value?.setZoom(z),\n zoomIn: () => ctx.viewport.value?.zoomBy(1.25),\n zoomOut: () => ctx.viewport.value?.zoomBy(0.8),\n }\n}\n"],"mappings":";;;AAKA,SAAgBA,IAAU;CACxB,IAAMC,IAAMC,EAAc,WAAW;CAGrC,OAAO;EACL,MAHWC,QAA6BF,EAAI,SAAS,OAAO,QAAQ,MAAM,WAG1E;EACA,OAHYE,QAA0BF,EAAI,SAAS,OAAO,SAAS,MAAM,CAGzE;EACA,UAAU,MAAiBA,EAAI,SAAS,OAAO,QAAQG,CAAC;EACxD,cAAcH,EAAI,SAAS,OAAO,OAAO,IAAI;EAC7C,eAAeA,EAAI,SAAS,OAAO,OAAO,EAAG;CAC/C;AACF"}
@@ -0,0 +1,7 @@
1
+ import e from "./DefaultToolbar.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/compositions/DefaultToolbar.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
6
+
7
+ //# sourceMappingURL=DefaultToolbar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultToolbar.js","names":["_sfc_main","DefaultToolbar_vue_vue_type_script_setup_true_lang_default","DefaultToolbar_default"],"sources":["../../src/compositions/DefaultToolbar.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/*\n * The standard toolbar: tools, zoom and page controls with icons. It adds no styles of its\n * own; the theme styles the `data-ink-*` hooks. Extra controls go in the default slot.\n */\nimport {\n Hand,\n Highlighter,\n MessageSquare,\n MousePointer2,\n Square,\n ZoomIn,\n ZoomOut,\n} from '@lucide/vue'\n\nimport InkPageCount from '../components/InkPageCount.vue'\nimport InkPageInput from '../components/InkPageInput.vue'\nimport InkToolbar from '../components/InkToolbar.vue'\nimport InkToolButton from '../components/InkToolButton.vue'\nimport InkZoomIn from '../components/InkZoomIn.vue'\nimport InkZoomOut from '../components/InkZoomOut.vue'\nimport InkZoomSelect from '../components/InkZoomSelect.vue'\n\nwithDefaults(defineProps<{ label?: string }>(), { label: 'Document tools' })\n\nconst ICON = 18\n</script>\n\n<template>\n <InkToolbar :label=\"label\" class=\"ink-default-toolbar\" data-ink-default-toolbar>\n <div\n class=\"ink-toolbar-group\"\n data-ink-toolbar-group=\"tools\"\n role=\"group\"\n aria-label=\"Tools\"\n >\n <InkToolButton tool=\"view\"><Hand :size=\"ICON\" aria-hidden=\"true\" /></InkToolButton>\n <InkToolButton tool=\"select\">\n <MousePointer2 :size=\"ICON\" aria-hidden=\"true\" />\n </InkToolButton>\n <InkToolButton tool=\"highlight\">\n <Highlighter :size=\"ICON\" aria-hidden=\"true\" />\n </InkToolButton>\n <InkToolButton tool=\"redact-area\">\n <Square :size=\"ICON\" aria-hidden=\"true\" />\n </InkToolButton>\n <InkToolButton tool=\"note\">\n <MessageSquare :size=\"ICON\" aria-hidden=\"true\" />\n </InkToolButton>\n </div>\n <div\n class=\"ink-toolbar-group\"\n data-ink-toolbar-group=\"zoom\"\n role=\"group\"\n aria-label=\"Zoom\"\n >\n <InkZoomOut><ZoomOut :size=\"ICON\" aria-hidden=\"true\" /></InkZoomOut>\n <InkZoomSelect />\n <InkZoomIn><ZoomIn :size=\"ICON\" aria-hidden=\"true\" /></InkZoomIn>\n </div>\n <div\n class=\"ink-toolbar-group\"\n data-ink-toolbar-group=\"page\"\n role=\"group\"\n aria-label=\"Page\"\n >\n <InkPageInput />\n <InkPageCount />\n </div>\n <slot />\n </InkToolbar>\n</template>\n"],"mappings":""}
@@ -0,0 +1,19 @@
1
+ type __VLS_Props = {
2
+ label?: string;
3
+ };
4
+ declare var __VLS_99: {};
5
+ type __VLS_Slots = {} & {
6
+ default?: (props: typeof __VLS_99) => any;
7
+ };
8
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
9
+ label: string;
10
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
11
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
14
+ type __VLS_WithSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
19
+ //# sourceMappingURL=DefaultToolbar.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultToolbar.vue.d.ts","sourceRoot":"","sources":["../../src/compositions/DefaultToolbar.vue"],"names":[],"mappings":"AAiGA,KAAK,WAAW,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAwPtC,QAAA,IAAI,QAAQ,IAAY,CAAC;AACzB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAGhD,QAAA,MAAM,UAAU;;6EAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -0,0 +1,100 @@
1
+ import e from "../components/InkToolbar.js";
2
+ import t from "../components/InkToolButton.js";
3
+ import n from "../components/InkZoomIn.js";
4
+ import r from "../components/InkZoomOut.js";
5
+ import i from "../components/InkZoomSelect.js";
6
+ import a from "../components/InkPageInput.js";
7
+ import o from "../components/InkPageCount.js";
8
+ import { createBlock as s, createElementVNode as c, createVNode as l, defineComponent as u, openBlock as d, renderSlot as f, unref as p, withCtx as m } from "vue";
9
+ import { Hand as h, Highlighter as g, MessageSquare as _, MousePointer2 as v, Square as y, ZoomIn as b, ZoomOut as x } from "@lucide/vue";
10
+ //#region src/compositions/DefaultToolbar.vue?vue&type=script&setup=true&lang.ts
11
+ var S = {
12
+ class: "ink-toolbar-group",
13
+ "data-ink-toolbar-group": "tools",
14
+ role: "group",
15
+ "aria-label": "Tools"
16
+ }, C = {
17
+ class: "ink-toolbar-group",
18
+ "data-ink-toolbar-group": "zoom",
19
+ role: "group",
20
+ "aria-label": "Zoom"
21
+ }, w = {
22
+ class: "ink-toolbar-group",
23
+ "data-ink-toolbar-group": "page",
24
+ role: "group",
25
+ "aria-label": "Page"
26
+ }, T = 18, E = /*@__PURE__*/ u({
27
+ __name: "DefaultToolbar",
28
+ props: { label: { default: "Document tools" } },
29
+ setup(u) {
30
+ return (E, D) => (d(), s(e, {
31
+ label: u.label,
32
+ class: "ink-default-toolbar",
33
+ "data-ink-default-toolbar": ""
34
+ }, {
35
+ default: m(() => [
36
+ c("div", S, [
37
+ l(t, { tool: "view" }, {
38
+ default: m(() => [l(p(h), {
39
+ size: T,
40
+ "aria-hidden": "true"
41
+ })]),
42
+ _: 1
43
+ }),
44
+ l(t, { tool: "select" }, {
45
+ default: m(() => [l(p(v), {
46
+ size: T,
47
+ "aria-hidden": "true"
48
+ })]),
49
+ _: 1
50
+ }),
51
+ l(t, { tool: "highlight" }, {
52
+ default: m(() => [l(p(g), {
53
+ size: T,
54
+ "aria-hidden": "true"
55
+ })]),
56
+ _: 1
57
+ }),
58
+ l(t, { tool: "redact-area" }, {
59
+ default: m(() => [l(p(y), {
60
+ size: T,
61
+ "aria-hidden": "true"
62
+ })]),
63
+ _: 1
64
+ }),
65
+ l(t, { tool: "note" }, {
66
+ default: m(() => [l(p(_), {
67
+ size: T,
68
+ "aria-hidden": "true"
69
+ })]),
70
+ _: 1
71
+ })
72
+ ]),
73
+ c("div", C, [
74
+ l(r, null, {
75
+ default: m(() => [l(p(x), {
76
+ size: T,
77
+ "aria-hidden": "true"
78
+ })]),
79
+ _: 1
80
+ }),
81
+ l(i),
82
+ l(n, null, {
83
+ default: m(() => [l(p(b), {
84
+ size: T,
85
+ "aria-hidden": "true"
86
+ })]),
87
+ _: 1
88
+ })
89
+ ]),
90
+ c("div", w, [l(a), l(o)]),
91
+ f(E.$slots, "default")
92
+ ]),
93
+ _: 3
94
+ }, 8, ["label"]));
95
+ }
96
+ });
97
+ //#endregion
98
+ export { E as default };
99
+
100
+ //# sourceMappingURL=DefaultToolbar.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultToolbar.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","InkToolbar","_withCtx","_createElementVNode","_createVNode","InkToolButton","_unref","InkZoomOut","InkZoomSelect","InkZoomIn","InkPageInput","InkPageCount","_renderSlot","InkToolbar_default","InkToolButton_default","InkZoomIn_default","InkZoomOut_default","InkZoomSelect_default","InkPageInput_default","InkPageCount_default","_hoisted_1","_hoisted_2","_hoisted_3","ICON","DefaultToolbar_vue_vue_type_script_setup_true_lang_default","openBlock","createBlock","__props","withCtx","createElementVNode","createVNode","unref","Hand","MousePointer2","Highlighter","Square","MessageSquare","ZoomOut","ZoomIn","renderSlot","_ctx"],"sources":["../../src/compositions/DefaultToolbar.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/*\n * The standard toolbar: tools, zoom and page controls with icons. It adds no styles of its\n * own; the theme styles the `data-ink-*` hooks. Extra controls go in the default slot.\n */\nimport {\n Hand,\n Highlighter,\n MessageSquare,\n MousePointer2,\n Square,\n ZoomIn,\n ZoomOut,\n} from '@lucide/vue'\n\nimport InkPageCount from '../components/InkPageCount.vue'\nimport InkPageInput from '../components/InkPageInput.vue'\nimport InkToolbar from '../components/InkToolbar.vue'\nimport InkToolButton from '../components/InkToolButton.vue'\nimport InkZoomIn from '../components/InkZoomIn.vue'\nimport InkZoomOut from '../components/InkZoomOut.vue'\nimport InkZoomSelect from '../components/InkZoomSelect.vue'\n\nwithDefaults(defineProps<{ label?: string }>(), { label: 'Document tools' })\n\nconst ICON = 18\n</script>\n\n<template>\n <InkToolbar :label=\"label\" class=\"ink-default-toolbar\" data-ink-default-toolbar>\n <div\n class=\"ink-toolbar-group\"\n data-ink-toolbar-group=\"tools\"\n role=\"group\"\n aria-label=\"Tools\"\n >\n <InkToolButton tool=\"view\"><Hand :size=\"ICON\" aria-hidden=\"true\" /></InkToolButton>\n <InkToolButton tool=\"select\">\n <MousePointer2 :size=\"ICON\" aria-hidden=\"true\" />\n </InkToolButton>\n <InkToolButton tool=\"highlight\">\n <Highlighter :size=\"ICON\" aria-hidden=\"true\" />\n </InkToolButton>\n <InkToolButton tool=\"redact-area\">\n <Square :size=\"ICON\" aria-hidden=\"true\" />\n </InkToolButton>\n <InkToolButton tool=\"note\">\n <MessageSquare :size=\"ICON\" aria-hidden=\"true\" />\n </InkToolButton>\n </div>\n <div\n class=\"ink-toolbar-group\"\n data-ink-toolbar-group=\"zoom\"\n role=\"group\"\n aria-label=\"Zoom\"\n >\n <InkZoomOut><ZoomOut :size=\"ICON\" aria-hidden=\"true\" /></InkZoomOut>\n <InkZoomSelect />\n <InkZoomIn><ZoomIn :size=\"ICON\" aria-hidden=\"true\" /></InkZoomIn>\n </div>\n <div\n class=\"ink-toolbar-group\"\n data-ink-toolbar-group=\"page\"\n role=\"group\"\n aria-label=\"Page\"\n >\n <InkPageInput />\n <InkPageCount />\n </div>\n <slot />\n </InkToolbar>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;GAyBMwB,IAAO;;;;oBAIXxB,EAAA,GAAAC,EAyCaC,GAAA;GAzCA,OAAO0B,EAAA;GAAO,OAAM;GAAsB,4BAAA;;GACrD,SAAAzB,QAmBM;IAnBNC,EAmBM,OAnBNiB,GAmBM;KAbJhB,EAAmFC,GAAA,EAApE,MAAK,OAAM,GAAA;MAAC,SAAAH,QAAwC,CAAxCE,EAAwCE,EAAA0B,CAAA,GAAA;OAAjC,MAAMT;OAAM,eAAY;;;;KAC1DnB,EAEgBC,GAAA,EAFD,MAAK,SAAQ,GAAA;MAC1B,SAAAH,QAAiD,CAAjDE,EAAiDE,EAAA2B,CAAA,GAAA;OAAjC,MAAMV;OAAM,eAAY;;;;KAE1CnB,EAEgBC,GAAA,EAFD,MAAK,YAAW,GAAA;MAC7B,SAAAH,QAA+C,CAA/CE,EAA+CE,EAAA4B,CAAA,GAAA;OAAjC,MAAMX;OAAM,eAAY;;;;KAExCnB,EAEgBC,GAAA,EAFD,MAAK,cAAa,GAAA;MAC/B,SAAAH,QAA0C,CAA1CE,EAA0CE,EAAA6B,CAAA,GAAA;OAAjC,MAAMZ;OAAM,eAAY;;;;KAEnCnB,EAEgBC,GAAA,EAFD,MAAK,OAAM,GAAA;MACxB,SAAAH,QAAiD,CAAjDE,EAAiDE,EAAA8B,CAAA,GAAA;OAAjC,MAAMb;OAAM,eAAY;;;;;IAG5CpB,EASM,OATNkB,GASM;KAHJjB,EAAoEG,GAAA,MAAA;MAAxD,SAAAL,QAA2C,CAA3CE,EAA2CE,EAAA+B,CAAA,GAAA;OAAjC,MAAMd;OAAM,eAAY;;;;KAC9CnB,EAAiBI,CAAA;KACjBJ,EAAiEK,GAAA,MAAA;MAAtD,SAAAP,QAA0C,CAA1CE,EAA0CE,EAAAgC,CAAA,GAAA;OAAjC,MAAMf;OAAM,eAAY;;;;;IAE9CpB,EAQM,OARNmB,GAQM,CAFJlB,EAAgBM,CAAA,GAChBN,EAAgBO,CAAA,CAAA,CAAA;IAElBC,EAAQ4B,EAAA,QAAA,SAAA"}
@@ -0,0 +1,50 @@
1
+ import { Annotation, InkDocument, InkStatus, PdfAssets } from '@inkbar/core';
2
+ import { ToolController, ToolId, Viewport, ZoomValue } from '@inkbar/core/dom';
3
+ import { Ref, ShallowRef } from 'vue';
4
+ export type { InkStatus };
5
+ /** Undo and redo for the current document, whichever mode its annotations are in. */
6
+ export interface InkHistory {
7
+ canUndo: Readonly<Ref<boolean>>;
8
+ canRedo: Readonly<Ref<boolean>>;
9
+ undo: () => void;
10
+ redo: () => void;
11
+ clear: () => void;
12
+ /**
13
+ * Runs `fn` and records what it changes as one undo step. The host still receives one change
14
+ * per add. Controlled, the history groups the resulting list changes into one step, and
15
+ * `canUndo` updates once the current task ends. Any other change the host applies in that
16
+ * same window joins the step.
17
+ */
18
+ batch: (fn: () => void) => void;
19
+ }
20
+ export interface InkContext {
21
+ assets: Readonly<Ref<PdfAssets>>;
22
+ document: Readonly<ShallowRef<InkDocument | null>>;
23
+ /** `loading` from the moment a document starts opening, then the document's own status. */
24
+ status: Readonly<Ref<InkStatus>>;
25
+ annotations: Readonly<Ref<readonly Annotation[]>>;
26
+ selection: Readonly<Ref<readonly string[]>>;
27
+ /** Set by InkViewport once it has mounted its viewport and tool controller. */
28
+ viewport: ShallowRef<Viewport | null>;
29
+ tools: ShallowRef<ToolController | null>;
30
+ /** Desired tool; InkViewport applies it to the controller. */
31
+ tool: Readonly<Ref<ToolId>>;
32
+ setTool(id: ToolId): void;
33
+ /** Desired zoom and page from the host's v-models; InkViewport applies and reports back. */
34
+ zoomModel: Readonly<Ref<ZoomValue | undefined>>;
35
+ pageModel: Readonly<Ref<number | undefined>>;
36
+ reportZoom(z: ZoomValue): void;
37
+ reportPage(p: number): void;
38
+ /** Last activated annotation (Enter, click with the note tool, etc.). Popovers key off this. */
39
+ activated: Readonly<Ref<string | null>>;
40
+ setActivated(id: string | null): void;
41
+ history: InkHistory;
42
+ rootEl: Readonly<Ref<HTMLElement | null>>;
43
+ }
44
+ export declare const injectInkContext: <T extends InkContext | null | undefined = InkContext>(fallback?: T | undefined) => T extends null ? InkContext | null : InkContext, provideInkContext: (contextValue: InkContext) => InkContext;
45
+ /**
46
+ * The context for composables: throws a readable error when called outside a component
47
+ * rendered inside `InkRoot`, instead of Vue's injection warning.
48
+ */
49
+ export declare function useInkContext(consumer: string): InkContext;
50
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACjF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACnF,OAAO,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAE1C,YAAY,EAAE,SAAS,EAAE,CAAA;AAEzB,qFAAqF;AACrF,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAA;IAC/B,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAA;IAC/B,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB;;;;;OAKG;IACH,KAAK,EAAE,CAAC,EAAE,EAAE,MAAM,IAAI,KAAK,IAAI,CAAA;CAChC;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAA;IAChC,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC,CAAA;IAClD,2FAA2F;IAC3F,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAA;IAChC,WAAW,EAAE,QAAQ,CAAC,GAAG,CAAC,SAAS,UAAU,EAAE,CAAC,CAAC,CAAA;IACjD,SAAS,EAAE,QAAQ,CAAC,GAAG,CAAC,SAAS,MAAM,EAAE,CAAC,CAAC,CAAA;IAC3C,+EAA+E;IAC/E,QAAQ,EAAE,UAAU,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAA;IACrC,KAAK,EAAE,UAAU,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IACxC,8DAA8D;IAC9D,IAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;IAC3B,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,4FAA4F;IAC5F,SAAS,EAAE,QAAQ,CAAC,GAAG,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC,CAAA;IAC/C,SAAS,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC,CAAA;IAC5C,UAAU,CAAC,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;IAC9B,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,gGAAgG;IAChG,SAAS,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAA;IACvC,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;IACrC,OAAO,EAAE,UAAU,CAAA;IACnB,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC,CAAA;CAC1C;AAED,eAAO,MAAO,gBAAgB,uIAAE,iBAAiB,0CAAwC,CAAA;AAEzF;;;GAGG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAO1D"}
@@ -0,0 +1,13 @@
1
+ import { getCurrentInstance as e } from "vue";
2
+ import { createContext as t } from "reka-ui";
3
+ //#region src/context.ts
4
+ var [n, r] = t("InkRoot");
5
+ function i(t) {
6
+ let r = e() ? n(null) : null;
7
+ if (!r) throw Error(`[inkbar] ${t} must be called in a component inside <InkRoot>.`);
8
+ return r;
9
+ }
10
+ //#endregion
11
+ export { n as injectInkContext, r as provideInkContext, i as useInkContext };
12
+
13
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","names":["injectInkContext","provideInkContext","createContext","useInkContext","ctx","getCurrentInstance","consumer"],"sources":["../src/context.ts"],"sourcesContent":["import { createContext } from 'reka-ui'\nimport { getCurrentInstance } from 'vue'\n\nimport type { Annotation, InkDocument, InkStatus, PdfAssets } from '@inkbar/core'\nimport type { ToolController, ToolId, Viewport, ZoomValue } from '@inkbar/core/dom'\nimport type { Ref, ShallowRef } from 'vue'\n\nexport type { InkStatus }\n\n/** Undo and redo for the current document, whichever mode its annotations are in. */\nexport interface InkHistory {\n canUndo: Readonly<Ref<boolean>>\n canRedo: Readonly<Ref<boolean>>\n undo: () => void\n redo: () => void\n clear: () => void\n /**\n * Runs `fn` and records what it changes as one undo step. The host still receives one change\n * per add. Controlled, the history groups the resulting list changes into one step, and\n * `canUndo` updates once the current task ends. Any other change the host applies in that\n * same window joins the step.\n */\n batch: (fn: () => void) => void\n}\n\nexport interface InkContext {\n assets: Readonly<Ref<PdfAssets>>\n document: Readonly<ShallowRef<InkDocument | null>>\n /** `loading` from the moment a document starts opening, then the document's own status. */\n status: Readonly<Ref<InkStatus>>\n annotations: Readonly<Ref<readonly Annotation[]>>\n selection: Readonly<Ref<readonly string[]>>\n /** Set by InkViewport once it has mounted its viewport and tool controller. */\n viewport: ShallowRef<Viewport | null>\n tools: ShallowRef<ToolController | null>\n /** Desired tool; InkViewport applies it to the controller. */\n tool: Readonly<Ref<ToolId>>\n setTool(id: ToolId): void\n /** Desired zoom and page from the host's v-models; InkViewport applies and reports back. */\n zoomModel: Readonly<Ref<ZoomValue | undefined>>\n pageModel: Readonly<Ref<number | undefined>>\n reportZoom(z: ZoomValue): void\n reportPage(p: number): void\n /** Last activated annotation (Enter, click with the note tool, etc.). Popovers key off this. */\n activated: Readonly<Ref<string | null>>\n setActivated(id: string | null): void\n history: InkHistory\n rootEl: Readonly<Ref<HTMLElement | null>>\n}\n\nexport const [injectInkContext, provideInkContext] = createContext<InkContext>('InkRoot')\n\n/**\n * The context for composables: throws a readable error when called outside a component\n * rendered inside `InkRoot`, instead of Vue's injection warning.\n */\nexport function useInkContext(consumer: string): InkContext {\n const ctx = getCurrentInstance() ? injectInkContext(null) : null\n if (!ctx)\n throw new Error(\n `[inkbar] ${consumer} must be called in a component inside <InkRoot>.`\n )\n return ctx\n}\n"],"mappings":";;;AAkDA,IAAa,CAACA,GAAkBC,KAAqBC,EAA0B,SAAS;AAMxF,SAAgBC,EAAc,GAA8B;CAC1D,IAAMC,IAAMC,EAAmB,IAAIL,EAAiB,IAAI,IAAI;CAC5D,IAAI,CAACI,GACH,MAAU,MACR,YAAYE,EAAS,iDACvB;CACF,OAAOF;AACT"}
@@ -0,0 +1,29 @@
1
+ export { default as InkRoot } from './components/InkRoot.vue';
2
+ export { injectInkContext } from './context';
3
+ export type { InkContext, InkHistory, InkStatus } from './context';
4
+ export { useReadable } from './use-readable';
5
+ export { useDocument } from './composables/useDocument';
6
+ export { useAnnotations } from './composables/useAnnotations';
7
+ export { useTool } from './composables/useTool';
8
+ export { useSelection } from './composables/useSelection';
9
+ export { useZoom } from './composables/useZoom';
10
+ export { usePage } from './composables/usePage';
11
+ export { useHistory } from './composables/useHistory';
12
+ export { useEmbedded } from './composables/useEmbedded';
13
+ export { default as InkViewport } from './components/InkViewport.vue';
14
+ export { default as InkPage } from './components/InkPage.vue';
15
+ export { default as InkAnnotation } from './components/InkAnnotation.vue';
16
+ export type { AnnotationSlotProps, AnnotationState } from './components/annotation-slot';
17
+ export { default as InkToolbar } from './components/InkToolbar.vue';
18
+ export { default as InkToolButton } from './components/InkToolButton.vue';
19
+ export { default as InkZoomIn } from './components/InkZoomIn.vue';
20
+ export { default as InkZoomOut } from './components/InkZoomOut.vue';
21
+ export { default as InkZoomSelect } from './components/InkZoomSelect.vue';
22
+ export { default as InkPageInput } from './components/InkPageInput.vue';
23
+ export { default as InkPageCount } from './components/InkPageCount.vue';
24
+ export { default as InkNotePopover } from './components/InkNotePopover.vue';
25
+ export type { NotePopoverSlotProps } from './components/InkNotePopover.vue';
26
+ export { default as InkSuggestionCard } from './components/InkSuggestionCard.vue';
27
+ export type { ConfidenceBucket, SuggestionCardSlotProps, } from './components/InkSuggestionCard.vue';
28
+ export { default as DefaultToolbar } from './compositions/DefaultToolbar.vue';
29
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAC5C,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,8BAA8B,CAAA;AACrE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,gCAAgC,CAAA;AACzE,YAAY,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AACxF,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,gCAAgC,CAAA;AACzE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,4BAA4B,CAAA;AACjE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,gCAAgC,CAAA;AACzE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACvE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACvE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAC3E,YAAY,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,oCAAoC,CAAA;AACjF,YAAY,EACV,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,25 @@
1
+ import { injectInkContext as e } from "./context.js";
2
+ import { useReadable as t } from "./use-readable.js";
3
+ import n from "./components/InkRoot.js";
4
+ import { useDocument as r } from "./composables/useDocument.js";
5
+ import { useAnnotations as i } from "./composables/useAnnotations.js";
6
+ import { useTool as a } from "./composables/useTool.js";
7
+ import { useSelection as o } from "./composables/useSelection.js";
8
+ import { useZoom as s } from "./composables/useZoom.js";
9
+ import { usePage as c } from "./composables/usePage.js";
10
+ import { useHistory as l } from "./composables/useHistory.js";
11
+ import { useEmbedded as u } from "./composables/useEmbedded.js";
12
+ import d from "./components/InkAnnotation.js";
13
+ import f from "./components/InkPage.js";
14
+ import p from "./components/InkViewport.js";
15
+ import m from "./components/InkToolbar.js";
16
+ import h from "./components/InkToolButton.js";
17
+ import g from "./components/InkZoomIn.js";
18
+ import _ from "./components/InkZoomOut.js";
19
+ import v from "./components/InkZoomSelect.js";
20
+ import y from "./components/InkPageInput.js";
21
+ import b from "./components/InkPageCount.js";
22
+ import x from "./components/InkNotePopover.js";
23
+ import S from "./components/InkSuggestionCard.js";
24
+ import C from "./compositions/DefaultToolbar.js";
25
+ export { C as DefaultToolbar, d as InkAnnotation, x as InkNotePopover, f as InkPage, b as InkPageCount, y as InkPageInput, n as InkRoot, S as InkSuggestionCard, h as InkToolButton, m as InkToolbar, p as InkViewport, g as InkZoomIn, _ as InkZoomOut, v as InkZoomSelect, e as injectInkContext, i as useAnnotations, r as useDocument, u as useEmbedded, l as useHistory, c as usePage, t as useReadable, o as useSelection, a as useTool, s as useZoom };
@@ -0,0 +1,18 @@
1
+ import { Ref } from 'vue';
2
+ import { InkHistory } from './context';
3
+ import { Annotation } from '@inkbar/core';
4
+ export interface RefHistoryOptions {
5
+ /** The host's list (the `annotations` v-model). Undefined when the host does not control it. */
6
+ source: () => readonly Annotation[] | undefined;
7
+ /** Proposes a list to the host; the step only counts once the host applies it. */
8
+ apply: (list: Annotation[]) => void;
9
+ enabled: Readonly<Ref<boolean>>;
10
+ limit?: number;
11
+ }
12
+ /**
13
+ * Snapshot undo and redo over a host-owned annotation list, for controlled hosts. The stacks
14
+ * live in core's `createSnapshotHistory`; this wrapper feeds it from a watch on the host's list
15
+ * and exposes refs.
16
+ */
17
+ export declare function createRefHistory(opts: RefHistoryOptions): InkHistory;
18
+ //# sourceMappingURL=ref-history.d.ts.map