kviewer 0.2.1 → 0.2.3

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 (111) hide show
  1. package/README.md +19 -0
  2. package/dist/module.d.mts +8 -1
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +25 -3
  5. package/dist/runtime/annotation/engine/canvas-resolution.d.ts +7 -0
  6. package/dist/runtime/annotation/engine/canvas-resolution.js +21 -0
  7. package/dist/runtime/annotation/engine/editor/editor.d.ts +7 -2
  8. package/dist/runtime/annotation/engine/editor/editor.js +14 -0
  9. package/dist/runtime/annotation/engine/editor/selector.d.ts +13 -1
  10. package/dist/runtime/annotation/engine/editor/selector.js +60 -8
  11. package/dist/runtime/annotation/engine/import-normalize.js +3 -3
  12. package/dist/runtime/annotation/engine/painter.d.ts +33 -2
  13. package/dist/runtime/annotation/engine/painter.js +88 -2
  14. package/dist/runtime/annotation/engine/store.js +3 -0
  15. package/dist/runtime/annotation/engine/tools/arrow.js +0 -1
  16. package/dist/runtime/annotation/engine/tools/circle.js +0 -2
  17. package/dist/runtime/annotation/engine/tools/free-highlight.js +0 -2
  18. package/dist/runtime/annotation/engine/tools/freehand.js +0 -2
  19. package/dist/runtime/annotation/engine/tools/rectangle.js +0 -2
  20. package/dist/runtime/annotation/engine/types.d.ts +9 -2
  21. package/dist/runtime/annotation/font-style.d.ts +15 -0
  22. package/dist/runtime/annotation/font-style.js +19 -0
  23. package/dist/runtime/annotation/parsers/extractCheckboxStyles.d.ts +8 -0
  24. package/dist/runtime/annotation/parsers/extractCheckboxStyles.js +24 -1
  25. package/dist/runtime/annotation/pdf-export/annotation-flags.d.ts +8 -0
  26. package/dist/runtime/annotation/pdf-export/annotation-flags.js +5 -0
  27. package/dist/runtime/annotation/pdf-export/export-form-fields.js +3 -1
  28. package/dist/runtime/annotation/pdf-export/export.js +17 -4
  29. package/dist/runtime/annotation/pdf-export/parse.d.ts +22 -1
  30. package/dist/runtime/annotation/pdf-export/parse.js +32 -2
  31. package/dist/runtime/annotation/pdf-export/parse_circle.js +5 -5
  32. package/dist/runtime/annotation/pdf-export/parse_freetext.js +33 -24
  33. package/dist/runtime/annotation/pdf-export/parse_highlight.js +5 -5
  34. package/dist/runtime/annotation/pdf-export/parse_ink.js +7 -6
  35. package/dist/runtime/annotation/pdf-export/parse_line.js +7 -6
  36. package/dist/runtime/annotation/pdf-export/parse_polyline.js +7 -6
  37. package/dist/runtime/annotation/pdf-export/parse_square.js +5 -5
  38. package/dist/runtime/annotation/pdf-export/parse_stamp.js +6 -7
  39. package/dist/runtime/annotation/pdf-export/parse_strikeout.js +5 -5
  40. package/dist/runtime/annotation/pdf-export/parse_text.js +5 -5
  41. package/dist/runtime/annotation/pdf-export/parse_underline.js +5 -5
  42. package/dist/runtime/annotation/pdf-export/unicode-font.d.ts +5 -0
  43. package/dist/runtime/annotation/pdf-export/unicode-font.js +31 -0
  44. package/dist/runtime/annotation/pdf-export/winansi.d.ts +17 -0
  45. package/dist/runtime/annotation/pdf-export/winansi.js +77 -0
  46. package/dist/runtime/annotation/pdf-import/decode_circle.js +0 -1
  47. package/dist/runtime/annotation/pdf-import/decode_ink.js +0 -1
  48. package/dist/runtime/annotation/pdf-import/decode_line.js +0 -1
  49. package/dist/runtime/annotation/pdf-import/decode_square.js +0 -1
  50. package/dist/runtime/annotation/pdf-import/extract_stamp_appearance.d.ts +12 -0
  51. package/dist/runtime/annotation/pdf-import/extract_stamp_appearance.js +17 -4
  52. package/dist/runtime/annotation/pdf-import/types.d.ts +2 -0
  53. package/dist/runtime/assets/fonts/LICENSE-LiberationSans +102 -0
  54. package/dist/runtime/assets/fonts/LiberationSans-Regular.ttf +0 -0
  55. package/dist/runtime/assets/kviewer.css +1 -1
  56. package/dist/runtime/components/AnnotationToolbar.vue +6 -4
  57. package/dist/runtime/components/PdfPage.d.vue.ts +16 -0
  58. package/dist/runtime/components/PdfPage.vue +170 -9
  59. package/dist/runtime/components/PdfPage.vue.d.ts +16 -0
  60. package/dist/runtime/components/PerfHud.d.vue.ts +3 -0
  61. package/dist/runtime/components/PerfHud.vue +97 -0
  62. package/dist/runtime/components/PerfHud.vue.d.ts +3 -0
  63. package/dist/runtime/components/ToolButton.vue +4 -1
  64. package/dist/runtime/components/Viewer.d.vue.ts +25 -2
  65. package/dist/runtime/components/Viewer.vue +174 -12
  66. package/dist/runtime/components/Viewer.vue.d.ts +25 -2
  67. package/dist/runtime/components/ViewerBar.d.vue.ts +21 -1
  68. package/dist/runtime/components/ViewerBar.vue +183 -101
  69. package/dist/runtime/components/ViewerBar.vue.d.ts +21 -1
  70. package/dist/runtime/components/ViewerTabs.d.vue.ts +10 -2
  71. package/dist/runtime/components/ViewerTabs.vue +13 -2
  72. package/dist/runtime/components/ViewerTabs.vue.d.ts +10 -2
  73. package/dist/runtime/components/form-fields/FormDropdown.vue +50 -19
  74. package/dist/runtime/components/form-fields/FormSignatureField.vue +4 -2
  75. package/dist/runtime/components/form-fields/FormTextField.vue +7 -18
  76. package/dist/runtime/components/modals/FreeTextModal.vue +6 -4
  77. package/dist/runtime/components/modals/SignatureDrawModal.vue +6 -4
  78. package/dist/runtime/components/panels/PlacedFieldSidebar.vue +67 -50
  79. package/dist/runtime/components/panels/SignaturePicker.vue +6 -4
  80. package/dist/runtime/components/panels/StampPicker.vue +3 -1
  81. package/dist/runtime/components/tools/AnnotationToolButton.d.vue.ts +10 -0
  82. package/dist/runtime/components/tools/AnnotationToolButton.vue +33 -0
  83. package/dist/runtime/components/tools/AnnotationToolButton.vue.d.ts +10 -0
  84. package/dist/runtime/components/tools/MarqueeTool.vue +3 -1
  85. package/dist/runtime/components/tools/PageSettings.vue +13 -11
  86. package/dist/runtime/components/tools/SearchTool.vue +12 -10
  87. package/dist/runtime/components/tools/ToolProperties.vue +7 -5
  88. package/dist/runtime/components/tools/ToolbarMenu.d.vue.ts +9 -0
  89. package/dist/runtime/components/tools/ToolbarMenu.vue +79 -0
  90. package/dist/runtime/components/tools/ToolbarMenu.vue.d.ts +9 -0
  91. package/dist/runtime/components/tools/ZoomControls.vue +17 -9
  92. package/dist/runtime/composables/canvas-limits.d.ts +22 -0
  93. package/dist/runtime/composables/canvas-limits.js +10 -0
  94. package/dist/runtime/composables/useAnnotationEngine.js +3 -1
  95. package/dist/runtime/composables/useFormFields.d.ts +6 -0
  96. package/dist/runtime/composables/useFormFields.js +28 -0
  97. package/dist/runtime/composables/useInertiaPanzoom.d.ts +10 -0
  98. package/dist/runtime/composables/useInertiaPanzoom.js +57 -10
  99. package/dist/runtime/composables/useKviewerI18n.d.ts +18 -0
  100. package/dist/runtime/composables/useKviewerI18n.js +29 -0
  101. package/dist/runtime/composables/useScriptingManager.d.ts +8 -4
  102. package/dist/runtime/composables/useScriptingManager.js +2 -0
  103. package/dist/runtime/composables/useViewerState.d.ts +4 -0
  104. package/dist/runtime/composables/useViewerState.js +8 -0
  105. package/dist/runtime/i18n/messages.d.ts +252 -0
  106. package/dist/runtime/i18n/messages.js +249 -0
  107. package/dist/runtime/public-types.d.ts +2 -0
  108. package/dist/runtime/toolbar-tools.d.ts +54 -0
  109. package/dist/runtime/toolbar-tools.js +79 -0
  110. package/dist/types.d.mts +1 -1
  111. package/package.json +14 -31
