@arbidocs/blocks 0.4.102 → 0.4.103

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.
@@ -2,7 +2,7 @@
2
2
  'use strict';
3
3
 
4
4
  var chunkMUMH3Z6K_cjs = require('./chunk-MUMH3Z6K.cjs');
5
- var chunkFAGQTB3D_cjs = require('./chunk-FAGQTB3D.cjs');
5
+ var chunkO33EBMIX_cjs = require('./chunk-O33EBMIX.cjs');
6
6
  var react$1 = require('react');
7
7
  var reactQuery = require('@tanstack/react-query');
8
8
  var react = require('@arbidocs/react');
@@ -13,7 +13,7 @@ function ConnectedNativeDocxEditor({
13
13
  ...props
14
14
  }) {
15
15
  const adapter = useConnectedNativeDocxAdapter(fontBaseUrl);
16
- return /* @__PURE__ */ jsxRuntime.jsx(chunkFAGQTB3D_cjs.NativeDocxEditor, { ...props, adapter });
16
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkO33EBMIX_cjs.NativeDocxEditor, { ...props, adapter });
17
17
  }
18
18
  function useConnectedNativeDocxAdapter(fontBaseUrl = "/native-docx/fonts") {
19
19
  const arbi = react.useArbi();
@@ -42,7 +42,7 @@ function useConnectedNativeDocxAdapter(fontBaseUrl = "/native-docx/fonts") {
42
42
  headers: { "Content-Type": "application/json" },
43
43
  body: JSON.stringify({ state })
44
44
  })).json(),
45
- loadFonts: () => chunkFAGQTB3D_cjs.loadDocxFonts(fontBaseUrl),
45
+ loadFonts: () => chunkO33EBMIX_cjs.loadDocxFonts(fontBaseUrl),
46
46
  baseUrl: apiUrl,
47
47
  author: user?.name || "You",
