calmlens 0.20.0 → 0.22.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 (110) hide show
  1. package/README.md +15 -10
  2. package/bin/calmlens.js +1848 -679
  3. package/cjs/{BrowserUpload-C07aL9Vq.d.ts → BrowserUpload-BWjZ9ntu.d.ts} +2 -2
  4. package/cjs/{BrowserUpload-CjSHjx3C.js → BrowserUpload-Bwlib4Zc.js} +1 -1
  5. package/cjs/{CalmLensAppClient-DDLojj0P.d.ts → CalmLensAppClient-BaW3ddUR.d.ts} +13 -3
  6. package/cjs/{CalmLensAppClient-NaCxOVlM.js → CalmLensAppClient-DUYMo9PZ.js} +30 -10
  7. package/cjs/{CalmLensOptionKeys-p2QK687A.js → CalmLensOptionKeys-YvgV995V.js} +318 -374
  8. package/cjs/{CalmLensServerClient-BDzTthxE.js → CalmLensServerClient-3N-gdsxC.js} +346 -89
  9. package/cjs/CalmLensServerClient-BKzn8zmp.d.ts +353 -0
  10. package/cjs/{CalmLensTypes-COJbOuiv.d.ts → CalmLensTypes-BDKwThbO.d.ts} +26993 -27187
  11. package/cjs/{Classification-D3SkprrQ-CMnQKW13.d.ts → Classification-Q5zGpR8l-CEWjnE39.d.ts} +731 -607
  12. package/cjs/Core-C33pkBmf.d.ts +826 -0
  13. package/cjs/Core-Cm5Z1oJ9.js +1001 -0
  14. package/cjs/FileIcons-4qSX7DW2.d.ts +67 -0
  15. package/cjs/{ModerationContextLimits-2nIv7Zh3.js → ModerationContextLimits-ud1xpZRK.js} +727 -268
  16. package/cjs/{ReactUpload-BdTRCTGA.js → ReactUpload-DQ0BYISX.js} +1 -1
  17. package/cjs/{ReactUpload-CRJNPB5T.d.ts → ReactUpload-DhF8mm51.d.ts} +1 -1
  18. package/{esm/TestTriggers-D-fwfhEP-hlaP1oW2.d.ts → cjs/TestTriggers-D0pYHbkr-D5T0VdSn.d.ts} +146 -8
  19. package/cjs/{TestTriggers-DbhsNPdg-DjvVuc2h.js → TestTriggers-D29T_R0M-D6Bu-Mln.js} +355 -47
  20. package/cjs/{UploadController-MLVs97Zt.js → UploadController-l8fZM2qT.js} +34 -14
  21. package/{esm/WebhookPayload-DkukERKE.d.ts → cjs/WebhookPayload-Dt6DttS0.d.ts} +120 -86
  22. package/cjs/app.d.ts +6 -7
  23. package/cjs/app.js +4 -3
  24. package/cjs/elements.d.ts +123 -22
  25. package/cjs/elements.js +553 -156
  26. package/cjs/file-icons.d.ts +2 -67
  27. package/cjs/index-Bde1wjiw.d.ts +16 -0
  28. package/cjs/index.d.ts +5 -6
  29. package/cjs/index.js +3 -2
  30. package/cjs/react-native.d.ts +52 -11
  31. package/cjs/react-native.js +231 -99
  32. package/cjs/react.d.ts +42 -9
  33. package/cjs/react.js +381 -118
  34. package/cjs/server.d.ts +48 -7
  35. package/cjs/server.js +7 -3
  36. package/cjs/test-inputs.d.ts +2 -2
  37. package/cjs/test-inputs.js +13 -9
  38. package/cjs/testing.d.ts +29 -15
  39. package/cjs/testing.js +1722 -433
  40. package/cjs/ui-BRA4HQ8r.js +1359 -0
  41. package/cjs/ui-YQuvbidU.d.ts +139 -0
  42. package/cjs/ui.d.ts +3 -2
  43. package/cjs/ui.js +45 -22
  44. package/cjs/vue.d.ts +802 -199
  45. package/cjs/vue.js +359 -127
  46. package/esm/{BrowserUpload-C07aL9Vq.d.ts → BrowserUpload-BWjZ9ntu.d.ts} +2 -2
  47. package/esm/{BrowserUpload-CAVkRotw.js → BrowserUpload-GRZVB0G_.js} +1 -1
  48. package/esm/{CalmLensAppClient-PQ9VBvlW.js → CalmLensAppClient-B5QIJ6KS.js} +30 -10
  49. package/esm/{CalmLensAppClient-DDLojj0P.d.ts → CalmLensAppClient-BaW3ddUR.d.ts} +13 -3
  50. package/esm/{CalmLensOptionKeys-Do2mPP6w.js → CalmLensOptionKeys-BG7Qrh8-.js} +317 -367
  51. package/esm/CalmLensServerClient-BKzn8zmp.d.ts +353 -0
  52. package/esm/{CalmLensServerClient-C_H5aAsV.js → CalmLensServerClient-bRUAebi-.js} +323 -90
  53. package/esm/{CalmLensTypes-COJbOuiv.d.ts → CalmLensTypes-BDKwThbO.d.ts} +26993 -27187
  54. package/esm/{Classification-D3SkprrQ-CMnQKW13.d.ts → Classification-Q5zGpR8l-CEWjnE39.d.ts} +731 -607
  55. package/esm/Core-BvQe4moS.js +846 -0
  56. package/esm/Core-C33pkBmf.d.ts +826 -0
  57. package/esm/FileIcons-4qSX7DW2.d.ts +67 -0
  58. package/esm/{ModerationContextLimits-Chw-AzgL.js → ModerationContextLimits-CrxSnVZ3.js} +682 -253
  59. package/esm/{ReactUpload-CMmL0R5Q.js → ReactUpload-BMO8saxT.js} +1 -1
  60. package/esm/{ReactUpload-CRJNPB5T.d.ts → ReactUpload-DhF8mm51.d.ts} +1 -1
  61. package/{cjs/TestTriggers-D-fwfhEP-hlaP1oW2.d.ts → esm/TestTriggers-D0pYHbkr-D5T0VdSn.d.ts} +146 -8
  62. package/esm/{TestTriggers-DbhsNPdg-CUdrv8Nm.js → TestTriggers-D29T_R0M-Ztc74ucs.js} +332 -48
  63. package/esm/{UploadController-BJZghJpg.js → UploadController-DnJrWiE4.js} +34 -14
  64. package/{cjs/WebhookPayload-DkukERKE.d.ts → esm/WebhookPayload-Dt6DttS0.d.ts} +120 -86
  65. package/esm/app.d.ts +6 -7
  66. package/esm/app.js +3 -3
  67. package/esm/elements.d.ts +123 -22
  68. package/esm/elements.js +497 -128
  69. package/esm/file-icons.d.ts +2 -67
  70. package/esm/index-Bde1wjiw.d.ts +16 -0
  71. package/esm/index.d.ts +5 -6
  72. package/esm/index.js +1 -1
  73. package/esm/react-native.d.ts +52 -11
  74. package/esm/react-native.js +205 -75
  75. package/esm/react.d.ts +42 -9
  76. package/esm/react.js +327 -91
  77. package/esm/server.d.ts +48 -7
  78. package/esm/server.js +3 -3
  79. package/esm/styles.css +142 -22
  80. package/esm/svelte/AssetViewer.svelte +25 -0
  81. package/esm/svelte/CalmLensAsset.svelte +318 -0
  82. package/esm/svelte/CalmLensDocumentViewer.svelte +7 -0
  83. package/esm/svelte/CalmLensImageViewer.svelte +7 -0
  84. package/esm/svelte/CalmLensSpreadsheetViewer.svelte +7 -0
  85. package/esm/svelte/CalmLensTextViewer.svelte +7 -0
  86. package/esm/svelte/CalmLensWebsiteViewer.svelte +7 -0
  87. package/esm/svelte/index.d.ts +29 -6
  88. package/esm/svelte/index.js +7 -2
  89. package/esm/test-inputs.d.ts +2 -2
  90. package/esm/test-inputs.js +1 -1
  91. package/esm/testing.d.ts +29 -15
  92. package/esm/testing.js +1718 -429
  93. package/esm/ui-YQuvbidU.d.ts +139 -0
  94. package/esm/ui-heryDd6g.js +1258 -0
  95. package/esm/ui.d.ts +3 -2
  96. package/esm/ui.js +4 -3
  97. package/esm/vue.d.ts +802 -199
  98. package/esm/vue.js +308 -103
  99. package/package.json +4 -2
  100. package/cjs/CalmLensServerClient-C-jsjn8m.d.ts +0 -259
  101. package/cjs/ModerationContext-9lGm-Mna-CcmbRnOy.d.ts +0 -67
  102. package/cjs/index-DxbJ_Xaa.d.ts +0 -253
  103. package/cjs/ui-BSqPGKrZ.d.ts +0 -539
  104. package/cjs/ui-CX1z2pD9.js +0 -586
  105. package/esm/CalmLensServerClient-C-jsjn8m.d.ts +0 -259
  106. package/esm/ModerationContext-9lGm-Mna-CcmbRnOy.d.ts +0 -67
  107. package/esm/index-DxbJ_Xaa.d.ts +0 -253
  108. package/esm/svelte/CalmLensMedia.svelte +0 -134
  109. package/esm/ui-BSqPGKrZ.d.ts +0 -539
  110. package/esm/ui-CXH7xJpb.js +0 -461
