@calimero-network/mero-react 11.5.0 → 11.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1456,9 +1456,9 @@ function useApiKeys(options) {
1456
1456
  const { withClient, ...state } = useClientAction(options);
1457
1457
  const create = react.useCallback(
1458
1458
  (input = {}) => withClient(async (c) => {
1459
- const created2 = await c.auth.apikeyCreate({ ...input }, confirmWith(passkey));
1459
+ const created = await c.auth.apikeyCreate({ ...input }, confirmWith(passkey));
1460
1460
  void refetch();
1461
- return created2;
1461
+ return created;
1462
1462
  }),
1463
1463
  [withClient, passkey, refetch]
1464
1464
  );
@@ -1872,7 +1872,51 @@ function ConnectButton({
1872
1872
  chunkRRETZWNI_cjs.styleInject('.mero-cw,\n.mero-cw-review {\n --_ink: var(--cw-ink, light-dark(#0f1117, #eceef5));\n --_muted: var(--cw-muted, light-dark(#6b7280, #9097ab));\n --_line: var(--cw-line, light-dark(#e6e8ee, rgba(255, 255, 255, 0.16)));\n --_surface: var(--cw-surface, light-dark(#ffffff, #161b2b));\n --_primary-bg: var(--cw-primary-bg, light-dark(#0f1117, #eceef5));\n --_primary-ink: var(--cw-primary-ink, light-dark(#ffffff, #0f1117));\n --_focus: var(--cw-link, light-dark(#3b5bfd, #9aafff));\n --_good-bg: var(--cw-good-bg, light-dark(#dcfce7, #0e3324));\n --_good-ink: var(--cw-good-ink, light-dark(#15803d, #7fe0b0));\n --_bad-bg: var(--cw-bad-bg, light-dark(#ffe4ea, #3d0f1e));\n --_bad-ink: var(--cw-bad-ink, light-dark(#a2194b, #f78bb0));\n --_busy-bg: var(--cw-busy-bg, light-dark(#e3e9ff, #1c2650));\n --_busy-ink: var(--cw-busy-ink, light-dark(#3451d1, #9aafff));\n --_warn-bg: var(--cw-warn-bg, light-dark(#fff1d6, #3a2a08));\n --_warn-ink: var(--cw-warn-ink, light-dark(#8a5a00, #f2c36b));\n --_code-bg: var(--cw-code-bg, light-dark(#f4f5f8, #1f2538));\n font-family: var(--cw-font, inherit);\n}\n.mero-cw-review [data-kind=verified] {\n --_tone: var(--_good-ink);\n --_tone-bg: var(--_good-bg);\n}\n.mero-cw-review [data-kind=refused] {\n --_tone: var(--_bad-ink);\n --_tone-bg: var(--_bad-bg);\n}\n.mero-cw-review [data-kind=checking] {\n --_tone: var(--_busy-ink);\n --_tone-bg: var(--_busy-bg);\n}\n.mero-cw-review [data-kind=unsealed] {\n --_tone: var(--_muted);\n --_tone-bg: color-mix(in srgb, var(--_muted) 14%, var(--_surface));\n}\n.mero-cw-shield__icon {\n flex: none;\n color: var(--_tone);\n}\n.mero-cw-shield__tick {\n flex: none;\n margin-top: 2px;\n color: var(--_muted);\n}\n@media (prefers-reduced-motion: no-preference) {\n [data-kind=checking] .mero-cw-shield__icon {\n animation: mero-cw-shield-pulse 1.4s ease-in-out infinite;\n }\n}\n@keyframes mero-cw-shield-pulse {\n 50% {\n opacity: 0.4;\n }\n}\n.mero-cw-review {\n box-sizing: border-box;\n width: 100%;\n color: var(--_ink);\n font-size: 14px;\n line-height: 1.45;\n text-align: left;\n}\n.mero-cw-review *,\n.mero-cw-review *::before,\n.mero-cw-review *::after {\n box-sizing: border-box;\n}\n.mero-cw-review__title {\n margin: 0;\n font-size: 18px;\n font-weight: 700;\n line-height: 1.3;\n}\n.mero-cw-review__title:focus {\n outline: none;\n}\n.mero-cw-review__lede {\n margin: 4px 0 6px;\n color: var(--_muted);\n}\n.mero-cw-review__muted,\n.mero-cw-review__sub {\n color: var(--_muted);\n font-size: 12.5px;\n}\n.mero-cw-review__muted {\n margin: 8px 0 0;\n}\n.mero-cw-review__sub {\n display: block;\n margin-top: 2px;\n}\n.mero-cw-review__mono {\n font-family:\n ui-monospace,\n "SF Mono",\n SFMono-Regular,\n Menlo,\n Consolas,\n monospace;\n font-size: 12.5px;\n overflow-wrap: anywhere;\n}\n.mero-cw-review__icon {\n flex: none;\n}\n.mero-cw-review__nobreak {\n white-space: nowrap;\n}\n.mero-cw-review__sec {\n padding: 14px 0;\n border-top: 1px solid var(--_line);\n}\n.mero-cw-review__h {\n display: flex;\n align-items: center;\n gap: 7px;\n margin: 0 0 10px;\n font-size: 13px;\n font-weight: 700;\n letter-spacing: 0.02em;\n}\n.mero-cw-review__h .mero-cw-shield__icon {\n margin-top: -1px;\n}\n.mero-cw-review__kv {\n display: flex;\n flex-direction: column;\n gap: 6px;\n margin: 0;\n}\n.mero-cw-review__kv > div {\n display: grid;\n grid-template-columns: 96px minmax(0, 1fr);\n gap: 12px;\n}\n.mero-cw-review__kv dt {\n color: var(--_muted);\n}\n.mero-cw-review__kv dd {\n margin: 0;\n overflow-wrap: anywhere;\n}\n.mero-cw-review__kv--raw {\n margin-bottom: 12px;\n}\n.mero-cw-review__tone--good {\n color: var(--_good-ink);\n}\n.mero-cw-review__tone--bad {\n color: var(--_bad-ink);\n font-weight: 600;\n}\n.mero-cw-review__copy,\n.mero-cw-review__link {\n margin-left: 8px;\n padding: 0;\n border: 0;\n background: none;\n color: var(--_focus);\n font: inherit;\n font-size: 12.5px;\n font-weight: 600;\n text-decoration: none;\n cursor: pointer;\n}\n.mero-cw-review__link {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n.mero-cw-review__copy:hover,\n.mero-cw-review__link:hover {\n text-decoration: underline;\n}\n.mero-cw-review__sum {\n display: flex;\n flex-direction: column;\n gap: 10px;\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.mero-cw-review__sum li {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n}\n.mero-cw-review__ic {\n display: grid;\n place-items: center;\n flex: none;\n width: 28px;\n height: 28px;\n border-radius: 50%;\n background: var(--_chip-bg);\n color: var(--_muted);\n}\n.mero-cw-review__sum li[data-tone=warn] .mero-cw-review__ic {\n background: var(--_warn-bg);\n color: var(--_warn-ink);\n}\n.mero-cw-review__sum li[data-tone=ok] .mero-cw-review__ic {\n background: var(--_good-bg);\n color: var(--_good-ink);\n}\n.mero-cw-review__tx {\n display: flex;\n flex-direction: column;\n min-width: 0;\n padding-top: 3px;\n}\n.mero-cw-review__tx span {\n color: var(--_muted);\n font-size: 12.5px;\n overflow-wrap: anywhere;\n}\n.mero-cw-review__more {\n margin-top: 0;\n}\n.mero-cw-review__sum + .mero-cw-review__more {\n margin-top: 10px;\n}\n.mero-cw-review__more > summary,\n.mero-cw-review__how > summary {\n display: flex;\n align-items: center;\n gap: 6px;\n min-height: 32px;\n color: var(--_focus);\n font-weight: 600;\n cursor: pointer;\n list-style: none;\n}\n.mero-cw-review summary::-webkit-details-marker {\n display: none;\n}\n.mero-cw-review__more > summary::after,\n.mero-cw-review__how > summary::after,\n.mero-cw-review__grp > summary::after,\n.mero-cw-review__act > summary::after {\n content: "";\n flex: none;\n width: 7px;\n height: 7px;\n margin: 0 3px;\n border: solid currentColor;\n border-width: 0 2px 2px 0;\n transform: rotate(-45deg);\n transition: transform 0.15s ease;\n}\n.mero-cw-review details[open] > summary::after {\n transform: rotate(45deg);\n}\n.mero-cw-review summary:focus-visible,\n.mero-cw-review__btn:focus-visible,\n.mero-cw-review__chip:focus-visible,\n.mero-cw-review__copy:focus-visible,\n.mero-cw-review__link:focus-visible {\n outline: 2px solid var(--_focus);\n outline-offset: 2px;\n border-radius: 6px;\n}\n.mero-cw-review__chips {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n margin: 4px 0 10px;\n}\n.mero-cw-review__chip {\n min-height: 30px;\n padding: 0 11px;\n border: 1px solid var(--_line);\n border-radius: 999px;\n background: var(--_surface);\n color: var(--_ink);\n font: inherit;\n font-size: 12.5px;\n font-weight: 600;\n cursor: pointer;\n}\n.mero-cw-review__chip[aria-pressed=true] {\n border-color: transparent;\n background: var(--_primary-bg);\n color: var(--_primary-ink);\n}\n.mero-cw-review__grp {\n margin-top: 8px;\n border: 1px solid var(--_line);\n border-radius: 12px;\n}\n.mero-cw-review__grp > summary {\n display: flex;\n align-items: center;\n gap: 10px;\n min-height: 48px;\n padding: 8px 12px;\n cursor: pointer;\n list-style: none;\n color: var(--_muted);\n}\n.mero-cw-review__grp-text {\n display: flex;\n flex: 1;\n flex-direction: column;\n min-width: 0;\n}\n.mero-cw-review__grp-text b {\n color: var(--_ink);\n}\n.mero-cw-review__grp-text span {\n font-size: 12.5px;\n}\n.mero-cw-review__count {\n flex: none;\n min-width: 22px;\n padding: 1px 7px;\n border-radius: 999px;\n background: var(--_chip-bg);\n color: var(--_ink);\n font-size: 12px;\n font-weight: 600;\n text-align: center;\n}\n.mero-cw-review__acts {\n border-top: 1px solid var(--_line);\n}\n.mero-cw-review__act + .mero-cw-review__act {\n border-top: 1px solid var(--_line);\n}\n.mero-cw-review__act > summary,\n.mero-cw-review__act-head {\n display: flex;\n align-items: center;\n gap: 8px;\n min-height: 40px;\n padding: 6px 12px;\n cursor: pointer;\n list-style: none;\n color: var(--_muted);\n}\n.mero-cw-review__act-head {\n cursor: default;\n}\n.mero-cw-review__act-main {\n display: flex;\n flex: 1 1 0;\n flex-direction: column;\n gap: 1px;\n min-width: 0;\n}\n.mero-cw-review__act-title {\n color: var(--_ink);\n font-weight: 600;\n overflow-wrap: anywhere;\n}\n.mero-cw-review__act-doc {\n font-size: 12px;\n font-style: italic;\n overflow-wrap: anywhere;\n}\n.mero-cw-review__act-doc code,\n.mero-cw-review__said code {\n font-family:\n ui-monospace,\n "SF Mono",\n SFMono-Regular,\n Menlo,\n Consolas,\n monospace;\n font-size: 0.92em;\n font-style: normal;\n}\n.mero-cw-review__act > summary::after {\n margin-left: 0;\n}\n.mero-cw-review__tags {\n display: flex;\n flex: none;\n flex-wrap: wrap;\n justify-content: flex-end;\n gap: 4px;\n max-width: 55%;\n}\n.mero-cw-review__tag {\n padding: 1px 8px;\n border-radius: 999px;\n background: var(--_chip-bg);\n color: var(--_muted);\n font-size: 11.5px;\n font-weight: 600;\n white-space: nowrap;\n}\n.mero-cw-review__tag--passkey {\n background: var(--_warn-bg);\n color: var(--_warn-ink);\n}\n.mero-cw-review__tag--public {\n background: var(--_busy-bg);\n color: var(--_busy-ink);\n}\n.mero-cw-review__facts {\n padding: 2px 12px 12px;\n}\n.mero-cw-review__facts .mero-cw-review__kv {\n font-size: 12.5px;\n}\n.mero-cw-review__said {\n margin-top: 10px;\n padding: 8px 10px;\n border: 1px dashed var(--_line);\n border-radius: 8px;\n}\n.mero-cw-review__said span {\n color: var(--_muted);\n font-size: 11.5px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n}\n.mero-cw-review__said p {\n margin: 2px 0 0;\n font-style: italic;\n overflow-wrap: anywhere;\n}\n.mero-cw-review__note {\n margin: 10px 0 0;\n color: var(--_muted);\n font-size: 12px;\n}\n.mero-cw-review__claims {\n display: flex;\n flex-direction: column;\n gap: 6px;\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.mero-cw-review__claims li {\n display: flex;\n align-items: flex-start;\n gap: 7px;\n}\n.mero-cw-review__claims .mero-cw-shield__tick {\n margin-top: 3px;\n color: var(--_good-ink);\n}\n.mero-cw-review__claims--plain b {\n font-weight: 500;\n color: var(--_muted);\n}\n.mero-cw-review__claims + .mero-cw-review__grey {\n margin-top: 10px;\n}\n.mero-cw-review__how {\n margin-top: 6px;\n}\n.mero-cw-review__how ul {\n margin: 0 0 4px;\n padding-left: 18px;\n color: var(--_muted);\n font-size: 12.5px;\n}\n.mero-cw-review__except {\n display: flex;\n flex-direction: column;\n gap: 6px;\n margin: 10px 0 0;\n padding: 0;\n list-style: none;\n}\n.mero-cw-review__except li {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 8px 10px;\n border-radius: 10px;\n background: var(--_warn-bg);\n color: var(--_warn-ink);\n font-weight: 600;\n overflow-wrap: anywhere;\n}\n.mero-cw-review__except .mero-cw-review__icon {\n margin-top: 2px;\n}\n.mero-cw-review__grey {\n display: flex;\n flex-direction: column;\n gap: 2px;\n margin: 0;\n padding: 10px 12px;\n border-radius: 10px;\n background: var(--_tone-bg);\n color: var(--_ink);\n}\n.mero-cw-review__grey span {\n color: var(--_muted);\n font-size: 12.5px;\n}\n.mero-cw-review__alert {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: space-between;\n gap: 8px 12px;\n margin: 10px 0 4px;\n padding: 10px 12px;\n border-radius: 10px;\n background: var(--_bad-bg);\n color: var(--_bad-ink);\n}\n.mero-cw-review__alert p {\n flex: 1 1 220px;\n margin: 0;\n font-weight: 600;\n overflow-wrap: anywhere;\n}\n.mero-cw-review__buttons {\n position: sticky;\n bottom: calc(0px - var(--cw-review-inset, 0px));\n z-index: 1;\n display: flex;\n justify-content: space-between;\n gap: 10px;\n margin-top: 6px;\n padding: 14px 0 calc(env(safe-area-inset-bottom, 0px) + 8px);\n border-top: 1px solid var(--_line);\n background: var(--_surface);\n}\n.mero-cw-review__btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-height: 40px;\n padding: 0 18px;\n border: 1px solid var(--_line);\n border-radius: 999px;\n background: var(--_surface);\n color: var(--_ink);\n font: inherit;\n font-weight: 600;\n cursor: pointer;\n}\n.mero-cw-review__btn:hover:not(:disabled) {\n border-color: var(--_ink);\n}\n.mero-cw-review__btn:disabled {\n opacity: 0.55;\n cursor: not-allowed;\n}\n.mero-cw-review__buttons .mero-cw-review__btn {\n white-space: nowrap;\n}\n.mero-cw-review__btn--primary {\n border-color: transparent;\n background: var(--_primary-bg);\n color: var(--_primary-ink);\n}\n.mero-cw-review__btn--primary:hover:not(:disabled) {\n border-color: transparent;\n opacity: 0.88;\n}\n@media (max-width: 480px) {\n .mero-cw-review__kv > div {\n grid-template-columns: minmax(0, 1fr);\n gap: 0;\n }\n .mero-cw-review__kv dt {\n font-size: 12px;\n }\n .mero-cw-review__buttons .mero-cw-review__btn {\n flex: 1;\n padding: 0 12px;\n }\n .mero-cw-review__buttons .mero-cw-review__btn--primary {\n flex: 2;\n }\n}\n');
1873
1873
 
1874
1874
  // src/create-workspace/createWorkspace.css
1875
- chunkRRETZWNI_cjs.styleInject('.mero-cw-overlay {\n position: fixed;\n inset: 0;\n z-index: var(--cw-z, 2147483000);\n display: grid;\n place-items: center;\n padding: 16px;\n background: rgba(15, 17, 23, 0.45);\n}\n.mero-cw-card {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n max-width: 420px;\n max-height: calc(100dvh - 32px);\n display: flex;\n flex-direction: column;\n overflow: hidden;\n border-radius: 18px;\n background: var(--_surface);\n color: var(--_ink);\n box-shadow: 0 10px 30px rgba(15, 17, 23, 0.18);\n}\n.mero-cw-body {\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n padding: 20px 22px 0;\n}\n.mero-cw-body > :last-child {\n margin-bottom: 20px;\n}\n.mero-cw-body .mero-cw-review__buttons {\n margin-bottom: 0;\n padding-bottom: 18px;\n}\n.mero-cw-card *,\n.mero-cw-card *::before,\n.mero-cw-card *::after {\n box-sizing: border-box;\n}\n.mero-cw-x {\n position: absolute;\n top: 12px;\n right: 14px;\n z-index: 2;\n display: grid;\n place-items: center;\n width: 28px;\n height: 28px;\n padding: 0;\n border: 0;\n border-radius: 50%;\n background: none;\n color: var(--_muted);\n cursor: pointer;\n}\n.mero-cw-x:hover {\n background: var(--_code-bg);\n color: var(--_ink);\n}\n.mero-cw-title {\n margin: 0 0 4px;\n padding-right: 28px;\n font-size: 17px;\n font-weight: 700;\n}\n.mero-cw-sub {\n margin: 0 0 14px;\n color: var(--_muted);\n font-size: 12.5px;\n line-height: 1.45;\n}\n.mero-cw-field {\n margin: 0 0 12px;\n}\n.mero-cw-field label {\n display: block;\n margin: 0 0 5px;\n font-size: 12px;\n font-weight: 600;\n}\n.mero-cw-field input {\n width: 100%;\n padding: 9px 11px;\n border: 1px solid var(--_line);\n border-radius: 10px;\n background: var(--_surface);\n color: var(--_ink);\n font: inherit;\n font-size: 13px;\n}\n.mero-cw-field input:focus-visible {\n outline: 2px solid var(--_focus);\n outline-offset: 1px;\n}\n.mero-cw-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-height: 38px;\n padding: 0 16px;\n border: 1px solid var(--_line);\n border-radius: 999px;\n background: var(--_surface);\n color: var(--_ink);\n font: inherit;\n font-size: 13px;\n font-weight: 600;\n cursor: pointer;\n}\n.mero-cw-btn:disabled {\n opacity: 0.55;\n cursor: not-allowed;\n}\n.mero-cw-btn--primary {\n border-color: transparent;\n background: var(--_primary-bg);\n color: var(--_primary-ink);\n}\n.mero-cw-btn--full {\n width: 100%;\n}\n.mero-cw-btn:focus-visible,\n.mero-cw-link:focus-visible,\n.mero-cw-x:focus-visible {\n outline: 2px solid var(--_focus);\n outline-offset: 2px;\n}\n.mero-cw-link {\n border: 0;\n background: none;\n color: var(--_focus);\n font: inherit;\n font-size: 12.5px;\n font-weight: 600;\n cursor: pointer;\n}\n.mero-cw-link:hover {\n text-decoration: underline;\n}\n.mero-cw-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 10px;\n margin-top: 14px;\n}\n.mero-cw-code {\n margin: 10px 0;\n padding: 10px;\n border-radius: 12px;\n background: var(--_code-bg);\n font-family:\n ui-monospace,\n "SF Mono",\n SFMono-Regular,\n Menlo,\n Consolas,\n monospace;\n font-size: 22px;\n font-weight: 700;\n letter-spacing: 3px;\n text-align: center;\n}\n.mero-cw-wait {\n display: flex;\n align-items: center;\n gap: 8px;\n color: var(--_muted);\n font-size: 12.5px;\n}\n.mero-cw-dot {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: var(--_focus);\n}\n@media (prefers-reduced-motion: no-preference) {\n .mero-cw-dot {\n animation: mero-cw-pulse 1.2s infinite;\n }\n}\n@keyframes mero-cw-pulse {\n 50% {\n opacity: 0.25;\n }\n}\n.mero-cw-error {\n margin: 0 0 12px;\n padding: 10px 12px;\n border-radius: 10px;\n background: var(--_bad-bg);\n color: var(--_bad-ink);\n font-size: 13px;\n font-weight: 600;\n overflow-wrap: anywhere;\n}\n.mero-cw-notice {\n position: fixed;\n right: 16px;\n bottom: 16px;\n z-index: var(--cw-z, 2147483000);\n max-width: 360px;\n padding: 10px 14px;\n border-radius: 10px;\n background: var(--_surface);\n color: var(--_ink);\n font-size: 13px;\n line-height: 1.4;\n box-shadow: 0 0 0 1px var(--_line), 0 12px 28px -12px rgba(14, 18, 34, 0.4);\n}\n');
1875
+ chunkRRETZWNI_cjs.styleInject('.mero-cw-overlay {\n position: fixed;\n inset: 0;\n z-index: var(--cw-z, 2147483000);\n display: grid;\n place-items: center;\n padding: 16px;\n background: rgba(15, 17, 23, 0.45);\n}\n.mero-cw-card {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n max-width: 420px;\n max-height: calc(100dvh - 32px);\n display: flex;\n flex-direction: column;\n overflow: hidden;\n border-radius: 18px;\n background: var(--_surface);\n color: var(--_ink);\n box-shadow: 0 10px 30px rgba(15, 17, 23, 0.18);\n}\n.mero-cw-body {\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n padding: 20px 22px 0;\n}\n.mero-cw-body > :last-child {\n margin-bottom: 20px;\n}\n.mero-cw-body .mero-cw-review__buttons {\n margin-bottom: 0;\n padding-bottom: 18px;\n}\n.mero-cw-card *,\n.mero-cw-card *::before,\n.mero-cw-card *::after {\n box-sizing: border-box;\n}\n.mero-cw-x {\n position: absolute;\n top: 12px;\n right: 14px;\n z-index: 2;\n display: grid;\n place-items: center;\n width: 28px;\n height: 28px;\n padding: 0;\n border: 0;\n border-radius: 50%;\n background: none;\n color: var(--_muted);\n cursor: pointer;\n}\n.mero-cw-x:hover {\n background: var(--_code-bg);\n color: var(--_ink);\n}\n.mero-cw-title {\n margin: 0 0 4px;\n padding-right: 28px;\n font-size: 17px;\n font-weight: 700;\n}\n.mero-cw-sub {\n margin: 0 0 14px;\n color: var(--_muted);\n font-size: 12.5px;\n line-height: 1.45;\n}\n.mero-cw-field {\n margin: 0 0 12px;\n}\n.mero-cw-field label {\n display: block;\n margin: 0 0 5px;\n font-size: 12px;\n font-weight: 600;\n}\n.mero-cw-field input {\n width: 100%;\n padding: 9px 11px;\n border: 1px solid var(--_line);\n border-radius: 10px;\n background: var(--_surface);\n color: var(--_ink);\n font: inherit;\n font-size: 13px;\n}\n.mero-cw-field input:focus-visible {\n outline: 2px solid var(--_focus);\n outline-offset: 1px;\n}\n.mero-cw-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-height: 38px;\n padding: 0 16px;\n border: 1px solid var(--_line);\n border-radius: 999px;\n background: var(--_surface);\n color: var(--_ink);\n font: inherit;\n font-size: 13px;\n font-weight: 600;\n cursor: pointer;\n}\n.mero-cw-btn:disabled {\n opacity: 0.55;\n cursor: not-allowed;\n}\n.mero-cw-btn--primary {\n border-color: transparent;\n background: var(--_primary-bg);\n color: var(--_primary-ink);\n}\n.mero-cw-btn--full {\n width: 100%;\n}\n.mero-cw-btn:focus-visible,\n.mero-cw-link:focus-visible,\n.mero-cw-x:focus-visible {\n outline: 2px solid var(--_focus);\n outline-offset: 2px;\n}\n.mero-cw-link {\n border: 0;\n background: none;\n color: var(--_focus);\n font: inherit;\n font-size: 12.5px;\n font-weight: 600;\n cursor: pointer;\n}\n.mero-cw-link:hover {\n text-decoration: underline;\n}\n.mero-cw-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 10px;\n margin-top: 14px;\n}\n.mero-cw-code {\n margin: 10px 0;\n padding: 10px;\n border-radius: 12px;\n background: var(--_code-bg);\n font-family:\n ui-monospace,\n "SF Mono",\n SFMono-Regular,\n Menlo,\n Consolas,\n monospace;\n font-size: 22px;\n font-weight: 700;\n letter-spacing: 3px;\n text-align: center;\n}\n.mero-cw-wait {\n display: flex;\n align-items: center;\n gap: 8px;\n color: var(--_muted);\n font-size: 12.5px;\n}\n.mero-cw-dot {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: var(--_focus);\n}\n@media (prefers-reduced-motion: no-preference) {\n .mero-cw-dot {\n animation: mero-cw-pulse 1.2s infinite;\n }\n}\n@keyframes mero-cw-pulse {\n 50% {\n opacity: 0.25;\n }\n}\n.mero-cw-error {\n margin: 0 0 12px;\n padding: 10px 12px;\n border-radius: 10px;\n background: var(--_bad-bg);\n color: var(--_bad-ink);\n font-size: 13px;\n font-weight: 600;\n overflow-wrap: anywhere;\n}\n.mero-cw-notice {\n position: fixed;\n right: 16px;\n bottom: 16px;\n z-index: var(--cw-z, 2147483000);\n max-width: 360px;\n padding: 10px 14px;\n border-radius: 10px;\n background: var(--_surface);\n color: var(--_ink);\n font-size: 13px;\n line-height: 1.4;\n box-shadow: 0 0 0 1px var(--_line), 0 12px 28px -12px rgba(14, 18, 34, 0.4);\n}\n.mero-cw-choices {\n display: flex;\n flex-direction: column;\n gap: 8px;\n margin: 0 0 12px;\n padding: 0;\n border: 0;\n}\n.mero-cw-choice {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n padding: 10px 12px;\n border: 1px solid var(--_line);\n border-radius: 12px;\n cursor: pointer;\n}\n.mero-cw-choice:has(input:checked) {\n border-color: var(--_ink);\n}\n.mero-cw-choice input {\n margin-top: 3px;\n accent-color: var(--_primary-bg);\n}\n.mero-cw-choice b {\n display: block;\n font-size: 13px;\n}\n.mero-cw-choice .mero-cw-sub {\n display: block;\n margin: 2px 0 0;\n}\n.mero-cw-caps {\n display: flex;\n flex-direction: column;\n gap: 2px;\n margin: 0 0 14px;\n padding: 6px 4px;\n border-top: 1px solid var(--_line);\n border-bottom: 1px solid var(--_line);\n max-height: 220px;\n overflow-y: auto;\n}\n.mero-cw-cap {\n display: flex;\n flex-wrap: wrap;\n align-items: baseline;\n gap: 0 10px;\n padding: 6px 8px;\n font-size: 13px;\n}\n.mero-cw-cap label {\n display: flex;\n align-items: center;\n gap: 10px;\n cursor: pointer;\n}\n.mero-cw-cap[data-disabled] {\n color: var(--_muted);\n}\n.mero-cw-cap[data-disabled] label {\n cursor: not-allowed;\n}\n.mero-cw-cap input {\n margin: 0;\n accent-color: var(--_primary-bg);\n}\n.mero-cw-hint {\n display: inline;\n color: var(--_muted);\n font-size: 11.5px;\n}\n.mero-cw-visually-hidden {\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip: rect(0 0 0 0);\n white-space: nowrap;\n}\n');
1876
+ var subscribeNothing = () => () => void 0;
1877
+ var useMounted = () => react.useSyncExternalStore(subscribeNothing, () => true, () => false);
1878
+ var CloseIcon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m6 6 12 12M18 6 6 18", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) });
1879
+ function DialogShell({ label, locked = false, onClose, children }) {
1880
+ const mounted = useMounted();
1881
+ if (!mounted) return null;
1882
+ return reactDom.createPortal(
1883
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mero-cw mero-cw-overlay", onKeyDown: (e) => e.key === "Escape" && !locked && onClose(), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mero-cw-card", role: "dialog", "aria-modal": "true", "aria-label": label, children: [
1884
+ /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "mero-cw-x", "aria-label": "Close", onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon, {}) }),
1885
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mero-cw-body", children })
1886
+ ] }) }),
1887
+ document.body
1888
+ );
1889
+ }
1890
+ function WithClient({ client, passkey, children }) {
1891
+ const sessionStore = react.useMemo(() => ({ load: () => client?.session ?? null, save: () => void 0, clear: () => void 0 }), [client]);
1892
+ return client ? /* @__PURE__ */ jsxRuntime.jsx(MeroProvider, { client, sessionStore, passkey, children }) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
1893
+ }
1894
+ function ApprovalCard({
1895
+ redirecting,
1896
+ code,
1897
+ onCancel,
1898
+ onProceed,
1899
+ onReopen
1900
+ }) {
1901
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mero-cw-approve", children: [
1902
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "mero-cw-title", children: "Approve with your passkey" }),
1903
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mero-cw-sub", children: redirecting ? "Your node will open its own page to ask for your passkey. Check that it shows this code." : "A window from your node opened. Check it shows this code, then approve there." }),
1904
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mero-cw-code", "aria-live": "polite", children: code ?? "..." }),
1905
+ redirecting ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1906
+ /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "mero-cw-btn mero-cw-btn--primary mero-cw-btn--full", onClick: onProceed, children: "Continue to your node" }),
1907
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mero-cw-row", children: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "mero-cw-btn", onClick: onCancel, children: "Cancel" }) })
1908
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1909
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mero-cw-wait", role: "status", children: [
1910
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mero-cw-dot", "aria-hidden": "true" }),
1911
+ "Waiting for your approval..."
1912
+ ] }),
1913
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mero-cw-row", children: [
1914
+ /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "mero-cw-btn", onClick: onCancel, children: "Cancel" }),
1915
+ /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "mero-cw-link", onClick: onReopen, children: "Open the window again" })
1916
+ ] })
1917
+ ] })
1918
+ ] });
1919
+ }
1876
1920
 
