@arbidocs/blocks 0.5.139 → 0.5.141
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/{ConnectedCallDock-L27WYW4Y.cjs → ConnectedCallDock-ZNS5BS2R.cjs} +20 -20
- package/dist/{ConnectedCallDock-L27WYW4Y.cjs.map → ConnectedCallDock-ZNS5BS2R.cjs.map} +1 -1
- package/dist/{ConnectedCallRoom-ZXSS6CVG.cjs → ConnectedCallRoom-ACNVSFH7.cjs} +13 -13
- package/dist/{ConnectedCallRoom-ZXSS6CVG.cjs.map → ConnectedCallRoom-ACNVSFH7.cjs.map} +1 -1
- package/dist/{ConnectedNativeDocxComparison-X2O5OIYZ.cjs → ConnectedNativeDocxComparison-QKY66ZJ7.cjs} +18 -18
- package/dist/{ConnectedNativeDocxComparison-X2O5OIYZ.cjs.map → ConnectedNativeDocxComparison-QKY66ZJ7.cjs.map} +1 -1
- package/dist/{ConnectedPresentation-XVCFF25X.cjs → ConnectedPresentation-3JXN6SRT.cjs} +17 -17
- package/dist/{ConnectedPresentation-XVCFF25X.cjs.map → ConnectedPresentation-3JXN6SRT.cjs.map} +1 -1
- package/dist/{ConnectedSlidesTab-UG2NUFPS.cjs → ConnectedSlidesTab-IECS2MJI.cjs} +15 -15
- package/dist/{ConnectedSlidesTab-UG2NUFPS.cjs.map → ConnectedSlidesTab-IECS2MJI.cjs.map} +1 -1
- package/dist/{ConnectedStreamedWordArtifact-BI6WFIAW.cjs → ConnectedStreamedWordArtifact-PHEOVHKH.cjs} +18 -18
- package/dist/{ConnectedStreamedWordArtifact-BI6WFIAW.cjs.map → ConnectedStreamedWordArtifact-PHEOVHKH.cjs.map} +1 -1
- package/dist/{DocumentReviewCard-NZCGQ7SH.cjs → DocumentReviewCard-ENCPTGJE.cjs} +16 -16
- package/dist/{DocumentReviewCard-NZCGQ7SH.cjs.map → DocumentReviewCard-ENCPTGJE.cjs.map} +1 -1
- package/dist/{FilesViewerDialog-NKDVTI6H.cjs → FilesViewerDialog-OFUBS5VA.cjs} +42 -42
- package/dist/{FilesViewerDialog-NKDVTI6H.cjs.map → FilesViewerDialog-OFUBS5VA.cjs.map} +1 -1
- package/dist/{NativeDocxEditor-KM6U4ZLA.cjs → NativeDocxEditor-7A3SYDAJ.cjs} +6 -6
- package/dist/{NativeDocxEditor-KM6U4ZLA.cjs.map → NativeDocxEditor-7A3SYDAJ.cjs.map} +1 -1
- package/dist/{WorkspaceTableView-B5FAVVVA.cjs → WorkspaceTableView-A2YTG4OQ.cjs} +9 -9
- package/dist/{WorkspaceTableView-B5FAVVVA.cjs.map → WorkspaceTableView-A2YTG4OQ.cjs.map} +1 -1
- package/dist/agents/index.cjs +296 -296
- package/dist/{ai-XVDR2XYV.cjs → ai-QEXZ4SYR.cjs} +25 -25
- package/dist/ai-QEXZ4SYR.cjs.map +1 -0
- package/dist/calls/index.cjs +120 -120
- package/dist/{chunk-SHGUTM42.cjs → chunk-2EY52GDM.cjs} +11 -11
- package/dist/{chunk-SHGUTM42.cjs.map → chunk-2EY52GDM.cjs.map} +1 -1
- package/dist/{chunk-FYNNNQ6H.cjs → chunk-33GOYI3O.cjs} +4 -4
- package/dist/{chunk-FYNNNQ6H.cjs.map → chunk-33GOYI3O.cjs.map} +1 -1
- package/dist/{chunk-RJE6KXJQ.cjs → chunk-6CGMSJLB.cjs} +3 -3
- package/dist/{chunk-RJE6KXJQ.cjs.map → chunk-6CGMSJLB.cjs.map} +1 -1
- package/dist/{chunk-C6DF6WB2.cjs → chunk-6JLRF7N6.cjs} +4 -3
- package/dist/chunk-6JLRF7N6.cjs.map +1 -0
- package/dist/{chunk-L62EU3TQ.cjs → chunk-A53YMUOX.cjs} +3 -3
- package/dist/{chunk-L62EU3TQ.cjs.map → chunk-A53YMUOX.cjs.map} +1 -1
- package/dist/{chunk-N5UI363Q.cjs → chunk-ECSOXKJQ.cjs} +3 -3
- package/dist/{chunk-N5UI363Q.cjs.map → chunk-ECSOXKJQ.cjs.map} +1 -1
- package/dist/{chunk-Q77OKXYM.cjs → chunk-EYXU32D7.cjs} +6 -6
- package/dist/{chunk-Q77OKXYM.cjs.map → chunk-EYXU32D7.cjs.map} +1 -1
- package/dist/{chunk-REP5GA2Z.cjs → chunk-FRRF2OQ7.cjs} +11 -11
- package/dist/{chunk-REP5GA2Z.cjs.map → chunk-FRRF2OQ7.cjs.map} +1 -1
- package/dist/{chunk-3Y75LUCT.cjs → chunk-HZG4GRDA.cjs} +3 -3
- package/dist/{chunk-3Y75LUCT.cjs.map → chunk-HZG4GRDA.cjs.map} +1 -1
- package/dist/{chunk-EY23TOPI.cjs → chunk-IFJBE7M5.cjs} +11 -11
- package/dist/{chunk-EY23TOPI.cjs.map → chunk-IFJBE7M5.cjs.map} +1 -1
- package/dist/{chunk-DBGBAD4J.cjs → chunk-INNHU46B.cjs} +4 -4
- package/dist/{chunk-DBGBAD4J.cjs.map → chunk-INNHU46B.cjs.map} +1 -1
- package/dist/{chunk-SS7IYHLK.cjs → chunk-IZNSTFAT.cjs} +69 -69
- package/dist/{chunk-SS7IYHLK.cjs.map → chunk-IZNSTFAT.cjs.map} +1 -1
- package/dist/{chunk-RYVZDFVO.cjs → chunk-JJZOL5MG.cjs} +3 -3
- package/dist/{chunk-RYVZDFVO.cjs.map → chunk-JJZOL5MG.cjs.map} +1 -1
- package/dist/{chunk-BT2QTDZ4.cjs → chunk-KP7BQIZL.cjs} +35 -35
- package/dist/{chunk-BT2QTDZ4.cjs.map → chunk-KP7BQIZL.cjs.map} +1 -1
- package/dist/{chunk-LWWPIYFD.cjs → chunk-LFMOQALU.cjs} +48 -48
- package/dist/{chunk-LWWPIYFD.cjs.map → chunk-LFMOQALU.cjs.map} +1 -1
- package/dist/{chunk-JXZM5ODS.cjs → chunk-MBXXWTKT.cjs} +28 -28
- package/dist/{chunk-JXZM5ODS.cjs.map → chunk-MBXXWTKT.cjs.map} +1 -1
- package/dist/{chunk-EHFSR633.cjs → chunk-MEYQLQWS.cjs} +13 -13
- package/dist/{chunk-EHFSR633.cjs.map → chunk-MEYQLQWS.cjs.map} +1 -1
- package/dist/{chunk-2WHI2PAJ.cjs → chunk-N2YDYEUL.cjs} +6 -6
- package/dist/{chunk-2WHI2PAJ.cjs.map → chunk-N2YDYEUL.cjs.map} +1 -1
- package/dist/{chunk-PA7YEXL3.cjs → chunk-N3H3YAKY.cjs} +4 -4
- package/dist/{chunk-PA7YEXL3.cjs.map → chunk-N3H3YAKY.cjs.map} +1 -1
- package/dist/{chunk-TKWYFNWW.cjs → chunk-NGPYPW7M.cjs} +62 -60
- package/dist/chunk-NGPYPW7M.cjs.map +1 -0
- package/dist/{chunk-FDRZJFNV.cjs → chunk-O6OLY43S.cjs} +5 -5
- package/dist/{chunk-FDRZJFNV.cjs.map → chunk-O6OLY43S.cjs.map} +1 -1
- package/dist/{chunk-KZWPBL2P.cjs → chunk-OOW7H2YD.cjs} +6 -6
- package/dist/{chunk-KZWPBL2P.cjs.map → chunk-OOW7H2YD.cjs.map} +1 -1
- package/dist/{chunk-YEGOCUBR.cjs → chunk-ORQXGMCC.cjs} +15 -15
- package/dist/{chunk-YEGOCUBR.cjs.map → chunk-ORQXGMCC.cjs.map} +1 -1
- package/dist/chunk-QCC57APO.cjs +18 -0
- package/dist/{chunk-SUPCMKLP.cjs.map → chunk-QCC57APO.cjs.map} +1 -1
- package/dist/{chunk-DT4ORVVI.cjs → chunk-QFXOTJ6G.cjs} +3 -3
- package/dist/{chunk-DT4ORVVI.cjs.map → chunk-QFXOTJ6G.cjs.map} +1 -1
- package/dist/{chunk-G7E5IJST.cjs → chunk-QW6NCUR7.cjs} +5 -5
- package/dist/{chunk-G7E5IJST.cjs.map → chunk-QW6NCUR7.cjs.map} +1 -1
- package/dist/{chunk-CKKODA5B.cjs → chunk-R5NTEW4L.cjs} +26 -26
- package/dist/{chunk-CKKODA5B.cjs.map → chunk-R5NTEW4L.cjs.map} +1 -1
- package/dist/{chunk-F5HT73TR.cjs → chunk-RGSFPWG2.cjs} +50 -50
- package/dist/{chunk-F5HT73TR.cjs.map → chunk-RGSFPWG2.cjs.map} +1 -1
- package/dist/{chunk-K3WSXEEI.cjs → chunk-RSQGDXAF.cjs} +3 -3
- package/dist/{chunk-K3WSXEEI.cjs.map → chunk-RSQGDXAF.cjs.map} +1 -1
- package/dist/{chunk-6JI4AXAY.cjs → chunk-TOYKBRAU.cjs} +12 -12
- package/dist/{chunk-6JI4AXAY.cjs.map → chunk-TOYKBRAU.cjs.map} +1 -1
- package/dist/{chunk-CYA7MDHZ.cjs → chunk-TXBXIUTX.cjs} +6 -6
- package/dist/{chunk-CYA7MDHZ.cjs.map → chunk-TXBXIUTX.cjs.map} +1 -1
- package/dist/{chunk-RDBUQCAS.cjs → chunk-U6XMZG6G.cjs} +3 -3
- package/dist/{chunk-RDBUQCAS.cjs.map → chunk-U6XMZG6G.cjs.map} +1 -1
- package/dist/{chunk-LYDPVFNS.cjs → chunk-UD56Y6UA.cjs} +4 -4
- package/dist/{chunk-LYDPVFNS.cjs.map → chunk-UD56Y6UA.cjs.map} +1 -1
- package/dist/{chunk-DNWJUTK6.cjs → chunk-UWTCK5IN.cjs} +6 -6
- package/dist/{chunk-DNWJUTK6.cjs.map → chunk-UWTCK5IN.cjs.map} +1 -1
- package/dist/{chunk-7HU2NQVO.cjs → chunk-VCDD763Y.cjs} +3 -3
- package/dist/{chunk-7HU2NQVO.cjs.map → chunk-VCDD763Y.cjs.map} +1 -1
- package/dist/{chunk-HG72AVXX.cjs → chunk-VF26CUE3.cjs} +3 -3
- package/dist/{chunk-HG72AVXX.cjs.map → chunk-VF26CUE3.cjs.map} +1 -1
- package/dist/{chunk-7YIN4Q63.cjs → chunk-X46QYO4S.cjs} +4 -4
- package/dist/{chunk-7YIN4Q63.cjs.map → chunk-X46QYO4S.cjs.map} +1 -1
- package/dist/{chunk-N7B5OAI5.cjs → chunk-ZPIZINH2.cjs} +4 -4
- package/dist/{chunk-N7B5OAI5.cjs.map → chunk-ZPIZINH2.cjs.map} +1 -1
- package/dist/{chunk-RFPZKHZ6.cjs → chunk-ZTHYJP4G.cjs} +7 -7
- package/dist/{chunk-RFPZKHZ6.cjs.map → chunk-ZTHYJP4G.cjs.map} +1 -1
- package/dist/connect/docx.cjs +22 -22
- package/dist/connect/index.cjs +1088 -1029
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/viewer.cjs +30 -30
- package/dist/connection/billing/ChangeProPlan.d.ts +1 -1
- package/dist/connection/billing/ChangeProPlan.js +9 -3
- package/dist/connection/billing/ChangeProPlan.js.map +2 -2
- package/dist/connection/billing/ConnectedPricesPrefetch.d.ts +1 -0
- package/dist/connection/billing/ConnectedPricesPrefetch.js +12 -0
- package/dist/connection/billing/ConnectedPricesPrefetch.js.map +7 -0
- package/dist/connection/billing/ConnectedWelcomeDialog.js +21 -3
- package/dist/connection/billing/ConnectedWelcomeDialog.js.map +2 -2
- package/dist/connection/billing/NewProjectFlow.js +3 -14
- package/dist/connection/billing/NewProjectFlow.js.map +2 -2
- package/dist/connection/billing/PlanPricesSkeleton.d.ts +3 -0
- package/dist/connection/billing/PlanPricesSkeleton.js +40 -0
- package/dist/connection/billing/PlanPricesSkeleton.js.map +7 -0
- package/dist/connection/billing/SubscriptionPlans.d.ts +1 -1
- package/dist/connection/billing/SubscriptionPlans.js +19 -6
- package/dist/connection/billing/SubscriptionPlans.js.map +2 -2
- package/dist/connection/billing/index.d.ts +1 -0
- package/dist/connection/billing/index.js +2 -0
- package/dist/connection/billing/index.js.map +2 -2
- package/dist/connection/notification-center/NotificationEvent.js +1 -1
- package/dist/connection/notification-center/NotificationEvent.js.map +1 -1
- package/dist/connection/viewer/useViewerBlobs.d.ts +3 -3
- package/dist/connection/viewer/useViewerBlobs.js +3 -1
- package/dist/connection/viewer/useViewerBlobs.js.map +2 -2
- package/dist/dashboards/index.cjs +1 -1
- package/dist/docx/index.cjs +38 -38
- package/dist/docx/review/DocxEditorReview.js +2 -1
- package/dist/docx/review/DocxEditorReview.js.map +2 -2
- package/dist/embed/index.cjs +37 -37
- package/dist/facts/index.cjs +43 -43
- package/dist/files/index.cjs +224 -224
- package/dist/index.cjs +1698 -1698
- package/dist/settings/WelcomeDialog.d.ts +1 -1
- package/dist/settings/WelcomeDialog.js.map +1 -1
- package/dist/settings/index.cjs +147 -147
- package/dist/shell/index.cjs +87 -87
- package/dist/studio/index.cjs +29 -29
- package/dist/styles.css +1 -1
- package/dist/vite/index.cjs +11 -10
- package/dist/vite/index.cjs.map +1 -1
- package/dist/vite/index.d.ts +4 -13
- package/dist/vite/index.js +11 -10
- package/dist/vite/index.js.map +1 -1
- package/dist/workflow-canvas/index.cjs +54 -54
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +5 -5
- package/dist/ai-XVDR2XYV.cjs.map +0 -1
- package/dist/chunk-C6DF6WB2.cjs.map +0 -1
- package/dist/chunk-SUPCMKLP.cjs +0 -18
- package/dist/chunk-TKWYFNWW.cjs.map +0 -1
package/dist/vite/index.cjs
CHANGED
|
@@ -35,16 +35,17 @@ function codeSplitting() {
|
|
|
35
35
|
groups: [
|
|
36
36
|
{ name: "preload-helper", test: /vite\/preload-helper/, priority: 100 },
|
|
37
37
|
{ name: vendorChunkOf },
|
|
38
|
-
// Vite's build-import lexer has a fixed WASM heap: the
|
|
39
|
-
//
|
|
40
|
-
//
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
38
|
+
// Vite's build-import lexer has a fixed WASM heap: the whole Word editor in one chunk
|
|
39
|
+
// exceeds it. Split it along package boundaries only (core, react, i18n), which depend on
|
|
40
|
+
// each other one way. A size-bounded split (`maxSize`) cuts through the cyclic modules of
|
|
41
|
+
// one package and yields chunks that import each other, so the editor broke with
|
|
42
|
+
// "X is not iterable" depending on which chunk loaded first. `scripts/check-chunk-cycles.mjs`
|
|
43
|
+
// guards the built output. Shared React/runtime dependencies stay out of the group.
|
|
44
|
+
...["core", "react", "i18n"].map((pkg) => ({
|
|
45
|
+
name: `docx-editor-${pkg}`,
|
|
46
|
+
test: new RegExp(`node_modules/@docx-editor\\.dev/${pkg}/`),
|
|
47
|
+
includeDependenciesRecursively: false
|
|
48
|
+
}))
|
|
48
49
|
]
|
|
49
50
|
};
|
|
50
51
|
}
|
package/dist/vite/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/vite/index.ts"],"names":["readdir","path","promisify","brotliCompress","gzip","readFile","constants","writeFile","require","createRequire","createReadStream"],"mappings":";;;;;;;;;;;;;;AAyBO,SAAS,cAAc,EAAA,EAA2B;AACvD,EAAA,IAAI,GAAG,QAAA,CAAS,qBAAqB,CAAA,IAAK,EAAA,CAAG,SAAS,yBAAyB,CAAA;AAC7E,IAAA,OAAO,YAAA;AACT,EAAA,IACE,GAAG,QAAA,CAAS,yBAAyB,KACrC,EAAA,CAAG,QAAA,CAAS,wCAAwC,CAAA,IACpD,EAAA,CAAG,QAAA,CAAS,oBAAoB,KAChC,EAAA,CAAG,QAAA,CAAS,8BAA8B,CAAA,IAC1C,EAAA,CAAG,SAAS,mCAAmC,CAAA;AAE/C,IAAA,OAAO,eAAA;AACT,EAAA,IAAI,GAAG,QAAA,CAAS,4BAA4B,CAAA,IAAK,EAAA,CAAG,SAAS,gCAAgC,CAAA;AAC3F,IAAA,OAAO,SAAA;AAET,EAAA,IACE,EAAA,CAAG,QAAA,CAAS,8BAA8B,CAAA,IACzC,EAAA,CAAG,SAAS,sBAAsB,CAAA,IAAK,CAAC,EAAA,CAAG,QAAA,CAAS,4BAA4B,KAChF,EAAA,CAAG,QAAA,CAAS,sBAAsB,CAAA,IAAK,CAAC,EAAA,CAAG,SAAS,2BAA2B,CAAA,IAChF,EAAA,CAAG,QAAA,CAAS,qBAAqB,CAAA;AAEjC,IAAA,OAAO,UAAA;AACT,EAAA,IACE,EAAA,CAAG,QAAA,CAAS,uBAAuB,CAAA,IACnC,GAAG,QAAA,CA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\n * site's `vite.config` imports it, never its browser code.\n *\n * In a site's `vite.config`: `plugins: [react(), ...arbiVitePlugins()]`, and the vendor groups as\n * `build.rolldownOptions.output.codeSplitting = codeSplitting()` (Vite 8) or\n * `build.rollupOptions.output.manualChunks = manualChunks` (Vite 6/7).\n *\n * The heavy kit parts (the Word editor, the PDF engine, the data grid, the calendar) are loaded on\n * demand by the kits themselves. Eager vendor groups leave them out: mixing shared helpers into\n * a lazy library chunk would make sign-in download the whole library. The Word editor has its\n * own size-bounded, entry-aware group that does not capture its shared dependencies.\n */\nimport { createReadStream } from 'node:fs'\nimport { readdir, readFile, writeFile } from 'node:fs/promises'\nimport { createRequire } from 'node:module'\nimport path from 'node:path'\nimport { promisify } from 'node:util'\nimport { brotliCompress, constants, gzip } from 'node:zlib'\nimport type { Plugin } from 'vite'\n\n/**\n * The vendor chunk a module belongs to, or null (left to the bundler): libraries every page loads\n * and that rarely change, so they stay cached across a site's deploys.\n */\nexport function vendorChunkOf(id: string): string | null {\n if (id.includes('node_modules/react/') || id.includes('node_modules/react-dom/'))\n return 'react-core'\n if (\n id.includes('node_modules/@radix-ui/') ||\n id.includes('node_modules/class-variance-authority/') ||\n id.includes('node_modules/clsx/') ||\n id.includes('node_modules/tailwind-merge/') ||\n id.includes('node_modules/tailwindcss-animate/')\n )\n return 'ui-components'\n if (id.includes('node_modules/react-router/') || id.includes('node_modules/react-router-dom/'))\n return 'routing'\n // KaTeX (rehype-katex / remark-math) is loaded on demand when content has math: left out.\n if (\n id.includes('node_modules/react-markdown/') ||\n (id.includes('node_modules/rehype-') && !id.includes('node_modules/rehype-katex/')) ||\n (id.includes('node_modules/remark-') && !id.includes('node_modules/remark-math/')) ||\n id.includes('node_modules/shiki/')\n )\n return 'markdown'\n if (\n id.includes('node_modules/zustand/') ||\n id.includes('node_modules/immer/') ||\n id.includes('node_modules/remeda/') ||\n id.includes('node_modules/@tanstack/react-query/')\n )\n return 'state-utils'\n if (id.includes('node_modules/framer-motion/') || id.includes('node_modules/sonner/'))\n return 'animation'\n if (\n id.includes('node_modules/@auth0/') ||\n id.includes('node_modules/axios/') ||\n id.includes('node_modules/js-cookie/')\n )\n return 'auth-api'\n // The end-to-end encryption library: needed at sign-in, large, and it never changes.\n if (id.includes('node_modules/libsodium')) return 'sodium'\n return null\n}\n\n/**\n * Rolldown's (Vite 8) `build.rolldownOptions.output.codeSplitting`. Vite's dynamic-import preload\n * helper gets its own chunk: left unpinned, the bundler parks it in a chunk that also imports\n * lazily, and the entry then preloads that whole chunk before the page renders.\n */\nexport function codeSplitting() {\n return {\n groups: [\n { name: 'preload-helper', test: /vite\\/preload-helper/, priority: 100 },\n { name: vendorChunkOf },\n // Vite's build-import lexer has a fixed WASM heap: the combined Word editor\n // can exceed it. Bound its chunks without pulling lazy editor code into an\n // eager vendor group or capturing its shared React/runtime dependencies.\n {\n name: 'docx-editor',\n test: /node_modules\\/@docx-editor\\.dev\\//,\n entriesAware: true,\n includeDependenciesRecursively: false,\n maxSize: 2_000_000,\n },\n ],\n }\n}\n\n/** Rollup's (Vite 6/7) `build.rollupOptions.output.manualChunks`, with the same vendor groups. */\nexport function manualChunks(id: string): string | undefined {\n return vendorChunkOf(id) ?? undefined\n}\n\nconst COMPRESSIBLE = /\\.(?:m?js|css|html|json|svg|wasm|txt|xml|webmanifest|ttf|otf)$/\n\n/**\n * Files a deployment rewrites after `vite build` (a compressed copy would serve the stale bytes):\n * the service worker (stamped with the build), the runtime config and web manifests (rendered when\n * the container starts), and `index.html` (tiny, and never cached).\n */\nexport const PRECOMPRESS_EXCLUDE: readonly string[] = [\n 'sw.js',\n 'config.json',\n '*.webmanifest',\n 'asset-manifest.json',\n 'index.html',\n]\n\nexport interface PrecompressOptions {\n /** Smallest file compressed, in bytes. Default 1024. */\n minSize?: number\n /**\n * File names (or `*` patterns, matched against the file name) never compressed: anything the\n * deployment changes after the build. Default `PRECOMPRESS_EXCLUDE`; pass your own list to\n * replace it (`[...PRECOMPRESS_EXCLUDE, 'extra.json']` to extend it).\n */\n exclude?: readonly string[]\n}\n\nasync function filesUnder(dir: string): Promise<string[]> {\n const entries = await readdir(dir, { withFileTypes: true, recursive: true })\n return entries.filter((e) => e.isFile()).map((e) => path.join(e.parentPath, e.name))\n}\n\nconst toPattern = (glob: string) =>\n new RegExp(`^${glob.replace(/[.+?^${}()|[\\]\\\\]/g, '\\\\$&').replace(/\\*/g, '.*')}$`)\n\n/** Runs `task` over `items`, `limit` at a time. */\nasync function eachLimited<T>(\n items: readonly T[],\n limit: number,\n task: (item: T) => Promise<void>\n) {\n let next = 0\n const worker = async () => {\n while (next < items.length) await task(items[next++])\n }\n await Promise.all(Array.from({ length: Math.min(limit, items.length) }, worker))\n}\n\n/**\n * Writes `<file>.br` (brotli, quality 11) and `<file>.gz` (gzip, level 9) beside every compressible\n * file of the build, including those copied from `public/`, so the web server sends them as they\n * are (nginx `gzip_static` / `brotli_static`): the smallest transfer, at no cost per request. Files\n * the deployment rewrites later are left out (`exclude`).\n */\nexport function precompress({\n minSize = 1024,\n exclude = PRECOMPRESS_EXCLUDE,\n}: PrecompressOptions = {}): Plugin {\n const br = promisify(brotliCompress)\n const gz = promisify(gzip)\n const excluded = exclude.map(toPattern)\n let outDir = ''\n return {\n name: 'arbi-precompress',\n apply: 'build',\n enforce: 'post',\n configResolved(config) {\n outDir = path.resolve(config.root, config.build.outDir)\n },\n async closeBundle() {\n const files = (await filesUnder(outDir)).filter(\n (f) => COMPRESSIBLE.test(f) && !excluded.some((p) => p.test(path.basename(f)))\n )\n // Brotli at quality 11 is CPU-heavy: a few files at a time.\n await eachLimited(files, 6, async (file) => {\n const data = await readFile(file)\n if (data.length < minSize) return\n const [brotli, gzipped] = await Promise.all([\n br(data, {\n params: {\n [constants.BROTLI_PARAM_QUALITY]: 11,\n [constants.BROTLI_PARAM_SIZE_HINT]: data.length,\n },\n }),\n gz(data, { level: 9 }),\n ])\n await Promise.all([writeFile(`${file}.br`, brotli), writeFile(`${file}.gz`, gzipped)])\n })\n },\n }\n}\n\n/**\n * The Word editor's text shaping loads `harfbuzz.wasm` with `new URL('harfbuzz.wasm',\n * import.meta.url)`. A build emits that asset, but the dev server's pre-bundle moves the editor into\n * `.vite/deps`, where the URL has no file and the SPA fallback answers with HTML (\"HarfBuzz shaping\n * failed\"). Serves the installed package's binary at that address. Dev server only.\n */\nexport function serveHarfBuzzWasm(): Plugin {\n return {\n name: 'arbi-harfbuzz-wasm',\n apply: 'serve',\n configureServer(server) {\n let wasm: string\n try {\n const require = createRequire(path.join(server.config.root, 'package.json'))\n wasm = path.join(path.dirname(require.resolve('@docx-editor.dev/core')), 'harfbuzz.wasm')\n } catch {\n return // The site does not use the Word editor.\n }\n server.middlewares.use((req, res, next) => {\n if (!req.url?.split('?')[0].endsWith('/.vite/deps/harfbuzz.wasm')) return next()\n res.setHeader('Content-Type', 'application/wasm')\n createReadStream(wasm).pipe(res)\n })\n },\n }\n}\n\nexport interface ArbiVitePluginsOptions {\n /** Precompress the build (`.br` and `.gz`). Default on. */\n precompress?: boolean | PrecompressOptions\n}\n\n/** The plugins every kit-built site uses: precompression and the Word editor's wasm in dev. */\nexport function arbiVitePlugins({\n precompress: compress = true,\n}: ArbiVitePluginsOptions = {}): Plugin[] {\n return [\n serveHarfBuzzWasm(),\n ...(compress ? [precompress(typeof compress === 'object' ? compress : {})] : []),\n ]\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/vite/index.ts"],"names":["readdir","path","promisify","brotliCompress","gzip","readFile","constants","writeFile","require","createRequire","createReadStream"],"mappings":";;;;;;;;;;;;;;AAyBO,SAAS,cAAc,EAAA,EAA2B;AACvD,EAAA,IAAI,GAAG,QAAA,CAAS,qBAAqB,CAAA,IAAK,EAAA,CAAG,SAAS,yBAAyB,CAAA;AAC7E,IAAA,OAAO,YAAA;AACT,EAAA,IACE,GAAG,QAAA,CAAS,yBAAyB,KACrC,EAAA,CAAG,QAAA,CAAS,wCAAwC,CAAA,IACpD,EAAA,CAAG,QAAA,CAAS,oBAAoB,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MAAA,MAAA,CAAO,WAAA,CAAY,GAAA,CAAI,CAAC,GAAA,EAAK,KAAK,IAAA,KAAS;AACzC,QAAA,IAAI,CAAC,GAAA,CAAI,GAAA,EAAK,KAAA,CAAM,GAAG,CAAA,CAAE,CAAC,CAAA,CAAE,QAAA,CAAS,2BAA2B,CAAA,EAAG,OAAO,IAAA,EAAK;AAC/E,QAAA,GAAA,CAAI,SAAA,CAAU,gBAAgB,kBAAkB,CAAA;AAChD,QAAAE,mBAAA,CAAiB,IAAI,CAAA,CAAE,IAAA,CAAK,GAAG,CAAA;AAAA,MACjC,CAAC,CAAA;AAAA,IACH;AAAA,GACF;AACF;AAQO,SAAS,eAAA,CAAgB;AAAA,EAC9B,aAAa,QAAA,GAAW;AAC1B,CAAA,GAA4B,EAAC,EAAa;AACxC,EAAA,OAAO;AAAA,IACL,iBAAA,EAAkB;AAAA,IAClB,GAAI,QAAA,GAAW,CAAC,WAAA,CAAY,OAAO,QAAA,KAAa,QAAA,GAAW,QAAA,GAAW,EAAE,CAAC,CAAA,GAAI;AAAC,GAChF;AACF","file":"index.cjs","sourcesContent":["/**\n * `@arbidocs/blocks/vite`: the build settings every site built from the kits shares. Node only: a\n * site's `vite.config` imports it, never its browser code.\n *\n * In a site's `vite.config`: `plugins: [react(), ...arbiVitePlugins()]`, and the vendor groups as\n * `build.rolldownOptions.output.codeSplitting = codeSplitting()` (Vite 8) or\n * `build.rollupOptions.output.manualChunks = manualChunks` (Vite 6/7).\n *\n * The heavy kit parts (the Word editor, the PDF engine, the data grid, the calendar) are loaded on\n * demand by the kits themselves. Eager vendor groups leave them out: mixing shared helpers into\n * a lazy library chunk would make sign-in download the whole library. The Word editor has its\n * own size-bounded, entry-aware group that does not capture its shared dependencies.\n */\nimport { createReadStream } from 'node:fs'\nimport { readdir, readFile, writeFile } from 'node:fs/promises'\nimport { createRequire } from 'node:module'\nimport path from 'node:path'\nimport { promisify } from 'node:util'\nimport { brotliCompress, constants, gzip } from 'node:zlib'\nimport type { Plugin } from 'vite'\n\n/**\n * The vendor chunk a module belongs to, or null (left to the bundler): libraries every page loads\n * and that rarely change, so they stay cached across a site's deploys.\n */\nexport function vendorChunkOf(id: string): string | null {\n if (id.includes('node_modules/react/') || id.includes('node_modules/react-dom/'))\n return 'react-core'\n if (\n id.includes('node_modules/@radix-ui/') ||\n id.includes('node_modules/class-variance-authority/') ||\n id.includes('node_modules/clsx/') ||\n id.includes('node_modules/tailwind-merge/') ||\n id.includes('node_modules/tailwindcss-animate/')\n )\n return 'ui-components'\n if (id.includes('node_modules/react-router/') || id.includes('node_modules/react-router-dom/'))\n return 'routing'\n // KaTeX (rehype-katex / remark-math) is loaded on demand when content has math: left out.\n if (\n id.includes('node_modules/react-markdown/') ||\n (id.includes('node_modules/rehype-') && !id.includes('node_modules/rehype-katex/')) ||\n (id.includes('node_modules/remark-') && !id.includes('node_modules/remark-math/')) ||\n id.includes('node_modules/shiki/')\n )\n return 'markdown'\n if (\n id.includes('node_modules/zustand/') ||\n id.includes('node_modules/immer/') ||\n id.includes('node_modules/remeda/') ||\n id.includes('node_modules/@tanstack/react-query/')\n )\n return 'state-utils'\n if (id.includes('node_modules/framer-motion/') || id.includes('node_modules/sonner/'))\n return 'animation'\n if (\n id.includes('node_modules/@auth0/') ||\n id.includes('node_modules/axios/') ||\n id.includes('node_modules/js-cookie/')\n )\n return 'auth-api'\n // The end-to-end encryption library: needed at sign-in, large, and it never changes.\n if (id.includes('node_modules/libsodium')) return 'sodium'\n return null\n}\n\n/**\n * Rolldown's (Vite 8) `build.rolldownOptions.output.codeSplitting`. Vite's dynamic-import preload\n * helper gets its own chunk: left unpinned, the bundler parks it in a chunk that also imports\n * lazily, and the entry then preloads that whole chunk before the page renders.\n */\nexport function codeSplitting() {\n return {\n groups: [\n { name: 'preload-helper', test: /vite\\/preload-helper/, priority: 100 },\n { name: vendorChunkOf },\n // Vite's build-import lexer has a fixed WASM heap: the whole Word editor in one chunk\n // exceeds it. Split it along package boundaries only (core, react, i18n), which depend on\n // each other one way. A size-bounded split (`maxSize`) cuts through the cyclic modules of\n // one package and yields chunks that import each other, so the editor broke with\n // \"X is not iterable\" depending on which chunk loaded first. `scripts/check-chunk-cycles.mjs`\n // guards the built output. Shared React/runtime dependencies stay out of the group.\n ...['core', 'react', 'i18n'].map((pkg) => ({\n name: `docx-editor-${pkg}`,\n test: new RegExp(`node_modules/@docx-editor\\\\.dev/${pkg}/`),\n includeDependenciesRecursively: false,\n })),\n ],\n }\n}\n\n/** Rollup's (Vite 6/7) `build.rollupOptions.output.manualChunks`, with the same vendor groups. */\nexport function manualChunks(id: string): string | undefined {\n return vendorChunkOf(id) ?? undefined\n}\n\nconst COMPRESSIBLE = /\\.(?:m?js|css|html|json|svg|wasm|txt|xml|webmanifest|ttf|otf)$/\n\n/**\n * Files a deployment rewrites after `vite build` (a compressed copy would serve the stale bytes):\n * the service worker (stamped with the build), the runtime config and web manifests (rendered when\n * the container starts), and `index.html` (tiny, and never cached).\n */\nexport const PRECOMPRESS_EXCLUDE: readonly string[] = [\n 'sw.js',\n 'config.json',\n '*.webmanifest',\n 'asset-manifest.json',\n 'index.html',\n]\n\nexport interface PrecompressOptions {\n /** Smallest file compressed, in bytes. Default 1024. */\n minSize?: number\n /**\n * File names (or `*` patterns, matched against the file name) never compressed: anything the\n * deployment changes after the build. Default `PRECOMPRESS_EXCLUDE`; pass your own list to\n * replace it (`[...PRECOMPRESS_EXCLUDE, 'extra.json']` to extend it).\n */\n exclude?: readonly string[]\n}\n\nasync function filesUnder(dir: string): Promise<string[]> {\n const entries = await readdir(dir, { withFileTypes: true, recursive: true })\n return entries.filter((e) => e.isFile()).map((e) => path.join(e.parentPath, e.name))\n}\n\nconst toPattern = (glob: string) =>\n new RegExp(`^${glob.replace(/[.+?^${}()|[\\]\\\\]/g, '\\\\$&').replace(/\\*/g, '.*')}$`)\n\n/** Runs `task` over `items`, `limit` at a time. */\nasync function eachLimited<T>(\n items: readonly T[],\n limit: number,\n task: (item: T) => Promise<void>\n) {\n let next = 0\n const worker = async () => {\n while (next < items.length) await task(items[next++])\n }\n await Promise.all(Array.from({ length: Math.min(limit, items.length) }, worker))\n}\n\n/**\n * Writes `<file>.br` (brotli, quality 11) and `<file>.gz` (gzip, level 9) beside every compressible\n * file of the build, including those copied from `public/`, so the web server sends them as they\n * are (nginx `gzip_static` / `brotli_static`): the smallest transfer, at no cost per request. Files\n * the deployment rewrites later are left out (`exclude`).\n */\nexport function precompress({\n minSize = 1024,\n exclude = PRECOMPRESS_EXCLUDE,\n}: PrecompressOptions = {}): Plugin {\n const br = promisify(brotliCompress)\n const gz = promisify(gzip)\n const excluded = exclude.map(toPattern)\n let outDir = ''\n return {\n name: 'arbi-precompress',\n apply: 'build',\n enforce: 'post',\n configResolved(config) {\n outDir = path.resolve(config.root, config.build.outDir)\n },\n async closeBundle() {\n const files = (await filesUnder(outDir)).filter(\n (f) => COMPRESSIBLE.test(f) && !excluded.some((p) => p.test(path.basename(f)))\n )\n // Brotli at quality 11 is CPU-heavy: a few files at a time.\n await eachLimited(files, 6, async (file) => {\n const data = await readFile(file)\n if (data.length < minSize) return\n const [brotli, gzipped] = await Promise.all([\n br(data, {\n params: {\n [constants.BROTLI_PARAM_QUALITY]: 11,\n [constants.BROTLI_PARAM_SIZE_HINT]: data.length,\n },\n }),\n gz(data, { level: 9 }),\n ])\n await Promise.all([writeFile(`${file}.br`, brotli), writeFile(`${file}.gz`, gzipped)])\n })\n },\n }\n}\n\n/**\n * The Word editor's text shaping loads `harfbuzz.wasm` with `new URL('harfbuzz.wasm',\n * import.meta.url)`. A build emits that asset, but the dev server's pre-bundle moves the editor into\n * `.vite/deps`, where the URL has no file and the SPA fallback answers with HTML (\"HarfBuzz shaping\n * failed\"). Serves the installed package's binary at that address. Dev server only.\n */\nexport function serveHarfBuzzWasm(): Plugin {\n return {\n name: 'arbi-harfbuzz-wasm',\n apply: 'serve',\n configureServer(server) {\n let wasm: string\n try {\n const require = createRequire(path.join(server.config.root, 'package.json'))\n wasm = path.join(path.dirname(require.resolve('@docx-editor.dev/core')), 'harfbuzz.wasm')\n } catch {\n return // The site does not use the Word editor.\n }\n server.middlewares.use((req, res, next) => {\n if (!req.url?.split('?')[0].endsWith('/.vite/deps/harfbuzz.wasm')) return next()\n res.setHeader('Content-Type', 'application/wasm')\n createReadStream(wasm).pipe(res)\n })\n },\n }\n}\n\nexport interface ArbiVitePluginsOptions {\n /** Precompress the build (`.br` and `.gz`). Default on. */\n precompress?: boolean | PrecompressOptions\n}\n\n/** The plugins every kit-built site uses: precompression and the Word editor's wasm in dev. */\nexport function arbiVitePlugins({\n precompress: compress = true,\n}: ArbiVitePluginsOptions = {}): Plugin[] {\n return [\n serveHarfBuzzWasm(),\n ...(compress ? [precompress(typeof compress === 'object' ? compress : {})] : []),\n ]\n}\n"]}
|
package/dist/vite/index.d.ts
CHANGED
|
@@ -11,26 +11,17 @@ export declare function vendorChunkOf(id: string): string | null;
|
|
|
11
11
|
*/
|
|
12
12
|
export declare function codeSplitting(): {
|
|
13
13
|
groups: ({
|
|
14
|
+
name: string;
|
|
15
|
+
test: RegExp;
|
|
16
|
+
includeDependenciesRecursively: boolean;
|
|
17
|
+
} | {
|
|
14
18
|
name: string;
|
|
15
19
|
test: RegExp;
|
|
16
20
|
priority: number;
|
|
17
|
-
entriesAware?: undefined;
|
|
18
|
-
includeDependenciesRecursively?: undefined;
|
|
19
|
-
maxSize?: undefined;
|
|
20
21
|
} | {
|
|
21
22
|
name: typeof vendorChunkOf;
|
|
22
23
|
test?: undefined;
|
|
23
24
|
priority?: undefined;
|
|
24
|
-
entriesAware?: undefined;
|
|
25
|
-
includeDependenciesRecursively?: undefined;
|
|
26
|
-
maxSize?: undefined;
|
|
27
|
-
} | {
|
|
28
|
-
name: string;
|
|
29
|
-
test: RegExp;
|
|
30
|
-
entriesAware: boolean;
|
|
31
|
-
includeDependenciesRecursively: boolean;
|
|
32
|
-
maxSize: number;
|
|
33
|
-
priority?: undefined;
|
|
34
25
|
})[];
|
|
35
26
|
};
|
|
36
27
|
/** Rollup's (Vite 6/7) `build.rollupOptions.output.manualChunks`, with the same vendor groups. */
|
package/dist/vite/index.js
CHANGED
|
@@ -29,16 +29,17 @@ function codeSplitting() {
|
|
|
29
29
|
groups: [
|
|
30
30
|
{ name: "preload-helper", test: /vite\/preload-helper/, priority: 100 },
|
|
31
31
|
{ name: vendorChunkOf },
|
|
32
|
-
// Vite's build-import lexer has a fixed WASM heap: the
|
|
33
|
-
//
|
|
34
|
-
//
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
32
|
+
// Vite's build-import lexer has a fixed WASM heap: the whole Word editor in one chunk
|
|
33
|
+
// exceeds it. Split it along package boundaries only (core, react, i18n), which depend on
|
|
34
|
+
// each other one way. A size-bounded split (`maxSize`) cuts through the cyclic modules of
|
|
35
|
+
// one package and yields chunks that import each other, so the editor broke with
|
|
36
|
+
// "X is not iterable" depending on which chunk loaded first. `scripts/check-chunk-cycles.mjs`
|
|
37
|
+
// guards the built output. Shared React/runtime dependencies stay out of the group.
|
|
38
|
+
...["core", "react", "i18n"].map((pkg) => ({
|
|
39
|
+
name: `docx-editor-${pkg}`,
|
|
40
|
+
test: new RegExp(`node_modules/@docx-editor\\.dev/${pkg}/`),
|
|
41
|
+
includeDependenciesRecursively: false
|
|
42
|
+
}))
|
|
42
43
|
]
|
|
43
44
|
};
|
|
44
45
|
}
|
package/dist/vite/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/vite/index.ts"],"names":["require"],"mappings":";;;;;;;;AAyBO,SAAS,cAAc,EAAA,EAA2B;AACvD,EAAA,IAAI,GAAG,QAAA,CAAS,qBAAqB,CAAA,IAAK,EAAA,CAAG,SAAS,yBAAyB,CAAA;AAC7E,IAAA,OAAO,YAAA;AACT,EAAA,IACE,GAAG,QAAA,CAAS,yBAAyB,KACrC,EAAA,CAAG,QAAA,CAAS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EAAK,KAAA,CAAM,GAAG,CAAA,CAAE,CAAC,CAAA,CAAE,QAAA,CAAS,2BAA2B,CAAA,EAAG,OAAO,IAAA,EAAK;AAC/E,QAAA,GAAA,CAAI,SAAA,CAAU,gBAAgB,kBAAkB,CAAA;AAChD,QAAA,gBAAA,CAAiB,IAAI,CAAA,CAAE,IAAA,CAAK,GAAG,CAAA;AAAA,MACjC,CAAC,CAAA;AAAA,IACH;AAAA,GACF;AACF;AAQO,SAAS,eAAA,CAAgB;AAAA,EAC9B,aAAa,QAAA,GAAW;AAC1B,CAAA,GAA4B,EAAC,EAAa;AACxC,EAAA,OAAO;AAAA,IACL,iBAAA,EAAkB;AAAA,IAClB,GAAI,QAAA,GAAW,CAAC,WAAA,CAAY,OAAO,QAAA,KAAa,QAAA,GAAW,QAAA,GAAW,EAAE,CAAC,CAAA,GAAI;AAAC,GAChF;AACF","file":"index.js","sourcesContent":["/**\n * `@arbidocs/blocks/vite`: the build settings every site built from the kits shares. Node only: a\n * site's `vite.config` imports it, never its browser code.\n *\n * In a site's `vite.config`: `plugins: [react(), ...arbiVitePlugins()]`, and the vendor groups as\n * `build.rolldownOptions.output.codeSplitting = codeSplitting()` (Vite 8) or\n * `build.rollupOptions.output.manualChunks = manualChunks` (Vite 6/7).\n *\n * The heavy kit parts (the Word editor, the PDF engine, the data grid, the calendar) are loaded on\n * demand by the kits themselves. Eager vendor groups leave them out: mixing shared helpers into\n * a lazy library chunk would make sign-in download the whole library. The Word editor has its\n * own size-bounded, entry-aware group that does not capture its shared dependencies.\n */\nimport { createReadStream } from 'node:fs'\nimport { readdir, readFile, writeFile } from 'node:fs/promises'\nimport { createRequire } from 'node:module'\nimport path from 'node:path'\nimport { promisify } from 'node:util'\nimport { brotliCompress, constants, gzip } from 'node:zlib'\nimport type { Plugin } from 'vite'\n\n/**\n * The vendor chunk a module belongs to, or null (left to the bundler): libraries every page loads\n * and that rarely change, so they stay cached across a site's deploys.\n */\nexport function vendorChunkOf(id: string): string | null {\n if (id.includes('node_modules/react/') || id.includes('node_modules/react-dom/'))\n return 'react-core'\n if (\n id.includes('node_modules/@radix-ui/') ||\n id.includes('node_modules/class-variance-authority/') ||\n id.includes('node_modules/clsx/') ||\n id.includes('node_modules/tailwind-merge/') ||\n id.includes('node_modules/tailwindcss-animate/')\n )\n return 'ui-components'\n if (id.includes('node_modules/react-router/') || id.includes('node_modules/react-router-dom/'))\n return 'routing'\n // KaTeX (rehype-katex / remark-math) is loaded on demand when content has math: left out.\n if (\n id.includes('node_modules/react-markdown/') ||\n (id.includes('node_modules/rehype-') && !id.includes('node_modules/rehype-katex/')) ||\n (id.includes('node_modules/remark-') && !id.includes('node_modules/remark-math/')) ||\n id.includes('node_modules/shiki/')\n )\n return 'markdown'\n if (\n id.includes('node_modules/zustand/') ||\n id.includes('node_modules/immer/') ||\n id.includes('node_modules/remeda/') ||\n id.includes('node_modules/@tanstack/react-query/')\n )\n return 'state-utils'\n if (id.includes('node_modules/framer-motion/') || id.includes('node_modules/sonner/'))\n return 'animation'\n if (\n id.includes('node_modules/@auth0/') ||\n id.includes('node_modules/axios/') ||\n id.includes('node_modules/js-cookie/')\n )\n return 'auth-api'\n // The end-to-end encryption library: needed at sign-in, large, and it never changes.\n if (id.includes('node_modules/libsodium')) return 'sodium'\n return null\n}\n\n/**\n * Rolldown's (Vite 8) `build.rolldownOptions.output.codeSplitting`. Vite's dynamic-import preload\n * helper gets its own chunk: left unpinned, the bundler parks it in a chunk that also imports\n * lazily, and the entry then preloads that whole chunk before the page renders.\n */\nexport function codeSplitting() {\n return {\n groups: [\n { name: 'preload-helper', test: /vite\\/preload-helper/, priority: 100 },\n { name: vendorChunkOf },\n // Vite's build-import lexer has a fixed WASM heap: the combined Word editor\n // can exceed it. Bound its chunks without pulling lazy editor code into an\n // eager vendor group or capturing its shared React/runtime dependencies.\n {\n name: 'docx-editor',\n test: /node_modules\\/@docx-editor\\.dev\\//,\n entriesAware: true,\n includeDependenciesRecursively: false,\n maxSize: 2_000_000,\n },\n ],\n }\n}\n\n/** Rollup's (Vite 6/7) `build.rollupOptions.output.manualChunks`, with the same vendor groups. */\nexport function manualChunks(id: string): string | undefined {\n return vendorChunkOf(id) ?? undefined\n}\n\nconst COMPRESSIBLE = /\\.(?:m?js|css|html|json|svg|wasm|txt|xml|webmanifest|ttf|otf)$/\n\n/**\n * Files a deployment rewrites after `vite build` (a compressed copy would serve the stale bytes):\n * the service worker (stamped with the build), the runtime config and web manifests (rendered when\n * the container starts), and `index.html` (tiny, and never cached).\n */\nexport const PRECOMPRESS_EXCLUDE: readonly string[] = [\n 'sw.js',\n 'config.json',\n '*.webmanifest',\n 'asset-manifest.json',\n 'index.html',\n]\n\nexport interface PrecompressOptions {\n /** Smallest file compressed, in bytes. Default 1024. */\n minSize?: number\n /**\n * File names (or `*` patterns, matched against the file name) never compressed: anything the\n * deployment changes after the build. Default `PRECOMPRESS_EXCLUDE`; pass your own list to\n * replace it (`[...PRECOMPRESS_EXCLUDE, 'extra.json']` to extend it).\n */\n exclude?: readonly string[]\n}\n\nasync function filesUnder(dir: string): Promise<string[]> {\n const entries = await readdir(dir, { withFileTypes: true, recursive: true })\n return entries.filter((e) => e.isFile()).map((e) => path.join(e.parentPath, e.name))\n}\n\nconst toPattern = (glob: string) =>\n new RegExp(`^${glob.replace(/[.+?^${}()|[\\]\\\\]/g, '\\\\$&').replace(/\\*/g, '.*')}$`)\n\n/** Runs `task` over `items`, `limit` at a time. */\nasync function eachLimited<T>(\n items: readonly T[],\n limit: number,\n task: (item: T) => Promise<void>\n) {\n let next = 0\n const worker = async () => {\n while (next < items.length) await task(items[next++])\n }\n await Promise.all(Array.from({ length: Math.min(limit, items.length) }, worker))\n}\n\n/**\n * Writes `<file>.br` (brotli, quality 11) and `<file>.gz` (gzip, level 9) beside every compressible\n * file of the build, including those copied from `public/`, so the web server sends them as they\n * are (nginx `gzip_static` / `brotli_static`): the smallest transfer, at no cost per request. Files\n * the deployment rewrites later are left out (`exclude`).\n */\nexport function precompress({\n minSize = 1024,\n exclude = PRECOMPRESS_EXCLUDE,\n}: PrecompressOptions = {}): Plugin {\n const br = promisify(brotliCompress)\n const gz = promisify(gzip)\n const excluded = exclude.map(toPattern)\n let outDir = ''\n return {\n name: 'arbi-precompress',\n apply: 'build',\n enforce: 'post',\n configResolved(config) {\n outDir = path.resolve(config.root, config.build.outDir)\n },\n async closeBundle() {\n const files = (await filesUnder(outDir)).filter(\n (f) => COMPRESSIBLE.test(f) && !excluded.some((p) => p.test(path.basename(f)))\n )\n // Brotli at quality 11 is CPU-heavy: a few files at a time.\n await eachLimited(files, 6, async (file) => {\n const data = await readFile(file)\n if (data.length < minSize) return\n const [brotli, gzipped] = await Promise.all([\n br(data, {\n params: {\n [constants.BROTLI_PARAM_QUALITY]: 11,\n [constants.BROTLI_PARAM_SIZE_HINT]: data.length,\n },\n }),\n gz(data, { level: 9 }),\n ])\n await Promise.all([writeFile(`${file}.br`, brotli), writeFile(`${file}.gz`, gzipped)])\n })\n },\n }\n}\n\n/**\n * The Word editor's text shaping loads `harfbuzz.wasm` with `new URL('harfbuzz.wasm',\n * import.meta.url)`. A build emits that asset, but the dev server's pre-bundle moves the editor into\n * `.vite/deps`, where the URL has no file and the SPA fallback answers with HTML (\"HarfBuzz shaping\n * failed\"). Serves the installed package's binary at that address. Dev server only.\n */\nexport function serveHarfBuzzWasm(): Plugin {\n return {\n name: 'arbi-harfbuzz-wasm',\n apply: 'serve',\n configureServer(server) {\n let wasm: string\n try {\n const require = createRequire(path.join(server.config.root, 'package.json'))\n wasm = path.join(path.dirname(require.resolve('@docx-editor.dev/core')), 'harfbuzz.wasm')\n } catch {\n return // The site does not use the Word editor.\n }\n server.middlewares.use((req, res, next) => {\n if (!req.url?.split('?')[0].endsWith('/.vite/deps/harfbuzz.wasm')) return next()\n res.setHeader('Content-Type', 'application/wasm')\n createReadStream(wasm).pipe(res)\n })\n },\n }\n}\n\nexport interface ArbiVitePluginsOptions {\n /** Precompress the build (`.br` and `.gz`). Default on. */\n precompress?: boolean | PrecompressOptions\n}\n\n/** The plugins every kit-built site uses: precompression and the Word editor's wasm in dev. */\nexport function arbiVitePlugins({\n precompress: compress = true,\n}: ArbiVitePluginsOptions = {}): Plugin[] {\n return [\n serveHarfBuzzWasm(),\n ...(compress ? [precompress(typeof compress === 'object' ? compress : {})] : []),\n ]\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/vite/index.ts"],"names":["require"],"mappings":";;;;;;;;AAyBO,SAAS,cAAc,EAAA,EAA2B;AACvD,EAAA,IAAI,GAAG,QAAA,CAAS,qBAAqB,CAAA,IAAK,EAAA,CAAG,SAAS,yBAAyB,CAAA;AAC7E,IAAA,OAAO,YAAA;AACT,EAAA,IACE,GAAG,QAAA,CAAS,yBAAyB,KACrC,EAAA,CAAG,QAAA,CAAS,wCAAwC,CAAA,IACpD,EAAA,CAAG,QAAA,CAAS,oBAAoB,KAChC,EAAA,CAAG,QAAA,CAAS,8BAA8B,CAAA,IAC1C,EAAA,CAAG,SAAS,mCAAmC,CAAA;AAE/C,IAAA,OAAO,eAAA;AACT,EAAA,IAAI,GAAG,QAAA,CAAS,4BAA4B,CAAA,IAAK,EAAA,CAAG,SAAS,gCAAgC,CAAA;AAC3F,IAAA,OAAO,SAAA;AAET,EAAA,IACE,EAAA,CAAG,QAAA,CAAS,8BAA8B,CAAA,IACzC,EAAA,CAAG,SAAS,sBAAsB,CAAA,IAAK,CAAC,EAAA,CAAG,QAAA,CAAS,4BAA4B,KAChF,EAAA,CAAG,QAAA,CAAS,sBAAsB,CAAA,IAAK,CAAC,EAAA,CAAG,SAAS,2BAA2B,CAAA,IAChF,EAAA,CAAG,QAAA,CAAS,qBAAqB,CAAA;AAEjC,IAAA,OAAO,UAAA;AACT,EAAA,IACE,EAAA,CAAG,QAAA,CAAS,uBAAuB,CAAA,IACnC,GAAG,QAAA,CAAS,qBAAqB,CAAA,IACjC,EAAA,CAAG,QAAA,CAAS,sBAAsB,CAAA,IAClC,EAAA,CAAG,SAAS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`: the build settings every site built from the kits shares. Node only: a\n * site's `vite.config` imports it, never its browser code.\n *\n * In a site's `vite.config`: `plugins: [react(), ...arbiVitePlugins()]`, and the vendor groups as\n * `build.rolldownOptions.output.codeSplitting = codeSplitting()` (Vite 8) or\n * `build.rollupOptions.output.manualChunks = manualChunks` (Vite 6/7).\n *\n * The heavy kit parts (the Word editor, the PDF engine, the data grid, the calendar) are loaded on\n * demand by the kits themselves. Eager vendor groups leave them out: mixing shared helpers into\n * a lazy library chunk would make sign-in download the whole library. The Word editor has its\n * own size-bounded, entry-aware group that does not capture its shared dependencies.\n */\nimport { createReadStream } from 'node:fs'\nimport { readdir, readFile, writeFile } from 'node:fs/promises'\nimport { createRequire } from 'node:module'\nimport path from 'node:path'\nimport { promisify } from 'node:util'\nimport { brotliCompress, constants, gzip } from 'node:zlib'\nimport type { Plugin } from 'vite'\n\n/**\n * The vendor chunk a module belongs to, or null (left to the bundler): libraries every page loads\n * and that rarely change, so they stay cached across a site's deploys.\n */\nexport function vendorChunkOf(id: string): string | null {\n if (id.includes('node_modules/react/') || id.includes('node_modules/react-dom/'))\n return 'react-core'\n if (\n id.includes('node_modules/@radix-ui/') ||\n id.includes('node_modules/class-variance-authority/') ||\n id.includes('node_modules/clsx/') ||\n id.includes('node_modules/tailwind-merge/') ||\n id.includes('node_modules/tailwindcss-animate/')\n )\n return 'ui-components'\n if (id.includes('node_modules/react-router/') || id.includes('node_modules/react-router-dom/'))\n return 'routing'\n // KaTeX (rehype-katex / remark-math) is loaded on demand when content has math: left out.\n if (\n id.includes('node_modules/react-markdown/') ||\n (id.includes('node_modules/rehype-') && !id.includes('node_modules/rehype-katex/')) ||\n (id.includes('node_modules/remark-') && !id.includes('node_modules/remark-math/')) ||\n id.includes('node_modules/shiki/')\n )\n return 'markdown'\n if (\n id.includes('node_modules/zustand/') ||\n id.includes('node_modules/immer/') ||\n id.includes('node_modules/remeda/') ||\n id.includes('node_modules/@tanstack/react-query/')\n )\n return 'state-utils'\n if (id.includes('node_modules/framer-motion/') || id.includes('node_modules/sonner/'))\n return 'animation'\n if (\n id.includes('node_modules/@auth0/') ||\n id.includes('node_modules/axios/') ||\n id.includes('node_modules/js-cookie/')\n )\n return 'auth-api'\n // The end-to-end encryption library: needed at sign-in, large, and it never changes.\n if (id.includes('node_modules/libsodium')) return 'sodium'\n return null\n}\n\n/**\n * Rolldown's (Vite 8) `build.rolldownOptions.output.codeSplitting`. Vite's dynamic-import preload\n * helper gets its own chunk: left unpinned, the bundler parks it in a chunk that also imports\n * lazily, and the entry then preloads that whole chunk before the page renders.\n */\nexport function codeSplitting() {\n return {\n groups: [\n { name: 'preload-helper', test: /vite\\/preload-helper/, priority: 100 },\n { name: vendorChunkOf },\n // Vite's build-import lexer has a fixed WASM heap: the whole Word editor in one chunk\n // exceeds it. Split it along package boundaries only (core, react, i18n), which depend on\n // each other one way. A size-bounded split (`maxSize`) cuts through the cyclic modules of\n // one package and yields chunks that import each other, so the editor broke with\n // \"X is not iterable\" depending on which chunk loaded first. `scripts/check-chunk-cycles.mjs`\n // guards the built output. Shared React/runtime dependencies stay out of the group.\n ...['core', 'react', 'i18n'].map((pkg) => ({\n name: `docx-editor-${pkg}`,\n test: new RegExp(`node_modules/@docx-editor\\\\.dev/${pkg}/`),\n includeDependenciesRecursively: false,\n })),\n ],\n }\n}\n\n/** Rollup's (Vite 6/7) `build.rollupOptions.output.manualChunks`, with the same vendor groups. */\nexport function manualChunks(id: string): string | undefined {\n return vendorChunkOf(id) ?? undefined\n}\n\nconst COMPRESSIBLE = /\\.(?:m?js|css|html|json|svg|wasm|txt|xml|webmanifest|ttf|otf)$/\n\n/**\n * Files a deployment rewrites after `vite build` (a compressed copy would serve the stale bytes):\n * the service worker (stamped with the build), the runtime config and web manifests (rendered when\n * the container starts), and `index.html` (tiny, and never cached).\n */\nexport const PRECOMPRESS_EXCLUDE: readonly string[] = [\n 'sw.js',\n 'config.json',\n '*.webmanifest',\n 'asset-manifest.json',\n 'index.html',\n]\n\nexport interface PrecompressOptions {\n /** Smallest file compressed, in bytes. Default 1024. */\n minSize?: number\n /**\n * File names (or `*` patterns, matched against the file name) never compressed: anything the\n * deployment changes after the build. Default `PRECOMPRESS_EXCLUDE`; pass your own list to\n * replace it (`[...PRECOMPRESS_EXCLUDE, 'extra.json']` to extend it).\n */\n exclude?: readonly string[]\n}\n\nasync function filesUnder(dir: string): Promise<string[]> {\n const entries = await readdir(dir, { withFileTypes: true, recursive: true })\n return entries.filter((e) => e.isFile()).map((e) => path.join(e.parentPath, e.name))\n}\n\nconst toPattern = (glob: string) =>\n new RegExp(`^${glob.replace(/[.+?^${}()|[\\]\\\\]/g, '\\\\$&').replace(/\\*/g, '.*')}$`)\n\n/** Runs `task` over `items`, `limit` at a time. */\nasync function eachLimited<T>(\n items: readonly T[],\n limit: number,\n task: (item: T) => Promise<void>\n) {\n let next = 0\n const worker = async () => {\n while (next < items.length) await task(items[next++])\n }\n await Promise.all(Array.from({ length: Math.min(limit, items.length) }, worker))\n}\n\n/**\n * Writes `<file>.br` (brotli, quality 11) and `<file>.gz` (gzip, level 9) beside every compressible\n * file of the build, including those copied from `public/`, so the web server sends them as they\n * are (nginx `gzip_static` / `brotli_static`): the smallest transfer, at no cost per request. Files\n * the deployment rewrites later are left out (`exclude`).\n */\nexport function precompress({\n minSize = 1024,\n exclude = PRECOMPRESS_EXCLUDE,\n}: PrecompressOptions = {}): Plugin {\n const br = promisify(brotliCompress)\n const gz = promisify(gzip)\n const excluded = exclude.map(toPattern)\n let outDir = ''\n return {\n name: 'arbi-precompress',\n apply: 'build',\n enforce: 'post',\n configResolved(config) {\n outDir = path.resolve(config.root, config.build.outDir)\n },\n async closeBundle() {\n const files = (await filesUnder(outDir)).filter(\n (f) => COMPRESSIBLE.test(f) && !excluded.some((p) => p.test(path.basename(f)))\n )\n // Brotli at quality 11 is CPU-heavy: a few files at a time.\n await eachLimited(files, 6, async (file) => {\n const data = await readFile(file)\n if (data.length < minSize) return\n const [brotli, gzipped] = await Promise.all([\n br(data, {\n params: {\n [constants.BROTLI_PARAM_QUALITY]: 11,\n [constants.BROTLI_PARAM_SIZE_HINT]: data.length,\n },\n }),\n gz(data, { level: 9 }),\n ])\n await Promise.all([writeFile(`${file}.br`, brotli), writeFile(`${file}.gz`, gzipped)])\n })\n },\n }\n}\n\n/**\n * The Word editor's text shaping loads `harfbuzz.wasm` with `new URL('harfbuzz.wasm',\n * import.meta.url)`. A build emits that asset, but the dev server's pre-bundle moves the editor into\n * `.vite/deps`, where the URL has no file and the SPA fallback answers with HTML (\"HarfBuzz shaping\n * failed\"). Serves the installed package's binary at that address. Dev server only.\n */\nexport function serveHarfBuzzWasm(): Plugin {\n return {\n name: 'arbi-harfbuzz-wasm',\n apply: 'serve',\n configureServer(server) {\n let wasm: string\n try {\n const require = createRequire(path.join(server.config.root, 'package.json'))\n wasm = path.join(path.dirname(require.resolve('@docx-editor.dev/core')), 'harfbuzz.wasm')\n } catch {\n return // The site does not use the Word editor.\n }\n server.middlewares.use((req, res, next) => {\n if (!req.url?.split('?')[0].endsWith('/.vite/deps/harfbuzz.wasm')) return next()\n res.setHeader('Content-Type', 'application/wasm')\n createReadStream(wasm).pipe(res)\n })\n },\n }\n}\n\nexport interface ArbiVitePluginsOptions {\n /** Precompress the build (`.br` and `.gz`). Default on. */\n precompress?: boolean | PrecompressOptions\n}\n\n/** The plugins every kit-built site uses: precompression and the Word editor's wasm in dev. */\nexport function arbiVitePlugins({\n precompress: compress = true,\n}: ArbiVitePluginsOptions = {}): Plugin[] {\n return [\n serveHarfBuzzWasm(),\n ...(compress ? [precompress(typeof compress === 'object' ? compress : {})] : []),\n ]\n}\n"]}
|
|
@@ -1,74 +1,60 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkRGSFPWG2_cjs = require('../chunk-RGSFPWG2.cjs');
|
|
5
5
|
require('../chunk-32W2S6DE.cjs');
|
|
6
6
|
require('../chunk-KWJW5TMH.cjs');
|
|
7
|
-
require('../chunk-
|
|
8
|
-
require('../chunk-
|
|
9
|
-
var
|
|
7
|
+
require('../chunk-ORQXGMCC.cjs');
|
|
8
|
+
require('../chunk-33GOYI3O.cjs');
|
|
9
|
+
var chunk6CGMSJLB_cjs = require('../chunk-6CGMSJLB.cjs');
|
|
10
10
|
require('../chunk-AEQT2QQX.cjs');
|
|
11
|
-
|
|
12
|
-
require('../chunk-
|
|
13
|
-
require('../chunk-
|
|
11
|
+
require('../chunk-QUMUAJ2P.cjs');
|
|
12
|
+
var chunkUD56Y6UA_cjs = require('../chunk-UD56Y6UA.cjs');
|
|
13
|
+
require('../chunk-KP7BQIZL.cjs');
|
|
14
|
+
require('../chunk-N3H3YAKY.cjs');
|
|
14
15
|
require('../chunk-HYUKPHCT.cjs');
|
|
15
|
-
require('../chunk-
|
|
16
|
+
require('../chunk-ZPIZINH2.cjs');
|
|
16
17
|
require('../chunk-223D4727.cjs');
|
|
17
18
|
require('../chunk-SNUBQMIS.cjs');
|
|
18
|
-
var
|
|
19
|
+
var chunkFRRF2OQ7_cjs = require('../chunk-FRRF2OQ7.cjs');
|
|
19
20
|
require('../chunk-4ONPEVTP.cjs');
|
|
20
21
|
require('../chunk-V3KLUWQQ.cjs');
|
|
21
22
|
var chunkOA3AN6WW_cjs = require('../chunk-OA3AN6WW.cjs');
|
|
22
|
-
require('../chunk-
|
|
23
|
+
require('../chunk-OOW7H2YD.cjs');
|
|
23
24
|
require('../chunk-OUYBYZ7Y.cjs');
|
|
24
25
|
require('../chunk-QQMMCXBP.cjs');
|
|
25
26
|
require('../chunk-DTMBAFIL.cjs');
|
|
26
27
|
require('../chunk-Z3LFF3YT.cjs');
|
|
27
|
-
require('../chunk-XZMYSDU4.cjs');
|
|
28
|
-
require('../chunk-OOHBXCDV.cjs');
|
|
29
|
-
require('../chunk-F6CEPWIF.cjs');
|
|
30
|
-
require('../chunk-5F4DCIHS.cjs');
|
|
31
28
|
require('../chunk-WQMR3O2D.cjs');
|
|
32
29
|
require('../chunk-NZNBJF3M.cjs');
|
|
33
30
|
require('../chunk-NWNVWO6L.cjs');
|
|
34
31
|
require('../chunk-SK6HQ46Q.cjs');
|
|
35
|
-
require('../chunk-MCXS6X37.cjs');
|
|
36
|
-
require('../chunk-KQF7POTG.cjs');
|
|
37
32
|
require('../chunk-TG2GM7WJ.cjs');
|
|
38
|
-
require('../chunk-
|
|
39
|
-
require('../chunk-75BNMCUX.cjs');
|
|
33
|
+
require('../chunk-A53YMUOX.cjs');
|
|
40
34
|
var chunkNSD37OF5_cjs = require('../chunk-NSD37OF5.cjs');
|
|
41
35
|
require('../chunk-OEJQFPWO.cjs');
|
|
42
|
-
var
|
|
43
|
-
var
|
|
36
|
+
var chunkX46QYO4S_cjs = require('../chunk-X46QYO4S.cjs');
|
|
37
|
+
var chunkR5NTEW4L_cjs = require('../chunk-R5NTEW4L.cjs');
|
|
44
38
|
require('../chunk-CYN66TBO.cjs');
|
|
45
|
-
var
|
|
39
|
+
var chunkQFXOTJ6G_cjs = require('../chunk-QFXOTJ6G.cjs');
|
|
46
40
|
var chunkI4IS6ST6_cjs = require('../chunk-I4IS6ST6.cjs');
|
|
47
41
|
var chunk5A6T4W46_cjs = require('../chunk-5A6T4W46.cjs');
|
|
48
42
|
require('../chunk-EVZH6Z5O.cjs');
|
|
49
|
-
require('../chunk-IN6ILI5A.cjs');
|
|
50
|
-
var chunkVL7ZX4KQ_cjs = require('../chunk-VL7ZX4KQ.cjs');
|
|
51
43
|
require('../chunk-OYXWQTHF.cjs');
|
|
52
44
|
require('../chunk-S237ORM3.cjs');
|
|
53
45
|
require('../chunk-II2OEXHW.cjs');
|
|
54
|
-
require('../chunk-
|
|
55
|
-
require('../chunk-RYVZDFVO.cjs');
|
|
46
|
+
require('../chunk-JJZOL5MG.cjs');
|
|
56
47
|
require('../chunk-3YEXZX4H.cjs');
|
|
57
48
|
require('../chunk-4PA6VCCR.cjs');
|
|
58
|
-
var
|
|
49
|
+
var chunkRSQGDXAF_cjs = require('../chunk-RSQGDXAF.cjs');
|
|
59
50
|
require('../chunk-AHDJXIUB.cjs');
|
|
60
51
|
require('../chunk-RL2HI6NP.cjs');
|
|
61
52
|
require('../chunk-6UZC4XVV.cjs');
|
|
62
53
|
require('../chunk-S5OGPQSB.cjs');
|
|
63
|
-
|
|
64
|
-
var chunkJN5YMHGI_cjs = require('../chunk-JN5YMHGI.cjs');
|
|
65
|
-
var chunkUDSHVNU3_cjs = require('../chunk-UDSHVNU3.cjs');
|
|
54
|
+
require('../chunk-VZOOGA47.cjs');
|
|
66
55
|
require('../chunk-OUGRCQM7.cjs');
|
|
67
|
-
require('../chunk-IPSHAMO2.cjs');
|
|
68
56
|
require('../chunk-ZVEW3JBT.cjs');
|
|
69
57
|
require('../chunk-M74FWYNL.cjs');
|
|
70
|
-
require('../chunk-QUMUAJ2P.cjs');
|
|
71
|
-
require('../chunk-VZOOGA47.cjs');
|
|
72
58
|
require('../chunk-AGL7Z6Y2.cjs');
|
|
73
59
|
require('../chunk-JZQ47OW5.cjs');
|
|
74
60
|
var chunkCENMN32L_cjs = require('../chunk-CENMN32L.cjs');
|
|
@@ -76,9 +62,23 @@ var chunkYKOPKLYP_cjs = require('../chunk-YKOPKLYP.cjs');
|
|
|
76
62
|
require('../chunk-TMX7YFVM.cjs');
|
|
77
63
|
var chunk3YZKDCWY_cjs = require('../chunk-3YZKDCWY.cjs');
|
|
78
64
|
require('../chunk-SJSGSHIT.cjs');
|
|
79
|
-
require('../chunk-PPCATBOY.cjs');
|
|
80
65
|
require('../chunk-ZW6FPIFC.cjs');
|
|
81
66
|
require('../chunk-ZT5MIFLC.cjs');
|
|
67
|
+
require('../chunk-XZMYSDU4.cjs');
|
|
68
|
+
require('../chunk-OOHBXCDV.cjs');
|
|
69
|
+
require('../chunk-F6CEPWIF.cjs');
|
|
70
|
+
require('../chunk-5F4DCIHS.cjs');
|
|
71
|
+
require('../chunk-MCXS6X37.cjs');
|
|
72
|
+
require('../chunk-KQF7POTG.cjs');
|
|
73
|
+
require('../chunk-75BNMCUX.cjs');
|
|
74
|
+
require('../chunk-IN6ILI5A.cjs');
|
|
75
|
+
var chunkVL7ZX4KQ_cjs = require('../chunk-VL7ZX4KQ.cjs');
|
|
76
|
+
require('../chunk-FX3K6LNZ.cjs');
|
|
77
|
+
var chunkEQTZQD66_cjs = require('../chunk-EQTZQD66.cjs');
|
|
78
|
+
var chunkJN5YMHGI_cjs = require('../chunk-JN5YMHGI.cjs');
|
|
79
|
+
var chunkUDSHVNU3_cjs = require('../chunk-UDSHVNU3.cjs');
|
|
80
|
+
require('../chunk-IPSHAMO2.cjs');
|
|
81
|
+
require('../chunk-PPCATBOY.cjs');
|
|
82
82
|
require('../chunk-LJJJ6CYH.cjs');
|
|
83
83
|
var chunkLIKDQBNJ_cjs = require('../chunk-LIKDQBNJ.cjs');
|
|
84
84
|
require('../chunk-YZBDHBKI.cjs');
|
|
@@ -374,9 +374,9 @@ function SignalsEditor({
|
|
|
374
374
|
{
|
|
375
375
|
className: ui.cn(
|
|
376
376
|
"space-y-1.5 rounded-md border p-2",
|
|
377
|
-
|
|
377
|
+
chunkQFXOTJ6G_cjs.isIncompleteSignal(signal) ? "border-destructive/50" : "border-border"
|
|
378
378
|
),
|
|
379
|
-
"data-incomplete":
|
|
379
|
+
"data-incomplete": chunkQFXOTJ6G_cjs.isIncompleteSignal(signal) || void 0,
|
|
380
380
|
"data-testid": `${testId}-${i}`,
|
|
381
381
|
children: [
|
|
382
382
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
@@ -1680,7 +1680,7 @@ function plan(value, options) {
|
|
|
1680
1680
|
criteria: [],
|
|
1681
1681
|
max_passes: 3,
|
|
1682
1682
|
documents: [],
|
|
1683
|
-
steps:
|
|
1683
|
+
steps: chunkQFXOTJ6G_cjs.toPlanSteps(value.workflow, options)
|
|
1684
1684
|
};
|
|
1685
1685
|
}
|
|
1686
1686
|
function builderToWorkflowRequest(value, workspaceId, options = {}) {
|
|
@@ -1715,7 +1715,7 @@ function builderToWorkflowUpdate(value, options = {}) {
|
|
|
1715
1715
|
}
|
|
1716
1716
|
function workflowRecordToBuilder(record) {
|
|
1717
1717
|
const planned = record.plan?.steps ?? [];
|
|
1718
|
-
const steps = planned.length ?
|
|
1718
|
+
const steps = planned.length ? chunkQFXOTJ6G_cjs.fromPlanSteps(planned) : record.prompt || record.skill_ref ? [
|
|
1719
1719
|
{
|
|
1720
1720
|
id: "work",
|
|
1721
1721
|
kind: "agent",
|
|
@@ -1732,7 +1732,7 @@ function workflowRecordToBuilder(record) {
|
|
|
1732
1732
|
inputs: [],
|
|
1733
1733
|
landing: "chat",
|
|
1734
1734
|
schedulable: false,
|
|
1735
|
-
run: { kind: "steps", steps, layout:
|
|
1735
|
+
run: { kind: "steps", steps, layout: chunkQFXOTJ6G_cjs.layoutFromPlanSteps(planned ?? []) }
|
|
1736
1736
|
},
|
|
1737
1737
|
trigger: {
|
|
1738
1738
|
...DEFAULT_WORKFLOW_TRIGGER,
|
|
@@ -1803,7 +1803,7 @@ function triggerSummary(trigger, options = {}) {
|
|
|
1803
1803
|
case "once":
|
|
1804
1804
|
return trigger.runAt ? new Date(trigger.runAt).toLocaleString() : l.starts.once;
|
|
1805
1805
|
case "repeat":
|
|
1806
|
-
return trigger.rrule ?
|
|
1806
|
+
return trigger.rrule ? chunkQFXOTJ6G_cjs.describeRRule(trigger.rrule) : l.starts.repeat;
|
|
1807
1807
|
case "event":
|
|
1808
1808
|
if (isSignalTrigger(trigger))
|
|
1809
1809
|
return trigger.signal ? l.signalSummary.replace("{signal}", trigger.signal) : l.stepSignals;
|
|
@@ -1862,7 +1862,7 @@ function TriggerInspector({
|
|
|
1862
1862
|
}
|
|
1863
1863
|
)
|
|
1864
1864
|
] }),
|
|
1865
|
-
trigger.start === "repeat" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1865
|
+
trigger.start === "repeat" && /* @__PURE__ */ jsxRuntime.jsx(chunkR5NTEW4L_cjs.RecurrenceBuilder, { rrule: trigger.rrule, onChange: (rrule) => set({ rrule }) }),
|
|
1866
1866
|
trigger.start === "event" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
1867
1867
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { className: "text-xs", children: l.event }),
|
|
1868
1868
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1960,7 +1960,7 @@ function TriggerInspector({
|
|
|
1960
1960
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
1961
1961
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { className: "text-xs", children: l.agent }),
|
|
1962
1962
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1963
|
-
|
|
1963
|
+
chunkRSQGDXAF_cjs.AgentSelect,
|
|
1964
1964
|
{
|
|
1965
1965
|
agents,
|
|
1966
1966
|
value: trigger.agentId,
|
|
@@ -2799,13 +2799,13 @@ function WorkflowPreview({
|
|
|
2799
2799
|
renderIcon,
|
|
2800
2800
|
testId
|
|
2801
2801
|
}) {
|
|
2802
|
-
const run =
|
|
2802
|
+
const run = chunkX46QYO4S_cjs.useWorkflowPreview(workflow, {
|
|
2803
2803
|
resolveWorkflow: (id) => workflows.find((w) => w.id === id),
|
|
2804
2804
|
compose,
|
|
2805
2805
|
answer
|
|
2806
2806
|
});
|
|
2807
2807
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2808
|
-
|
|
2808
|
+
chunkR5NTEW4L_cjs.WorkflowRunner,
|
|
2809
2809
|
{
|
|
2810
2810
|
workflow,
|
|
2811
2811
|
run,
|
|
@@ -2876,7 +2876,7 @@ function scheduledTaskBuilderValue() {
|
|
|
2876
2876
|
]
|
|
2877
2877
|
}
|
|
2878
2878
|
},
|
|
2879
|
-
trigger: { ...value.trigger, start: "repeat", rrule:
|
|
2879
|
+
trigger: { ...value.trigger, start: "repeat", rrule: chunkQFXOTJ6G_cjs.buildRRule(chunkQFXOTJ6G_cjs.DEFAULT_RECURRENCE) }
|
|
2880
2880
|
};
|
|
2881
2881
|
}
|
|
2882
2882
|
var TITLE_WORDS = 6;
|
|
@@ -3100,13 +3100,13 @@ function ConnectedWorkflowsPage({
|
|
|
3100
3100
|
historyLabels,
|
|
3101
3101
|
testId = "workflows-page"
|
|
3102
3102
|
}) {
|
|
3103
|
-
const webWorkflows =
|
|
3103
|
+
const webWorkflows = chunk6CGMSJLB_cjs.useNamedWorkflows(chunk5A6T4W46_cjs.WEB_WORKFLOWS);
|
|
3104
3104
|
const l = { ...DEFAULT_CONNECTED_WORKFLOWS_PAGE_LABELS, ...labels };
|
|
3105
3105
|
const host = chunk3YZKDCWY_cjs.useHost();
|
|
3106
3106
|
const config = host.workflows;
|
|
3107
3107
|
const { openConversation, openFiles } = chunkLIKDQBNJ_cjs.useBlocksEnvironment();
|
|
3108
3108
|
const openWorkflow = chunkOA3AN6WW_cjs.useOpenWorkflow();
|
|
3109
|
-
const renderPerson =
|
|
3109
|
+
const renderPerson = chunkRGSFPWG2_cjs.useRenderTaskPerson();
|
|
3110
3110
|
const refreshDocuments = react$2.useRefreshDocuments();
|
|
3111
3111
|
const invalidateTags = react$2.useInvalidateTagData();
|
|
3112
3112
|
const { data: tags = [] } = react$2.useTags();
|
|
@@ -3137,7 +3137,7 @@ function ConnectedWorkflowsPage({
|
|
|
3137
3137
|
openHistory,
|
|
3138
3138
|
closeHistoryTab,
|
|
3139
3139
|
selectHistoryTab
|
|
3140
|
-
} =
|
|
3140
|
+
} = chunkRGSFPWG2_cjs.useWorkflowsPageState({
|
|
3141
3141
|
historyWorkflowId: requestedHistoryId ?? historyWorkflowId,
|
|
3142
3142
|
onHistoryWorkflowConsumed: consumeHistory
|
|
3143
3143
|
});
|
|
@@ -3186,14 +3186,14 @@ function ConnectedWorkflowsPage({
|
|
|
3186
3186
|
await refreshDocuments(execution.document_ext_ids);
|
|
3187
3187
|
await invalidateTags();
|
|
3188
3188
|
const fieldIds = execution.result?.tag_ext_ids ?? runsFor?.action?.tag_ext_ids ?? [];
|
|
3189
|
-
|
|
3189
|
+
chunkUD56Y6UA_cjs.useAiReviewStore.getState().setRun({
|
|
3190
3190
|
docIds: execution.document_ext_ids,
|
|
3191
3191
|
tags: fieldIds.map((fieldId) => ({
|
|
3192
3192
|
id: fieldId,
|
|
3193
3193
|
name: tags.find((tag) => tag.external_id === fieldId)?.name ?? "Review"
|
|
3194
3194
|
}))
|
|
3195
3195
|
});
|
|
3196
|
-
|
|
3196
|
+
chunkUD56Y6UA_cjs.useAiReviewStore.getState().setOpen(true);
|
|
3197
3197
|
openFiles(
|
|
3198
3198
|
execution.label_ext_id ? { filters: { [execution.label_ext_id]: "include" } } : void 0
|
|
3199
3199
|
);
|
|
@@ -3205,7 +3205,7 @@ function ConnectedWorkflowsPage({
|
|
|
3205
3205
|
return (
|
|
3206
3206
|
// The page in the Workflows page's frame: padded, scrolling.
|
|
3207
3207
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full min-h-0 w-full overflow-auto p-4 sm:p-6", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3208
|
-
|
|
3208
|
+
chunkRGSFPWG2_cjs.ConnectedWorkflowRunPage,
|
|
3209
3209
|
{
|
|
3210
3210
|
workflow: running.workflow,
|
|
3211
3211
|
projectFrom: running.projectFrom,
|
|
@@ -3293,7 +3293,7 @@ function ConnectedWorkflowsPage({
|
|
|
3293
3293
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full min-h-0 flex-col", "data-testid": testId, children: [
|
|
3294
3294
|
pageHeader && /* @__PURE__ */ jsxRuntime.jsx(chunkNSD37OF5_cjs.PageHeader, { ...pageHeader }),
|
|
3295
3295
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3296
|
-
|
|
3296
|
+
chunkFRRF2OQ7_cjs.ConnectedWorkflowsTable,
|
|
3297
3297
|
{
|
|
3298
3298
|
onOpenTemplate: (id) => openBuilder({ kind: "template", id }),
|
|
3299
3299
|
tabs: [
|
|
@@ -3323,7 +3323,7 @@ function ConnectedWorkflowsPage({
|
|
|
3323
3323
|
}
|
|
3324
3324
|
},
|
|
3325
3325
|
content: hostTab ? hostTab.content : runsFor ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3326
|
-
|
|
3326
|
+
chunkRGSFPWG2_cjs.ConnectedWorkflowHistory,
|
|
3327
3327
|
{
|
|
3328
3328
|
inline: true,
|
|
3329
3329
|
hideHeader: true,
|
|
@@ -3348,7 +3348,7 @@ function ConnectedWorkflowsPage({
|
|
|
3348
3348
|
) : void 0,
|
|
3349
3349
|
automationsOnly: true,
|
|
3350
3350
|
gridId: "automations-grid-v1",
|
|
3351
|
-
describeTrigger: (workflow) => workflow.on_demand ? l.manualTrigger :
|
|
3351
|
+
describeTrigger: (workflow) => workflow.on_demand ? l.manualTrigger : chunkQFXOTJ6G_cjs.describeTrigger(workflow),
|
|
3352
3352
|
formatDate: ui.formatFriendlyDate,
|
|
3353
3353
|
renderPerson,
|
|
3354
3354
|
onViewRuns: showHistory,
|
|
@@ -3387,7 +3387,7 @@ function ConnectedWorkflowsPage({
|
|
|
3387
3387
|
}
|
|
3388
3388
|
),
|
|
3389
3389
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3390
|
-
|
|
3390
|
+
chunkRGSFPWG2_cjs.ConnectedTaskComposer,
|
|
3391
3391
|
{
|
|
3392
3392
|
kind: "workflow",
|
|
3393
3393
|
saveOnly: true,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arbidocs/coedit",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.141",
|
|
4
4
|
"description": "Real-time collaboration for the ARBI native DOCX editor: a Yjs mirror of the canonical OOXML package, session, and server runtime",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arbidocs/blocks",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.141",
|
|
4
4
|
"description": "Composable, domain-neutral UI blocks for ARBI apps, organised by capability (retrieval, facts, agents, workspaces, citations, collaboration) plus shell, theme and site primitives, on top of @arbidocs/react.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -344,9 +344,9 @@
|
|
|
344
344
|
"custom-site:test:e2e": "playwright test -c examples/custom-site/playwright.config.ts"
|
|
345
345
|
},
|
|
346
346
|
"dependencies": {
|
|
347
|
-
"@arbidocs/client": "0.5.
|
|
348
|
-
"@arbidocs/coedit": "0.5.
|
|
349
|
-
"@arbidocs/sdk": "0.5.
|
|
347
|
+
"@arbidocs/client": "0.5.141",
|
|
348
|
+
"@arbidocs/coedit": "0.5.141",
|
|
349
|
+
"@arbidocs/sdk": "0.5.141",
|
|
350
350
|
"@auth0/auth0-react": "^2.19.0",
|
|
351
351
|
"@dnd-kit/core": "^6.3.1",
|
|
352
352
|
"@dnd-kit/sortable": "^10.0.0",
|
|
@@ -397,7 +397,7 @@
|
|
|
397
397
|
"y-protocols": "^1.0.6"
|
|
398
398
|
},
|
|
399
399
|
"peerDependencies": {
|
|
400
|
-
"@arbidocs/react": "0.5.
|
|
400
|
+
"@arbidocs/react": "0.5.141",
|
|
401
401
|
"@lexical/html": "0.35.0",
|
|
402
402
|
"@lexical/link": "0.35.0",
|
|
403
403
|
"@lexical/list": "0.35.0",
|
package/dist/ai-XVDR2XYV.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"ai-XVDR2XYV.cjs"}
|