48
48
  onVersionSaved: async (id) => {
@@ -91,5 +91,5 @@ function useConnectedNativeDocxAdapter(fontBaseUrl = "/native-docx/fonts") {
91
91
 
92
92
  exports.ConnectedNativeDocxEditor = ConnectedNativeDocxEditor;
93
93
  exports.useConnectedNativeDocxAdapter = useConnectedNativeDocxAdapter;
94
- //# sourceMappingURL=chunk-Y5XW57U4.cjs.map
95
- //# sourceMappingURL=chunk-Y5XW57U4.cjs.map
94
+ //# sourceMappingURL=chunk-TFDU2KGS.cjs.map
95
+ //# sourceMappingURL=chunk-TFDU2KGS.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/connection/ConnectedNativeDocxEditor.tsx"],"names":["jsx","NativeDocxEditor","useArbi","useConnection","useQueryClient","useQuery","useMemo","loadDocxFonts","arbiQueryKeys","notify"],"mappings":";;;;;;;;;AAYO,SAAS,yBAAA,CAA0B;AAAA,EACxC,WAAA,GAAc,oBAAA;AAAA,EACd,GAAG;AACL,CAAA,EAAsE;AACpE,EAAA,MAAM,OAAA,GAAU,8BAA8B,WAAW,CAAA;AACzD,EAAA,uBAAOA,cAAA,CAACC,kCAAA,EAAA,EAAkB,GAAG,KAAA,EAAO,OAAA,EAAkB,CAAA;AACxD;AAEO,SAAS,6BAAA,CAA8B,cAAc,oBAAA,EAAsB;AAChF,EAAA,MAAM,OAAOC,aAAA,EAAQ;AACrB,EAAA,MAAM,EAAE,WAAA,EAAa,MAAA,EAAQ,IAAA,EAAM,mBAAA,KAAwBC,+BAAA,EAAc;AACzE,EAAA,MAAM,UAAUC,yBAAA,EAAe;AAC/B,EAAA,MAAM,EAAE,IAAA,EAAM,OAAA,EAAQ,GAAIC,mBAAA,CAAS;AAAA,IACjC,UAAU,CAAC,qBAAA,EAAuB,MAAA,EAAQ,IAAA,EAAM,YAAY,WAAW,CAAA;AAAA,IACvE,OAAA,EAAS,IAAA,CAAK,UAAA,IAAc,CAAC,CAAC,WAAA;AAAA,IAC9B,SAAS,YAAY;AACnB,MAAA,MAAM,mBAAA,EAAoB;AAC1B,MAAA,OAAO,IAAA,CAAK,WAAW,SAAA,EAAU;AAAA,IACnC;AAAA,GACD,CAAA;AACD,EAAA,MAAM,OAAA,GAAUC,eAAA;AAAA,IACd,OAAO;AAAA,MACL,OAAA,EAAS,OAAO,IAAA,EAAM,OAAA,KAAY;AAChC,QAAA,MAAM,mBAAA,EAAoB;AA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CAAQ,SAAA;AAAA,YACpB,eAAe,OAAA,CAAQ;AAAA,WACxB;AAAA,SACF,CAAA;AACD,QAAA,MAAM,QAAA,GAAY,MAAM,QAAA,CAAS,IAAA,EAAK;AACtC,QAAAA,YAAA,CAAO,QAAQ,oBAAoB,CAAA;AACnC,QAAA,OAAO,EAAE,WAAA,EAAa,QAAA,CAAS,YAAA,IAAgB,EAAC,EAAE;AAAA,MACpD,CAAA;AAAA,MACA,cAAA,EAAgB,OAAO,UAAA,KAAA,CAAgB,MAAM,KAAK,SAAA,CAAU,WAAA,CAAY,UAAU,CAAA,EAAG;AAAA,KACvF,CAAA;AAAA,IACA,CAAC,MAAM,MAAA,EAAQ,IAAA,EAAM,MAAM,OAAA,EAAS,mBAAA,EAAqB,WAAA,EAAa,OAAA,EAAS,WAAW;AAAA,GAC5F;AACA,EAAA,OAAO,OAAA;AACT","file":"chunk-Y5XW57U4.cjs","sourcesContent":["import { useMemo } from 'react'\nimport { useQuery, useQueryClient } from '@tanstack/react-query'\nimport { useArbi, notify, arbiQueryKeys } from '@arbidocs/react'\nimport { useConnection } from './ConnectionProvider'\nimport {\n NativeDocxEditor,\n type NativeDocxAdapter,\n type NativeDocxEditorProps,\n} from '../docx/NativeDocxEditor'\nimport { loadDocxFonts } from '../docx/fonts'\n\n/** Native Word widget bound to the standard blocks connection and SDK session. */\nexport function ConnectedNativeDocxEditor({\n fontBaseUrl = '/native-docx/fonts',\n ...props\n}: Omit<NativeDocxEditorProps, 'adapter'> & { fontBaseUrl?: string }) {\n const adapter = useConnectedNativeDocxAdapter(fontBaseUrl)\n return <NativeDocxEditor {...props} adapter={adapter} />\n}\n\nexport function useConnectedNativeDocxAdapter(fontBaseUrl = '/native-docx/fonts') {\n const arbi = useArbi()\n const { workspaceId, apiUrl, user, ensureWorkspaceOpen } = useConnection()\n const queries = useQueryClient()\n const { data: members } = useQuery({\n queryKey: ['native-docx-members', apiUrl, user?.externalId, workspaceId],\n enabled: arbi.isLoggedIn && !!workspaceId,\n queryFn: async () => {\n await ensureWorkspaceOpen()\n return arbi.workspaces.listUsers()\n },\n })\n const adapter = useMemo<NativeDocxAdapter>(\n () => ({\n request: async (path, options) => {\n await ensureWorkspaceOpen()\n return arbi.editor.request(path, options)\n },\n open: async (id) => {\n await ensureWorkspaceOpen()\n return (\n await arbi.editor.request(`/${encodeURIComponent(id)}/session`, { method: 'POST' })\n ).json()\n },\n save: async (id, state) =>\n (\n await arbi.editor.request(`/${encodeURIComponent(id)}/save`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ state }),\n })\n ).json(),\n loadFonts: () => loadDocxFonts(fontBaseUrl),\n baseUrl: apiUrl,\n author: user?.name || 'You',\n onVersionSaved: async (id) => {\n if (!workspaceId) return\n const key = arbiQueryKeys.documents(workspaceId)\n try {\n const documents = await arbi.documents.get([id])\n if (!documents.length) throw new Error('The saved version is not available yet.')\n queries.setQueryData<Awaited<ReturnType<typeof arbi.documents.list>>>(key, (previous) => [\n ...documents,\n ...(previous || []).filter(\n (doc) => !documents.some((saved) => saved.external_id === doc.external_id)\n ),\n ])\n } catch {\n await queries.invalidateQueries({ queryKey: key })\n }\n },\n notify: (message, kind) => notify[kind](message),\n mentions: members?.map(({ user: member }) => ({\n id: member.external_id,\n name: [member.given_name, member.family_name].filter(Boolean).join(' '),\n kind: member.external_id.startsWith('agt-') ? 'agent' : 'human',\n })),\n requestAgent: async (id, request) => {\n const response = await arbi.editor.request(`/${encodeURIComponent(id)}/mentions`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({\n comment_id: request.commentId,\n instruction: request.instruction,\n request_id: request.requestId,\n recipient_ids: request.recipientIds,\n }),\n })\n const delivery = (await response.json()) as { response_ids: string[] }\n notify.success('Mention delivered.')\n return { responseIds: delivery.response_ids || [] }\n },\n getAgentStatus: async (responseId) => (await arbi.assistant.getResponse(responseId)).status,\n }),\n [arbi, apiUrl, user?.name, members, ensureWorkspaceOpen, fontBaseUrl, queries, workspaceId]\n )\n return adapter\n}\n"]}
1
+ {"version":3,"sources":["../src/connection/ConnectedNativeDocxEditor.tsx"],"names":["jsx","NativeDocxEditor","useArbi","useConnection","useQueryClient","useQuery","useMemo","loadDocxFonts","arbiQueryKeys","notify"],"mappings":";;;;;;;;;AAYO,SAAS,yBAAA,CAA0B;AAAA,EACxC,WAAA,GAAc,oBAAA;AAAA,EACd,GAAG;AACL,CAAA,EAAsE;AACpE,EAAA,MAAM,OAAA,GAAU,8BAA8B,WAAW,CAAA;AACzD,EAAA,uBAAOA,cAAA,CAACC,kCAAA,EAAA,EAAkB,GAAG,KAAA,EAAO,OAAA,EAAkB,CAAA;AACxD;AAEO,SAAS,6BAAA,CAA8B,cAAc,oBAAA,EAAsB;AAChF,EAAA,MAAM,OAAOC,aAAA,EAAQ;AACrB,EAAA,MAAM,EAAE,WAAA,EAAa,MAAA,EAAQ,IAAA,EAAM,mBAAA,KAAwBC,+BAAA,EAAc;AACzE,EAAA,MAAM,UAAUC,yBAAA,EAAe;AAC/B,EAAA,MAAM,EAAE,IAAA,EAAM,OAAA,EAAQ,GAAIC,mBAAA,CAAS;AAAA,IACjC,UAAU,CAAC,qBAAA,EAAuB,MAAA,EAAQ,IAAA,EAAM,YAAY,WAAW,CAAA;AAAA,IACvE,OAAA,EAAS,IAAA,CAAK,UAAA,IAAc,CAAC,CAAC,WAAA;AAAA,IAC9B,SAAS,YAAY;AACnB,MAAA,MAAM,mBAAA,EAAoB;AAC1B,MAAA,OAAO,IAAA,CAAK,WAAW,SAAA,EAAU;AAAA,IACnC;AAAA,GACD,CAAA;AACD,EAAA,MAAM,OAAA,GAAUC,eAAA;AAAA,IACd,OAAO;AAAA,MACL,OAAA,EAAS,OAAO,IAAA,EAAM,OAAA,KAAY;AAChC,QAAA,MAAM,mBAAA,EAAoB;AAC1B,QAAA,OAAO,IAAA,CAAK,MAAA,CAAO,OAAA,CAAQ,IAAA,EAAM,OAAO,CAAA;AAAA,MAC1C,CAAA;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AAY,MAAM,QAAA,CAAS,IAAA,EAAK;AACtC,QAAAA,YAAA,CAAO,QAAQ,oBAAoB,CAAA;AACnC,QAAA,OAAO,EAAE,WAAA,EAAa,QAAA,CAAS,YAAA,IAAgB,EAAC,EAAE;AAAA,MACpD,CAAA;AAAA,MACA,cAAA,EAAgB,OAAO,UAAA,KAAA,CAAgB,MAAM,KAAK,SAAA,CAAU,WAAA,CAAY,UAAU,CAAA,EAAG;AAAA,KACvF,CAAA;AAAA,IACA,CAAC,MAAM,MAAA,EAAQ,IAAA,EAAM,MAAM,OAAA,EAAS,mBAAA,EAAqB,WAAA,EAAa,OAAA,EAAS,WAAW;AAAA,GAC5F;AACA,EAAA,OAAO,OAAA;AACT","file":"chunk-TFDU2KGS.cjs","sourcesContent":["import { useMemo } from 'react'\nimport { useQuery, useQueryClient } from '@tanstack/react-query'\nimport { useArbi, notify, arbiQueryKeys } from '@arbidocs/react'\nimport { useConnection } from './ConnectionProvider'\nimport {\n NativeDocxEditor,\n type NativeDocxAdapter,\n type NativeDocxEditorProps,\n} from '../docx/NativeDocxEditor'\nimport { loadDocxFonts } from '../docx/fonts'\n\n/** Native Word widget bound to the standard blocks connection and SDK session. */\nexport function ConnectedNativeDocxEditor({\n fontBaseUrl = '/native-docx/fonts',\n ...props\n}: Omit<NativeDocxEditorProps, 'adapter'> & { fontBaseUrl?: string }) {\n const adapter = useConnectedNativeDocxAdapter(fontBaseUrl)\n return <NativeDocxEditor {...props} adapter={adapter} />\n}\n\nexport function useConnectedNativeDocxAdapter(fontBaseUrl = '/native-docx/fonts') {\n const arbi = useArbi()\n const { workspaceId, apiUrl, user, ensureWorkspaceOpen } = useConnection()\n const queries = useQueryClient()\n const { data: members } = useQuery({\n queryKey: ['native-docx-members', apiUrl, user?.externalId, workspaceId],\n enabled: arbi.isLoggedIn && !!workspaceId,\n queryFn: async () => {\n await ensureWorkspaceOpen()\n return arbi.workspaces.listUsers()\n },\n })\n const adapter = useMemo<NativeDocxAdapter>(\n () => ({\n request: async (path, options) => {\n await ensureWorkspaceOpen()\n return arbi.editor.request(path, options)\n },\n open: async (id) => {\n await ensureWorkspaceOpen()\n return (\n await arbi.editor.request(`/${encodeURIComponent(id)}/session`, { method: 'POST' })\n ).json()\n },\n save: async (id, state) =>\n (\n await arbi.editor.request(`/${encodeURIComponent(id)}/save`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ state }),\n })\n ).json(),\n loadFonts: () => loadDocxFonts(fontBaseUrl),\n baseUrl: apiUrl,\n author: user?.name || 'You',\n onVersionSaved: async (id) => {\n if (!workspaceId) return\n const key = arbiQueryKeys.documents(workspaceId)\n try {\n const documents = await arbi.documents.get([id])\n if (!documents.length) throw new Error('The saved version is not available yet.')\n queries.setQueryData<Awaited<ReturnType<typeof arbi.documents.list>>>(key, (previous) => [\n ...documents,\n ...(previous || []).filter(\n (doc) => !documents.some((saved) => saved.external_id === doc.external_id)\n ),\n ])\n } catch {\n await queries.invalidateQueries({ queryKey: key })\n }\n },\n notify: (message, kind) => notify[kind](message),\n mentions: members?.map(({ user: member }) => ({\n id: member.external_id,\n name: [member.given_name, member.family_name].filter(Boolean).join(' '),\n kind: member.external_id.startsWith('agt-') ? 'agent' : 'human',\n })),\n requestAgent: async (id, request) => {\n const response = await arbi.editor.request(`/${encodeURIComponent(id)}/mentions`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({\n comment_id: request.commentId,\n instruction: request.instruction,\n request_id: request.requestId,\n recipient_ids: request.recipientIds,\n }),\n })\n const delivery = (await response.json()) as { response_ids: string[] }\n notify.success('Mention delivered.')\n return { responseIds: delivery.response_ids || [] }\n },\n getAgentStatus: async (responseId) => (await arbi.assistant.getResponse(responseId)).status,\n }),\n [arbi, apiUrl, user?.name, members, ensureWorkspaceOpen, fontBaseUrl, queries, workspaceId]\n )\n return adapter\n}\n"]}
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunkY5XW57U4_cjs = require('../chunk-Y5XW57U4.cjs');
4
+ var chunkTFDU2KGS_cjs = require('../chunk-TFDU2KGS.cjs');
5
5
  require('../chunk-MUMH3Z6K.cjs');
6
- var chunkZT2EBBSC_cjs = require('../chunk-ZT2EBBSC.cjs');
7
- require('../chunk-FAGQTB3D.cjs');
6
+ var chunkN36PWG7A_cjs = require('../chunk-N36PWG7A.cjs');
7
+ require('../chunk-O33EBMIX.cjs');
8
8
  require('../chunk-AOFATOT3.cjs');
9
9
  require('../chunk-RC25WMVB.cjs');
10
10
  require('../chunk-7UTB4PHM.cjs');
@@ -16,13 +16,13 @@ function ConnectedStreamedWordArtifact({
16
16
  fontBaseUrl,
17
17
  ...props
18
18
  }) {
19
- const adapter = chunkY5XW57U4_cjs.useConnectedNativeDocxAdapter(fontBaseUrl);
20
- return /* @__PURE__ */ jsxRuntime.jsx(chunkZT2EBBSC_cjs.StreamedWordArtifact, { ...props, adapter });
19
+ const adapter = chunkTFDU2KGS_cjs.useConnectedNativeDocxAdapter(fontBaseUrl);
20
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkN36PWG7A_cjs.StreamedWordArtifact, { ...props, adapter });
21
21
  }
22
22
 
23
23
  Object.defineProperty(exports, "ConnectedNativeDocxEditor", {
24
24
  enumerable: true,
25
- get: function () { return chunkY5XW57U4_cjs.ConnectedNativeDocxEditor; }
25
+ get: function () { return chunkTFDU2KGS_cjs.ConnectedNativeDocxEditor; }
26
26
  });
27
27
  exports.ConnectedStreamedWordArtifact = ConnectedStreamedWordArtifact;
28
28
  //# sourceMappingURL=docx.cjs.map
@@ -1,9 +1,9 @@
1
1
  "use client";
2
- import { useConnectedNativeDocxAdapter } from '../chunk-G5JH2YMQ.js';
3
- export { ConnectedNativeDocxEditor } from '../chunk-G5JH2YMQ.js';
2
+ import { useConnectedNativeDocxAdapter } from '../chunk-GQTIAATM.js';
3
+ export { ConnectedNativeDocxEditor } from '../chunk-GQTIAATM.js';
4
4
  import '../chunk-OYMWV45N.js';
5
- import { StreamedWordArtifact } from '../chunk-YGREW5TZ.js';
6
- import '../chunk-MYALCKDR.js';
5
+ import { StreamedWordArtifact } from '../chunk-H6DFXG5N.js';
6
+ import '../chunk-CVYY4X5R.js';
7
7
  import '../chunk-D3QPYKZG.js';
8
8
  import '../chunk-AF6RDAJF.js';
9
9
  import '../chunk-AA3PT6KR.js';
@@ -3,10 +3,10 @@
3
3
 
4
4
  var chunk5YXG342J_cjs = require('../chunk-5YXG342J.cjs');
5
5
  var chunkXMBYDLZQ_cjs = require('../chunk-XMBYDLZQ.cjs');
6
- var chunkY5XW57U4_cjs = require('../chunk-Y5XW57U4.cjs');
6
+ var chunkTFDU2KGS_cjs = require('../chunk-TFDU2KGS.cjs');
7
7
  var chunkMUMH3Z6K_cjs = require('../chunk-MUMH3Z6K.cjs');
8
8
  var chunkJH6JTI76_cjs = require('../chunk-JH6JTI76.cjs');
9
- require('../chunk-FAGQTB3D.cjs');
9
+ require('../chunk-O33EBMIX.cjs');
10
10
  var chunkO4YPVYPO_cjs = require('../chunk-O4YPVYPO.cjs');
11
11
  var chunkLENXDIMY_cjs = require('../chunk-LENXDIMY.cjs');
12
12
  var chunkAOFATOT3_cjs = require('../chunk-AOFATOT3.cjs');
@@ -663,7 +663,7 @@ function WorkflowWordDialog({
663
663
  title: title ?? labels.wordTitle,
664
664
  size: "xl",
665
665
  testId: "workflow-word-dialog",
666
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Body, { className: "h-[70dvh] p-0", children: /* @__PURE__ */ jsxRuntime.jsx(chunkY5XW57U4_cjs.ConnectedNativeDocxEditor, { documentId: id, title: title ?? labels.wordTitle }) })
666
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Body, { className: "h-[70dvh] p-0", children: /* @__PURE__ */ jsxRuntime.jsx(chunkTFDU2KGS_cjs.ConnectedNativeDocxEditor, { documentId: id, title: title ?? labels.wordTitle }) })
667
667
  }
