@abyss-project/commons-front-core 10.1.0 → 11.0.0

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 (139) hide show
  1. package/README.md +319 -334
  2. package/catalog/catalog-entries.ts +0 -2
  3. package/catalog/pages/index.ts +0 -4
  4. package/dist/{AbyssCookieConsentProvider-DTHchhfw.js → AbyssCookieConsentProvider-C3NZfWxR.js} +1532 -2151
  5. package/dist/{CookieConsentSettings.component-D13TqxZl.js → CookieConsentSettings.component-Dvbp3MIX.js} +1 -1
  6. package/dist/cookie-consent.js +2 -2
  7. package/dist/{design-theme-BGMTwRaP.js → design-theme-sPEoMB7j.js} +12200 -9258
  8. package/dist/hooks/quota-dialog.store.d.ts +1 -1
  9. package/dist/hooks/use-rich-intl.hook.d.ts +44 -666
  10. package/dist/{index-BlhbGVkk.js → index-BVGdsnC4.js} +2 -2
  11. package/dist/{index-s2djh_x_.js → index-C2KrTHAO.js} +2 -2
  12. package/dist/{index-kfzQWNLP.js → index-C9FzqvHz.js} +2 -2
  13. package/dist/{index-B9pFhQQG.js → index-CB-jdY_E.js} +2 -2
  14. package/dist/{index-JEsamj6m.js → index-CCaW-38I.js} +2 -2
  15. package/dist/{index-BUqYHWKw.js → index-CKCWWoQb.js} +3 -3
  16. package/dist/{index-Dop3xXC3.js → index-CNcmCFNN.js} +1 -1
  17. package/dist/{index-40JUFFwY.js → index-CXwwKVPn.js} +3 -3
  18. package/dist/{index-CdL2MLmd.js → index-Cb-uMz_V.js} +3 -3
  19. package/dist/{index-tN8hz-IX.js → index-CrWjgIMV.js} +4 -4
  20. package/dist/{index-BFBonBC2.js → index-D9s128sK.js} +4 -4
  21. package/dist/{index-D0EC1_iy.js → index-DD25yrsQ.js} +4 -4
  22. package/dist/{index-Cccq9d1E.js → index-DEqCdX0Q.js} +2 -2
  23. package/dist/{index-BsOQZ-n8.js → index-DIpJhT2r.js} +2 -2
  24. package/dist/index-DPi7aKci.js +95942 -0
  25. package/dist/{index-oBWWShwb.js → index-Di1amUHq.js} +2 -2
  26. package/dist/{index-CM-90k5s.js → index-DtHUaGVU.js} +3 -3
  27. package/dist/{index-Dk1JTU4K.js → index-QNJIP2m4.js} +2 -2
  28. package/dist/{index-DqAkOKf8.js → index-Ut9uJwau.js} +2 -2
  29. package/dist/{index-D7AFc1sX.js → index-aYivWEyJ.js} +2 -2
  30. package/dist/{index-CBrydj4V.js → index-lE9lxmTc.js} +2 -2
  31. package/dist/{index-BcRgJqSB.js → index-whpnjq54.js} +2 -2
  32. package/dist/index.js +7900 -5669
  33. package/dist/legacy/components/PdfEditor/PdfEditor.d.ts +1 -1
  34. package/dist/legacy/components/PdfEditor/index.d.ts +2 -2
  35. package/dist/legacy/components/PdfEditor/signature/SignatureDrawCanvas.d.ts +1 -1
  36. package/dist/legacy/components/PdfEditor/signature/SignaturePicker.d.ts +1 -1
  37. package/dist/legacy/components/PdfEditor/signature/SignatureSaveButton.d.ts +1 -1
  38. package/dist/legacy/components/PdfEditor/signature/SignatureSavedList.d.ts +1 -1
  39. package/dist/legacy/components/PdfEditor/signature/SignatureUploadDropzone.d.ts +1 -1
  40. package/dist/legacy/components/PdfEditor/signature/resolve-asset.d.ts +1 -1
  41. package/dist/legacy/components/PdfEditor/tools/FillFieldsTool.d.ts +1 -1
  42. package/dist/legacy/components/PdfEditor/tools/ShapeTool.d.ts +1 -1
  43. package/dist/legacy/components/PdfEditor/tools/SignatureTool.d.ts +1 -1
  44. package/dist/legacy/components/PdfEditor/tools/TextTool.d.ts +1 -1
  45. package/dist/legacy/components/PdfEditor/tools/Toolbar.d.ts +1 -1
  46. package/dist/{components/editors/PdfEditor/engine → legacy/components/PdfEditor}/types.d.ts +1 -1
  47. package/dist/legacy/components/PdfEditor/viewer/InsertPagesButton.d.ts +1 -1
  48. package/dist/legacy/components/PdfEditor/viewer/PageOverlay.d.ts +1 -1
  49. package/dist/legacy/components/PdfEditor/viewer/PageSidebar.d.ts +2 -2
  50. package/dist/legacy/components/PdfEditor/viewer/PageThumbnail.d.ts +2 -2
  51. package/dist/legacy/components/PdfEditor/viewer/PdfCanvas.d.ts +1 -1
  52. package/dist/legacy.js +209 -26787
  53. package/dist/translations/en.d.ts +22 -333
  54. package/dist/translations/fr.d.ts +22 -333
  55. package/package.json +5 -12
  56. package/vite.config.ts +0 -4
  57. package/catalog/pages/MarkdownEditor.tsx +0 -48
  58. package/catalog/pages/PdfEditor.tsx +0 -153
  59. package/dist/AbyssCloud-IuD91X6C.js +0 -2949
  60. package/dist/Tabs-CZQ1JYlW.js +0 -2315
  61. package/dist/_commonjsHelpers-DaMA6jEr.js +0 -8
  62. package/dist/components/editors/MarkdownEditor/MarkdownEditor.d.ts +0 -19
  63. package/dist/components/editors/MarkdownEditor/MarkdownEditor.spec.d.ts +0 -1
  64. package/dist/components/editors/MarkdownEditor/crepe-labels.d.ts +0 -17
  65. package/dist/components/editors/MarkdownEditor/index.d.ts +0 -2
  66. package/dist/components/editors/MarkdownEditor/markdown-theme.d.ts +0 -7
  67. package/dist/components/editors/PdfEditor/PdfEditor.d.ts +0 -9
  68. package/dist/components/editors/PdfEditor/PdfEditor.spec.d.ts +0 -1
  69. package/dist/components/editors/PdfEditor/engine/open-pdf-document.d.ts +0 -8
  70. package/dist/components/editors/PdfEditor/index.d.ts +0 -3
  71. package/dist/components/editors/PdfEditor/pdf-colors.d.ts +0 -26
  72. package/dist/components/editors/PdfEditor/pdf-colors.spec.d.ts +0 -1
  73. package/dist/components/editors/PdfEditor/signature/SignatureDrawPad.d.ts +0 -15
  74. package/dist/components/editors/PdfEditor/signature/SignaturePicker.d.ts +0 -31
  75. package/dist/components/editors/PdfEditor/signature/SignaturePicker.spec.d.ts +0 -1
  76. package/dist/components/editors/PdfEditor/signature/SignatureSaveButton.d.ts +0 -14
  77. package/dist/components/editors/PdfEditor/signature/SignatureSavedList.d.ts +0 -19
  78. package/dist/components/editors/PdfEditor/signature/SignatureUploadPanel.d.ts +0 -14
  79. package/dist/components/editors/PdfEditor/signature/resolve-asset.d.ts +0 -19
  80. package/dist/components/editors/PdfEditor/signature/resolve-asset.spec.d.ts +0 -1
  81. package/dist/components/editors/PdfEditor/signature/test-support/pdf-editor-test-harness.d.ts +0 -28
  82. package/dist/components/editors/PdfEditor/toolbar/EraserIcon.d.ts +0 -3
  83. package/dist/components/editors/PdfEditor/toolbar/GroupPanel.d.ts +0 -17
  84. package/dist/components/editors/PdfEditor/toolbar/PanelRow.d.ts +0 -14
  85. package/dist/components/editors/PdfEditor/toolbar/PdfToolbar.d.ts +0 -65
  86. package/dist/components/editors/PdfEditor/toolbar/PdfToolbar.spec.d.ts +0 -1
  87. package/dist/components/editors/PdfEditor/toolbar/SavedAssets.d.ts +0 -24
  88. package/dist/components/editors/PdfEditor/toolbar/ToolGroupButton.d.ts +0 -20
  89. package/dist/components/editors/PdfEditor/toolbar/tool-groups.d.ts +0 -34
  90. package/dist/components/editors/PdfEditor/toolbar/tool-options/DrawOptions.d.ts +0 -6
  91. package/dist/components/editors/PdfEditor/toolbar/tool-options/FillFieldsOptions.d.ts +0 -13
  92. package/dist/components/editors/PdfEditor/toolbar/tool-options/HighlightOptions.d.ts +0 -6
  93. package/dist/components/editors/PdfEditor/toolbar/tool-options/RedactOptions.d.ts +0 -6
  94. package/dist/components/editors/PdfEditor/toolbar/tool-options/ShapeOptions.d.ts +0 -6
  95. package/dist/components/editors/PdfEditor/toolbar/tool-options/SignatureOptions.d.ts +0 -5
  96. package/dist/components/editors/PdfEditor/toolbar/tool-options/TextOptions.d.ts +0 -6
  97. package/dist/components/editors/PdfEditor/toolbar/tool-options/ToolOptions.d.ts +0 -14
  98. package/dist/components/editors/PdfEditor/toolbar/tool-options/swatches.d.ts +0 -2
  99. package/dist/components/editors/PdfEditor/toolbar/tool-settings.d.ts +0 -14
  100. package/dist/components/editors/PdfEditor/viewer/InsertPagesButton.d.ts +0 -14
  101. package/dist/components/editors/PdfEditor/viewer/InsertPagesButton.spec.d.ts +0 -1
  102. package/dist/components/editors/PdfEditor/viewer/InsertPagesDialog.d.ts +0 -28
  103. package/dist/components/editors/PdfEditor/viewer/PageOverlay.d.ts +0 -37
  104. package/dist/components/editors/PdfEditor/viewer/PageOverlay.spec.d.ts +0 -1
  105. package/dist/components/editors/PdfEditor/viewer/PageSidebar.d.ts +0 -16
  106. package/dist/components/editors/PdfEditor/viewer/PageSidebar.spec.d.ts +0 -1
  107. package/dist/components/editors/PdfEditor/viewer/PageThumbnail.d.ts +0 -16
  108. package/dist/components/editors/PdfEditor/viewer/PdfCanvas.d.ts +0 -26
  109. package/dist/components/editors/PdfEditor/viewer/PdfCanvas.spec.d.ts +0 -1
  110. package/dist/components/editors/PdfEditor/viewer/ViewerControls.d.ts +0 -21
  111. package/dist/components/editors/PdfEditor/viewer/ViewerControls.spec.d.ts +0 -1
  112. package/dist/components/editors/PdfEditor/viewer/test-support/viewer-test-harness.d.ts +0 -30
  113. package/dist/components/editors/editors-guard.spec.d.ts +0 -1
  114. package/dist/components/editors/index.d.ts +0 -2
  115. package/dist/editors.d.ts +0 -1
  116. package/dist/editors.js +0 -5151
  117. package/dist/sortable.esm-DM2HNEC7.js +0 -69322
  118. package/dist/translations/editors-i18n.spec.d.ts +0 -1
  119. /package/dist/{components/editors/PdfEditor/engine → legacy/components/PdfEditor}/hooks/use-acro-form-fields.d.ts +0 -0
  120. /package/dist/{components/editors/PdfEditor/engine → legacy/components/PdfEditor}/hooks/use-export.d.ts +0 -0
  121. /package/dist/{components/editors/PdfEditor/engine → legacy/components/PdfEditor}/hooks/use-page-order.d.ts +0 -0
  122. /package/dist/{components/editors/PdfEditor/engine → legacy/components/PdfEditor}/hooks/use-pdf-document.d.ts +0 -0
  123. /package/dist/{components/editors/PdfEditor/engine → legacy/components/PdfEditor}/hooks/use-undo-redo.d.ts +0 -0
  124. /package/dist/{components/editors/PdfEditor/engine → legacy/components/PdfEditor}/hooks/use-uploaded-docs.d.ts +0 -0
  125. /package/dist/{components/editors/PdfEditor/engine → legacy/components/PdfEditor}/operations/actions.d.ts +0 -0
  126. /package/dist/{components/editors/PdfEditor/engine → legacy/components/PdfEditor}/operations/apply.d.ts +0 -0
  127. /package/dist/{components/editors/PdfEditor/engine → legacy/components/PdfEditor}/operations/apply.spec.d.ts +0 -0
  128. /package/dist/{components/editors/PdfEditor/engine → legacy/components/PdfEditor}/operations/compute-page-order.d.ts +0 -0
  129. /package/dist/{components/editors/PdfEditor/engine → legacy/components/PdfEditor}/operations/compute-page-order.spec.d.ts +0 -0
  130. /package/dist/{components/editors/PdfEditor/engine → legacy/components/PdfEditor}/operations/extract.d.ts +0 -0
  131. /package/dist/{components/editors/PdfEditor/engine → legacy/components/PdfEditor}/operations/extract.spec.d.ts +0 -0
  132. /package/dist/{components/editors/PdfEditor/engine → legacy/components/PdfEditor}/operations/pdf-data-url.d.ts +0 -0
  133. /package/dist/{components/editors/PdfEditor/engine → legacy/components/PdfEditor}/operations/rasterize.d.ts +0 -0
  134. /package/dist/{components/editors/PdfEditor/engine → legacy/components/PdfEditor}/operations/redact.d.ts +0 -0
  135. /package/dist/{components/editors/PdfEditor/engine → legacy/components/PdfEditor}/operations/redact.spec.d.ts +0 -0
  136. /package/dist/{components/editors/PdfEditor/engine → legacy/components/PdfEditor}/operations/reducer.d.ts +0 -0
  137. /package/dist/{components/editors/PdfEditor/engine → legacy/components/PdfEditor}/operations/reducer.spec.d.ts +0 -0
  138. /package/dist/{components/editors/PdfEditor/engine → legacy/components/PdfEditor}/operations/rotate-coords.d.ts +0 -0
  139. /package/dist/{components/editors/PdfEditor/engine → legacy/components/PdfEditor}/operations/rotate-coords.spec.d.ts +0 -0