@@ -0,0 +1,139 @@
1
+ import "./CalmLensTypes-BDKwThbO.js";
2
+ import { G as AssetSession, W as AssetOptions, Y as AssetView, at as ImageViewerOptions, ct as TextViewerOptions, ft as WebsiteViewerOptions, it as DocumentViewerOptions, ot as PdfAssetOptions, st as SpreadsheetViewerOptions, ut as ViewerOptions } from "./Core-C33pkBmf.js";
3
+ import "pdfjs-dist";
4
+ /** A viewer mounted into an element, which it owns the children of. */
5
+ interface AssetViewer<O extends ViewerOptions = ViewerOptions> {
6
+ /** Shows new options, loading again only when what is shown changed. */
7
+ update(options: O): void;
8
+ /** Stops loading and empties the element. */
9
+ destroy(): void;
10
+ }
11
+ type ViewerState = "loading" | "loaded" | "error";
12
+ /** Shows a PDF, or a document rendered as one, in `root`. */
13
+ declare const createDocumentViewer: (root: HTMLElement, options: DocumentViewerOptions) => AssetViewer<DocumentViewerOptions>;
14
+ /** Shows an image asset's rendered file in `root`. */
15
+ declare const createImageViewer: (root: HTMLElement, options: ImageViewerOptions) => AssetViewer<ImageViewerOptions>;
16
+ /** Shows a website asset's screenshot and a link to the page in `root`. */
17
+ declare const createWebsiteViewer: (root: HTMLElement, options: WebsiteViewerOptions) => AssetViewer<WebsiteViewerOptions>;
18
+ type PdfJs = typeof import("pdfjs-dist");
19
+ /**
20
+ * Loads pdf.js, the first time a document viewer needs it: never at import, so pages without
21
+ * documents never download it. With `workerSrc`, pdf.js reads documents in a worker loaded from
22
+ * your app; otherwise its worker module is imported too and reads them on the main thread.
23
+ */
24
+ declare const loadPdfJs: (options?: PdfAssetOptions) => Promise<PdfJs>;
25
+ /** One cell of a spreadsheet's extracted text. */
26
+ interface SpreadsheetCell {
27
+ /** Zero-based column index: 0 is column `A`. */
28
+ column: number;
29
+ /** The column's letters, such as `A` or `AB`. */
30
+ columnName: string;
31
+ /** Whether the cell's column is hidden in the workbook. */
32
+ hidden: boolean;
33
+ /** The cell's value, then any `(formula: …)` and `(link: …)` notes. */
34
+ text: string;
35
+ }
36
+ interface SpreadsheetRow {
37
+ /** The one-based row number in the sheet. */
38
+ number: number;
39
+ hidden: boolean;
40
+ cells: SpreadsheetCell[];
41
+ }
42
+ interface SpreadsheetSheet {
43
+ name: string;
44
+ hidden: boolean;
45
+ /** The rows that have cells, in order. */
46
+ rows: SpreadsheetRow[];
47
+ /** The columns any row has a cell in, in order. */
48
+ columns: {
49
+ column: number;
50
+ columnName: string;
51
+ hidden: boolean;
52
+ }[];
53
+ /** The sheet's comments and chart titles, one line each. */
54
+ notes: string[];
55
+ }
56
+ /** A column's index from its letters: `A` is 0, `Z` 25 and `AA` 26. */
57
+ declare const spreadsheetColumnIndex: (name: string) => number;
58
+ /**
59
+ * Reads a spreadsheet's sheets from the text CalmLens extracts from it: a `# Sheet "name"` line
60
+ * per sheet (marked `(hidden)` when it is), then a `Row 3: A=… | B=…` line per row that has cells,
61
+ * then its comments and chart titles. A cell value that itself contains ` | B=` reads as two
62
+ * cells. Text before the first sheet heading, as in a file that isn't a spreadsheet's text, reads
63
+ * as one unnamed sheet's notes.
64
+ */
65
+ declare const parseSpreadsheetText: (text: string) => SpreadsheetSheet[];
66
+ /** The rows of one page of a sheet, with their one-based positions among the sheet's rows. */
67
+ declare const getSpreadsheetPage: (sheet: SpreadsheetSheet, page: number, pageSize: number) => {
68
+ rows: SpreadsheetRow[];
69
+ from: number;
70
+ to: number;
71
+ pages: number;
72
+ };
73
+ /** Shows text in `root`. */
74
+ declare const createTextViewer: (root: HTMLElement, options: TextViewerOptions) => AssetViewer<TextViewerOptions>;
75
+ /** Shows a spreadsheet's sheets in `root`. */
76
+ declare const createSpreadsheetViewer: (root: HTMLElement, options: SpreadsheetViewerOptions) => AssetViewer<SpreadsheetViewerOptions>;
77
+ /**
78
+ * The asset viewers' styles, part of the components' stylesheet (`calmlens/styles.css`). A viewer
79
+ * fills its element; give the element a height (an embed page's frame, or a box in your page),
80
+ * or it takes the image's shape, or a default height for documents, text and spreadsheets. Set
81
+ * `--calmlens-viewer-background` and `--calmlens-viewer-text` to match a page's own colours.
82
+ */
83
+ declare const VIEWER_STYLES: string;
84
+ /** Each viewer's options, by the kind of viewer `getAssetViewerKind` names. */
85
+ interface AssetViewerOptionsByKind {
86
+ image: ImageViewerOptions;
87
+ website: WebsiteViewerOptions;
88
+ text: TextViewerOptions;
89
+ document: DocumentViewerOptions;
90
+ spreadsheet: SpreadsheetViewerOptions;
91
+ }
92
+ type AssetViewerName = keyof AssetViewerOptionsByKind;
93
+ /** Mounts each viewer, by kind, for the bindings. */
94
+ declare const ASSET_VIEWERS: { [K in AssetViewerName]: (root: HTMLElement, options: AssetViewerOptionsByKind[K]) => AssetViewer<AssetViewerOptionsByKind[K]>; };
95
+ /** The kinds of view `CalmLensAsset` shows through a viewer module. */
96
+ type MountedViewerKind = Extract<AssetView["kind"], "document" | "text" | "spreadsheet">;
97
+ declare const isMountedViewerKind: (kind: AssetView["kind"]) => kind is MountedViewerKind;
98
+ /**
99
+ * The viewer options for `CalmLensAsset`'s options: the asset URL in use, the info, and the
100
+ * session's refresh and unavailable notice, so the viewer follows the same asset URL.
101
+ */
102
+ declare const getMountedViewerOptions: (options: AssetOptions & {
103
+ alt?: string;
104
+ }, session: AssetSession) => ViewerOptions & Record<string, unknown>;
105
+ /**
106
+ * Keeps the viewer for a document, text or spreadsheet view mounted in `root`, replacing it when
107
+ * the kind changes and destroying it when there is none. `onState` reports each state the viewer
108
+ * reaches (`loading`, `loaded`, `error`).
109
+ */
110
+ declare class AssetViewerMount {
111
+ #private;
112
+ update(root: HTMLElement | null | undefined, kind: MountedViewerKind | undefined, options: ViewerOptions & Record<string, unknown>, onState?: (state: ViewerState) => void): void;
113
+ destroy(): void;
114
+ }
115
+ /**
116
+ * Plays the adaptive stream of `CalmLensAsset`'s video or audio, when its view has one: as the
117
+ * element's own source where the browser plays HLS (Safari and iOS), through hls.js where it has
118
+ * Media Source Extensions (hls.js loads only then), and otherwise, or once the stream fails, from
119
+ * the rendered file. Without a stream the component sets the file as the element's `src` itself.
120
+ * `onExpired` runs when the stream's URL is refused, as an expired signed one is; it returns
121
+ * `true` when a fresh asset URL is on its way, which replaces the stream once it renders.
122
+ */
123
+ declare class MediaStreamPlayer {
124
+ #private;
125
+ constructor(onExpired: (media: HTMLMediaElement) => boolean);
126
+ /**
127
+ * Call after every render with the video or audio element shown (or none) and the view: it
128
+ * starts, replaces or stops the stream when either changed.
129
+ */
130
+ update(media: HTMLMediaElement | null | undefined, view: AssetView): void;
131
+ /**
132
+ * For a video or audio element's `error`: `true` when it switched from the stream to the
133
+ * rendered file. `false` means the file itself failed, for the component's session to handle.
134
+ */
135
+ recover(media: HTMLMediaElement): boolean;
136
+ /** Stops the stream, when the component unmounts. */
137
+ stop(): void;
138
+ }
139
+ export { ViewerState as C, AssetViewer as S, spreadsheetColumnIndex as _, isMountedViewerKind as a, createWebsiteViewer as b, AssetViewerOptionsByKind as c, createTextViewer as d, SpreadsheetCell as f, parseSpreadsheetText as g, getSpreadsheetPage as h, getMountedViewerOptions as i, VIEWER_STYLES as l, SpreadsheetSheet as m, AssetViewerMount as n, ASSET_VIEWERS as o, SpreadsheetRow as p, MountedViewerKind as r, AssetViewerName as s, MediaStreamPlayer as t, createSpreadsheetViewer as u, loadPdfJs as v, createDocumentViewer as x, createImageViewer as y };
package/cjs/ui.d.ts CHANGED
@@ -1,2 +1,3 @@
1
- import { A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as getUploadItemOutcome, E as getUploadItemMessage, F as UploadFile, G as MediaSource, H as MediaImageSource, I as UploadItem, J as pickMediaSource, K as MediaState, L as UploadSnapshot, M as UploadClient, N as UploadController, O as resolveMessages, P as UploadControllerOptions, R as UploadStage, S as formatBytes, T as getMediaUnavailableMessage, U as MediaOptions, V as MediaAsset, W as MediaSettings, Y as resolveMediaProps, _ as DEFAULT_MESSAGES, a as ProgressFetchOptions, b as describeUploadItem, c as ICON_ATTRIBUTES, d as MediaProps, f as UploaderDisplayOptions, g as CalmLensMessages, h as getMediaLoadKey, i as CALMLENS_STYLES, j as CustomUploadResult, k as CalmLensUpload, l as IconName, m as getMediaAspectRatio, n as CalmLensTheme, o as createProgressFetch, p as UploaderProps, q as getMediaState, r as resolveTheme, s as ICONS, t as CALMLENS_THEME, u as MediaDisplayOptions, v as UploadItemView, w as getDropzoneHint, x as describeUploader, y as UploaderView, z as createUploadController } from "./ui-BSqPGKrZ.js";
2
- export { CALMLENS_STYLES, CALMLENS_THEME, type CalmLensMessages, type CalmLensTheme, type CalmLensUpload, type CustomUploadContext, type CustomUploadResult, DEFAULT_MESSAGES, ICONS, ICON_ATTRIBUTES, type IconName, type MediaAsset, type MediaDisplayOptions, type MediaImageSource, type MediaOptions, type MediaProps, type MediaSettings, type MediaSource, type MediaState, type ProgressFetchOptions, type UploadClient, UploadController, type UploadControllerOptions, type UploadFile, type UploadItem, type UploadItemView, type UploadSnapshot, type UploadStage, type UploaderDisplayOptions, type UploaderProps, type UploaderView, createProgressFetch, createUploadController, describeUploadItem, describeUploader, formatBytes, formatMessage, getDropzoneHint, getMediaAspectRatio, getMediaLoadKey, getMediaState, getMediaUnavailableMessage, getUploadItemMessage, getUploadItemOutcome, isFileAccepted, pickMediaSource, resolveMediaProps, resolveMessages, resolveTheme };
1
+ import { $ as getAssetViewKey, A as CustomUploadResult, B as AssetDisplay, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadItem, G as AssetSession, H as AssetImageOptions, I as UploadSnapshot, J as AssetVideoOptions, K as AssetSessionState, L as UploadStage, M as UploadController, N as UploadControllerOptions, O as CalmLensUpload, P as UploadFile, Q as getAssetView, R as createUploadController, S as formatBytes, T as getUploadItemMessage, U as AssetImageSource, V as AssetDocumentOptions, W as AssetOptions, X as MediaPlayback, Y as AssetView, Z as getAssetAspectRatio, _ as DEFAULT_MESSAGES, _t as formatViewerMessage, a as ProgressFetchOptions, at as ImageViewerOptions, b as describeUploadItem, c as ICON_ATTRIBUTES, ct as TextViewerOptions, d as AssetDisplayOptions, dt as ViewerTextOptions, et as getPeakHeights, f as AssetEventHandlers, ft as WebsiteViewerOptions, g as CalmLensMessages, gt as ViewerMessages, h as UploaderProps, ht as DEFAULT_VIEWER_MESSAGES, i as CALMLENS_STYLES, it as DocumentViewerOptions, j as UploadClient, k as CustomUploadContext, l as IconName, lt as ViewerAsset, m as UploaderDisplayOptions, mt as isSpreadsheetFormat, n as CalmLensTheme, nt as pickAssetSource, o as createProgressFetch, ot as PdfAssetOptions, p as AssetProps, pt as getAssetViewerKind, q as AssetSpreadsheetOptions, r as resolveTheme, rt as AssetViewerKind, s as ICONS, st as SpreadsheetViewerOptions, t as CALMLENS_THEME, tt as getPlayedPercent, u as ASSET_FILE_ICON_SIZE, ut as ViewerOptions, v as UploadItemView, vt as resolveViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, z as isFileAccepted } from "./Core-C33pkBmf.js";
2
+ import { C as ViewerState, S as AssetViewer, _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as createWebsiteViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as createDocumentViewer, y as createImageViewer } from "./ui-YQuvbidU.js";
3
+ export { ASSET_FILE_ICON_SIZE, ASSET_VIEWERS, type AssetDisplay, type AssetDisplayOptions, type AssetDocumentOptions, type AssetEventHandlers, type AssetImageOptions, type AssetImageSource, type AssetOptions, type AssetProps, AssetSession, type AssetSessionState, type AssetSpreadsheetOptions, type AssetVideoOptions, type AssetView, type AssetViewer, type AssetViewerKind, AssetViewerMount, AssetViewerName, AssetViewerOptionsByKind, CALMLENS_STYLES, CALMLENS_THEME, type CalmLensMessages, type CalmLensTheme, type CalmLensUpload, type CustomUploadContext, type CustomUploadResult, DEFAULT_MESSAGES, DEFAULT_VIEWER_MESSAGES, type DocumentViewerOptions, ICONS, ICON_ATTRIBUTES, type IconName, type ImageViewerOptions, type MediaPlayback, MediaStreamPlayer, type MountedViewerKind, type PdfAssetOptions, type ProgressFetchOptions, type SpreadsheetCell, type SpreadsheetRow, type SpreadsheetSheet, type SpreadsheetViewerOptions, type TextViewerOptions, type UploadClient, UploadController, type UploadControllerOptions, type UploadFile, type UploadItem, type UploadItemView, type UploadSnapshot, type UploadStage, type UploaderDisplayOptions, type UploaderProps, type UploaderView, VIEWER_STYLES, type ViewerAsset, type ViewerMessages, type ViewerOptions, type ViewerState, type ViewerTextOptions, type WebsiteViewerOptions, createDocumentViewer, createImageViewer, createProgressFetch, createSpreadsheetViewer, createTextViewer, createUploadController, createWebsiteViewer, describeUploadItem, describeUploader, formatBytes, formatMessage, formatViewerMessage, getAssetAspectRatio, getAssetView, getAssetViewKey, getAssetViewerKind, getDropzoneHint, getMountedViewerOptions, getPeakHeights, getPlayedPercent, getSpreadsheetPage, getUploadItemMessage, getUploadItemOutcome, isFileAccepted, isMountedViewerKind, isSpreadsheetFormat, loadPdfJs, parseSpreadsheetText, pickAssetSource, resolveMessages, resolveTheme, resolveViewerMessages, spreadsheetColumnIndex };
package/cjs/ui.js CHANGED
@@ -1,27 +1,50 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_ui = require("./ui-CX1z2pD9.js");
3
- const require_UploadController = require("./UploadController-MLVs97Zt.js");
4
- exports.CALMLENS_STYLES = require_ui.CALMLENS_STYLES;
5
- exports.CALMLENS_THEME = require_ui.CALMLENS_THEME;
6
- exports.DEFAULT_MESSAGES = require_ui.DEFAULT_MESSAGES;
7
- exports.ICONS = require_ui.ICONS;
8
- exports.ICON_ATTRIBUTES = require_ui.ICON_ATTRIBUTES;
2
+ const require_ui = require("./ui-BRA4HQ8r.js");
3
+ const require_UploadController = require("./UploadController-l8fZM2qT.js");
4
+ const require_Core = require("./Core-Cm5Z1oJ9.js");
5
+ exports.ASSET_FILE_ICON_SIZE = require_Core.ASSET_FILE_ICON_SIZE;
6
+ exports.ASSET_VIEWERS = require_ui.ASSET_VIEWERS;
7
+ exports.AssetSession = require_Core.AssetSession;
8
+ exports.AssetViewerMount = require_ui.AssetViewerMount;
9
+ exports.CALMLENS_STYLES = require_Core.CALMLENS_STYLES;
10
+ exports.CALMLENS_THEME = require_Core.CALMLENS_THEME;
11
+ exports.DEFAULT_MESSAGES = require_Core.DEFAULT_MESSAGES;
12
+ exports.DEFAULT_VIEWER_MESSAGES = require_ui.DEFAULT_VIEWER_MESSAGES;
13
+ exports.ICONS = require_Core.ICONS;
14
+ exports.ICON_ATTRIBUTES = require_Core.ICON_ATTRIBUTES;
15
+ exports.MediaStreamPlayer = require_ui.MediaStreamPlayer;
9
16
  exports.UploadController = require_UploadController.UploadController;