1877
1921
  // src/create-workspace/clusterName.ts
1878
1922
  var LOCAL_HOSTS = /* @__PURE__ */ new Set(["localhost", "127.0.0.1", "[::1]"]);
@@ -2427,48 +2471,41 @@ function ConsentPopupReturn({ children }) {
2427
2471
  return returned === "null" ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children }) : null;
2428
2472
  }
2429
2473
 
2430
- // src/create-workspace/useCreateWorkspace.ts
2431
- var INTENT_KEY = "mero-react:create-workspace-intent";
2474
+ // src/consent-flow/useNodeConsent.ts
2432
2475
  var POPUP_FEATURES = "popup,width=480,height=720";
2433
2476
  var NARROW_PX = 640;
2434
2477
  var CLOSED_POLL_MS = 400;
2435
2478
  var WAIT_POLL_MS = 1500;
2436
- var MSG = {
2437
- declined: "You declined the request on your node. Nothing was created.",
2438
- closed: "The approval window was closed before you approved. Nothing was created.",
2439
- expired: "The request expired before you approved it. Nothing was created.",
2440
- noOrg: "Your node approved the request but named no workspace. Nothing was created."
2479
+ var CONSENT_MSG = {
2480
+ declined: "You declined the request on your node. Nothing was changed.",
2481
+ closed: "The approval window was closed before you approved. Nothing was changed.",
2482
+ expired: "The request expired before you approved it. Nothing was changed."
2441
2483
  };
2442
- function readIntent() {
2484
+ var messageOf2 = (e) => e instanceof Error ? e.message : String(e);
2485
+ var codeOf = (e) => typeof e?.code === "string" ? e.code : null;
2486
+ function readIntent(key2, valid) {
2443
2487
  try {
2444
- const v = JSON.parse(sessionStorage.getItem(INTENT_KEY) ?? "null");
2445
- return v && typeof v.name === "string" && typeof v.selfName === "string" ? { name: v.name, selfName: v.selfName } : null;
2488
+ const v = JSON.parse(sessionStorage.getItem(key2) ?? "null");
2489
+ return valid(v) ? v : null;
2446
2490
  } catch {
2447
2491
  return null;
2448
2492
  }
2449
2493
  }
2450
- function keepIntent(intent) {
2494
+ function keepIntent(key2, intent) {
2451
2495
  try {
2452
- sessionStorage.setItem(INTENT_KEY, JSON.stringify(intent));
2496
+ sessionStorage.setItem(key2, JSON.stringify(intent));
2453
2497
  } catch {
2454
2498
  }
2455
2499
  }
2456
- function forgetIntent() {
2500
+ function forgetIntent(key2) {
2457
2501
  try {
2458
- sessionStorage.removeItem(INTENT_KEY);
2502
+ sessionStorage.removeItem(key2);
2459
2503
  } catch {
2460
2504
  }
2461
2505
  }
2462
- var messageOf2 = (e) => e instanceof Error ? e.message : String(e);
2463
- function created(result) {
2464
- if (result.status === "declined") return { error: MSG.declined };
2465
- const orgId = result.status === "approved" && result.kind === "createOrg" ? result.outcome?.orgId : void 0;
2466
- return orgId ? { orgId } : { error: MSG.noOrg };
2467
- }
2468
- function useCreateWorkspace({ returnTo, onCreated }) {
2506
+ function useNodeConsent({ storageKey }) {
2469
2507
  const { client } = useMero();
2470
2508
  const consent = useConsent({ throwOnError: true });
2471
- const orgs = useCreateOrg({ throwOnError: true });
2472
2509
  const [bound, setBound] = react.useState(null);
2473
2510
  const [phase, setPhase] = react.useState("idle");
2474
2511
  const [error, setError] = react.useState(null);
@@ -2488,16 +2525,16 @@ function useCreateWorkspace({ returnTo, onCreated }) {
2488
2525
  };
2489
2526
  }, [client]);
2490
2527
  react.useEffect(() => () => stop.current?.(), []);
2491
- const approveInPopup = async (win, name, selfName) => {
2492
- if (!client) return;
2493
- const started = await consent.open(meroJs.createOrgConsent(name, returnTo), {
2528
+ const approveInPopup = async (win, request) => {
2529
+ if (!client) return null;
2530
+ const started = await consent.open(request, {
2494
2531
  navigate: (url) => {
2495
2532
  if (popup.current) popup.current.url = url;
2496
2533
  win.location.href = url;
2497
2534
  },
2498
2535
  confirm: () => true
2499
2536
  });
2500
- if (!started) return;
2537
+ if (!started) return null;
2501
2538
  let cause = null;
2502
2539
  const ctrl = new AbortController();
2503
2540
  const end = (why) => {
@@ -2517,23 +2554,25 @@ function useCreateWorkspace({ returnTo, onCreated }) {
2517
2554
  result = await client.consent.pageResult({ request: started.requestId });
2518
2555
  }
2519
2556
  if (result.status === "pending") {
2520
- if (cause !== "cancelled") setError(cause === "closed" ? MSG.closed : MSG.expired);
2521
- return;
2557
+ if (cause !== "cancelled") setError({ message: cause === "closed" ? CONSENT_MSG.closed : CONSENT_MSG.expired, code: null });
2558
+ return null;
2559
+ }
2560
+ if (result.status === "declined") {
2561
+ setError({ message: CONSENT_MSG.declined, code: null });
2562
+ return null;
2522
2563
  }
2523
- const made = created(result);
2524
- if ("error" in made) setError(made.error);
2525
- else onCreated({ orgId: made.orgId, name, selfName });
2564
+ return result;
2526
2565
  } finally {
2527
2566
  clearInterval(timer);
2528
2567
  window.removeEventListener("message", onMessage);
2529
2568
  stop.current = null;
2530
2569
  }
2531
2570
  };
2532
- const redirect = async (name, selfName) => {
2533
- keepIntent({ name, selfName });
2571
+ const redirect = async (request, intent) => {
2572
+ keepIntent(storageKey, intent);
2534
2573
  let went = false;
2535
2574
  try {
2536
- await consent.open(meroJs.createOrgConsent(name, returnTo), {
2575
+ await consent.open(request, {
2537
2576
  // The page opens once the person has seen the code and chosen to go.
2538
2577
  confirm: async () => {
2539
2578
  setPhase("redirect");
@@ -2544,13 +2583,13 @@ function useCreateWorkspace({ returnTo, onCreated }) {
2544
2583
  }
2545
2584
  });
2546
2585
  } catch (e) {
2547
- forgetIntent();
2586
+ forgetIntent(storageKey);
2548
2587
  throw e;
2549
2588
  }
2550
- if (!went) forgetIntent();
2589
+ if (!went) forgetIntent(storageKey);
2551
2590
  else await new Promise(() => void 0);
2552
2591
  };
2553
- const create = (name, selfName) => {
2592
+ const start = ({ request, intent, direct, done }) => {
2554
2593
  if (busy.current || bound === null) return;
2555
2594
  busy.current = true;
2556
2595
  setError(null);
@@ -2559,13 +2598,16 @@ function useCreateWorkspace({ returnTo, onCreated }) {
2559
2598
  setPhase(win ? "approving" : "creating");
2560
2599
  void (async () => {
2561
2600
  try {
2562
- if (!bound) {
2563
- const orgId = await orgs.create(name);
2564
- if (orgId) onCreated({ orgId, name, selfName });
2565
- } else if (win) await approveInPopup(win, name, selfName);
2566
- else await redirect(name, selfName);
2601
+ let outcome = null;
2602
+ if (!bound) outcome = { direct: await direct() };
2603
+ else if (win) {
2604
+ const result = await approveInPopup(win, request);
2605
+ if (result) outcome = { consent: result };
2606
+ } else await redirect(request, intent);
2607
+ const problem = outcome && done(outcome);
2608
+ if (problem) setError({ message: problem, code: null });
2567
2609
  } catch (e) {
2568
- setError(messageOf2(e));
2610
+ setError({ message: messageOf2(e), code: codeOf(e) });
2569
2611
  } finally {
2570
2612
  if (win && !win.closed) win.close();
2571
2613
  popup.current = null;
@@ -2585,35 +2627,86 @@ function useCreateWorkspace({ returnTo, onCreated }) {
2585
2627
  if (p.url) p.win.location.href = p.url;
2586
2628
  p.win.focus();
2587
2629
  }, []);
2588
- return { create, cancel, reopen, proceed, phase, error, code: consent.code, ready: bound !== null };
2630
+ const clearError = react.useCallback(() => setError(null), []);
2631
+ return {
2632
+ start,
2633
+ cancel,
2634
+ reopen,
2635
+ proceed,
2636
+ clearError,
2637
+ phase,
2638
+ error: error?.message ?? null,
2639
+ errorCode: error?.code ?? null,
2640
+ code: consent.code,
2641
+ ready: bound !== null,
2642
+ bound
2643
+ };
2589
2644
  }
2590
- function useCreateWorkspaceResume({ onCreated }) {
2645
+ function useConsentResume({
2646
+ storageKey,
2647
+ valid,
2648
+ onApproved
2649
+ }) {
2591
2650
  const { client } = useMero();
2592
2651
  const [message, setMessage] = react.useState(null);
2593
2652
  const started = react.useRef(false);
2594
- const latest = react.useRef(onCreated);
2595
- latest.current = onCreated;
2653
+ const latest = react.useRef({ valid, onApproved });
2654
+ latest.current = { valid, onApproved };
2596
2655
  react.useEffect(() => {
2597
2656
  if (!client || started.current || !meroJs.consentReturn(window.location.href)) return;
2598
- const intent = readIntent();
2657
+ const intent = readIntent(storageKey, latest.current.valid);
2599
2658
  if (!intent) return;
2600
2659
  started.current = true;
2601
2660
  void (async () => {
2602
2661
  try {
2603
2662
  const result = await client.resumeConsent();
2604
2663
  if (!result) return;
2605
- const made = created(result);
2606
- if ("error" in made) setMessage(made.error);
2607
- else latest.current({ orgId: made.orgId, name: intent.name, selfName: intent.selfName });
2664
+ if (result.status === "declined") setMessage(CONSENT_MSG.declined);
2665
+ else if (result.status === "pending") setMessage(CONSENT_MSG.expired);
2666
+ else setMessage(latest.current.onApproved(intent, result) ?? null);
2608
2667
  } catch (e) {
2609
2668
  setMessage(messageOf2(e));
2610
2669
  } finally {
2611
- forgetIntent();
2670
+ forgetIntent(storageKey);
2612
2671
  }
2613
2672
  })();
2614
- }, [client]);
2673
+ }, [client, storageKey]);
2615
2674
  return { message };
2616
2675
  }
2676
+
2677
+ // src/create-workspace/useCreateWorkspace.ts
2678
+ var INTENT_KEY = "mero-react:create-workspace-intent";
2679
+ var NO_ORG = "Your node approved the request but named no workspace. Nothing was created.";
2680
+ var isIntent = (v) => !!v && typeof v.name === "string" && typeof v.selfName === "string";
2681
+ var orgIdOf = (result) => result.status === "approved" && result.kind === "createOrg" ? result.outcome?.orgId : void 0;
2682
+ function useCreateWorkspace({ returnTo, onCreated }) {
2683
+ const orgs = useCreateOrg({ throwOnError: true });
2684
+ const { start, ...flow } = useNodeConsent({ storageKey: INTENT_KEY });
2685
+ const create = (name, selfName) => start({
2686
+ request: meroJs.createOrgConsent(name, returnTo),
2687
+ intent: { name, selfName },
2688
+ direct: () => orgs.create(name),
2689
+ done: (outcome) => {
2690
+ const orgId = "direct" in outcome ? outcome.direct : orgIdOf(outcome.consent);
2691
+ if (!orgId) return NO_ORG;
2692
+ onCreated({ orgId, name, selfName });
2693
+ return void 0;
2694
+ }
2695
+ });
2696
+ return { create, ...flow };
2697
+ }
2698
+ function useCreateWorkspaceResume({ onCreated }) {
2699
+ return useConsentResume({
2700
+ storageKey: INTENT_KEY,
2701
+ valid: isIntent,
2702
+ onApproved: (intent, result) => {
2703
+ const orgId = orgIdOf(result);
2704
+ if (!orgId) return NO_ORG;
2705
+ onCreated({ orgId, name: intent.name, selfName: intent.selfName });
2706
+ return void 0;
2707
+ }
2708
+ });
2709
+ }
2617
2710
  var NOUN = "workspace";
2618
2711
  function wording(labels) {
2619
2712
  const noun = labels?.noun ?? NOUN;
@@ -2629,8 +2722,6 @@ function wording(labels) {
2629
2722
  ...labels
2630
2723
  };
2631
2724
  }
2632
- var subscribeNothing = () => () => void 0;
2633
- var useMounted = () => react.useSyncExternalStore(subscribeNothing, () => true, () => false);
2634
2725
  function ResumeNotice({ onCreated }) {
2635
2726
  const { message } = useCreateWorkspaceResume({ onCreated });
2636
2727
  const [dismissed, setDismissed] = react.useState(null);
@@ -2645,11 +2736,8 @@ function ResumeNotice({ onCreated }) {
2645
2736
  document.body
2646
2737
  );
2647
2738
  }
2648
- var CloseIcon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m6 6 12 12M18 6 6 18", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) });
2649
2739
  function CreateWorkspaceDialog({ client, passkey, ...props }) {
2650
- const sessionStore = react.useMemo(() => ({ load: () => client?.session ?? null, save: () => void 0, clear: () => void 0 }), [client]);
2651
- const inner = /* @__PURE__ */ jsxRuntime.jsx(Dialog, { ...props });
2652
- return client ? /* @__PURE__ */ jsxRuntime.jsx(MeroProvider, { client, sessionStore, passkey, children: inner }) : inner;
2740
+ return /* @__PURE__ */ jsxRuntime.jsx(WithClient, { client, passkey, children: /* @__PURE__ */ jsxRuntime.jsx(Dialog, { ...props }) });
2653
2741
  }
2654
2742
  function Dialog({ open, onClose, release, onCreated, returnTo, labels, defaultSelfName = "", cluster, fields, fieldsValid = true }) {
2655
2743
  const text = wording(labels);
@@ -2660,7 +2748,6 @@ function Dialog({ open, onClose, release, onCreated, returnTo, labels, defaultSe
2660
2748
  const [selfName, setSelfName] = react.useState(defaultSelfName);
2661
2749
  const ids = [react.useId(), react.useId()];
2662
2750
  const first = react.useRef(null);
2663
- const mounted = useMounted();
2664
2751
  react.useEffect(() => {
2665
2752
  if (open && release && step === "names") first.current?.focus();
2666
2753
  }, [open, release, step]);
@@ -2669,24 +2756,7 @@ function Dialog({ open, onClose, release, onCreated, returnTo, labels, defaultSe
2669
2756
  const trimmed = { name: name.trim(), self: selfName.trim() };
2670
2757
  const redirecting = flow.phase === "redirect";
2671
2758
  const approving = flow.phase === "approving" || redirecting;
2672
- const body = !release ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mero-cw-sub", role: "status", children: "Checking the newest release\u2026" }) : approving ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mero-cw-approve", children: [
2673
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "mero-cw-title", children: "Approve with your passkey" }),
2674
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mero-cw-sub", children: redirecting ? "Your node will open its own page to ask for your passkey. Check that it shows this code." : "A window from your node opened. Check it shows this code, then approve there." }),
2675
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mero-cw-code", "aria-live": "polite", children: flow.code ?? "..." }),
2676
- redirecting ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2677
- /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "mero-cw-btn mero-cw-btn--primary mero-cw-btn--full", onClick: flow.proceed, children: "Continue to your node" }),
2678
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mero-cw-row", children: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "mero-cw-btn", onClick: flow.cancel, children: "Cancel" }) })
2679
- ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2680
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mero-cw-wait", role: "status", children: [
2681
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mero-cw-dot", "aria-hidden": "true" }),
2682
- "Waiting for your approval..."
2683
- ] }),
2684
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mero-cw-row", children: [
2685
- /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "mero-cw-btn", onClick: flow.cancel, children: "Cancel" }),
2686
- /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "mero-cw-link", onClick: flow.reopen, children: "Open the window again" })
2687
- ] })
2688
- ] })
2689
- ] }) : step === "names" ? /* @__PURE__ */ jsxRuntime.jsxs(
2759
+ const body = !release ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mero-cw-sub", role: "status", children: "Checking the newest release\u2026" }) : approving ? /* @__PURE__ */ jsxRuntime.jsx(ApprovalCard, { redirecting, code: flow.code, onCancel: flow.cancel, onProceed: flow.proceed, onReopen: flow.reopen }) : step === "names" ? /* @__PURE__ */ jsxRuntime.jsxs(
2690
2760
  "form",
2691
2761
  {
2692
2762
  onSubmit: (e) => {
@@ -2727,25 +2797,303 @@ function Dialog({ open, onClose, release, onCreated, returnTo, labels, defaultSe
2727
2797
  ] });
2728
2798
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2729
2799
  /* @__PURE__ */ jsxRuntime.jsx(ResumeNotice, { onCreated }),
2730
- open && mounted && reactDom.createPortal(
2731
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mero-cw mero-cw-overlay", onKeyDown: (e) => e.key === "Escape" && !approving && onClose(), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mero-cw-card", role: "dialog", "aria-modal": "true", "aria-label": text.title, children: [
2732
- /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "mero-cw-x", "aria-label": "Close", onClick: () => approving ? flow.cancel() : onClose(), children: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon, {}) }),
2733
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mero-cw-body", children: body })
2734
- ] }) }),
2735
- document.body
2736
- )
2800
+ open && /* @__PURE__ */ jsxRuntime.jsx(DialogShell, { label: text.title, locked: approving, onClose: () => approving ? flow.cancel() : onClose(), children: body })
2737
2801
  ] });