@@ -1,37 +0,0 @@
1
- import { default as React } from 'react';
2
- import { PdfOperation, ToolKind, EditorAction, ShapeKind, TextFontFamily } from '../engine/types';
3
- export interface PageOverlayProps {
4
- pageIndex: number;
5
- displayIndex: number;
6
- width: number;
7
- height: number;
8
- operations: PdfOperation[];
9
- activeTool: ToolKind;
10
- activePageIndex: number;
11
- pendingSignature: string | null;
12
- pendingText: string | null;
13
- pendingApplyAllPages: boolean;
14
- /** Live virtual page indices (pageOrder) — the targets for "apply to all pages". */
15
- pageIndices: number[];
16
- dispatch: React.Dispatch<EditorAction>;
17
- drawColor?: string;
18
- drawStrokeWidth?: number;
19
- /** New-text styling (existing text keeps its own values). */
20
- textColor?: string;
21
- textSize?: number;
22
- textFamily?: TextFontFamily;
23
- /** Active shape kind (rect/ellipse/line/arrow) when the shape tool is on. */
24
- shapeKind?: ShapeKind;
25
- /** Fill color for rect/ellipse shapes (hex), or null for outline only. */
26
- shapeFill?: string | null;
27
- /** Highlighter color (hex). */
28
- highlightColor?: string;
29
- /** Render scale (px per PDF point) — driven by the zoom control. */
30
- scale?: number;
31
- /** Total displayed rotation (page intrinsic /Rotate + user delta), clockwise.
32
- * Annotations are stored in unrotated content space; the overlay maps pointer
33
- * input back to content space and renders inside a rotated inner layer so the
34
- * preview matches the baked output. */
35
- rotation?: number;
36
- }
37
- export declare const PageOverlay: React.FC<PageOverlayProps>;
@@ -1,16 +0,0 @@
1
- import { default as React } from 'react';
2
- import { PDFDocumentProxy } from 'pdfjs-dist';
3
- import { PdfOperation, EditorAction, PdfEditorCloudImportProps } from '../engine/types';
4
- import { InsertedPageRef } from '../engine/operations/compute-page-order';
5
- /** Width of the sidebar in px; the host offsets the floating viewer controls by it. */
6
- export declare const PAGE_SIDEBAR_WIDTH = 220;
7
- export interface PageSidebarProps {
8
- pdfDoc: PDFDocumentProxy;
9
- operations: PdfOperation[];
10
- activePageIndex: number;
11
- uploadedDocs: Map<string, PDFDocumentProxy>;
12
- insertionTable: Map<number, InsertedPageRef>;
13
- dispatch: React.Dispatch<EditorAction>;
14
- cloudImport?: PdfEditorCloudImportProps;
15
- }
16
- export declare const PageSidebar: React.FC<PageSidebarProps>;
@@ -1,16 +0,0 @@
1
- import { default as React } from 'react';
2
- import { PDFDocumentProxy } from 'pdfjs-dist';
3
- import { EditorAction, PdfOperation } from '../engine/types';
4
- import { InsertedPageRef } from '../engine/operations/compute-page-order';
5
- export interface PageThumbnailProps {
6
- pdfDoc: PDFDocumentProxy;
7
- uploadedDocs: Map<string, PDFDocumentProxy>;
8
- virtualIndex: number;
9
- insertedRef: InsertedPageRef | undefined;
10
- displayIndex: number;
11
- isActive: boolean;
12
- rotation: number;
13
- operations: PdfOperation[];
14
- dispatch: React.Dispatch<EditorAction>;
15
- }
16
- export declare const PageThumbnail: React.FC<PageThumbnailProps>;
@@ -1,26 +0,0 @@
1
- import { default as React } from 'react';
2
- import { PDFDocumentProxy } from 'pdfjs-dist';
3
- import { InsertedPageRef } from '../engine/operations/compute-page-order';
4
- declare const RENDER_SCALE = 1.5;
5
- export { RENDER_SCALE };
6
- interface PdfCanvasProps {
7
- pdfDoc: PDFDocumentProxy;
8
- uploadedDocs: Map<string, PDFDocumentProxy>;
9
- insertionTable: Map<number, InsertedPageRef>;
10
- blankPages?: Map<number, {
11
- widthPt: number;
12
- heightPt: number;
13
- }>;
14
- rotationMap?: Map<number, number>;
15
- scale?: number;
16
- activePageIndex: number;
17
- pageOrder: number[];
18
- onPageDimensions?: (pageIndex: number, width: number, height: number, totalRotation: number, pointWidth: number) => void;
19
- /** Reports the display index of the page currently dominant in the viewport. */
20
- onVisiblePageChange?: (displayIndex: number) => void;
21
- children?: (virtualIndex: number, displayIndex: number) => React.ReactNode;
22
- }
23
- export interface PdfCanvasHandle {
24
- scrollToPage: (displayIndex: number) => void;
25
- }
26
- export declare const PdfCanvas: React.ForwardRefExoticComponent<PdfCanvasProps & React.RefAttributes<PdfCanvasHandle>>;
@@ -1,21 +0,0 @@
1
- import { default as React } from 'react';
2
- export interface ViewerControlsProps {
3
- /** Current zoom as a fraction of the base scale (1 = 100%). */
4
- zoom: number;
5
- onZoomIn: () => void;
6
- onZoomOut: () => void;
7
- onFitWidth: () => void;
8
- onResetZoom: () => void;
9
- canZoomIn: boolean;
10
- canZoomOut: boolean;
11
- currentPage: number;
12
- totalPages: number;
13
- onGoToPage: (index: number) => void;
14
- /** Narrow viewport: dock as a flush full-width bottom bar (no floating pills). */
15
- compact?: boolean;
16
- /** Width (px) of the inline page sidebar, so the floating pills center over the
17
- * PAGE region rather than the whole area (kept in sync with the placement banner). */
18
- sidebarWidth?: number;
19
- }
20
- /** The floating page navigation and zoom controls of the viewer. */
21
- export declare const ViewerControls: React.FC<ViewerControlsProps>;
@@ -1,30 +0,0 @@
1
- import { ReactElement } from 'react';
2
- import { RenderResult } from '@testing-library/react';
3
- import { Theme } from '@mui/material/styles';
4
- import { UserLanguage } from '@abyss-project/main';
5
- import { PDFDocumentProxy } from 'pdfjs-dist';
6
- import { EditorAction, PdfOperation } from '../../engine/types';
7
- import { ThemeMode } from '../../../../../theme';
8
- export interface ViewerRenderOptions {
9
- mode?: ThemeMode;
10
- width?: number;
11
- language?: UserLanguage;
12
- }
13
- export interface ViewerRenderResult extends RenderResult {
14
- theme: Theme;
15
- }
16
- /** Renders `ui` under the root theme, the messages of the language and the confirm-dialog host. */
17
- export declare const renderViewer: (ui: ReactElement, { mode, width, language, }?: ViewerRenderOptions) => ViewerRenderResult;
18
- /** The page width in points of every page of `fakePdfDoc`. */
19
- export declare const FAKE_PAGE_WIDTH_PT = 200;
20
- export declare const FAKE_PAGE_HEIGHT_PT = 300;
21
- /**
22
- * A pdf.js document double: `numPages` pages of 200 x 300 pt whose render resolves at once. The
23
- * viewer only reads `numPages` and `getPage`, so the double carries just those; the cast stands
24
- * for the rest of the pdf.js proxy.
25
- */
26
- export declare const fakePdfDoc: (numPages: number) => PDFDocumentProxy;
27
- /** jsdom has no 2D canvas: gives every canvas a context that accepts the calls the viewer makes. */
28
- export declare const stubCanvasContext: () => void;
29
- /** The operations a mocked `dispatch` was asked to append, in order. */
30
- export declare const addedOperations: (dispatch: (action: EditorAction) => void) => PdfOperation[];
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- export * from './MarkdownEditor';
2
- export * from './PdfEditor';
package/dist/editors.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './components/editors';