package/dist/types.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- export { type AddFormFieldPayload, type CheckboxStyle, type ExportPdfOptions, type FormFieldDefinition, type FormFieldOrigin, type FormFieldType, type FormFieldValue, type KVIEWER_EMBED_PROTOCOL_VERSION, type KViewerApi, type KViewerEmbedBridgeOptions, type KViewerEmbedClient, type KViewerEmbedClientOptions, type KViewerEmbedEventName, type KViewerEmbedEventPayloads, type KViewerEmbedMethodName, type SignatureData, type SignatureHandlers, type ViewMode, type ViewerMenuButtonItem, type ViewerMenuCheckboxItem, type ViewerMenuItem, type ViewerMenuSeparatorItem, type useKViewerEmbedBridge } from '../dist/runtime/public-types.js'
1
+ export { type ActiveTool, type AddFormFieldPayload, type CheckboxStyle, type ExportPdfOptions, type FormFieldDefinition, type FormFieldOrigin, type FormFieldType, type FormFieldValue, type KVIEWER_EMBED_PROTOCOL_VERSION, type KViewerApi, type KViewerEmbedBridgeOptions, type KViewerEmbedClient, type KViewerEmbedClientOptions, type KViewerEmbedEventName, type KViewerEmbedEventPayloads, type KViewerEmbedMethodName, type SignatureData, type SignatureHandlers, type ViewMode, type ViewerBottomToolId, type ViewerLayoutToolId, type ViewerMenuButtonItem, type ViewerMenuCheckboxItem, type ViewerMenuItem, type ViewerMenuSeparatorItem, type ViewerState, type ViewerToolEntry, type ViewerToolId, type ViewerToolSlot, type ViewerTopToolId, type useKViewerEmbedBridge } from '../dist/runtime/public-types.js'
2
2
 
