@arbidocs/blocks 0.5.159 → 0.5.161

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/connection/auth/useLoginActions.ts"],
4
- "sourcesContent": ["/**\n * What the sign-in page does: local sign-in (or an offline unlock with no network), registration\n * (then straight in), the verification email and the hand-over to SSO. Every sign-in goes through\n * the host's `Arbi` (`arbi.login`), so the SDK opens the identity, stores the keys and signs the\n * session in, and the site's sign-in hooks run around it.\n */\n\nimport { useCallback, useState } from 'react'\nimport { useArbi } from '@arbidocs/react'\nimport { parseAuthError } from '../../auth/auth-error'\nimport { useBlocksEnvironment } from '../../provider/environment'\nimport { backUpOnSignup } from './signup-backup'\nimport { useOptionalConnection } from '../ConnectionProvider'\nimport { useAuthPages, useSsoSignIn } from './support'\nimport type { LoginFormActions, LoginFormState } from './useLoginForm'\n\nconst BAD_CREDENTIALS =\n 'This username/password combination is not valid. Please double-check your credentials and try again.'\n\nexport function useLoginActions({\n formState,\n formActions,\n onError,\n}: {\n formState: LoginFormState\n formActions: LoginFormActions\n /** Show a refusal in the form itself. Default: a notice. */\n onError?: (message: string) => void\n}) {\n const arbi = useArbi()\n const signInLayer = useOptionalConnection()\n const sso = useSsoSignIn()\n const environment = useBlocksEnvironment()\n // Errors go to the form's own place when it has one; everything else is a notice.\n const environmentNotify = environment.notify\n const notify = useCallback<typeof environmentNotify>(\n (...args) =>\n args[1] === 'error' && onError && typeof args[0] === 'string'\n ? onError(args[0])\n : environmentNotify(...args),\n [environmentNotify, onError]\n )\n const { passwordRules, onRegistered, onUnlockedOffline } = useAuthPages()\n\n // True from the moment a login/registration submit starts doing real work until it fails.\n // Deliberately NOT cleared on success: after the API call there is still key setup, session\n // storage and the signed-in app's download before this page is replaced, and the button must not\n // flip back to \"Sign in\" and look idle then.\n const [isAuthenticating, setIsAuthenticating] = useState(false)\n const [isRequestingCode, setIsRequestingCode] = useState(false)\n\n const {\n email,\n password,\n confirmPassword,\n firstName,\n lastName,\n verificationCode,\n cooldownSeconds,\n } = formState\n const { setVerificationSent, setIsRedirecting, startCooldown, validateEmailWithError } =\n formActions\n\n /** Hand over to the SSO provider. */\n const handleSsoLogin = useCallback(\n (connection?: string) => {\n arbi.session?.setSsoMode(true)\n setIsRedirecting(true)\n sso.signIn(connection ? { connection } : undefined).catch((error) => {\n console.error('Error during SSO redirect:', error)\n setIsRedirecting(false)\n notify(\n 'There was a problem connecting to the authentication service. Please try again.',\n 'error'\n )\n })\n },\n [arbi, sso, setIsRedirecting, notify]\n )\n\n /** Send the verification email (a link and a three-word code). */\n const handleRequestVerificationCode = useCallback(async () => {\n if (cooldownSeconds > 0) {\n notify(`Please wait ${cooldownSeconds} seconds before requesting again`, 'warning')\n return\n }\n if (!validateEmailWithError(email)) return\n\n setIsRequestingCode(true)\n try {\n const sent = await arbi.requestVerification(email)\n setVerificationSent(true)\n notify(sent, 'success')\n startCooldown(30)\n } catch (error: unknown) {\n console.error('Verification email error:', error)\n const { detail, message } = error as { detail?: string; message?: string }\n notify(detail || message || 'Unable to send verification email.', 'error')\n } finally {\n setIsRequestingCode(false)\n }\n }, [\n arbi,\n cooldownSeconds,\n email,\n validateEmailWithError,\n setVerificationSent,\n startCooldown,\n notify,\n ])\n\n /** Local (non-SSO) sign-in; offline, an unlock on this device. */\n const handleLocalLogin = useCallback(\n async (opts?: {\n isFreshRegistration?: boolean\n /** Sign in with these, not the form's (a sign-in link's). */\n credentials?: { email: string; password: string }\n }) => {\n arbi.session?.setSsoMode(false)\n const loginEmail = opts?.credentials?.email ?? email\n const loginPassword = opts?.credentials?.password ?? password\n\n if (!loginPassword) {\n notify('Please fill in all required fields.', 'error')\n return\n }\n if (!validateEmailWithError(loginEmail)) return\n\n // Offline: unlock locally from the saved session instead of calling the backend. The\n // password still derives the key client-side; it is the same login box with no\n // /v1/user/login. This is what lets you back in (and back to your offline files) after a\n // \"log out (this device)\" with no network.\n if (typeof navigator !== 'undefined' && !navigator.onLine) {\n try {\n await arbi.unlock(loginEmail, loginPassword)\n onUnlockedOffline?.()\n } catch (err: unknown) {\n notify(\n err instanceof Error && err.message === 'no-session'\n ? 'You need to be online to log in on this device.'\n : BAD_CREDENTIALS,\n 'error'\n )\n }\n return\n }\n\n // A demo site (`defaultHost` with no backend configured) enters its demo workspace.\n if (signInLayer && !signInLayer.apiConfigured) {\n await signInLayer.login(loginEmail, loginPassword)\n return\n }\n\n setIsAuthenticating(true)\n try {\n const login = await arbi.login(loginEmail, loginPassword)\n // The single welcome toast comes with the signed-in app; none here. Where to land is the\n // site's: a fresh registration hands its login over.\n if (opts?.isFreshRegistration) onRegistered?.(login)\n return login\n } catch (error: unknown) {\n setIsAuthenticating(false)\n console.error('Login error:', error)\n notify(\n parseAuthError(error, {\n messageMap: { 'Incorrect username or password': BAD_CREDENTIALS },\n }),\n 'error'\n )\n }\n },\n [\n arbi,\n signInLayer,\n email,\n password,\n validateEmailWithError,\n notify,\n onRegistered,\n onUnlockedOffline,\n ]\n )\n\n /** Registration, then straight in. */\n const handleRegister = useCallback(\n async (saveRecoveryKey = true) => {\n arbi.session?.setSsoMode(false)\n\n if (!password || !confirmPassword || !firstName || !lastName || !verificationCode) {\n notify('Please fill in all required fields.', 'error')\n return\n }\n if (!validateEmailWithError(email)) return\n if (password !== confirmPassword) {\n notify('Passwords do not match. Please ensure both password fields are identical.', 'error')\n return\n }\n const passwordError = passwordRules.error(password)\n if (passwordError) {\n notify(passwordError, 'error')\n return\n }\n\n setIsAuthenticating(true)\n try {\n const { signingPrivateKey } = await arbi.register({\n email,\n password,\n verificationCode: verificationCode.trim(),\n firstName,\n lastName,\n })\n // Password manager save always; recovery key download unless opted out. After the\n // account exists: each attempt generates a new random identity, so a recovery file saved\n // for a failed attempt would recover nothing.\n await backUpOnSignup({ email, password, signingPrivateKey, saveRecoveryKey })\n // No success toast: the button already says \"Creating your account\u2026\", and the next thing\n // the user sees (the site's first landing) is the confirmation.\n await handleLocalLogin({ isFreshRegistration: true })\n } catch (error: unknown) {\n setIsAuthenticating(false)\n console.error('Registration error:', error)\n notify(parseAuthError(error), 'error')\n }\n },\n [\n arbi,\n email,\n password,\n confirmPassword,\n firstName,\n lastName,\n verificationCode,\n validateEmailWithError,\n passwordRules,\n handleLocalLogin,\n notify,\n ]\n )\n\n return {\n isAuthenticating,\n isRequestingCode,\n handleSsoLogin,\n handleLocalLogin,\n handleRegister,\n handleRequestVerificationCode,\n }\n}\n"],
5
- "mappings": ";AAOA,SAAS,aAAa,gBAAgB;AACtC,SAAS,eAAe;AACxB,SAAS,sBAAsB;AAC/B,SAAS,4BAA4B;AACrC,SAAS,sBAAsB;AAC/B,SAAS,6BAA6B;AACtC,SAAS,cAAc,oBAAoB;AAG3C,MAAM,kBACJ;AAEK,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AACF,GAKG;AACD,QAAM,OAAO,QAAQ;AACrB,QAAM,cAAc,sBAAsB;AAC1C,QAAM,MAAM,aAAa;AACzB,QAAM,cAAc,qBAAqB;AAEzC,QAAM,oBAAoB,YAAY;AACtC,QAAM,SAAS;AAAA,IACb,IAAI,SACF,KAAK,CAAC,MAAM,WAAW,WAAW,OAAO,KAAK,CAAC,MAAM,WACjD,QAAQ,KAAK,CAAC,CAAC,IACf,kBAAkB,GAAG,IAAI;AAAA,IAC/B,CAAC,mBAAmB,OAAO;AAAA,EAC7B;AACA,QAAM,EAAE,eAAe,cAAc,kBAAkB,IAAI,aAAa;AAMxE,QAAM,CAAC,kBAAkB,mBAAmB,IAAI,SAAS,KAAK;AAC9D,QAAM,CAAC,kBAAkB,mBAAmB,IAAI,SAAS,KAAK;AAE9D,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AACJ,QAAM,EAAE,qBAAqB,kBAAkB,eAAe,uBAAuB,IACnF;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AAM,KAAK,SAAS;AAAA,UAChD;AAAA,UACA;AAAA,UACA,kBAAkB,iBAAiB,KAAK;AAAA,UACxC;AAAA,UACA;AAAA,QACF,CAAC;AAID,cAAM,eAAe,EAAE,OAAO,UAAU,mBAAmB,gBAAgB,CAAC;AAG5E,cAAM,iBAAiB,EAAE,qBAAqB,KAAK,CAAC;AAAA,MACtD,SAAS,OAAgB;AACvB,4BAAoB,KAAK;AACzB,gBAAQ,MAAM,uBAAuB,KAAK;AAC1C,eAAO,eAAe,KAAK,GAAG,OAAO;AAAA,MACvC;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["/**\n * What the sign-in page does: local sign-in (or an offline unlock with no network), registration\n * (then straight in), the verification email and the hand-over to SSO. Every sign-in goes through\n * the host's `Arbi` (`arbi.login`), so the SDK opens the identity, stores the keys and signs the\n * session in, and the site's sign-in hooks run around it.\n */\n\nimport { useCallback, useState } from 'react'\nimport { useArbi } from '@arbidocs/react'\nimport { parseAuthError } from '../../auth/auth-error'\nimport { useBlocksEnvironment } from '../../provider/environment'\nimport { backUpOnSignup } from './signup-backup'\nimport { useOptionalConnection } from '../ConnectionProvider'\nimport { useAuthPages, useSsoSignIn } from './support'\nimport type { LoginFormActions, LoginFormState } from './useLoginForm'\n\nconst BAD_CREDENTIALS =\n 'This username/password combination is not valid. Please double-check your credentials and try again.'\n\nexport function useLoginActions({\n formState,\n formActions,\n onError,\n}: {\n formState: LoginFormState\n formActions: LoginFormActions\n /** Show a refusal in the form itself. Default: a notice. */\n onError?: (message: string) => void\n}) {\n const arbi = useArbi()\n const signInLayer = useOptionalConnection()\n const sso = useSsoSignIn()\n const environment = useBlocksEnvironment()\n // Errors go to the form's own place when it has one; everything else is a notice.\n const environmentNotify = environment.notify\n const notify = useCallback<typeof environmentNotify>(\n (...args) =>\n args[1] === 'error' && onError && typeof args[0] === 'string'\n ? onError(args[0])\n : environmentNotify(...args),\n [environmentNotify, onError]\n )\n const { passwordRules, onRegistered, onUnlockedOffline } = useAuthPages()\n\n // True from the moment a login/registration submit starts doing real work until it fails.\n // Deliberately NOT cleared on success: after the API call there is still key setup, session\n // storage and the signed-in app's download before this page is replaced, and the button must not\n // flip back to \"Sign in\" and look idle then.\n const [isAuthenticating, setIsAuthenticating] = useState(false)\n const [isRequestingCode, setIsRequestingCode] = useState(false)\n // The session kept on this device is signing in again (or a sign-in is opening its workspace):\n // the form waits, busy, so nothing typed is lost when the page moves on.\n const restoring = signInLayer?.status === 'connecting'\n\n const {\n email,\n password,\n confirmPassword,\n firstName,\n lastName,\n verificationCode,\n cooldownSeconds,\n } = formState\n const { setVerificationSent, setIsRedirecting, startCooldown, validateEmailWithError } =\n formActions\n\n /** Hand over to the SSO provider. */\n const handleSsoLogin = useCallback(\n (connection?: string) => {\n arbi.session?.setSsoMode(true)\n setIsRedirecting(true)\n sso.signIn(connection ? { connection } : undefined).catch((error) => {\n console.error('Error during SSO redirect:', error)\n setIsRedirecting(false)\n notify(\n 'There was a problem connecting to the authentication service. Please try again.',\n 'error'\n )\n })\n },\n [arbi, sso, setIsRedirecting, notify]\n )\n\n /** Send the verification email (a link and a three-word code). */\n const handleRequestVerificationCode = useCallback(async () => {\n if (cooldownSeconds > 0) {\n notify(`Please wait ${cooldownSeconds} seconds before requesting again`, 'warning')\n return\n }\n if (!validateEmailWithError(email)) return\n\n setIsRequestingCode(true)\n try {\n const sent = await arbi.requestVerification(email)\n setVerificationSent(true)\n notify(sent, 'success')\n startCooldown(30)\n } catch (error: unknown) {\n console.error('Verification email error:', error)\n const { detail, message } = error as { detail?: string; message?: string }\n notify(detail || message || 'Unable to send verification email.', 'error')\n } finally {\n setIsRequestingCode(false)\n }\n }, [\n arbi,\n cooldownSeconds,\n email,\n validateEmailWithError,\n setVerificationSent,\n startCooldown,\n notify,\n ])\n\n /** Local (non-SSO) sign-in; offline, an unlock on this device. */\n const handleLocalLogin = useCallback(\n async (opts?: {\n isFreshRegistration?: boolean\n /** Sign in with these, not the form's (a sign-in link's). */\n credentials?: { email: string; password: string }\n }) => {\n arbi.session?.setSsoMode(false)\n const loginEmail = opts?.credentials?.email ?? email\n const loginPassword = opts?.credentials?.password ?? password\n\n if (!loginPassword) {\n notify('Please fill in all required fields.', 'error')\n return\n }\n if (!validateEmailWithError(loginEmail)) return\n\n // Offline: unlock locally from the saved session instead of calling the backend. The\n // password still derives the key client-side; it is the same login box with no\n // /v1/user/login. This is what lets you back in (and back to your offline files) after a\n // \"log out (this device)\" with no network.\n if (typeof navigator !== 'undefined' && !navigator.onLine) {\n try {\n await arbi.unlock(loginEmail, loginPassword)\n onUnlockedOffline?.()\n } catch (err: unknown) {\n notify(\n err instanceof Error && err.message === 'no-session'\n ? 'You need to be online to log in on this device.'\n : BAD_CREDENTIALS,\n 'error'\n )\n }\n return\n }\n\n // A demo site (`defaultHost` with no backend configured) enters its demo workspace.\n if (signInLayer && !signInLayer.apiConfigured) {\n await signInLayer.login(loginEmail, loginPassword)\n return\n }\n\n setIsAuthenticating(true)\n try {\n const login = await arbi.login(loginEmail, loginPassword)\n // The single welcome toast comes with the signed-in app; none here. Where to land is the\n // site's: a fresh registration hands its login over.\n if (opts?.isFreshRegistration) onRegistered?.(login)\n return login\n } catch (error: unknown) {\n setIsAuthenticating(false)\n console.error('Login error:', error)\n notify(\n parseAuthError(error, {\n messageMap: { 'Incorrect username or password': BAD_CREDENTIALS },\n }),\n 'error'\n )\n }\n },\n [\n arbi,\n signInLayer,\n email,\n password,\n validateEmailWithError,\n notify,\n onRegistered,\n onUnlockedOffline,\n ]\n )\n\n /** Registration, then straight in. */\n const handleRegister = useCallback(\n async (saveRecoveryKey = true) => {\n arbi.session?.setSsoMode(false)\n\n if (!password || !confirmPassword || !firstName || !lastName || !verificationCode) {\n notify('Please fill in all required fields.', 'error')\n return\n }\n if (!validateEmailWithError(email)) return\n if (password !== confirmPassword) {\n notify('Passwords do not match. Please ensure both password fields are identical.', 'error')\n return\n }\n const passwordError = passwordRules.error(password)\n if (passwordError) {\n notify(passwordError, 'error')\n return\n }\n\n setIsAuthenticating(true)\n try {\n const { signingPrivateKey } = await arbi.register({\n email,\n password,\n verificationCode: verificationCode.trim(),\n firstName,\n lastName,\n })\n // Password manager save always; recovery key download unless opted out. After the\n // account exists: each attempt generates a new random identity, so a recovery file saved\n // for a failed attempt would recover nothing.\n await backUpOnSignup({ email, password, signingPrivateKey, saveRecoveryKey })\n // No success toast: the button already says \"Creating your account\u2026\", and the next thing\n // the user sees (the site's first landing) is the confirmation.\n await handleLocalLogin({ isFreshRegistration: true })\n } catch (error: unknown) {\n setIsAuthenticating(false)\n console.error('Registration error:', error)\n notify(parseAuthError(error), 'error')\n }\n },\n [\n arbi,\n email,\n password,\n confirmPassword,\n firstName,\n lastName,\n verificationCode,\n validateEmailWithError,\n passwordRules,\n handleLocalLogin,\n notify,\n ]\n )\n\n return {\n isAuthenticating: isAuthenticating || restoring,\n isRequestingCode,\n handleSsoLogin,\n handleLocalLogin,\n handleRegister,\n handleRequestVerificationCode,\n }\n}\n"],
5
+ "mappings": ";AAOA,SAAS,aAAa,gBAAgB;AACtC,SAAS,eAAe;AACxB,SAAS,sBAAsB;AAC/B,SAAS,4BAA4B;AACrC,SAAS,sBAAsB;AAC/B,SAAS,6BAA6B;AACtC,SAAS,cAAc,oBAAoB;AAG3C,MAAM,kBACJ;AAEK,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AACF,GAKG;AACD,QAAM,OAAO,QAAQ;AACrB,QAAM,cAAc,sBAAsB;AAC1C,QAAM,MAAM,aAAa;AACzB,QAAM,cAAc,qBAAqB;AAEzC,QAAM,oBAAoB,Y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2
  'use strict';
3
3
 
4
- var chunk7G64NNCC_cjs = require('../chunk-7G64NNCC.cjs');
4
+ var chunkK4U4TM23_cjs = require('../chunk-K4U4TM23.cjs');
5
5
  require('../chunk-6P4U63HO.cjs');
6
6
  require('../chunk-ZC7X4ZIX.cjs');
7
7
  require('../chunk-ZPBTXRMG.cjs');
@@ -89,27 +89,27 @@ require('../chunk-PLIF5CUV.cjs');
89
89
 
90
90
  Object.defineProperty(exports, "ArbiChat", {
91
91
  enumerable: true,
92
- get: function () { return chunk7G64NNCC_cjs.ArbiChat; }
92
+ get: function () { return chunkK4U4TM23_cjs.ArbiChat; }
93
93
  });
94
94
  Object.defineProperty(exports, "ConnectedCompactLogin", {
95
95
  enumerable: true,
96
- get: function () { return chunk7G64NNCC_cjs.ConnectedCompactLogin; }
96
+ get: function () { return chunkK4U4TM23_cjs.ConnectedCompactLogin; }
97
97
  });
98
98
  Object.defineProperty(exports, "ConnectedEmbeddedChat", {
99
99
  enumerable: true,
100
- get: function () { return chunk7G64NNCC_cjs.ConnectedEmbeddedChat; }
100
+ get: function () { return chunkK4U4TM23_cjs.ConnectedEmbeddedChat; }
101
101
  });
102
102
  Object.defineProperty(exports, "ConnectedLoginPage", {
103
103
  enumerable: true,
104
- get: function () { return chunk7G64NNCC_cjs.ConnectedLoginPage; }
104
+ get: function () { return chunkK4U4TM23_cjs.ConnectedLoginPage; }
105
105
  });
106
106
  Object.defineProperty(exports, "EmbeddedChatPanel", {
107
107
  enumerable: true,
108
- get: function () { return chunk7G64NNCC_cjs.EmbeddedChatPanel; }
108
+ get: function () { return chunkK4U4TM23_cjs.EmbeddedChatPanel; }
109
109
  });
110
110
  Object.defineProperty(exports, "defaultHost", {
111
111
  enumerable: true,
112
- get: function () { return chunk7G64NNCC_cjs.defaultHost; }
112
+ get: function () { return chunkK4U4TM23_cjs.defaultHost; }
113
113
  });
114
114
  Object.defineProperty(exports, "useConnection", {
115
115
  enumerable: true,
package/dist/index.cjs CHANGED
@@ -14,8 +14,8 @@ var chunkUWJ63GLD_cjs = require('./chunk-UWJ63GLD.cjs');
14
14
  var chunkNX56DIG3_cjs = require('./chunk-NX56DIG3.cjs');
15
15
  var chunkU4YOVI5D_cjs = require('./chunk-U4YOVI5D.cjs');
16
16
  var chunkNEGFHF3V_cjs = require('./chunk-NEGFHF3V.cjs');
17
- var chunkZ3LFF3YT_cjs = require('./chunk-Z3LFF3YT.cjs');
18
17
  var chunkI6GEQWIV_cjs = require('./chunk-I6GEQWIV.cjs');
18
+ var chunkZ3LFF3YT_cjs = require('./chunk-Z3LFF3YT.cjs');
19
19
  var chunk4B6HYQTW_cjs = require('./chunk-4B6HYQTW.cjs');
20
20
  var chunk6XKQAQWF_cjs = require('./chunk-6XKQAQWF.cjs');
21
21
  var chunkADMNU2CR_cjs = require('./chunk-ADMNU2CR.cjs');
@@ -853,6 +853,10 @@ Object.defineProperty(exports, "toHslTriplet", {
853
853
  enumerable: true,
854
854
  get: function () { return chunkNEGFHF3V_cjs.toHslTriplet; }
855
855
  });
856
+ Object.defineProperty(exports, "MemberAvatarStack", {
857
+ enumerable: true,
858
+ get: function () { return chunkI6GEQWIV_cjs.MemberAvatarStack; }
859
+ });
856
860
  Object.defineProperty(exports, "DEFAULT_THREAD_FOLLOW_LABELS", {
857
861
  enumerable: true,
858
862
  get: function () { return chunkZ3LFF3YT_cjs.DEFAULT_THREAD_FOLLOW_LABELS; }
@@ -873,10 +877,6 @@ Object.defineProperty(exports, "WorkspaceNotificationMenu", {
873
877
  enumerable: true,
874
878
  get: function () { return chunkZ3LFF3YT_cjs.WorkspaceNotificationMenu; }
875
879
  });
876
- Object.defineProperty(exports, "MemberAvatarStack", {
877
- enumerable: true,
878
- get: function () { return chunkI6GEQWIV_cjs.MemberAvatarStack; }
879
- });
880
880
  Object.defineProperty(exports, "TIPS_VISIBILITY_OVERRIDE", {
881
881
  enumerable: true,
882
882
  get: function () { return chunk4B6HYQTW_cjs.TIPS_VISIBILITY_OVERRIDE; }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbidocs/coedit",
3
- "version": "0.5.159",
3
+ "version": "0.5.161",
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.159",
3
+ "version": "0.5.161",
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",
@@ -351,9 +351,9 @@
351
351
  "custom-site:test:e2e": "playwright test -c examples/custom-site/playwright.config.ts"
352
352
  },
353
353
  "dependencies": {
354
- "@arbidocs/client": "0.5.159",
355
- "@arbidocs/coedit": "0.5.159",
356
- "@arbidocs/sdk": "0.5.159",
354
+ "@arbidocs/client": "0.5.161",
355
+ "@arbidocs/coedit": "0.5.161",
356
+ "@arbidocs/sdk": "0.5.161",
357
357
  "@auth0/auth0-react": "^2.19.0",
358
358
  "@dnd-kit/core": "^6.3.1",
359
359
  "@dnd-kit/sortable": "^10.0.0",
@@ -404,7 +404,7 @@
404
404
  "y-protocols": "^1.0.6"
405
405
  },
406
406
  "peerDependencies": {
407
- "@arbidocs/react": "0.5.159",
407
+ "@arbidocs/react": "0.5.161",
408
408
  "@lexical/html": "0.35.0",
409
409
  "@lexical/link": "0.35.0",
410
410
  "@lexical/list": "0.35.0",