17
+ exports.VIEWER_STYLES = require_Core.VIEWER_STYLES;
18
+ exports.createDocumentViewer = require_ui.createDocumentViewer;
19
+ exports.createImageViewer = require_ui.createImageViewer;
10
20
  exports.createProgressFetch = require_UploadController.createProgressFetch;
21
+ exports.createSpreadsheetViewer = require_ui.createSpreadsheetViewer;
22
+ exports.createTextViewer = require_ui.createTextViewer;
11
23
  exports.createUploadController = require_UploadController.createUploadController;
12
- exports.describeUploadItem = require_ui.describeUploadItem;
13
- exports.describeUploader = require_ui.describeUploader;
14
- exports.formatBytes = require_ui.formatBytes;
15
- exports.formatMessage = require_ui.formatMessage;
16
- exports.getDropzoneHint = require_ui.getDropzoneHint;
17
- exports.getMediaAspectRatio = require_ui.getMediaAspectRatio;
18
- exports.getMediaLoadKey = require_ui.getMediaLoadKey;
19
- exports.getMediaState = require_ui.getMediaState;
20
- exports.getMediaUnavailableMessage = require_ui.getMediaUnavailableMessage;
21
- exports.getUploadItemMessage = require_ui.getUploadItemMessage;
22
- exports.getUploadItemOutcome = require_ui.getUploadItemOutcome;
24
+ exports.createWebsiteViewer = require_ui.createWebsiteViewer;
25
+ exports.describeUploadItem = require_Core.describeUploadItem;
26
+ exports.describeUploader = require_Core.describeUploader;
27
+ exports.formatBytes = require_Core.formatBytes;
28
+ exports.formatMessage = require_Core.formatMessage;
29
+ exports.formatViewerMessage = require_ui.formatViewerMessage;
30
+ exports.getAssetAspectRatio = require_Core.getAssetAspectRatio;
31
+ exports.getAssetView = require_Core.getAssetView;
32
+ exports.getAssetViewKey = require_Core.getAssetViewKey;
33
+ exports.getAssetViewerKind = require_Core.getAssetViewerKind;
34
+ exports.getDropzoneHint = require_Core.getDropzoneHint;
35
+ exports.getMountedViewerOptions = require_ui.getMountedViewerOptions;
36
+ exports.getPeakHeights = require_Core.getPeakHeights;
37
+ exports.getPlayedPercent = require_Core.getPlayedPercent;
38
+ exports.getSpreadsheetPage = require_ui.getSpreadsheetPage;
39
+ exports.getUploadItemMessage = require_Core.getUploadItemMessage;
40
+ exports.getUploadItemOutcome = require_Core.getUploadItemOutcome;
23
41
  exports.isFileAccepted = require_UploadController.isFileAccepted;
24
- exports.pickMediaSource = require_ui.pickMediaSource;
25
- exports.resolveMediaProps = require_ui.resolveMediaProps;
26
- exports.resolveMessages = require_ui.resolveMessages;
27
- exports.resolveTheme = require_ui.resolveTheme;
42
+ exports.isMountedViewerKind = require_ui.isMountedViewerKind;
43
+ exports.isSpreadsheetFormat = require_Core.isSpreadsheetFormat;
44
+ exports.loadPdfJs = require_ui.loadPdfJs;
45
+ exports.parseSpreadsheetText = require_ui.parseSpreadsheetText;
46
+ exports.pickAssetSource = require_Core.pickAssetSource;
47
+ exports.resolveMessages = require_Core.resolveMessages;
48
+ exports.resolveTheme = require_Core.resolveTheme;
49
+ exports.resolveViewerMessages = require_ui.resolveViewerMessages;
50
+ exports.spreadsheetColumnIndex = require_ui.spreadsheetColumnIndex;