668
668
  );
669
669
  }
@@ -2,11 +2,11 @@
2
2
  import { SettingsSection, ProfileCard, AvatarPicker, IdentityVerificationCard, IdentityVerificationDialog, RequireVerified, SettingsCard, SettingsActionRow, PasswordChangeDialog, EMAIL_NOTIFICATION_KEYS, EMAIL_NOTIFICATION_CATEGORIES, NotificationCategoryList, toNotificationCategories, toActiveSessionViews, SettingsRow, ActiveSessionsDialog, LogoutDialog, toLogoutSessionViews, SettingsDangerZone, DeleteAccountDialog, toDeleteBlockerViews } from '../chunk-W7NZRZ54.js';
3
3
  import { useWorkspaceDocs } from '../chunk-XQDM6T6C.js';
4
4
  export { ConnectedAssistantDock, redlineStats, textToArtifact, toRedlineMarkdown, useConnectedAiTask, useConnectedChat, useSemanticSearch, useWorkspaceDocs } from '../chunk-XQDM6T6C.js';
5
- import { ConnectedNativeDocxEditor } from '../chunk-G5JH2YMQ.js';
5
+ import { ConnectedNativeDocxEditor } from '../chunk-GQTIAATM.js';
6
6
  import { ConnectionProvider, useConnection } from '../chunk-OYMWV45N.js';