3
3
  export { default } from './module.mjs'
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kviewer",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Kabema PDF Editor",
5
5
  "repository": "kabema/kviewer",
6
6
  "license": "MIT",
@@ -28,26 +28,14 @@
28
28
  "playground",
29
29
  "docs"
30
30
  ],
31
- "scripts": {
32
- "prepack": "nuxt-module-build build",
33
- "dev": "npm run dev:prepare && portless kviewer nuxt dev playground",
34
- "dev:build": "nuxt build playground",
35
- "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt prepare playground",
36
- "release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
37
- "lint": "eslint .",
38
- "test": "vitest run --exclude '**/e2e/**'",
39
- "test:watch": "vitest watch",
40
- "test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit",
41
- "test:e2e": "playwright test",
42
- "test:e2e:ui": "playwright test --ui"
43
- },
44
31
  "dependencies": {
45
32
  "@iconify-json/lucide": "^1.2.101",
46
33
  "@nuxt/kit": "^4.4.2",
47
34
  "@nuxt/ui": "^4.6.0",
35
+ "@pdf-lib/fontkit": "^1.1.1",
48
36
  "konva": "^10.2.3",
49
37
  "pdf-lib": "^1.17.1",
50
- "pdfjs-dist": "^5.6.205",
38
+ "pdfjs-dist": "^6.0.227",
51
39
  "tailwindcss": "^4.2.2"
52
40
  },
53
41
  "devDependencies": {
@@ -70,20 +58,15 @@
70
58
  "vitest": "^4.1.1",
71
59
  "vue-tsc": "^3.2.6"
72
60
  },
73
- "packageManager": "pnpm@10.33.0",
74
- "pnpm": {
75
- "onlyBuiltDependencies": [
76
- "canvas",
77
- "@parcel/watcher",
78
- "better-sqlite3",
79
- "esbuild",
80
- "sharp",
81
- "vue-demi",
82
- "unrs-resolver"
83
- ],
84
- "overrides": {
85
- "vue": "^3.5.32",
86
- "vue-router": "^5.0.4"
87
- }
61
+ "scripts": {
62
+ "dev": "npm run dev:prepare && portless kviewer nuxt dev playground",
63
+ "dev:build": "nuxt build playground",
64
+ "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt prepare playground",
65
+ "lint": "eslint .",
66
+ "test": "vitest run --exclude '**/e2e/**'",
67
+ "test:watch": "vitest watch",
68
+ "test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit",
69
+ "test:e2e": "playwright test",
70
+ "test:e2e:ui": "playwright test --ui"
88
71
  }
89
- }
72
+ }