2738
2802
  }
2803
+ var CAPABILITY_LABELS = [
2804
+ { name: "CREATE_APP", label: "Add apps" },
2805
+ { name: "INVITE_MEMBERS", label: "Invite people" },
2806
+ { name: "JOIN_OPEN_TEAMS", label: "Join open teams" },
2807
+ { name: "MANAGE_MEMBERS", label: "Manage team members" },
2808
+ { name: "MANAGE_APPLICATION", label: "Upgrade apps" },
2809
+ { name: "CREATE_TEAM", label: "Create teams" },
2810
+ { name: "CREATE_CHILD_TEAM", label: "Create child teams" },
2811
+ { name: "DELETE_TEAM", label: "Delete teams" },
2812
+ { name: "MANAGE_VISIBILITY", label: "Change who can join a team" },
2813
+ { name: "MANAGE_METADATA", label: "Rename the workspace and its teams" },
2814
+ { name: "APPROVE_RELEASES", label: "Approve app releases" }
2815
+ ];
2816
+ var ALL_CAPABILITIES = Object.values(meroJs.ORG_CAPABILITIES).reduce((mask, bit) => mask | bit, 0);
2817
+ function describeCapabilities(mask) {
2818
+ return CAPABILITY_LABELS.filter(({ name }) => (mask & meroJs.ORG_CAPABILITIES[name]) !== 0).map(({ label }) => label);
2819
+ }
2820
+ function heldCapabilities(org, account) {
2821
+ const role = account ? org.members[account] : void 0;
2822
+ if (role === "owner" || role === "admin") return ALL_CAPABILITIES;
2823
+ return account ? org.capabilities[account] ?? org.defaultCapabilities : 0;
2824
+ }
2825
+ var INVITE_KEY = "mero-react:invite-intent";
2826
+ var ACCEPT_KEY = "mero-react:accept-invite-intent";
2827
+ var NO_TOKEN = "Your node approved the request but made no invite. Nothing was changed.";
2828
+ var NO_ORG2 = "Your node approved the request but named no workspace. Nothing was changed.";
2829
+ var isInviteIntent = (v) => !!v && typeof v.role === "string";
2830
+ var isObject = (v) => !!v && typeof v === "object";
2831
+ var tokenOf = (r) => r.status === "approved" && r.kind === "createInvite" ? r.outcome?.token : void 0;
2832
+ var orgOf = (r) => r.status === "approved" && r.kind === "acceptInvite" ? r.outcome?.org : void 0;
2833
+ function useInviteCreate({ returnTo, linkBase, onCreated }) {
2834
+ const { client, passkey } = useMero();
2835
+ const { start, ...flow } = useNodeConsent({ storageKey: INVITE_KEY });
2836
+ const finish = (token, capabilities) => {
2837
+ if (!token) return NO_TOKEN;
2838
+ onCreated({ token, link: inviteLink(token, linkBase), ...capabilities === void 0 ? {} : { capabilities } });
2839
+ return void 0;
2840
+ };
2841
+ const create = ({ org, role, teams, capabilities }) => start({
2842
+ request: meroJs.createInviteConsent({ org, role, ...teams?.length ? { teams } : {}, ...capabilities === void 0 ? {} : { capabilities } }, returnTo),
2843
+ intent: { role, ...capabilities === void 0 ? {} : { capabilities } },
2844
+ direct: async () => {
2845
+ if (!client) throw new Error("Not connected to a node.");
2846
+ const answer = await client.orgs.inviteCreate(
2847
+ { org, role, ...teams?.length ? { teams } : {}, ...capabilities === void 0 ? {} : { capabilities } },
2848
+ confirmWith(passkey)
2849
+ );
2850
+ return answer.token;
2851
+ },
2852
+ done: (outcome) => finish("direct" in outcome ? outcome.direct : tokenOf(outcome.consent), capabilities)
2853
+ });
2854
+ return { create, ...flow };
2855
+ }
2856
+ function useInviteResume({ linkBase, onCreated }) {
2857
+ return useConsentResume({
2858
+ storageKey: INVITE_KEY,
2859
+ valid: isInviteIntent,
2860
+ onApproved: (intent, result) => {
2861
+ const token = tokenOf(result);
2862
+ if (!token) return NO_TOKEN;
2863
+ onCreated({ token, link: inviteLink(token, linkBase), ...intent.capabilities === void 0 ? {} : { capabilities: intent.capabilities } });
2864
+ return void 0;
2865
+ }
2866
+ });
2867
+ }
2868
+ function useInviteAccept({ returnTo, onJoined }) {
2869
+ const ctx = useMero();
2870
+ const { start, ...flow } = useNodeConsent({ storageKey: ACCEPT_KEY });
2871
+ const accept = (token) => start({
2872
+ request: meroJs.acceptInviteConsent(token, returnTo),
2873
+ intent: {},
2874
+ direct: async () => {
2875
+ if (!ctx.client) throw new Error("Not connected to a node.");
2876
+ return (await ctx.client.orgs.inviteRedeem({ token })).org;
2877
+ },
2878
+ done: (outcome) => {
2879
+ const org = "direct" in outcome ? outcome.direct : orgOf(outcome.consent);
2880
+ if (!org) return NO_ORG2;
2881
+ onJoined({ org });
2882
+ return void 0;
2883
+ }
2884
+ });
2885
+ return { accept, ...flow };
2886
+ }
2887
+ function useAcceptResume({ onJoined }) {
2888
+ return useConsentResume({
2889
+ storageKey: ACCEPT_KEY,
2890
+ valid: isObject,
2891
+ onApproved: (_intent, result) => {
2892
+ const org = orgOf(result);
2893
+ if (!org) return NO_ORG2;
2894
+ onJoined({ org });
2895
+ return void 0;
2896
+ }
2897
+ });
2898
+ }
2899
+ var REFUSALS = {
2900
+ FEATURE_NOT_ACTIVE: { text: "This cluster doesn't support custom permissions yet.", fallback: true },
2901
+ CANNOT_GRANT_UNHELD: { text: "You can't give a permission you don't have.", fallback: false },
2902
+ UNKNOWN_CAPABILITIES: { text: "This cluster does not know one of the permissions you chose.", fallback: true }
2903
+ };
2904
+ var DEFAULT_LABELS = {
2905
+ title: "Invite people",
2906
+ subtitle: "Choose what the people you invite can do.",
2907
+ next: "Create invite"
2908
+ };
2909
+ function useOrgFacts(org) {
2910
+ const { client, accountId } = useMero();
2911
+ const [facts, setFacts] = react.useState(null);
2912
+ react.useEffect(() => {
2913
+ if (!client) return;
2914
+ let live = true;
2915
+ setFacts(null);
2916
+ client.orgs.get({ org }).then(
2917
+ (info) => live && setFacts({ defaults: info.defaultCapabilities, held: heldCapabilities(info, accountId) }),
2918
+ () => live && setFacts("unreadable")
2919
+ );
2920
+ return () => {
2921
+ live = false;
2922
+ };
2923
+ }, [client, org, accountId]);
2924
+ return facts;
2925
+ }
2926
+ var originRoot = () => `${typeof window === "undefined" ? "" : window.location.origin}/`;
2927
+ function InviteDialog({ client, passkey, ...props }) {
2928
+ return /* @__PURE__ */ jsxRuntime.jsx(WithClient, { client, passkey, children: /* @__PURE__ */ jsxRuntime.jsx(Dialog2, { ...props }) });
2929
+ }
2930
+ function Dialog2({ open, onClose, org, teams, role = "member", appName, labels, onInvited, linkBase, returnTo }) {
2931
+ const text = { ...DEFAULT_LABELS, ...labels };
2932
+ const facts = useOrgFacts(org);
2933
+ const [mode, setMode] = react.useState("default");
2934
+ const [picked, setPicked] = react.useState(null);
2935
+ const [shared, setShared] = react.useState(null);
2936
+ const [copied, copy] = useCopy();
2937
+ const ids = [react.useId(), react.useId()];
2938
+ const onCreated = (invite) => {
2939
+ setShared(invite);
2940
+ onInvited?.(invite);
2941
+ };
2942
+ const flow = useInviteCreate({ returnTo: returnTo ?? originRoot(), linkBase, onCreated });
2943
+ const resume = useInviteResume({ linkBase, onCreated });
2944
+ const [dismissed, setDismissed] = react.useState(null);
2945
+ const readable = facts !== null && facts !== "unreadable";
2946
+ const bits = picked ?? (readable ? facts.defaults & facts.held : 0);
2947
+ const redirecting = flow.phase === "redirect";
2948
+ const approving = flow.phase === "approving" || redirecting;
2949
+ const notice = resume.message && dismissed !== resume.message ? resume.message : null;
2950
+ const refusal = flow.errorCode ? REFUSALS[flow.errorCode] : void 0;
2951
+ const close = () => {
2952
+ setShared(null);
2953
+ onClose();
2954
+ };
2955
+ if (!open && !shared && !notice) return null;
2956
+ let body;
2957
+ if (approving) {
2958
+ body = /* @__PURE__ */ jsxRuntime.jsx(ApprovalCard, { redirecting, code: flow.code, onCancel: flow.cancel, onProceed: flow.proceed, onReopen: flow.reopen });
2959
+ } else if (shared) {
2960
+ const perms = shared.capabilities === void 0 ? null : describeCapabilities(shared.capabilities);
2961
+ body = /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2962
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "mero-cw-title", children: "Invite link ready" }),
2963
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "mero-cw-sub", children: [
2964
+ "Anyone with this link can join as a ",
2965
+ role,
2966
+ appName ? ` in ${appName}` : "",
2967
+ ".",
2968
+ " ",
2969
+ perms ? perms.length ? `They can: ${perms.join(", ")}.` : "They get basic access only." : "They get the workspace's member defaults."
2970
+ ] }),
2971
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mero-cw-field", children: [
2972
+ /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: ids[0], children: "Invite link" }),
2973
+ /* @__PURE__ */ jsxRuntime.jsx("input", { id: ids[0], readOnly: true, value: shared.link, onFocus: (e) => e.currentTarget.select() })
2974
+ ] }),
2975
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mero-cw-row", children: [
2976
+ /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "mero-cw-btn mero-cw-btn--primary", onClick: () => copy(shared.link), children: "Copy link" }),
2977
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mero-cw-wait", role: "status", children: copied === "done" ? "Copied" : copied === "failed" ? "Could not copy" : "" }),
2978
+ /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "mero-cw-btn", onClick: close, children: "Done" })
2979
+ ] })
2980
+ ] });
2981
+ } else {
2982
+ const defaultWords = !readable ? "the workspace's member defaults" : describeCapabilities(facts.defaults).join(", ") || "basic access only";
2983
+ body = /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2984
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "mero-cw-title", children: text.title }),
2985
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mero-cw-sub", children: text.subtitle }),
2986
+ notice && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "mero-cw-error", role: "alert", children: [
2987
+ notice,
2988
+ " ",
2989
+ /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "mero-cw-link", onClick: () => setDismissed(notice), children: "Dismiss" })
2990
+ ] }),
2991
+ flow.error && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "mero-cw-error", role: "alert", children: [
2992
+ refusal ? refusal.text : flow.error,
2993
+ refusal?.fallback && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2994
+ " ",
2995
+ /* @__PURE__ */ jsxRuntime.jsx(
2996
+ "button",
2997
+ {
2998
+ type: "button",
2999
+ className: "mero-cw-link",
3000
+ onClick: () => {
3001
+ setMode("default");
3002
+ flow.clearError();
3003
+ },
3004
+ children: "Send a default invite"
3005
+ }
3006
+ )
3007
+ ] })
3008
+ ] }),
3009
+ facts === "unreadable" && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mero-cw-sub", children: "We could not read this workspace's permissions, so only a default invite is available." }),
3010
+ /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className: "mero-cw-choices", children: [
3011
+ /* @__PURE__ */ jsxRuntime.jsx("legend", { className: "mero-cw-visually-hidden", children: "Permissions" }),
3012
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "mero-cw-choice", children: [
3013
+ /* @__PURE__ */ jsxRuntime.jsx("input", { type: "radio", name: ids[1], checked: mode === "default", onChange: () => setMode("default") }),
3014
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
3015
+ /* @__PURE__ */ jsxRuntime.jsx("b", { children: "Default" }),
3016
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mero-cw-sub", children: `They get the workspace's member defaults: ${defaultWords}.` })
3017
+ ] })
3018
+ ] }),
3019
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "mero-cw-choice", children: [
3020
+ /* @__PURE__ */ jsxRuntime.jsx("input", { type: "radio", name: ids[1], checked: mode === "custom", disabled: !readable, onChange: () => setMode("custom") }),
3021
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
3022
+ /* @__PURE__ */ jsxRuntime.jsx("b", { children: "Custom" }),
3023
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mero-cw-sub", children: "Choose exactly what they can do." })
3024
+ ] })
3025
+ ] })
3026
+ ] }),
3027
+ mode === "custom" && readable && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mero-cw-caps", children: CAPABILITY_LABELS.map(({ name, label }) => {
3028
+ const bit = meroJs.ORG_CAPABILITIES[name];
3029
+ const mine = (facts.held & bit) !== 0;
3030
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mero-cw-cap", "data-disabled": mine ? void 0 : "", children: [
3031
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { children: [
3032
+ /* @__PURE__ */ jsxRuntime.jsx("input", { type: "checkbox", checked: mine && (bits & bit) !== 0, disabled: !mine, "aria-describedby": mine ? void 0 : `${ids[1]}-${name}`, onChange: (e) => setPicked(e.target.checked ? bits | bit : bits & ~bit) }),
3033
+ label
3034
+ ] }),
3035
+ !mine && /* @__PURE__ */ jsxRuntime.jsx("span", { id: `${ids[1]}-${name}`, className: "mero-cw-hint", children: "You don't have this" })
3036
+ ] }, name);
3037
+ }) }),
3038
+ /* @__PURE__ */ jsxRuntime.jsx(
3039
+ "button",
3040
+ {
3041
+ type: "button",
3042
+ className: "mero-cw-btn mero-cw-btn--primary mero-cw-btn--full",
3043
+ disabled: !flow.ready || flow.phase !== "idle" || mode === "custom" && !readable,
3044
+ onClick: () => flow.create({ org, role, teams, ...mode === "custom" ? { capabilities: bits } : {} }),
3045
+ children: flow.phase === "creating" ? "Creating\u2026" : text.next
3046
+ }
3047
+ )
3048
+ ] });
3049
+ }
3050
+ return /* @__PURE__ */ jsxRuntime.jsx(DialogShell, { label: text.title, locked: approving, onClose: () => approving ? flow.cancel() : close(), children: body });
3051
+ }
3052
+ function AcceptInviteDialog({ client, passkey, ...props }) {
3053
+ return /* @__PURE__ */ jsxRuntime.jsx(WithClient, { client, passkey, children: /* @__PURE__ */ jsxRuntime.jsx(Dialog3, { ...props }) });
3054
+ }
3055
+ function Dialog3({ open, onClose, token, appName, onJoined, returnTo }) {
3056
+ const flow = useInviteAccept({ returnTo: returnTo ?? `${typeof window === "undefined" ? "" : window.location.origin}/`, onJoined });
3057
+ const resume = useAcceptResume({ onJoined });
3058
+ const [dismissed, setDismissed] = react.useState(null);
3059
+ const notice = resume.message && dismissed !== resume.message ? resume.message : null;
3060
+ const redirecting = flow.phase === "redirect";
3061
+ const approving = flow.phase === "approving" || redirecting;
3062
+ if (!open && !notice) return null;
3063
+ return /* @__PURE__ */ jsxRuntime.jsx(DialogShell, { label: "Join workspace", locked: approving, onClose: () => approving ? flow.cancel() : onClose(), children: approving ? /* @__PURE__ */ jsxRuntime.jsx(ApprovalCard, { redirecting, code: flow.code, onCancel: flow.cancel, onProceed: flow.proceed, onReopen: flow.reopen }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
3064
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "mero-cw-title", children: "Join workspace" }),
3065
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mero-cw-sub", children: `You were invited to a workspace${appName ? ` in ${appName}` : ""}. Join it with your account.` }),
3066
+ [notice, flow.error].filter(Boolean).map((message) => /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "mero-cw-error", role: "alert", children: [
3067
+ message,
3068
+ message === notice && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3069
+ " ",
3070
+ /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "mero-cw-link", onClick: () => setDismissed(message), children: "Dismiss" })
3071
+ ] })
3072
+ ] }, message)),
3073
+ /* @__PURE__ */ jsxRuntime.jsx(
3074
+ "button",
3075
+ {
3076
+ type: "button",
3077
+ className: "mero-cw-btn mero-cw-btn--primary mero-cw-btn--full",
3078
+ disabled: !flow.ready || flow.phase !== "idle",
3079
+ onClick: () => flow.accept(token),
3080
+ children: flow.phase === "creating" ? "Joining\u2026" : "Join"
3081
+ }
3082
+ )
3083
+ ] }) });
3084
+ }
2739
3085
 