7
7
  export { ConnectionProvider, SESSION_EXPIRED_MESSAGE, isAuthenticated, useConnection } from '../chunk-OYMWV45N.js';
8
8
  import { SignDocumentDialog } from '../chunk-2YOVK524.js';
9
- import '../chunk-MYALCKDR.js';
9
+ import '../chunk-CVYY4X5R.js';
10
10
  import { FilesFilterBar, FolderFilterButton, FolderPickerRow } from '../chunk-7RJTEWYM.js';
11
11
  import { WorkspaceActivityList, WorkspaceNotificationMenu, ThreadFollowMenuItem, ThreadFollowButton, TagTable, tagTableDocx } from '../chunk-Z3G65XHZ.js';
12
12
  import { DOCX_MIME_TYPE } from '../chunk-D3QPYKZG.js';
@@ -5,7 +5,7 @@ import React from 'react';
5
5
  * press outside it. `children` may be a function that receives `close`, for panels that close
6
6
  * themselves once the user has picked something.
7
7
  */
8
- export declare function RibbonMenu({ label, icon, children, className, testId, title, }: {
8
+ export declare function RibbonMenu({ label, icon, children, className, testId, title, keepMounted, popoverClassName, }: {
9
9
  label: string;
10
10
  /** Tooltip; defaults to `label`. */
11
11
  title?: string;
@@ -14,4 +14,7 @@ export declare function RibbonMenu({ label, icon, children, className, testId, t
14
14
  children: React.ReactNode | ((close: () => void) => React.ReactNode);
15
15
  className?: string;
16
16
  testId?: string;
17
+ /** Keep the panel's content mounted (hidden) while closed, so its controls keep their state. */
18
+ keepMounted?: boolean;
19
+ popoverClassName?: string;
17
20
  }): React.JSX.Element;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * A ribbon tab's row of controls that never crowds: what does not fit collapses into a trailing
3
+ * "…" (More) menu, as Word's ribbon does. Each control is a `RibbonItem` with a label and a
4
+ * priority; the row measures the controls (ResizeObserver) and collapses the lowest priority
5
+ * first, the rightmost first among equals. A collapsed control is the same component, moved by a
6
+ * portal into its row of the More menu, beside its label, so it keeps working (and keeps its
7
+ * state while the menu is closed).
8
+ */
9
+ import React from 'react';
10
+ /**
11
+ * The row of one ribbon tab. `tab` names the tab shown, so the More menu closes and the row is
12
+ * measured afresh when it changes.
13
+ */
14
+ export declare function RibbonOverflow({ tab, children }: {
15
+ tab: string;
16
+ children: React.ReactNode;
17
+ }): React.JSX.Element;
18
+ /**
19
+ * One control of a ribbon row. `label` names it in the More menu; `priority` (default 0) decides
20
+ * what collapses first. Outside a `RibbonOverflow` it renders its children as they are.
21
+ */
22
+ export declare function RibbonItem({ id, label, priority, children, }: {
23
+ id: string;
24
+ label: string;
25
+ priority?: number;
26
+ children: React.ReactNode;
27
+ }): React.JSX.Element;
@@ -6,8 +6,9 @@
6
6
  * and its note in `footnotes.xml` (creating the part on a document that has none), moves the caret
7
7
  * into the note so the user types it straight away, numbers notes in document order, and lays
8
8
  * them out at the foot of the page, where an existing note is edited in place. What it leaves out
9
- * is Word's note paragraph style, so a new note is given the document's "footnote text" (or
10
- * "endnote text") style when it defines one.
9
+ * is what Word adds around a new note: the note styles in a document that has none (without
10
+ * "footnote reference" the reference and the number are painted at body size on the baseline),
11
+ * the note's "footnote text" (or "endnote text") paragraph style, and the space after its number.
11
12
  */
12
13
  import React, { type RefObject } from 'react';
13
14
  /** References tab: Insert footnote, Insert endnote. */
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunkZT2EBBSC_cjs = require('../chunk-ZT2EBBSC.cjs');
5
- var chunkFAGQTB3D_cjs = require('../chunk-FAGQTB3D.cjs');
4
+ var chunkN36PWG7A_cjs = require('../chunk-N36PWG7A.cjs');
5
+ var chunkO33EBMIX_cjs = require('../chunk-O33EBMIX.cjs');
6
6
  require('../chunk-AOFATOT3.cjs');
7
7
  require('../chunk-RC25WMVB.cjs');
8
8
  require('../chunk-7UTB4PHM.cjs');
@@ -60,7 +60,7 @@ function NativeDocxComparison({
60
60
  if (!documentId)
61
61
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "native-docx-error", role: "status", children: "Comparing Word documents\u2026" });
62
62
  return /* @__PURE__ */ jsxRuntime.jsx(
63
- chunkFAGQTB3D_cjs.NativeDocxEditor,
63
+ chunkO33EBMIX_cjs.NativeDocxEditor,
64
64
  {
65
65
  adapter,
66
66
  documentId,
@@ -72,131 +72,131 @@ function NativeDocxComparison({
72
72
 
73
73
  Object.defineProperty(exports, "StreamedWordArtifact", {
74
74
  enumerable: true,
75
- get: function () { return chunkZT2EBBSC_cjs.StreamedWordArtifact; }
75
+ get: function () { return chunkN36PWG7A_cjs.StreamedWordArtifact; }
76
76
  });
77
77
  Object.defineProperty(exports, "BUILTIN_TEMPLATE_NAME", {
78
78
  enumerable: true,
79
- get: function () { return chunkFAGQTB3D_cjs.BUILTIN_TEMPLATE_NAME; }
79
+ get: function () { return chunkO33EBMIX_cjs.BUILTIN_TEMPLATE_NAME; }
80
80
  });
81
81
  Object.defineProperty(exports, "DEFAULT_DEFINED_TERMS_LABELS", {
82
82
  enumerable: true,
83
- get: function () { return chunkFAGQTB3D_cjs.DEFAULT_DEFINED_TERMS_LABELS; }
83
+ get: function () { return chunkO33EBMIX_cjs.DEFAULT_DEFINED_TERMS_LABELS; }
84
84
  });
85
85
  Object.defineProperty(exports, "DEFINED_TERM_TRIGGER", {
86
86
  enumerable: true,
87
- get: function () { return chunkFAGQTB3D_cjs.DEFINED_TERM_TRIGGER; }
87
+ get: function () { return chunkO33EBMIX_cjs.DEFINED_TERM_TRIGGER; }
88
88
  });
89
89
  Object.defineProperty(exports, "DefinedTermsProvider", {
90
90
  enumerable: true,
91
- get: function () { return chunkFAGQTB3D_cjs.DefinedTermsProvider; }
91
+ get: function () { return chunkO33EBMIX_cjs.DefinedTermsProvider; }
92
92
  });
93
93
  Object.defineProperty(exports, "DocxAuthorContext", {
94
94
  enumerable: true,
95
- get: function () { return chunkFAGQTB3D_cjs.DocxAuthorContext; }
95
+ get: function () { return chunkO33EBMIX_cjs.DocxAuthorContext; }
96
96
  });
97
97
  Object.defineProperty(exports, "DocxCommentActivity", {
98
98
  enumerable: true,
99
- get: function () { return chunkFAGQTB3D_cjs.DocxCommentActivity; }
99
+ get: function () { return chunkO33EBMIX_cjs.DocxCommentActivity; }
100
100
  });
101
101
  Object.defineProperty(exports, "DocxEditorReview", {
102
102
  enumerable: true,
103
- get: function () { return chunkFAGQTB3D_cjs.DocxEditorReview; }
103
+ get: function () { return chunkO33EBMIX_cjs.DocxEditorReview; }
104
104
  });
105
105
  Object.defineProperty(exports, "DocxMentions", {
106
106
  enumerable: true,
107
- get: function () { return chunkFAGQTB3D_cjs.DocxMentions; }
107
+ get: function () { return chunkO33EBMIX_cjs.DocxMentions; }
108
108
  });
109
109
  Object.defineProperty(exports, "DocxParticipants", {
110
110
  enumerable: true,
111
- get: function () { return chunkFAGQTB3D_cjs.DocxParticipants; }
111
+ get: function () { return chunkO33EBMIX_cjs.DocxParticipants; }
112
112
  });
113
113
  Object.defineProperty(exports, "DocxRibbon", {
114
114
  enumerable: true,
115
- get: function () { return chunkFAGQTB3D_cjs.DocxRibbon; }
115
+ get: function () { return chunkO33EBMIX_cjs.DocxRibbon; }
116
116
  });
117
117
  Object.defineProperty(exports, "GenerateImageButton", {
118
118
  enumerable: true,
119
- get: function () { return chunkFAGQTB3D_cjs.GenerateImageButton; }
119
+ get: function () { return chunkO33EBMIX_cjs.GenerateImageButton; }
120
120
  });
121
121
  Object.defineProperty(exports, "HouseTemplateProvider", {
122
122
  enumerable: true,
123
- get: function () { return chunkFAGQTB3D_cjs.HouseTemplateProvider; }
123
+ get: function () { return chunkO33EBMIX_cjs.HouseTemplateProvider; }
124
124
  });
125
125
  Object.defineProperty(exports, "NativeDocxEditor", {
126
126
  enumerable: true,
127
- get: function () { return chunkFAGQTB3D_cjs.NativeDocxEditor; }
127
+ get: function () { return chunkO33EBMIX_cjs.NativeDocxEditor; }
128
128
  });
129
129
  Object.defineProperty(exports, "builtinHouseTemplate", {
130
130
  enumerable: true,
131
- get: function () { return chunkFAGQTB3D_cjs.builtinHouseTemplate; }
131
+ get: function () { return chunkO33EBMIX_cjs.builtinHouseTemplate; }
132
132
  });
133
133
  Object.defineProperty(exports, "contentPath", {
134
134
  enumerable: true,
135
- get: function () { return chunkFAGQTB3D_cjs.contentPath; }
135
+ get: function () { return chunkO33EBMIX_cjs.contentPath; }
136
136
  });
137
137
  Object.defineProperty(exports, "editorPort", {
138
138
  enumerable: true,
139
- get: function () { return chunkFAGQTB3D_cjs.editorPort; }
139
+ get: function () { return chunkO33EBMIX_cjs.editorPort; }
140
140
  });
141
141
  Object.defineProperty(exports, "findDefinitionsSection", {
142
142
  enumerable: true,
143
- get: function () { return chunkFAGQTB3D_cjs.findDefinitionsSection; }
143
+ get: function () { return chunkO33EBMIX_cjs.findDefinitionsSection; }
144
144
  });
145
145
  Object.defineProperty(exports, "insertDefinedTerm", {
146
146
  enumerable: true,
147
- get: function () { return chunkFAGQTB3D_cjs.insertDefinedTerm; }
147
+ get: function () { return chunkO33EBMIX_cjs.insertDefinedTerm; }
148
148
  });
149
149
  Object.defineProperty(exports, "loadDocxFonts", {
150
150
  enumerable: true,
151
- get: function () { return chunkFAGQTB3D_cjs.loadDocxFonts; }
151
+ get: function () { return chunkO33EBMIX_cjs.loadDocxFonts; }
152
152
  });
153
153
  Object.defineProperty(exports, "normalizeDocxExport", {
154
154
  enumerable: true,
155
- get: function () { return chunkFAGQTB3D_cjs.normalizeDocxExport; }
155
+ get: function () { return chunkO33EBMIX_cjs.normalizeDocxExport; }
156
156
  });
157
157
  Object.defineProperty(exports, "resolveHouseTemplate", {
158
158
  enumerable: true,
159
- get: function () { return chunkFAGQTB3D_cjs.resolveHouseTemplate; }
159
+ get: function () { return chunkO33EBMIX_cjs.resolveHouseTemplate; }
160
160
  });
161
161
  Object.defineProperty(exports, "reviewModule", {
162
162
  enumerable: true,
163
- get: function () { return chunkFAGQTB3D_cjs.reviewModule; }
163
+ get: function () { return chunkO33EBMIX_cjs.reviewModule; }
164
164
  });
165
165
  Object.defineProperty(exports, "structuralPort", {
166
166
  enumerable: true,
167
- get: function () { return chunkFAGQTB3D_cjs.structuralPort; }
167
+ get: function () { return chunkO33EBMIX_cjs.structuralPort; }
168
168
  });
169
169
  Object.defineProperty(exports, "templateFileName", {
170
170
  enumerable: true,
171
- get: function () { return chunkFAGQTB3D_cjs.templateFileName; }
171
+ get: function () { return chunkO33EBMIX_cjs.templateFileName; }
172
172
  });
173
173
  Object.defineProperty(exports, "trackedOrNoted", {
174
174
  enumerable: true,
175
- get: function () { return chunkFAGQTB3D_cjs.trackedOrNoted; }
175
+ get: function () { return chunkO33EBMIX_cjs.trackedOrNoted; }
176
176
  });
177
177
  Object.defineProperty(exports, "useDefinedTerms", {
178
178
  enumerable: true,
179
- get: function () { return chunkFAGQTB3D_cjs.useDefinedTerms; }
179
+ get: function () { return chunkO33EBMIX_cjs.useDefinedTerms; }
180
180
  });
181
181
  Object.defineProperty(exports, "useHouseTemplate", {
182
182
  enumerable: true,
183
- get: function () { return chunkFAGQTB3D_cjs.useHouseTemplate; }
183
+ get: function () { return chunkO33EBMIX_cjs.useHouseTemplate; }
184
184
  });
185
185
  Object.defineProperty(exports, "useReview", {
186
186
  enumerable: true,
187
- get: function () { return chunkFAGQTB3D_cjs.useReview; }
187
+ get: function () { return chunkO33EBMIX_cjs.useReview; }
188
188
  });
189
189
  Object.defineProperty(exports, "useReviewItem", {
190
190
  enumerable: true,
191
- get: function () { return chunkFAGQTB3D_cjs.useReviewItem; }
191
+ get: function () { return chunkO33EBMIX_cjs.useReviewItem; }
192
192
  });
193
193
  Object.defineProperty(exports, "useTrackedOrNoted", {
194
194
  enumerable: true,
195
- get: function () { return chunkFAGQTB3D_cjs.useTrackedOrNoted; }
195
+ get: function () { return chunkO33EBMIX_cjs.useTrackedOrNoted; }
196
196
  });
197
197
  Object.defineProperty(exports, "withDirectEditing", {
198
198
  enumerable: true,
199
- get: function () { return chunkFAGQTB3D_cjs.withDirectEditing; }
199
+ get: function () { return chunkO33EBMIX_cjs.withDirectEditing; }
200
200
  });
201
201
  Object.defineProperty(exports, "DocxEditor", {
202
202
  enumerable: true,
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- export { StreamedWordArtifact } from '../chunk-YGREW5TZ.js';
3
- import { NativeDocxEditor } from '../chunk-MYALCKDR.js';
4
- export { BUILTIN_TEMPLATE_NAME, DEFAULT_DEFINED_TERMS_LABELS, DEFINED_TERM_TRIGGER, DefinedTermsProvider, DocxAuthorContext, DocxCommentActivity, DocxEditorReview, DocxMentions, DocxParticipants, DocxRibbon, GenerateImageButton, HouseTemplateProvider, NativeDocxEditor, builtinHouseTemplate, contentPath, editorPort, findDefinitionsSection, insertDefinedTerm, loadDocxFonts, normalizeDocxExport, resolveHouseTemplate, reviewModule, structuralPort, templateFileName, trackedOrNoted, useDefinedTerms, useHouseTemplate, useReview, useReviewItem, useTrackedOrNoted, withDirectEditing } from '../chunk-MYALCKDR.js';
2
+ export { StreamedWordArtifact } from '../chunk-H6DFXG5N.js';
3
+ import { NativeDocxEditor } from '../chunk-CVYY4X5R.js';
4
+ export { BUILTIN_TEMPLATE_NAME, DEFAULT_DEFINED_TERMS_LABELS, DEFINED_TERM_TRIGGER, DefinedTermsProvider, DocxAuthorContext, DocxCommentActivity, DocxEditorReview, DocxMentions, DocxParticipants, DocxRibbon, GenerateImageButton, HouseTemplateProvider, NativeDocxEditor, builtinHouseTemplate, contentPath, editorPort, findDefinitionsSection, insertDefinedTerm, loadDocxFonts, normalizeDocxExport, resolveHouseTemplate, reviewModule, structuralPort, templateFileName, trackedOrNoted, useDefinedTerms, useHouseTemplate, useReview, useReviewItem, useTrackedOrNoted, withDirectEditing } from '../chunk-CVYY4X5R.js';
5
5
  import '../chunk-D3QPYKZG.js';
6
6
  import '../chunk-AF6RDAJF.js';
7
7
  import '../chunk-AA3PT6KR.js';
@@ -0,0 +1,46 @@
1
+ export type NoteKind = 'footnote' | 'endnote';
2
+ /** A style the document defines, as the engine lists them (`getDocumentStyles`). */
3
+ export interface DocumentStyle {
4
+ readonly styleId: string;
5
+ readonly name: string;
6
+ readonly type: string;
7
+ }
8
+ /** The note text style among `styles`: by Word's built-in name, else by its standard id. */
9
+ export declare function noteTextStyle(styles: readonly DocumentStyle[], kind: NoteKind): string | undefined;
10
+ /**
11
+ * The definitions of the note styles `styles` lacks, in `styles.xml` form ([] when none). The
12
+ * reference style is matched by id, the id the engine writes on the reference; the text style by
13
+ * Word's built-in name too, which a document saved in another language keeps under its own id.
14
+ */
15
+ export declare function missingNoteStyles(styles: readonly DocumentStyle[], kind: NoteKind): string[];
16
+ /**
17
+ * A fragment that carries only `styles`: one empty, open paragraph, so pasting it at the caret
18
+ * inserts nothing and the editor's paste merges the styles the document lacks (as it does for a
19
+ * Quick Part's).
20
+ */
21
+ export declare function stylesOnlyClipboardHtml(styles: readonly string[]): string;
22
+ /** The editor surface `ensureNoteStyles` needs. */
23
+ interface NoteStyleEditor {
24
+ can(command: {
25
+ type: 'insertNote';
26
+ noteKind: NoteKind;
27
+ }): {
28
+ ok: boolean;
29
+ };
30
+ getDocumentStyles(): readonly DocumentStyle[];
31
+ exec(command: {
32
+ type: 'paste';
33
+ text: string;
34
+ html: string;
35
+ }): {
36
+ ok: boolean;
37
+ };
38
+ }
39
+ /**
40
+ * Before a note is inserted: add Word's note styles the document lacks, so the reference and the
41
+ * note number are superscript and the note text is Word's smaller footnote text. `direct` runs
42
+ * the write untracked, as Word adds styles. Returns the id of the document's note text style
43
+ * ("footnote text" / "endnote text"), for the new note's paragraph.
44
+ */
45
+ export declare function ensureNoteStyles(editor: NoteStyleEditor, kind: NoteKind, direct?: <T>(fn: () => T) => T): string | undefined;
46
+ export {};
@@ -0,0 +1,15 @@
1
+ /** What a ribbon row collapses into its More menu (see `RibbonOverflow`). */
2
+ /** One control as the row measured it, in ribbon order. */
3
+ export interface OverflowItem {
4
+ id: string;
5
+ /** Width in the row, including the gap after it. */
6
+ width: number;
7
+ /** Higher stays in the row longer. */
8
+ priority: number;
9
+ }
10
+ /**
11
+ * The controls to collapse so the rest fit in `available` beside a More trigger `moreWidth`
12
+ * wide: none when everything fits; otherwise the lowest priority first, and among equal
13
+ * priorities the rightmost first.
14
+ */
15
+ export declare function planOverflow(items: readonly OverflowItem[], available: number, moreWidth: number): Set<string>;
package/dist/index.cjs CHANGED
@@ -2,8 +2,8 @@
2
2
  'use strict';
3
3
 
4
4
  var chunkQI6AIHWP_cjs = require('./chunk-QI6AIHWP.cjs');
5
- var chunk46IU3UPF_cjs = require('./chunk-46IU3UPF.cjs');
6
5
  var chunkHBF4BDRU_cjs = require('./chunk-HBF4BDRU.cjs');
6
+ var chunk46IU3UPF_cjs = require('./chunk-46IU3UPF.cjs');
7
7
  var chunk65THHQVB_cjs = require('./chunk-65THHQVB.cjs');
8
8
  var chunk7QDX2CO4_cjs = require('./chunk-7QDX2CO4.cjs');
9
9
  var chunkMJCCBMM5_cjs = require('./chunk-MJCCBMM5.cjs');
@@ -966,10 +966,6 @@ Object.defineProperty(exports, "stripMarkdownLinks", {
966
966
  enumerable: true,
967
967
  get: function () { return chunkQI6AIHWP_cjs.stripMarkdownLinks; }
968
968
  });
969
- Object.defineProperty(exports, "UsageMeter", {
970
- enumerable: true,
971
- get: function () { return chunk46IU3UPF_cjs.UsageMeter; }
972
- });
973
969
  Object.defineProperty(exports, "ActionCluster", {
974
970
  enumerable: true,
975
971
  get: function () { return chunkHBF4BDRU_cjs.ActionCluster; }
@@ -1146,6 +1142,10 @@ Object.defineProperty(exports, "workspaceKindMeta", {
1146
1142
  enumerable: true,
1147
1143
  get: function () { return chunkHBF4BDRU_cjs.workspaceKindMeta; }
1148
1144
  });
1145
+ Object.defineProperty(exports, "UsageMeter", {
1146
+ enumerable: true,
1147
+ get: function () { return chunk46IU3UPF_cjs.UsageMeter; }
1148
+ });
1149
1149
  Object.defineProperty(exports, "ArticleList", {
1150
1150
  enumerable: true,
1151
1151
  get: function () { return chunk65THHQVB_cjs.ArticleList; }
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  export { ApplyLabelButton, ApplyLabelDialog, DEFAULT_APPLY_LABEL_DIALOG_LABELS, DEFAULT_RELEVANCE_STEPS, DEFAULT_SEARCH_BAR_LABELS, DEFAULT_SEARCH_EMPTY_STATE_LABELS, DEFAULT_SEARCH_GROUP_HEADER_LABELS, DEFAULT_SEARCH_NO_RESULTS_LABELS, DEFAULT_SEARCH_PAGINATION_LABELS, DEFAULT_SEARCH_TOTALS_LABELS, DOCUMENT_SEARCH_NOUNS, Highlight, RelevanceThreshold, SearchBar, SearchControlsBar, SearchEmptyState, SearchErrorBanner, SearchGroupCard, SearchGroupHeader, SearchNoResults, SearchPageBody, SearchPageFrame, SearchPageHeader, SearchPagination, SearchPillToggle, SearchResultList, SearchResultsInner, SearchResultsMain, SearchToolbarRow, SearchTotalsHeadline, getPageNumbers, highlightTerms, searchNouns, splitByTerms, stripMarkdownLinks } from './chunk-2MJWWPHY.js';
3
- export { UsageMeter } from './chunk-D5T53XCL.js';
4
3
  export { ActionCluster, AskField, AskRow, AskTrigger, DEFAULT_ASK_FIELD_LABELS, DEFAULT_INSTALL_PROMPT_LABELS, DEFAULT_MOBILE_BARS_LABELS, DEFAULT_OFFLINE_PILL_LABELS, DEFAULT_REMOTE_CONTROL_PILL_LABELS, DEFAULT_SIDEBAR_LABELS, DEFAULT_TIP_CARD_LABELS, DEFAULT_WORKSPACE_KIND_LABELS, DEFAULT_WORKSPACE_SWITCHER_LABELS, INSTALL_PROMPT_DISMISSED_KEY, InfoBar, InstallPrompt, MobileAppBar, MobileTabBar, NotificationBell, OfflinePill, RemoteControlPill, STATUS_ROW_BASE_CLASS, STATUS_ROW_TONES, Sidebar, SidebarBadgeRow, SidebarRowAction, SidebarRowHoverContext, SplitLayout, StatusBadge, StatusRow, TipCard, UserMenu, WorkspaceIdentity, WorkspaceSwitcher, getInstallInstructions, initInstallPrompt, isIosDevice, promptAppInstall, resolveSidebarLayout, useInstallPrompt, useSidebarContext, useSidebarSettle, workspaceKindColor, workspaceKindMeta } from './chunk-VLOPZHFH.js';
4
+ export { UsageMeter } from './chunk-D5T53XCL.js';
5
5
  export { ArticleList, Chart, CheckList, CollectionDetail, CtaBand, DefinitionList, EditorialHeading, EditorialHero, EditorialProse, EditorialSection, Eyebrow, PanelGrid, ProofStrip, PullQuote, Reveal, TagList } from './chunk-LYUO3E6V.js';
6
6
  export { DataTable, DataTableBlock, MetricCard, PageHeader, StatGroup } from './chunk-ZCF2JJFA.js';
7
7
  export { Accordion, AvatarBlock, Banner, BlockImage, BlockLink, CTABanner, Columns, ContactForm, Container, FAQ, FONT_PAIRINGS, FeatureGrid, Footer, Gallery, Hero, ListBlock, LogoCloud, MediaText, Navbar, PricingTable, ProfileCard, RichTextBlock, SectionHeading, Spacer, Steps, THEME_STYLE_ID, Tabs, TeamGrid, Testimonial, TestimonialGrid, ThemeEditor, VideoEmbed, applyFontVars, applyStoredTheme, applyThemeVars, clearFontVars, clearThemeVars, createThemeStore, fontPackages, getFontPairing, matchFontPairing, tid, toEmbedUrl, toHslTriplet } from './chunk-DLBUFHLY.js';
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbidocs/coedit",
3
- "version": "0.4.102",
3
+ "version": "0.4.103",
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.4.102",
3
+ "version": "0.4.103",
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",
@@ -267,8 +267,8 @@
267
267
  "example:test:e2e": "playwright test -c examples/custom-ui/playwright.config.ts"
268
268
  },
269
269
  "dependencies": {
270
- "@arbidocs/client": "0.4.102",
271
- "@arbidocs/coedit": "0.4.102",
270
+ "@arbidocs/client": "0.4.103",
271
+ "@arbidocs/coedit": "0.4.103",
272
272
  "@dnd-kit/core": "^6.3.1",
273
273
  "@dnd-kit/sortable": "^10.0.0",
274
274
  "@dnd-kit/utilities": "^3.2.2",
@@ -310,7 +310,7 @@
310
310
  "y-protocols": "^1.0.6"
311
311
  },
312
312
  "peerDependencies": {
313
- "@arbidocs/react": "0.4.102",
313
+ "@arbidocs/react": "0.4.103",
314
314
  "@lexical/html": "0.35.0",
315
315
  "@lexical/link": "0.35.0",
316
316
  "@lexical/list": "0.35.0",
@@ -87,6 +87,16 @@ text, rotate and flip, and Insert caption (a `Caption`-style paragraph numbered
87
87
  Give the adapter `imageGeneration` and Insert offers Generate image: the picture comes back as an
88
88
  ordinary inline picture at the caret, its alt text the prompt, its bytes a media part of the DOCX.
89
89
 
90
+ Ribbon width: when a tab's controls do not fit, they collapse into a trailing More ("…") menu, as in
91
+ Word: lowest priority first, the rightmost first among equals (`RibbonOverflow`, `RibbonItem`).
92
+ A collapsed control is the same component, shown in the menu beside its label. Undo, Redo and Save
93
+ always stay in the ribbon.
94
+
95
+ Footnotes and endnotes: References › Insert footnote / Insert endnote (Ctrl+Alt+F / Ctrl+Alt+D)
96
+ first adds Word's note styles when the document has none (a new blank note has none), so the
97
+ reference and the note number are superscript and the note text is smaller. The note then takes the
98
+ "footnote text" (or "endnote text") style and gets a space after its number, as in Word.
99
+
90
100
  What the engine does not do yet, so the ribbon shows it disabled with the engine's reason:
91
101
 
92
102
  - Text columns: `w:cols` in an opened document lay out and save unchanged, but no command writes