@factorialco/f0-react 16.2.0 → 16.7.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.
- package/dist/{ArchiveThumbnail-D-4c2HTz.js → ArchiveThumbnail-DxxGStkI.js} +3 -3
- package/dist/{ArchiveViewer-6AIrLkTU.js → ArchiveViewer-nuxVYoSA.js} +5 -5
- package/dist/{ChatPostComposerDialog-YDBKuWMs.js → ChatPostComposerDialog-B-n-Hqds.js} +3 -3
- package/dist/{CoachmarkProvider-CG8_5mZi.js → CoachmarkProvider-BGx__lPw.js} +15148 -15129
- package/dist/{CodeThumbnail-wORziixS.js → CodeThumbnail-DqH5gHZu.js} +2 -2
- package/dist/{CodeViewer-Btp4H9Tv.js → CodeViewer-T59a8NjB.js} +8 -8
- package/dist/{DocumentToolbar-DWq7Zg1o.js → DocumentToolbar-Dylh5Ap4.js} +5 -5
- package/dist/{DocxThumbnail-CK9vFoTB.js → DocxThumbnail-Dmiz9_9a.js} +1 -1
- package/dist/{DocxViewer-BR0FDQFa.js → DocxViewer-7n-AYpP4.js} +4 -4
- package/dist/{F0AiProcessingOverlay-BGAmf_ch.js → F0AiProcessingOverlay-ODrQ_8Bz.js} +1447 -1447
- package/dist/{F0Alert-CH3tkbEc.js → F0Alert-Ck3zBYdd.js} +12 -12
- package/dist/F0AudioPlayer-DadfbJQp.js +2 -0
- package/dist/{F0Button-BCWiHDDV.js → F0Button-K-Tsj-wR.js} +2655 -2655
- package/dist/{F0CanvasPanel-lWi0R2Ct.js → F0CanvasPanel-8sSInjUf.js} +6522 -6522
- package/dist/{F0DocumentViewer-DbvYrP07.js → F0DocumentViewer-BrWkziLK.js} +6 -6
- package/dist/{F0DocumentViewer-CdDwxxRr.js → F0DocumentViewer-CAHZnuNS.js} +1 -1
- package/dist/{F0Icon-C0Ks-zGo.js → F0Icon-BBCAaVEn.js} +3 -3
- package/dist/{F0Map-DT14cjTW.js → F0Map-DvLUX9Ft.js} +17 -17
- package/dist/{F0Select-CPIJ4yN6.js → F0Select-FocuIygc.js} +350 -313
- package/dist/{F0Text-MqvXgPpZ.js → F0Text-40EQGsxS.js} +2 -2
- package/dist/{F0VideoPlayer-ClfVqxVy.js → F0VideoPlayer-7r47FGZM.js} +29 -29
- package/dist/F0VideoPlayer-CZ2o-kkq.js +1 -0
- package/dist/{HtmlThumbnail-RLEVY9G9.js → HtmlThumbnail-B9Gz3J8v.js} +1 -1
- package/dist/{HtmlViewer-BFIty3Uq.js → HtmlViewer-CCBntGYz.js} +10 -10
- package/dist/{LayoutGroup-Bc1Iudo_.js → LayoutGroup-B8iuK3D7.js} +6 -6
- package/dist/{LocationMap-Ds0SgBMO.js → LocationMap-CRcaItG1.js} +1 -1
- package/dist/{Map-C68icVU0.js → Map-D-WSG3i2.js} +11 -11
- package/dist/{PdfThumbnail-DMtXVsHe.js → PdfThumbnail-etMVzOej.js} +1 -1
- package/dist/PdfViewer-N8tnidrx.js +345 -0
- package/dist/{SandboxedHtmlFrame-BNNZgkcF.js → SandboxedHtmlFrame-DYYjEWYn.js} +3 -3
- package/dist/{SheetThumbnail-HtGezPp4.js → SheetThumbnail-BkHpWfUx.js} +1 -1
- package/dist/{SheetViewer-TByL8ZDC.js → SheetViewer-DyNij5aV.js} +6 -6
- package/dist/{TextViewer-IN4Yxidv.js → TextViewer-Cb52tMok.js} +4 -4
- package/dist/ai.d.ts +3 -3
- package/dist/ai.js +4 -4
- package/dist/{axe-CpDXsSXe.js → axe-BBhXfUWo.js} +1 -1
- package/dist/{bash-BcZBmoDA.js → bash-D6uqvgOi.js} +1 -1
- package/dist/{browser-DU608quv.js → browser-C-vE8YPD.js} +1 -1
- package/dist/{browser-Chetd4xB.js → browser-DqmpbuJ2.js} +79 -79
- package/dist/{c-Dv-5_kUQ.js → c-BCnJboA_.js} +1 -1
- package/dist/{compact-CzGBEjf8.js → compact-9OtitSAw.js} +1 -1
- package/dist/{compact-Qms4WvjZ.js → compact-B2rHEFaN.js} +1 -1
- package/dist/{compact-dMl1Bapz.js → compact-BHSxoSFn.js} +1 -1
- package/dist/{compact-zPPgKFcT.js → compact-BKem4xoK.js} +1 -1
- package/dist/{compact-Dgm7WZm4.js → compact-BplUl26Q.js} +1 -1
- package/dist/{compact-BSMrd_is.js → compact-Bw8Vwg5U.js} +1 -1
- package/dist/{compact-DmKqtNtX.js → compact-Bx9aL9XJ.js} +1 -1
- package/dist/{compact-nSZlZM3P.js → compact-CUhC2S_R.js} +1 -1
- package/dist/{compact-uUc-DLEN.js → compact-C_87Kf8C.js} +1 -1
- package/dist/{compact-0GS3nMlK.js → compact-Cltlx5En.js} +1 -1
- package/dist/{compact-BoPwI23t.js → compact-Cn7H9IVm.js} +1 -1
- package/dist/{compact-ZDmzUHcP.js → compact-Cq0dqu3o.js} +1 -1
- package/dist/{compact-DdztPfef.js → compact-Ct1noWQi.js} +1 -1
- package/dist/{compact-Z0NBHrB2.js → compact-DHrmqzo_.js} +1 -1
- package/dist/{compact-CAU854By.js → compact-DWIIs9Wa.js} +1 -1
- package/dist/{compact-wGaWbKfv.js → compact-DZf6oE2C.js} +1 -1
- package/dist/{compact-DzI2x9BY.js → compact-D_yZkU5y.js} +1 -1
- package/dist/{compact-B8nnWkSZ.js → compact-DqFVrM7r.js} +1 -1
- package/dist/{compact-CPJg_obs.js → compact-Dv0883Un.js} +1 -1
- package/dist/{compact-DTl-y6_A.js → compact-TSPmz689.js} +1 -1
- package/dist/{compact-BRO-o3bX.js → compact-ULCTY6Hb.js} +1 -1
- package/dist/{compact-20h_4e0l.js → compact-VnA-DCWx.js} +1 -1
- package/dist/{compact-e3mEwDvq.js → compact-hWCoVvbh.js} +1 -1
- package/dist/{compact-CR-ykoh8.js → compact-kkgLvbns.js} +1 -1
- package/dist/{compact-D0Nw81Jx.js → compact-tvpEcaFg.js} +1 -1
- package/dist/{compact-CAbl_-c3.js → compact-xAoRyROm.js} +1 -1
- package/dist/{compact-B2VEEW0d.js → compact-zh_DdrKL.js} +1 -1
- package/dist/component-status.js +42 -20
- package/dist/{cpp-CMQhucZt.js → cpp-Cd4fuO4E.js} +1 -1
- package/dist/{csharp-CuDKSCf2.js → csharp-_44-H2ZN.js} +1 -1
- package/dist/{css-Dta7Q4Li.js → css-DQyhasvg.js} +1 -1
- package/dist/{dart-po7Eq73d.js → dart-CRIQ97dd.js} +1 -1
- package/dist/{diff-IgsQP-8T.js → diff-BhZeLM8Q.js} +1 -1
- package/dist/{dist-BKmw8oWk.js → dist-Bqn2Tvbv.js} +4 -4
- package/dist/{dist-Bdbhtnvl.js → dist-DQLaXxAV.js} +2 -2
- package/dist/{dist-CAC7X0BZ.js → dist-DT2eYug9.js} +2 -2
- package/dist/{dist-BEGjI3Xp.js → dist-RnbZP6nJ.js} +5 -5
- package/dist/{dist-Dt-cTb6D.js → dist-ZjZbrLOW.js} +1 -1
- package/dist/{dist-DFNqqmLn.js → dist-jtkUGoUE.js} +15 -15
- package/dist/{dockerfile-B4Bz9I5u.js → dockerfile-DbFV5Pbz.js} +1 -1
- package/dist/{dos-1TcyLtUq.js → dos-VxE5JslU.js} +1 -1
- package/dist/{elixir-BnEjyLGa.js → elixir-DS-uBoZN.js} +1 -1
- package/dist/{erlang-tgri7ZSv.js → erlang-Bx_duAAA.js} +1 -1
- package/dist/experimental.d.ts +119 -5
- package/dist/experimental.js +7009 -6332
- package/dist/{exports-BCwj4qmp.d.ts → exports-DyepZL4X.d.ts} +1 -1
- package/dist/f0.d.ts +4 -4
- package/dist/f0.js +187 -187
- package/dist/{go-CEVmppuo.js → go-BhmEjBcc.js} +1 -1
- package/dist/{graphql-BWwc-u8d.js → graphql-CGE5MRvH.js} +1 -1
- package/dist/{groovy-BELuqtd6.js → groovy-BNCfr4d_.js} +1 -1
- package/dist/{haskell-Cxh7aaFM.js → haskell-DBbEfzb-.js} +1 -1
- package/dist/{highlight-MHlQa3or.js → highlight-BmHT5bVt.js} +43 -43
- package/dist/{i18n-provider-DoTL-0tJ.js → i18n-provider-B3-P0gAN.js} +1 -1
- package/dist/{i18n-provider-defaults-ZqFx7uFw.js → i18n-provider-defaults-D4jZJwqk.js} +23 -0
- package/dist/{i18n-provider-defaults-BkNbvakp.d.ts → i18n-provider-defaults-DDg-0uul.d.ts} +37 -0
- package/dist/i18n-provider-defaults.d.ts +1 -1
- package/dist/i18n-provider-defaults.js +1 -1
- package/dist/{index-DyzQfXF1.d.ts → index-Bon-AuSX.d.ts} +44 -11
- package/dist/{ini-DA-F0rRr.js → ini-BI-Hrf-H.js} +1 -1
- package/dist/{java-Bujnoc_f.js → java-BsqDt9nV.js} +1 -1
- package/dist/{javascript-BeEhpXRE.js → javascript-BgkjyjxN.js} +1 -1
- package/dist/{json-CxvE7tEw.js → json-BdZjX9S-.js} +1 -1
- package/dist/{kotlin-DOwDGI_m.js → kotlin-C6y-Vaus.js} +1 -1
- package/dist/{less-DWlR-e-o.js → less-YAR6amXX.js} +1 -1
- package/dist/{lua-BlZiakwh.js → lua-DIMsJDpR.js} +1 -1
- package/dist/{makefile-D3841Yg4.js → makefile-CV_MU-6b.js} +1 -1
- package/dist/{maplibre-BPuVdfhS.js → maplibre-CBdPIfGt.js} +3 -3
- package/dist/{maplibre-gl-DVldSYfz.js → maplibre-gl-C9VxucUv.js} +1 -1
- package/dist/{markdown-D1wNG79U.js → markdown-ZTJ3lhtO.js} +1 -1
- package/dist/{objectivec-DxtRzTBy.js → objectivec-DWqUivqh.js} +1 -1
- package/dist/{papaparse.min-BwPbUAd9.js → papaparse.min-Do443n2P.js} +1 -1
- package/dist/{pdfWorker-CzU4sprQ.js → pdfWorker-GOiDQZal.js} +21 -21
- package/dist/{perl-BWRmkuyz.js → perl-BKXDDb_i.js} +1 -1
- package/dist/{php-CjwybYSP.js → php-AuFdNkWE.js} +1 -1
- package/dist/{popover-CCSQvMSp.js → popover-Fe5Kn3Xb.js} +34 -34
- package/dist/{powershell-CgKcNA5Q.js → powershell-DRZ15pam.js} +1 -1
- package/dist/{properties-Bc45MTzW.js → properties-BkNZPRIs.js} +1 -1
- package/dist/{protobuf-Bv_xSUaI.js → protobuf-Cmcso0sU.js} +1 -1
- package/dist/{purify.es-ZpfdAuNV.js → purify.es-CJ7gZxxn.js} +1 -1
- package/dist/{python-D8PdGjgy.js → python-BG1HaU2o.js} +1 -1
- package/dist/{r-DA-9ZIdU.js → r-DyjJi7NZ.js} +1 -1
- package/dist/{renderDocx-BW-uDyaZ.js → renderDocx-BmKEajZl.js} +1 -1
- package/dist/{ruby-Bqr16BpN.js → ruby-CQGuF5Ox.js} +1 -1
- package/dist/{rust-BCvJMwk8.js → rust-Ct4XXXd3.js} +1 -1
- package/dist/{scala-Du8mOD2z.js → scala-DsjkmjHJ.js} +1 -1
- package/dist/{scss-AMxHqh46.js → scss-De8s5ohp.js} +1 -1
- package/dist/{sheetPreview-Ca0kCtSa.js → sheetPreview-Cd5OSWJi.js} +35 -35
- package/dist/{skeleton-BsalZgC5.js → skeleton-C-H2S5ZI.js} +2 -2
- package/dist/{sql-BbYSgcOA.js → sql-Bd1o6RCN.js} +1 -1
- package/dist/styles.css +1 -1
- package/dist/{swift-DRKtalPn.js → swift-ushwDHmu.js} +1 -1
- package/dist/{toolbarStyles-CDHbnt8G.js → toolbarStyles-BAunJtAw.js} +2 -2
- package/dist/{tooltip-DFMOxXQO.js → tooltip-NXXT56H4.js} +84 -84
- package/dist/{types-D1p-rbhL.d.ts → types-B_RODWSZ.d.ts} +13 -4
- package/dist/{typescript-Bv8uKU6V.js → typescript-BRJ7pjgl.js} +1 -1
- package/dist/{useData-BtGI0HO3.js → useData-CKJGQ0mx.js} +981 -996
- package/dist/{xml-BVpP05uE.js → xml-CN1oK3nr.js} +1 -1
- package/dist/{yaml-BNe2WG-i.js → yaml-CpyaOGsC.js} +1 -1
- package/package.json +49 -62
- package/tailwind.config.ts +34 -2
- package/dist/F0AudioPlayer-Bz4IHMqq.js +0 -2
- package/dist/F0VideoPlayer-CnWbe7pg.js +0 -1
- package/dist/PdfViewer-DkIM1R9R.js +0 -296
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.
|
|
1
|
+
//#region ../../node_modules/.bun/highlight.js@11.12.0/node_modules/highlight.js/es/languages/xml.js
|
|
2
2
|
function e(e) {
|
|
3
3
|
let t = e.regex, n = t.concat(/[\p{L}_]/u, t.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u), r = /[\p{L}0-9._:-]+/u, i = {
|
|
4
4
|
className: "symbol",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.
|
|
1
|
+
//#region ../../node_modules/.bun/highlight.js@11.12.0/node_modules/highlight.js/es/languages/yaml.js
|
|
2
2
|
function e(e) {
|
|
3
3
|
let t = "true false yes no null", n = "[\\w#;/?:@&=+$,.~*'()[\\]]+", r = {
|
|
4
4
|
className: "attr",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@factorialco/f0-react",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.7.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/factorialco/f0.git",
|
|
@@ -22,6 +22,47 @@
|
|
|
22
22
|
],
|
|
23
23
|
"main": "dist/f0.js",
|
|
24
24
|
"typings": "dist/f0.d.ts",
|
|
25
|
+
"scripts": {
|
|
26
|
+
"dev": "storybook dev -p 6006",
|
|
27
|
+
"dev:docs": "DOCS_MODE=true bun run dev",
|
|
28
|
+
"dev:sync": "bun run build:prepare && bun scripts/dev-sync.ts",
|
|
29
|
+
"build:types": "bun check --no-script -p tsconfig-build.json",
|
|
30
|
+
"build:prepare": "bun run build:types && bun run build-icons",
|
|
31
|
+
"start": "bun run dev",
|
|
32
|
+
"size": "bun run build && size-limit",
|
|
33
|
+
"build": "bun check --no-script -p tsconfig-build.json && bun run build-icons && BUILD_TYPES=true vite build -- --tailwind",
|
|
34
|
+
"build-icons": "tsc --project ./tsconfig-build-icons.json",
|
|
35
|
+
"build:tailwind": "NODE_ENV=production tailwindcss -i src/styles.css -o ./dist/styles.css --postcss --minify",
|
|
36
|
+
"build:watch": "bun run build --watch",
|
|
37
|
+
"lint": "bun .scripts/lint.ts",
|
|
38
|
+
"lint:fix": "bun .scripts/lint.ts --fix",
|
|
39
|
+
"preview": "vite preview",
|
|
40
|
+
"generate-icons": "rm -fR src/icons/app/* src/icons/modules/* src/icons/flags/components/* src/icons/ai/* && bun run --parallel generate-app-icons generate-module-icons generate-flag-icons generate-ai-icons && bun fmt \"src/icons/**/*.tsx\" && bun run generate-icon-barrels",
|
|
41
|
+
"generate-icon-barrels": "bash scripts/generate-icon-barrels.sh src/icons/app src/icons/modules src/icons/ai src/icons/flags/components",
|
|
42
|
+
"generate-app-icons": "svgr --out-dir src/icons/app node_modules/@factorialco/f0-core/assets/icons/app",
|
|
43
|
+
"generate-flag-icons": "svgr --out-dir src/icons/flags/components node_modules/@factorialco/f0-core/assets/flags",
|
|
44
|
+
"generate-module-icons": "svgr --out-dir src/icons/modules node_modules/@factorialco/f0-core/assets/icons/modules",
|
|
45
|
+
"generate-ai-icons": "svgr --out-dir src/icons/ai node_modules/@factorialco/f0-core/assets/icons/ai",
|
|
46
|
+
"build-storybook": "storybook build",
|
|
47
|
+
"build-api": "bun install --cwd api --frozen-lockfile --linker hoisted && bun run --cwd api build",
|
|
48
|
+
"serve-storybook": "http-server storybook-static",
|
|
49
|
+
"test-storybook": "bun .scripts/storybook-tests/run.ts",
|
|
50
|
+
"unused-components": "node scripts/unused-components.mjs",
|
|
51
|
+
"format": "sh -c 'bun fmt \"${@:-src/}\"' --",
|
|
52
|
+
"format:check": "sh -c 'bun fmt --check \"${@:-src/}\"' --",
|
|
53
|
+
"typecheck": "bun check --no-script -p tsconfig.json && bun check --no-script -p tsconfig.tests.json",
|
|
54
|
+
"check:api-surface": "bun .scripts/check-api-surface.ts",
|
|
55
|
+
"check:published-types": "node .scripts/check-published-types.ts",
|
|
56
|
+
"check:dist-loads": "node .scripts/check-dist-loads.ts",
|
|
57
|
+
"check:aria-surface": "bun .scripts/check-aria-surface.ts",
|
|
58
|
+
"check:docs-index": "bun .scripts/check-docs-index.ts",
|
|
59
|
+
"check:bugfix-red-green": "bun .scripts/check-bugfix-red-green.ts",
|
|
60
|
+
"check:new-component-dod": "bun .scripts/check-new-component-dod.ts",
|
|
61
|
+
"check:stable-dod": "bun .scripts/check-stable-dod.ts",
|
|
62
|
+
"preflight": "bun .scripts/pre-push-preflight.ts",
|
|
63
|
+
"test": "bun test --parallel ./src ./scripts ./.scripts ./.oxlint-plugins ./.storybook",
|
|
64
|
+
"test:watch": "bun test --watch ./src ./scripts ./.scripts ./.oxlint-plugins ./.storybook"
|
|
65
|
+
},
|
|
25
66
|
"dependencies": {
|
|
26
67
|
"@atlaskit/pragmatic-drag-and-drop": "^1.7.4",
|
|
27
68
|
"@atlaskit/pragmatic-drag-and-drop-flourish": "^2.0.4",
|
|
@@ -31,6 +72,7 @@
|
|
|
31
72
|
"@dnd-kit/core": "^6.3.1",
|
|
32
73
|
"@dnd-kit/sortable": "^10.0.0",
|
|
33
74
|
"@dnd-kit/utilities": "^3.2.2",
|
|
75
|
+
"@factorialco/f0-core": "5.1.0",
|
|
34
76
|
"@radix-ui/number": "^1.1.1",
|
|
35
77
|
"@radix-ui/primitive": "^1.1.2",
|
|
36
78
|
"@radix-ui/react-collection": "^1.1.7",
|
|
@@ -114,8 +156,7 @@
|
|
|
114
156
|
"y-protocols": "^1.0.6",
|
|
115
157
|
"yjs": "^13.6.27",
|
|
116
158
|
"zen-observable-ts": "^1.1.0",
|
|
117
|
-
"zod-to-json-schema": "^3.25.1"
|
|
118
|
-
"@factorialco/f0-core": "5.0.0"
|
|
159
|
+
"zod-to-json-schema": "^3.25.1"
|
|
119
160
|
},
|
|
120
161
|
"devDependencies": {
|
|
121
162
|
"@chromatic-com/storybook": "^5.5.1",
|
|
@@ -140,9 +181,7 @@
|
|
|
140
181
|
"@storybook/addon-links": "^10.6.3",
|
|
141
182
|
"@storybook/addon-mcp": "^10.6.3",
|
|
142
183
|
"@storybook/addon-themes": "^10.6.3",
|
|
143
|
-
"@storybook/addon-vitest": "^10.6.3",
|
|
144
184
|
"@storybook/react-vite": "^10.6.3",
|
|
145
|
-
"@storybook/test-runner": "^0.26.0",
|
|
146
185
|
"@svgr/cli": "^8.1.0",
|
|
147
186
|
"@testing-library/dom": "^10.4.1",
|
|
148
187
|
"@testing-library/jest-dom": "^7.0.1",
|
|
@@ -157,24 +196,22 @@
|
|
|
157
196
|
"@types/react-dom": "^18.3.1",
|
|
158
197
|
"@types/twemoji-parser": "^13.1.4",
|
|
159
198
|
"@vitejs/plugin-react": "^6.1.2",
|
|
160
|
-
"@vitest/browser-playwright": "^5.0.5",
|
|
161
|
-
"@vitest/coverage-v8": "^5.0.5",
|
|
162
|
-
"@vitest/ui": "5.0.5",
|
|
163
199
|
"@xyflow/react": "^12",
|
|
164
200
|
"autoprefixer": "^10.4.21",
|
|
165
201
|
"axe-core": "^4.11.1",
|
|
166
202
|
"axe-playwright": "^2.1.0",
|
|
203
|
+
"bun-types": "1.4.5-canary.20261121T140937",
|
|
167
204
|
"chalk": "^5.4.1",
|
|
168
205
|
"chromatic": "^11.28.0",
|
|
169
206
|
"consola": "^3.4.0",
|
|
170
207
|
"dotenv": "^16.4.7",
|
|
171
208
|
"emoji-mart": "^5.6.0",
|
|
172
209
|
"emojibase-data": "^16.0.3",
|
|
210
|
+
"eslint": "^9.39.2",
|
|
173
211
|
"eslint-plugin-import": "^2.32.0",
|
|
174
212
|
"eslint-plugin-react": "^7.37.5",
|
|
175
|
-
"eslint-plugin-react-
|
|
213
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
176
214
|
"eslint-plugin-sonarjs": "^4.2.0",
|
|
177
|
-
"eslint-plugin-storybook": "^10.6.3",
|
|
178
215
|
"fflate": "0.8.2",
|
|
179
216
|
"globals": "^16.0.0",
|
|
180
217
|
"http-server": "^14.1.1",
|
|
@@ -185,12 +222,8 @@
|
|
|
185
222
|
"maplibre-gl": "^5.24.0",
|
|
186
223
|
"markdown-to-jsx": "^9.3.3",
|
|
187
224
|
"mockdate": "^3.0.5",
|
|
188
|
-
"npm-run-all": "^4.1.5",
|
|
189
225
|
"oxc-parser": "^0.155.0",
|
|
190
|
-
"oxfmt": "^0.26.0",
|
|
191
|
-
"oxlint": "^1.33.0",
|
|
192
226
|
"oxlint-tailwindcss": "1.17.2",
|
|
193
|
-
"oxlint-tsgolint": "7.0.2001",
|
|
194
227
|
"pdfjs-dist": "4.8.69",
|
|
195
228
|
"playwright": "^1.65.1",
|
|
196
229
|
"postcss": "^8.5.3",
|
|
@@ -206,8 +239,7 @@
|
|
|
206
239
|
"typescript": "^7.0.2",
|
|
207
240
|
"user-agent-data-types": "^0.4.2",
|
|
208
241
|
"vite": "^8.3.4",
|
|
209
|
-
"vite-plugin-lib-inject-css": "^2.2.1"
|
|
210
|
-
"vitest": "^5.0.5"
|
|
242
|
+
"vite-plugin-lib-inject-css": "^2.2.1"
|
|
211
243
|
},
|
|
212
244
|
"peerDependencies": {
|
|
213
245
|
"@hookform/resolvers": "^3.9.0",
|
|
@@ -267,50 +299,5 @@
|
|
|
267
299
|
"maplibre-gl": {
|
|
268
300
|
"optional": true
|
|
269
301
|
}
|
|
270
|
-
},
|
|
271
|
-
"scripts": {
|
|
272
|
-
"dev": "storybook dev -p 6006",
|
|
273
|
-
"dev:docs": "DOCS_MODE=true pnpm run dev",
|
|
274
|
-
"dev:sync": "pnpm build:prepare && tsx scripts/dev-sync.ts",
|
|
275
|
-
"build:types": "tsc --project ./tsconfig-build.json",
|
|
276
|
-
"build:prepare": "pnpm run build:types && run-p build-icons",
|
|
277
|
-
"start": "pnpm run dev",
|
|
278
|
-
"size": "pnpm run build && size-limit",
|
|
279
|
-
"build": "tsc --project ./tsconfig-build.json && run-p build-icons && BUILD_TYPES=true vite build -- --tailwind",
|
|
280
|
-
"build-icons": "tsc --project ./tsconfig-build-icons.json",
|
|
281
|
-
"build:tailwind": "NODE_ENV=production tailwindcss -i src/styles.css -o ./dist/styles.css --postcss --minify",
|
|
282
|
-
"build:watch": "pnpm build --watch",
|
|
283
|
-
"lint": "sh -c 'oxlint --type-aware --tsconfig tsconfig.lint.json \"${@:-src/}\" --quiet' --",
|
|
284
|
-
"lint:fix": "sh -c 'oxlint --type-aware --tsconfig tsconfig.lint.json \"${@:-src/}\" --fix --quiet' --",
|
|
285
|
-
"preview": "vite preview",
|
|
286
|
-
"generate-icons": "rm -fR src/icons/app/* src/icons/modules/* src/icons/flags/components/* src/icons/ai/* && run-p generate-app-icons generate-module-icons generate-flag-icons generate-ai-icons && oxfmt \"src/icons/**/*.tsx\" && pnpm generate-icon-barrels",
|
|
287
|
-
"generate-icon-barrels": "bash scripts/generate-icon-barrels.sh src/icons/app src/icons/modules src/icons/ai src/icons/flags/components",
|
|
288
|
-
"generate-app-icons": "npx @svgr/cli --out-dir src/icons/app node_modules/@factorialco/f0-core/assets/icons/app",
|
|
289
|
-
"generate-flag-icons": "npx @svgr/cli --out-dir src/icons/flags/components node_modules/@factorialco/f0-core/assets/flags",
|
|
290
|
-
"generate-module-icons": "npx @svgr/cli --out-dir src/icons/modules node_modules/@factorialco/f0-core/assets/icons/modules",
|
|
291
|
-
"generate-ai-icons": "npx @svgr/cli --out-dir src/icons/ai node_modules/@factorialco/f0-core/assets/icons/ai",
|
|
292
|
-
"build-storybook": "storybook build",
|
|
293
|
-
"build-api": "pnpm --dir api install --ignore-workspace && pnpm --dir api run build",
|
|
294
|
-
"serve-storybook": "http-server storybook-static",
|
|
295
|
-
"test-storybook": "test-storybook --testTimeout=60000",
|
|
296
|
-
"unused-components": "node scripts/unused-components.mjs",
|
|
297
|
-
"format": "sh -c 'oxfmt \"${@:-src/}\"' --",
|
|
298
|
-
"format:check": "sh -c 'oxfmt --check \"${@:-src/}\"' --",
|
|
299
|
-
"tsc": "tsc --noEmit",
|
|
300
|
-
"tsc:tests": "tsc --noEmit -p tsconfig.tests.json",
|
|
301
|
-
"check:api-surface": "tsx .scripts/check-api-surface.ts",
|
|
302
|
-
"check:published-types": "tsx .scripts/check-published-types.ts",
|
|
303
|
-
"check:dist-loads": "tsx .scripts/check-dist-loads.ts",
|
|
304
|
-
"check:aria-surface": "tsx .scripts/check-aria-surface.ts",
|
|
305
|
-
"check:docs-index": "tsx .scripts/check-docs-index.ts",
|
|
306
|
-
"check:bugfix-red-green": "tsx .scripts/check-bugfix-red-green.ts",
|
|
307
|
-
"check:new-component-dod": "tsx .scripts/check-new-component-dod.ts",
|
|
308
|
-
"check:stable-dod": "tsx .scripts/check-stable-dod.ts",
|
|
309
|
-
"check:lint-debt": "tsx .scripts/check-lint-debt.ts",
|
|
310
|
-
"preflight": "tsx .scripts/pre-push-preflight.ts",
|
|
311
|
-
"vitest": "vitest --project=unit",
|
|
312
|
-
"vitest:ui": "vitest --project=unit --ui",
|
|
313
|
-
"vitest:watch": "vitest --project=unit dev",
|
|
314
|
-
"vitest:ci": "pnpm run vitest --project=unit --reporter=dot"
|
|
315
302
|
}
|
|
316
|
-
}
|
|
303
|
+
}
|
package/tailwind.config.ts
CHANGED
|
@@ -39,9 +39,41 @@ export default {
|
|
|
39
39
|
content: "712px",
|
|
40
40
|
// The room Radix leaves a select's popup, so it never overflows the viewport.
|
|
41
41
|
"select-available": "var(--radix-select-content-available-width)",
|
|
42
|
+
// F0SystemBanner's list leaves 8px of screen on each side.
|
|
43
|
+
"system-banner-list": "calc(100vw - 16px)",
|
|
42
44
|
},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
maxHeight: {
|
|
46
|
+
...baseConfig.theme?.extend?.maxHeight,
|
|
47
|
+
// F0SystemBanner's list: the spec's 480px cap, or the height Radix
|
|
48
|
+
// measures below the trigger when that is less.
|
|
49
|
+
"system-banner-list":
|
|
50
|
+
"min(480px,var(--radix-popover-content-available-height))",
|
|
51
|
+
// F0SystemBanner's sheet stops at 85% of the screen, so the page
|
|
52
|
+
// stays visible above it.
|
|
53
|
+
"system-banner-sheet": "85vh",
|
|
54
|
+
},
|
|
55
|
+
width: {
|
|
56
|
+
...baseConfig.theme?.extend?.width,
|
|
57
|
+
// F0SystemBanner's list, the spec's width.
|
|
58
|
+
"system-banner-list": "420px",
|
|
59
|
+
},
|
|
60
|
+
backgroundColor: (utils: PluginUtils) => ({
|
|
61
|
+
...avatarSoft(10)(utils),
|
|
62
|
+
// F0SystemBanner's context strip: the viridian 70 step. The strip
|
|
63
|
+
// carries F0's dark theme, which maps `--selected-70` to the 50 step,
|
|
64
|
+
// so it reads the palette directly.
|
|
65
|
+
"system-banner-context": `hsl(${utils.theme("colors.viridian.70")})`,
|
|
66
|
+
}),
|
|
67
|
+
textColor: (utils: PluginUtils) => ({
|
|
68
|
+
...avatarSoft(80)(utils),
|
|
69
|
+
// F0SystemBanner's list icons: the 60 step, one lighter than their
|
|
70
|
+
// 70 title. F0's `icon-*` tokens are the 50 step, under 3:1 on white.
|
|
71
|
+
"system-banner-icon": {
|
|
72
|
+
critical: "hsl(var(--critical-60))",
|
|
73
|
+
info: "hsl(var(--info-60))",
|
|
74
|
+
warning: "hsl(var(--warning-60))",
|
|
75
|
+
},
|
|
76
|
+
}),
|
|
45
77
|
// Steps Tailwind's pixel scale skips: a mention chip's name sits 3px
|
|
46
78
|
// over its underline, an inline link 5px.
|
|
47
79
|
textUnderlineOffset: {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { t as F0VideoPlayer } from "./F0VideoPlayer-ClfVqxVy.js";
|
|
@@ -1,296 +0,0 @@
|
|
|
1
|
-
import { r as e } from "./i18n-provider-DoTL-0tJ.js";
|
|
2
|
-
import { t } from "./skeleton-BsalZgC5.js";
|
|
3
|
-
import { L as n } from "./tooltip-DFMOxXQO.js";
|
|
4
|
-
import { C as r } from "./F0Button-BCWiHDDV.js";
|
|
5
|
-
import { Ic as i, js as a, ws as o } from "./F0CanvasPanel-lWi0R2Ct.js";
|
|
6
|
-
import { V as s, W as c } from "./useData-BtGI0HO3.js";
|
|
7
|
-
import { dr as l, t as u, wr as d } from "./F0Select-CPIJ4yN6.js";
|
|
8
|
-
import { a as f, i as p, l as ee, n as te, o as m, r as h, s as g, t as _, u as ne } from "./toolbarStyles-CDHbnt8G.js";
|
|
9
|
-
import { n as re, r as ie, t as v } from "./pdfWorker-CzU4sprQ.js";
|
|
10
|
-
import { forwardRef as y, useCallback as b, useEffect as x, useMemo as S, useRef as C, useState as w } from "react";
|
|
11
|
-
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
12
|
-
//#region src/addons/documents/F0DocumentViewer/crispCanvas.ts
|
|
13
|
-
var D = (e, t) => t ? (O(e, t) + .001) / t : e, O = (e, t) => Math.round(t * e), k = (e, t, n) => O(e, n) === O(t, n), ae = (e, t = window.devicePixelRatio || 1) => {
|
|
14
|
-
e && e.width !== 0 && e.height !== 0 && (e.style.width = `${e.width / t}px`, e.style.height = `${e.height / t}px`);
|
|
15
|
-
}, oe = (e, t, n) => {
|
|
16
|
-
let r = null, i = 0;
|
|
17
|
-
return t.forEach((t, a) => {
|
|
18
|
-
if (!t) return;
|
|
19
|
-
let o = t.offsetHeight, s = t.offsetTop, c = s + o, l = e.offsetHeight - n, u = e.scrollTop + n, d = u + l;
|
|
20
|
-
if (!(u < c && d > s)) return;
|
|
21
|
-
let f;
|
|
22
|
-
if (u <= s) f = d > c ? o : d - s;
|
|
23
|
-
else {
|
|
24
|
-
let e = u - s;
|
|
25
|
-
d < c && (e += c - d), f = o - e;
|
|
26
|
-
}
|
|
27
|
-
f > i && (i = f, r = a + 1);
|
|
28
|
-
}), r;
|
|
29
|
-
}, se = ({ label: e, width: n, height: r }) => /* @__PURE__ */ T("div", {
|
|
30
|
-
role: "status",
|
|
31
|
-
"aria-label": e,
|
|
32
|
-
"aria-live": "polite",
|
|
33
|
-
"aria-busy": !0,
|
|
34
|
-
className: "F0DocumentViewer__page mx-auto w-fit px-4 pt-4 last:pb-4",
|
|
35
|
-
children: /* @__PURE__ */ T(t, {
|
|
36
|
-
style: {
|
|
37
|
-
width: n,
|
|
38
|
-
height: r
|
|
39
|
-
},
|
|
40
|
-
className: "rounded-lg border border-solid border-f1-border-secondary shadow-md"
|
|
41
|
-
})
|
|
42
|
-
}), A = ({ toolbarRef: t, currentPage: r, totalPages: f, hasDocument: p, selectedScale: ee, scaleOptions: m, onPreviousPage: g, onNextPage: ne, onZoomIn: re, onZoomOut: ie, onScaleChange: v, rotatable: y, onRotate: b, onPrint: x, onDownload: S, hideDownload: C = !1, actions: w, placement: D }) => {
|
|
43
|
-
let { pdfViewer: O } = e(), k = te(D);
|
|
44
|
-
return /* @__PURE__ */ E("div", {
|
|
45
|
-
ref: t,
|
|
46
|
-
role: "toolbar",
|
|
47
|
-
"aria-label": O.toolbar,
|
|
48
|
-
"data-placement": D,
|
|
49
|
-
className: _(D),
|
|
50
|
-
children: [
|
|
51
|
-
p ? /* @__PURE__ */ E("span", {
|
|
52
|
-
"aria-live": "polite",
|
|
53
|
-
className: n("whitespace-nowrap text-sm font-medium", D === "top" ? "text-f1-foreground-secondary" : "pl-2 text-f1-foreground-inverse"),
|
|
54
|
-
children: [
|
|
55
|
-
r,
|
|
56
|
-
" / ",
|
|
57
|
-
f
|
|
58
|
-
]
|
|
59
|
-
}) : null,
|
|
60
|
-
/* @__PURE__ */ E("div", {
|
|
61
|
-
className: k,
|
|
62
|
-
children: [/* @__PURE__ */ T(h, {
|
|
63
|
-
label: O.previousPage,
|
|
64
|
-
onClick: g,
|
|
65
|
-
icon: d,
|
|
66
|
-
size: "sm"
|
|
67
|
-
}), /* @__PURE__ */ T(h, {
|
|
68
|
-
label: O.nextPage,
|
|
69
|
-
onClick: ne,
|
|
70
|
-
icon: c,
|
|
71
|
-
size: "sm"
|
|
72
|
-
})]
|
|
73
|
-
}),
|
|
74
|
-
/* @__PURE__ */ E("div", {
|
|
75
|
-
className: k,
|
|
76
|
-
children: [
|
|
77
|
-
/* @__PURE__ */ T(h, {
|
|
78
|
-
label: O.zoomOut,
|
|
79
|
-
onClick: ie,
|
|
80
|
-
icon: s
|
|
81
|
-
}),
|
|
82
|
-
/* @__PURE__ */ T(h, {
|
|
83
|
-
label: O.zoomIn,
|
|
84
|
-
onClick: re,
|
|
85
|
-
icon: l
|
|
86
|
-
}),
|
|
87
|
-
/* @__PURE__ */ T(u, {
|
|
88
|
-
hideLabel: !0,
|
|
89
|
-
label: O.scaleSelector,
|
|
90
|
-
options: m,
|
|
91
|
-
value: ee,
|
|
92
|
-
onChange: (e) => v(e)
|
|
93
|
-
})
|
|
94
|
-
]
|
|
95
|
-
}),
|
|
96
|
-
/* @__PURE__ */ E("div", {
|
|
97
|
-
className: k,
|
|
98
|
-
children: [
|
|
99
|
-
y ? /* @__PURE__ */ T(h, {
|
|
100
|
-
label: O.rotate,
|
|
101
|
-
onClick: b,
|
|
102
|
-
icon: o
|
|
103
|
-
}) : null,
|
|
104
|
-
/* @__PURE__ */ T(h, {
|
|
105
|
-
label: O.print,
|
|
106
|
-
onClick: x,
|
|
107
|
-
icon: a
|
|
108
|
-
}),
|
|
109
|
-
C ? null : /* @__PURE__ */ T(h, {
|
|
110
|
-
label: O.download,
|
|
111
|
-
onClick: S,
|
|
112
|
-
icon: i
|
|
113
|
-
}),
|
|
114
|
-
w?.map((e, t) => /* @__PURE__ */ T(h, {
|
|
115
|
-
label: e.label,
|
|
116
|
-
onClick: e.onClick,
|
|
117
|
-
icon: e.icon
|
|
118
|
-
}, `${e.label}-${t}`))
|
|
119
|
-
]
|
|
120
|
-
})
|
|
121
|
-
]
|
|
122
|
-
});
|
|
123
|
-
};
|
|
124
|
-
//#endregion
|
|
125
|
-
//#region src/addons/documents/F0DocumentViewer/components/PdfViewer.tsx
|
|
126
|
-
v();
|
|
127
|
-
var j = 48, ce = 150, M = y((n, i) => {
|
|
128
|
-
let { url: a, filename: o = "document.pdf", page: s = 0, pagesToDisplay: c = [], initialScale: l = "page-width", withCredentials: u = !0, rotatable: d = !1, initialRotation: te = 0, onRotationChange: h, onPdfLoaded: _, onPageChange: v, actions: y, toolbar: O = "top", hideDownload: M = !1, ...le } = n, { pdfViewer: N } = e(), P = Math.max(2, typeof window > "u" ? 1 : window.devicePixelRatio || 1), [F, ue] = w(null), [I, L] = w([]), [R, z] = w(1), [B, V] = w(0), [H, U] = w(l), [W, de] = w(te), G = C(null), K = C(null), q = C([]), J = c.length > 0 ? c.length : F?.numPages, Y = b(() => O === "top" ? K.current?.offsetHeight ?? 0 : 0, [O]), fe = I.find(Boolean), pe = (fe?.originalWidth ?? 595) * R, me = (fe?.originalHeight ?? 842) * R, he = S(() => [
|
|
129
|
-
{
|
|
130
|
-
value: "page-width",
|
|
131
|
-
label: N.pageWidth
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
value: "page-fit",
|
|
135
|
-
label: N.pageFit
|
|
136
|
-
},
|
|
137
|
-
...f.map((e) => ({
|
|
138
|
-
value: e,
|
|
139
|
-
label: `${Number(e) * 100}%`
|
|
140
|
-
}))
|
|
141
|
-
], [N.pageWidth, N.pageFit]), ge = S(() => ({
|
|
142
|
-
url: a,
|
|
143
|
-
withCredentials: u
|
|
144
|
-
}), [a, u]), X = b((e) => {
|
|
145
|
-
let t = (J ?? 1) - 1, n = Math.min(Math.max(e, 0), t), r = q.current[n], i = r?.offsetParent;
|
|
146
|
-
r && i instanceof HTMLElement && (i.scrollTop = r.offsetTop - Y() - 10);
|
|
147
|
-
}, [J, Y]), Z = b((e) => {
|
|
148
|
-
let t = I[B - 1], n = G.current;
|
|
149
|
-
if (!t || !n || n.clientWidth <= 0) return;
|
|
150
|
-
let r = K.current?.offsetHeight ?? 0, i = W === 90 || W === 270, a = (e) => i ? e.originalHeight : e.originalWidth, o = a(t), s = i ? t.originalWidth : t.originalHeight, c = e === "page-fit" ? Math.max(...I.filter(Boolean).map(a)) : o, l = p(e, {
|
|
151
|
-
width: c,
|
|
152
|
-
height: s
|
|
153
|
-
}, {
|
|
154
|
-
width: n.clientWidth - j,
|
|
155
|
-
height: n.clientHeight - r - j
|
|
156
|
-
});
|
|
157
|
-
z((e) => k(e, l, c) ? e : l), U(e);
|
|
158
|
-
}, [
|
|
159
|
-
I,
|
|
160
|
-
B,
|
|
161
|
-
W
|
|
162
|
-
]), _e = b((e) => {
|
|
163
|
-
e === "page-width" || e === "page-fit" ? Z(e) : (z(Number(e)), U(e));
|
|
164
|
-
}, [Z]), Q = b((e) => {
|
|
165
|
-
if (e === void 0) return;
|
|
166
|
-
z(e);
|
|
167
|
-
let t = f.find((t) => Number(t) === e);
|
|
168
|
-
t && U(t);
|
|
169
|
-
}, []), ve = b(() => Q(g(R)), [R, Q]), ye = b(() => Q(m(R)), [R, Q]), be = b(() => {
|
|
170
|
-
de((e) => {
|
|
171
|
-
let t = (e + 90) % 360;
|
|
172
|
-
return h?.(t), t;
|
|
173
|
-
});
|
|
174
|
-
}, [h]), xe = b((e) => {
|
|
175
|
-
ue(e), _?.(e), setTimeout(() => {
|
|
176
|
-
V(s + 1), X(s);
|
|
177
|
-
}, 0);
|
|
178
|
-
}, [
|
|
179
|
-
_,
|
|
180
|
-
s,
|
|
181
|
-
X
|
|
182
|
-
]), Se = b((e) => {
|
|
183
|
-
let t = e.target;
|
|
184
|
-
if (!(t instanceof HTMLElement)) return;
|
|
185
|
-
let n = oe(t, q.current, Y());
|
|
186
|
-
n && V(n);
|
|
187
|
-
}, [Y]), Ce = b(() => {
|
|
188
|
-
ne(F);
|
|
189
|
-
}, [F]), we = b(() => {
|
|
190
|
-
ee(F, o);
|
|
191
|
-
}, [F, o]);
|
|
192
|
-
x(() => {
|
|
193
|
-
ue(null), L([]), q.current = [];
|
|
194
|
-
}, [a]), x(() => {
|
|
195
|
-
X(s);
|
|
196
|
-
}, [s, X]), x(() => {
|
|
197
|
-
B > 0 && v?.(B);
|
|
198
|
-
}, [B, v]), x(() => {
|
|
199
|
-
I.length > 0 && (l === "page-width" || l === "page-fit") && Z(l);
|
|
200
|
-
}, [I.length, l]), x(() => {
|
|
201
|
-
(H === "page-width" || H === "page-fit") && Z(H);
|
|
202
|
-
}, [W]);
|
|
203
|
-
let $ = C();
|
|
204
|
-
r({
|
|
205
|
-
ref: G,
|
|
206
|
-
onResize: () => {
|
|
207
|
-
clearTimeout($.current), $.current = setTimeout(() => {
|
|
208
|
-
(H === "page-width" || H === "page-fit") && Z(H);
|
|
209
|
-
}, ce);
|
|
210
|
-
}
|
|
211
|
-
}), x(function() {
|
|
212
|
-
return () => clearTimeout($.current);
|
|
213
|
-
}, []), x(() => {
|
|
214
|
-
let e = G.current;
|
|
215
|
-
if (!e) return;
|
|
216
|
-
let t = (e) => {
|
|
217
|
-
let t = e.target;
|
|
218
|
-
t instanceof HTMLAnchorElement && (t.target = "_blank", t.rel = "noopener noreferrer");
|
|
219
|
-
};
|
|
220
|
-
return e.addEventListener("click", t, !0), () => e.removeEventListener("click", t, !0);
|
|
221
|
-
}, []);
|
|
222
|
-
let Te = {
|
|
223
|
-
toolbarRef: K,
|
|
224
|
-
placement: O,
|
|
225
|
-
currentPage: B,
|
|
226
|
-
totalPages: J,
|
|
227
|
-
hasDocument: !!F?.numPages,
|
|
228
|
-
selectedScale: H,
|
|
229
|
-
scaleOptions: he,
|
|
230
|
-
onPreviousPage: () => X(B - 2),
|
|
231
|
-
onNextPage: () => X(B),
|
|
232
|
-
onZoomIn: ve,
|
|
233
|
-
onZoomOut: ye,
|
|
234
|
-
onScaleChange: _e,
|
|
235
|
-
rotatable: d,
|
|
236
|
-
onRotate: be,
|
|
237
|
-
onPrint: Ce,
|
|
238
|
-
onDownload: we,
|
|
239
|
-
hideDownload: M,
|
|
240
|
-
actions: y
|
|
241
|
-
};
|
|
242
|
-
return /* @__PURE__ */ E("div", {
|
|
243
|
-
ref: i,
|
|
244
|
-
...le,
|
|
245
|
-
className: "F0DocumentViewer__surface relative flex h-full w-full flex-col overflow-hidden border border-solid border-f1-border-secondary",
|
|
246
|
-
children: [/* @__PURE__ */ E("div", {
|
|
247
|
-
ref: G,
|
|
248
|
-
onScroll: Se,
|
|
249
|
-
className: "F0DocumentViewer__surface relative flex h-full flex-col overflow-auto [scrollbar-gutter:stable_both-edges]",
|
|
250
|
-
children: [O === "top" ? /* @__PURE__ */ T(A, { ...Te }) : null, a ? /* @__PURE__ */ T(re, {
|
|
251
|
-
file: ge,
|
|
252
|
-
onLoadSuccess: xe,
|
|
253
|
-
loading: /* @__PURE__ */ T(se, {
|
|
254
|
-
label: N.loading,
|
|
255
|
-
width: pe,
|
|
256
|
-
height: me
|
|
257
|
-
}),
|
|
258
|
-
children: F ? Array.from({ length: J ?? 0 }).map((e, n) => {
|
|
259
|
-
let r = (c.length > 0 ? c[n] : n) + 1;
|
|
260
|
-
return /* @__PURE__ */ T("div", {
|
|
261
|
-
className: "F0DocumentViewer__page mx-auto w-fit px-4 pt-4 last:pb-4",
|
|
262
|
-
children: /* @__PURE__ */ T(ie, {
|
|
263
|
-
className: "overflow-hidden rounded-lg border border-solid border-f1-border-secondary shadow-md",
|
|
264
|
-
pageNumber: r,
|
|
265
|
-
scale: D(R, W === 90 || W === 270 ? I[n]?.originalHeight : I[n]?.originalWidth),
|
|
266
|
-
rotate: W,
|
|
267
|
-
devicePixelRatio: P,
|
|
268
|
-
loading: /* @__PURE__ */ T(t, { style: {
|
|
269
|
-
width: pe,
|
|
270
|
-
height: me
|
|
271
|
-
} }),
|
|
272
|
-
renderForms: !0,
|
|
273
|
-
renderTextLayer: !0,
|
|
274
|
-
inputRef: (e) => {
|
|
275
|
-
q.current[n] = e;
|
|
276
|
-
},
|
|
277
|
-
onRenderSuccess: () => ae(q.current[n]?.querySelector("canvas"), P),
|
|
278
|
-
onLoadSuccess: (e) => {
|
|
279
|
-
L((t) => {
|
|
280
|
-
let r = [...t];
|
|
281
|
-
return r[n] = {
|
|
282
|
-
originalWidth: e.originalWidth,
|
|
283
|
-
originalHeight: e.originalHeight
|
|
284
|
-
}, r;
|
|
285
|
-
});
|
|
286
|
-
}
|
|
287
|
-
})
|
|
288
|
-
}, n);
|
|
289
|
-
}) : null
|
|
290
|
-
}) : null]
|
|
291
|
-
}), O === "floating" ? /* @__PURE__ */ T(A, { ...Te }) : null]
|
|
292
|
-
});
|
|
293
|
-
});
|
|
294
|
-
M.displayName = "PdfViewerBase";
|
|
295
|
-
//#endregion
|
|
296
|
-
export { M as default };
|