2740
3086
  Object.defineProperty(exports, "MeroContext", {
2741
3087
  enumerable: true,
2742
3088
  get: function () { return chunkRRETZWNI_cjs.MeroContext; }
2743
3089
  });
3090
+ exports.AcceptInviteDialog = AcceptInviteDialog;
2744
3091
  exports.CONSENT_RETURN_MESSAGE = CONSENT_RETURN_MESSAGE;
2745
3092
  exports.CalimeroLogo = CalimeroLogo;
2746
3093
  exports.ConnectButton = ConnectButton;
2747
3094
  exports.ConsentPopupReturn = ConsentPopupReturn;
2748
3095
  exports.CreateWorkspaceDialog = CreateWorkspaceDialog;
3096
+ exports.InviteDialog = InviteDialog;
2749
3097
  exports.LoginModal = LoginModal;
2750
3098
  exports.MERO_CSS_VARS = MERO_CSS_VARS;
2751
3099
  exports.MeroProvider = MeroProvider;
@@ -2760,6 +3108,7 @@ exports.clearNodeUrl = clearNodeUrl;
2760
3108
  exports.clusterName = clusterName;
2761
3109
  exports.cssVar = cssVar;
2762
3110
  exports.defaultMeroTheme = defaultMeroTheme;
3111
+ exports.describeCapabilities = describeCapabilities;
2763
3112
  exports.describeError = describeError;
2764
3113
  exports.followEvents = followEvents;
2765
3114
  exports.getAppId = getAppId;