@openclaw/matrix 2026.9.4 → 2026.9.6
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/assets/activity.svg +40 -0
- package/assets/icon.png +0 -0
- package/dist/{account-selection-Bbtc483D.js → .setup/account-selection-BHkfU1eC.mjs} +12 -3
- package/dist/{accounts-GwSAk9vY.js → .setup/accounts-iThMol10.mjs} +39 -38
- package/dist/{approval-handler.runtime-6I3IpyeX.js → .setup/approval-handler.runtime-9W7R2ZMq.mjs} +16 -15
- package/dist/{approval-ids-C4NdeXNz.js → .setup/approval-ids-j08q8LEG.mjs} +1 -1
- package/dist/{approval-reaction-auth-cbltZAUQ.js → .setup/approval-reaction-auth-DMVE7VSp.mjs} +7 -3
- package/dist/{approval-reactions-1fwEhoK9.js → .setup/approval-reactions-B0hfA6qz.mjs} +6 -6
- package/dist/{channel-Cg97H4c1.js → .setup/channel-ConuJfxT.mjs} +59 -38
- package/dist/{channel.runtime-Bhpfa1qc.js → .setup/channel.runtime-CnxR2JUK.mjs} +6 -6
- package/dist/{channel.setup-DmS7m7aT.js → .setup/channel.setup-C6KvBV8l.mjs} +9 -5
- package/dist/{cli-CLexRrQw.js → .setup/cli-O196sg8g.mjs} +19 -19
- package/dist/{cli-metadata-zRyVmUOL.js → .setup/cli-metadata-DFHQj5XR.mjs} +1 -1
- package/dist/{client-C0nZFCTj.js → .setup/client-C2yVkVdw.mjs} +5 -3
- package/dist/{client-CPcRv6ab.js → .setup/client-ChrXpxos.mjs} +170 -109
- package/dist/{client-bootstrap-DLN-K8Xb.js → .setup/client-bootstrap-BSnUAoz1.mjs} +17 -8
- package/dist/{client-support-DLj4vDeu.js → .setup/client-support-Bn9Bk0-H.mjs} +1 -1
- package/dist/{config-update-BnX26jCO.js → .setup/config-update-B_4qZ5bV.mjs} +3 -3
- package/dist/.setup/create-client-CHxcron_.mjs +67 -0
- package/dist/{credentials-DysXbkv2.js → .setup/credentials-BGKfiaJW.mjs} +40 -17
- package/dist/{credentials-read-WWpqi88V.js → .setup/credentials-read-Q5sHkkHv.mjs} +30 -9
- package/dist/{credentials-write.runtime-D22lPwRO.js → .setup/credentials-write.runtime-DxbXh-pK.mjs} +1 -1
- package/dist/{crypto-runtime-DiyH4R3D.js → .setup/crypto-runtime-D9qn_Pbj.mjs} +6 -7
- package/dist/{crypto-snapshot-doctor.runtime-DxgUMXUy.js → .setup/crypto-snapshot-doctor.runtime-CMWa1d9Y.mjs} +3 -3
- package/dist/{device-health-B4-YXtJR.js → .setup/device-health-CWOuIirq.mjs} +1 -1
- package/dist/.setup/direct-management-B2Bno2xL.mjs +346 -0
- package/dist/{directory-live-B8-GAVcc.js → .setup/directory-live-CxqkcYbT.mjs} +8 -6
- package/dist/{doctor-CJE8wO6y.js → .setup/doctor-BLCvdOFo.mjs} +1 -1
- package/dist/{draft-stream--NdEtnZ8.js → .setup/draft-stream-y0Vq5f38.mjs} +22 -6
- package/dist/{encryption-guidance-mDyxJV9U.js → .setup/encryption-guidance-CMWXiBzJ.mjs} +2 -2
- package/dist/.setup/file-sync-store-CsalA4yI.mjs +213 -0
- package/dist/{http-client-BfPeF4CE.js → .setup/http-client-Bi6uKmzh.mjs} +90 -9
- package/dist/{idb-persistence-DBdwHSWg.js → .setup/idb-persistence-c8uxcofH.mjs} +12 -8
- package/dist/{inbound-dedupe-Ch33GU06.js → .setup/inbound-dedupe-BSlv35xl.mjs} +1 -1
- package/dist/.setup/joined-room-encryption-BCtxQ3hR.mjs +67 -0
- package/dist/{logger-B_71hN6W.js → .setup/logger-xBjiRIp1.mjs} +1 -1
- package/dist/{logging-DRjvUOIh.js → .setup/logging-rgm8ep9H.mjs} +2 -2
- package/dist/{messages-CpZfiQO0.js → .setup/messages-COuAcrz-.mjs} +12 -5
- package/dist/{monitor-BUek91SW.js → .setup/monitor-CzE3myC_.mjs} +224 -476
- package/dist/{outbound-D91JinYa.js → .setup/outbound-B508VPBM.mjs} +12 -4
- package/dist/.setup/probe.runtime-C-NMeYk2.mjs +2 -0
- package/dist/{profile-vmjsmhh4.js → .setup/profile-ClrB3IgR.mjs} +1 -1
- package/dist/{profile-update-vnhxwjEt.js → .setup/profile-update-DrblJttE.mjs} +4 -4
- package/dist/{reaction-events-2WM2nJe_.js → .setup/reaction-events-BvZmhjLC.mjs} +8 -7
- package/dist/{resolve-targets-K8D0HWPX.js → .setup/resolve-targets-BLz748lX.mjs} +3 -3
- package/dist/{resolver.runtime-C88GwQCx.js → .setup/resolver.runtime-CuLQ2uHe.mjs} +1 -1
- package/dist/{room-info-BPVJkXnp.js → .setup/room-info-DTyP1k5g.mjs} +4 -4
- package/dist/.setup/runtime-1kn1P6io.mjs +29 -0
- package/dist/.setup/runtime-setter-api-DtxDAM-x.mjs +3 -0
- package/dist/{sdk-B4By16Bt.js → .setup/sdk-rqFjgltR.mjs} +523 -503
- package/dist/{secret-contract-CufozuyJ.js → .setup/secret-contract-JlB6VmI3.mjs} +1 -1
- package/dist/.setup/secret-contract-api-B-iJoQEv.mjs +3 -0
- package/dist/{send-UWLIQ0bG.js → .setup/send-aVdC5NJO.mjs} +218 -439
- package/dist/{reaction-common-DkrQdBSZ.js → .setup/send-currentness-BrGXL7b8.mjs} +20 -1
- package/dist/{setup-bootstrap-sVqkwtSY.js → .setup/setup-bootstrap-A_WGFq1Y.mjs} +3 -3
- package/dist/{setup-core-8keb-Yre.js → .setup/setup-core-D2hMbIi3.mjs} +7 -7
- package/dist/.setup/setup-plugin-api-JiRgm8s6.mjs +3 -0
- package/dist/{setup-surface-bcluelBI.js → .setup/setup-surface-BL3ha1l-.mjs} +12 -12
- package/dist/{startup-verification-BTSf31hS.js → .setup/startup-verification-Cp1Gf7pM.mjs} +8 -8
- package/dist/{storage-CV-pfV_2.js → .setup/storage-BXaFc0S4.mjs} +97 -93
- package/dist/{storage-metadata-DYArLcq1.js → .setup/storage-metadata-fHN6Df2m.mjs} +74 -83
- package/dist/{subagent-hooks-DeICLbU5.js → .setup/subagent-hooks-jFgft_Mr.mjs} +1 -1
- package/dist/{sync-cache-state-C-mhj3xb.js → .setup/sync-cache-state-BMtGMxU1.mjs} +31 -44
- package/dist/{thread-binding-api-CzkeLZCU.js → .setup/thread-binding-api-DRMC62cs.mjs} +1 -1
- package/dist/{thread-bindings-Bwv87Gve.js → .setup/thread-bindings-JlnLDfPM.mjs} +8 -8
- package/dist/{tool-actions.runtime-Bf98Juk6.js → .setup/tool-actions.runtime-REzYTNxm.mjs} +29 -14
- package/dist/{verification-BbG-VC9S.js → .setup/verification-0o8MOW9T.mjs} +4 -3
- package/dist/api.js +8 -8
- package/dist/auth-presence.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/contract-api.js +2 -2
- package/dist/doctor-contract-api.js +10 -10
- package/dist/helper-api.js +4 -4
- package/dist/index.js +4 -1
- package/dist/plugin-entry.handlers.runtime.js +1 -1
- package/dist/runtime-api.js +6 -6
- package/dist/runtime-setter-api.js +2 -2
- package/dist/secret-contract-api.js +1 -1
- package/dist/session-binding-contract-api.js +2 -2
- package/dist/setup-entry.js +4 -3
- package/dist/setup-plugin-api.js +1 -1
- package/dist/subagent-hooks-api.js +1 -1
- package/dist/thread-binding-api.js +1 -1
- package/dist/thread-bindings-runtime.js +1 -1
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/package.json +1 -1
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.cjs +17 -17
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.js +17 -17
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.wasm +0 -0
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.wasm.d.ts +5 -5
- package/node_modules/markdown-it/dist/browser/markdown-it.esm.min.mjs +442 -434
- package/node_modules/markdown-it/dist/browser/markdown-it.esm.min.mjs.map +1 -1
- package/node_modules/markdown-it/dist/browser/markdown-it.umd.min.js +2 -2
- package/node_modules/markdown-it/dist/browser/markdown-it.umd.min.js.map +1 -1
- package/node_modules/markdown-it/dist/markdown-it.cjs.js +32 -16
- package/node_modules/markdown-it/dist/markdown-it.cjs.js.map +1 -1
- package/node_modules/markdown-it/dist/markdown-it.mjs +32 -16
- package/node_modules/markdown-it/dist/markdown-it.mjs.map +1 -1
- package/node_modules/markdown-it/node_modules/argparse/LICENSE +1 -208
- package/node_modules/markdown-it/node_modules/argparse/lib/argparse.js +18 -2
- package/node_modules/markdown-it/node_modules/argparse/package.json +2 -2
- package/node_modules/markdown-it/node_modules/entities/dist/decode-codepoint.d.ts +23 -3
- package/node_modules/markdown-it/node_modules/entities/dist/decode-codepoint.d.ts.map +1 -1
- package/node_modules/markdown-it/node_modules/entities/dist/decode-codepoint.js +52 -37
- package/node_modules/markdown-it/node_modules/entities/dist/decode-codepoint.js.map +1 -1
- package/node_modules/markdown-it/node_modules/entities/dist/decode.d.ts +61 -28
- package/node_modules/markdown-it/node_modules/entities/dist/decode.d.ts.map +1 -1
- package/node_modules/markdown-it/node_modules/entities/dist/decode.js +789 -201
- package/node_modules/markdown-it/node_modules/entities/dist/decode.js.map +1 -1
- package/node_modules/markdown-it/node_modules/entities/dist/encode.d.ts +4 -2
- package/node_modules/markdown-it/node_modules/entities/dist/encode.d.ts.map +1 -1
- package/node_modules/markdown-it/node_modules/entities/dist/encode.js +249 -44
- package/node_modules/markdown-it/node_modules/entities/dist/encode.js.map +1 -1
- package/node_modules/markdown-it/node_modules/entities/dist/escape.d.ts +19 -7
- package/node_modules/markdown-it/node_modules/entities/dist/escape.d.ts.map +1 -1
- package/node_modules/markdown-it/node_modules/entities/dist/escape.js +104 -64
- package/node_modules/markdown-it/node_modules/entities/dist/escape.js.map +1 -1
- package/node_modules/markdown-it/node_modules/entities/dist/generated/decode-data-html.d.ts.map +1 -1
- package/node_modules/markdown-it/node_modules/entities/dist/generated/decode-data-html.js +2 -2
- package/node_modules/markdown-it/node_modules/entities/dist/generated/decode-data-html.js.map +1 -1
- package/node_modules/markdown-it/node_modules/entities/dist/generated/decode-data-xml.d.ts.map +1 -1
- package/node_modules/markdown-it/node_modules/entities/dist/generated/decode-data-xml.js +4 -2
- package/node_modules/markdown-it/node_modules/entities/dist/generated/decode-data-xml.js.map +1 -1
- package/node_modules/markdown-it/node_modules/entities/dist/generated/encode-html.d.ts +2 -4
- package/node_modules/markdown-it/node_modules/entities/dist/generated/encode-html.d.ts.map +1 -1
- package/node_modules/markdown-it/node_modules/entities/dist/generated/encode-html.js +1 -10
- package/node_modules/markdown-it/node_modules/entities/dist/generated/encode-html.js.map +1 -1
- package/node_modules/markdown-it/node_modules/entities/dist/index.d.ts +2 -2
- package/node_modules/markdown-it/node_modules/entities/dist/index.d.ts.map +1 -1
- package/node_modules/markdown-it/node_modules/entities/dist/index.js +2 -6
- package/node_modules/markdown-it/node_modules/entities/dist/index.js.map +1 -1
- package/node_modules/markdown-it/node_modules/entities/dist/internal/bin-trie-flags.d.ts +39 -8
- package/node_modules/markdown-it/node_modules/entities/dist/internal/bin-trie-flags.d.ts.map +1 -1
- package/node_modules/markdown-it/node_modules/entities/dist/internal/bin-trie-flags.js +37 -6
- package/node_modules/markdown-it/node_modules/entities/dist/internal/bin-trie-flags.js.map +1 -1
- package/node_modules/markdown-it/node_modules/entities/dist/internal/decode-shared.d.ts +35 -4
- package/node_modules/markdown-it/node_modules/entities/dist/internal/decode-shared.d.ts.map +1 -1
- package/node_modules/markdown-it/node_modules/entities/dist/internal/decode-shared.js +189 -11
- package/node_modules/markdown-it/node_modules/entities/dist/internal/decode-shared.js.map +1 -1
- package/node_modules/markdown-it/node_modules/entities/package.json +14 -14
- package/node_modules/markdown-it/node_modules/entities/src/decode-codepoint.ts +58 -39
- package/node_modules/markdown-it/node_modules/entities/src/decode.ts +942 -245
- package/node_modules/markdown-it/node_modules/entities/src/encode.ts +289 -47
- package/node_modules/markdown-it/node_modules/entities/src/escape.ts +110 -83
- package/node_modules/markdown-it/node_modules/entities/src/generated/decode-data-html.ts +8 -3
- package/node_modules/markdown-it/node_modules/entities/src/generated/decode-data-xml.ts +4 -4
- package/node_modules/markdown-it/node_modules/entities/src/generated/encode-html.ts +1 -16
- package/node_modules/markdown-it/node_modules/entities/src/index.ts +6 -8
- package/node_modules/markdown-it/node_modules/entities/src/internal/bin-trie-flags.ts +38 -7
- package/node_modules/markdown-it/node_modules/entities/src/internal/decode-shared.ts +203 -12
- package/node_modules/markdown-it/package.json +1 -1
- package/node_modules/matrix-js-sdk/CHANGELOG.md +15 -0
- package/node_modules/matrix-js-sdk/lib/client.d.ts +1 -2
- package/node_modules/matrix-js-sdk/lib/client.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/client.js +16 -8
- package/node_modules/matrix-js-sdk/lib/client.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/errors.d.ts +8 -0
- package/node_modules/matrix-js-sdk/lib/http-api/errors.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/errors.js +12 -0
- package/node_modules/matrix-js-sdk/lib/http-api/errors.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.d.ts +5 -0
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.js +2 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oauth/authorize.d.ts +2 -4
- package/node_modules/matrix-js-sdk/lib/oauth/authorize.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oauth/authorize.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oauth/error.d.ts +44 -0
- package/node_modules/matrix-js-sdk/lib/oauth/error.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oauth/error.js +53 -0
- package/node_modules/matrix-js-sdk/lib/oauth/error.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oauth/index.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oauth/index.js +19 -2
- package/node_modules/matrix-js-sdk/lib/oauth/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oauth/tokenRefresher.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oauth/tokenRefresher.js +4 -2
- package/node_modules/matrix-js-sdk/lib/oauth/tokenRefresher.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/secret-storage.d.ts +1 -1
- package/node_modules/matrix-js-sdk/lib/secret-storage.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/secret-storage.js +9 -32
- package/node_modules/matrix-js-sdk/lib/secret-storage.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/sliding-sync-sdk.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/sliding-sync-sdk.js +54 -1
- package/node_modules/matrix-js-sdk/lib/sliding-sync-sdk.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/@babel/runtime/package.json +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/dist/api.js +556 -311
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/dist/api.min.js +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/ClientWidgetApi.d.ts +2 -0
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/ClientWidgetApi.js +221 -129
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/ClientWidgetApi.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/Symbols.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/WidgetApi.d.ts +37 -0
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/WidgetApi.js +182 -63
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/WidgetApi.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/driver/WidgetDriver.d.ts +20 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/driver/WidgetDriver.js +49 -20
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/driver/WidgetDriver.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/index.d.ts +1 -0
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/ApiVersion.d.ts +2 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/ApiVersion.js +3 -2
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/ApiVersion.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/Capabilities.d.ts +9 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/Capabilities.js +2 -0
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/Capabilities.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/CapabilitiesAction.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/ContentLoadedAction.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/DownloadFileAction.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/GetMediaConfigAction.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/GetOpenIDAction.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/ICustomWidgetData.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/IJitsiWidgetData.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/IRoomAccountData.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/IRoomEvent.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/IStickerpickerWidgetData.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/IToDeviceMessage.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/IWidget.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/IWidgetApiErrorResponse.js +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/IWidgetApiErrorResponse.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/IWidgetApiRequest.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/IWidgetApiResponse.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/LanguageChangeAction.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/ModalButtonKind.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/ModalWidgetActions.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/NavigateAction.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/OpenIDCredentialsAction.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/ReadEventAction.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/ReadRelationsAction.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/ReadRoomAccountDataAction.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/RtcLivekitActions.d.ts +53 -0
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/RtcLivekitActions.js +6 -0
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/RtcLivekitActions.js.map +1 -0
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/RtcTransportsAction.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/ScreenshotAction.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/SendEventAction.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/SendToDeviceAction.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/SetModalButtonEnabledAction.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/StickerAction.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/StickyAction.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/SupportedVersionsAction.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/ThemeChangeAction.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/TurnServerActions.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/UpdateDelayedEventAction.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/UpdateStateAction.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/UploadFileAction.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/UserDirectorySearchAction.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/VisibilityAction.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/WidgetApiAction.d.ts +9 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/WidgetApiAction.js +2 -0
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/WidgetApiAction.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/WidgetApiDirection.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/WidgetConfigAction.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/WidgetKind.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/interfaces/WidgetType.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/models/Widget.js +20 -20
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/models/Widget.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/models/WidgetEventCapability.js +9 -9
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/models/WidgetEventCapability.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/models/WidgetParser.js +23 -23
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/models/WidgetParser.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/models/validation/url.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/models/validation/utils.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/templating/url-template.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/transport/ITransport.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/transport/PostmessageTransport.js +32 -32
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/transport/PostmessageTransport.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/util/SimpleObservable.js +10 -10
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/util/SimpleObservable.js.map +1 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/package.json +2 -2
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/src/ClientWidgetApi.ts +48 -0
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/src/WidgetApi.ts +75 -1
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/src/driver/WidgetDriver.ts +33 -0
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/src/index.ts +1 -0
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/src/interfaces/ApiVersion.ts +2 -0
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/src/interfaces/Capabilities.ts +8 -0
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/src/interfaces/RtcLivekitActions.ts +80 -0
- package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/src/interfaces/WidgetApiAction.ts +10 -0
- package/node_modules/matrix-js-sdk/node_modules/p-retry/index.d.ts +1 -1
- package/node_modules/matrix-js-sdk/node_modules/p-retry/index.js +4 -0
- package/node_modules/matrix-js-sdk/node_modules/p-retry/package.json +1 -1
- package/node_modules/matrix-js-sdk/node_modules/p-retry/readme.md +1 -1
- package/node_modules/matrix-js-sdk/package.json +2 -2
- package/node_modules/matrix-js-sdk/src/client.ts +19 -11
- package/node_modules/matrix-js-sdk/src/http-api/errors.ts +16 -0
- package/node_modules/matrix-js-sdk/src/matrixrtc/MatrixRTCSession.ts +8 -1
- package/node_modules/matrix-js-sdk/src/oauth/authorize.ts +2 -5
- package/node_modules/matrix-js-sdk/src/oauth/error.ts +69 -0
- package/node_modules/matrix-js-sdk/src/oauth/index.ts +19 -2
- package/node_modules/matrix-js-sdk/src/oauth/tokenRefresher.ts +9 -2
- package/node_modules/matrix-js-sdk/src/secret-storage.ts +8 -31
- package/node_modules/matrix-js-sdk/src/sliding-sync-sdk.ts +74 -0
- package/node_modules/music-metadata/node_modules/file-type/package.json +3 -2
- package/node_modules/music-metadata/node_modules/file-type/readme.md +3 -0
- package/node_modules/music-metadata/node_modules/file-type/source/index.js +28 -1
- package/node_modules/music-metadata/node_modules/file-type/source/supported.js +2 -0
- package/node_modules/typebox/build/compile/validator.d.mts +1 -1
- package/node_modules/typebox/build/compile/validator.mjs +1 -1
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +7 -5
- package/node_modules/typebox/build/format/iri.mjs +5 -1
- package/node_modules/typebox/build/guard/emit.mjs +2 -4
- package/node_modules/typebox/build/guard/guard.mjs +6 -18
- package/node_modules/typebox/build/guard/string.mjs +16 -24
- package/node_modules/typebox/build/schema/build.mjs +2 -2
- package/node_modules/typebox/build/schema/check.mjs +1 -1
- package/node_modules/typebox/build/schema/compile.d.mts +3 -2
- package/node_modules/typebox/build/schema/compile.mjs +8 -8
- package/node_modules/typebox/build/schema/engine/_context.d.mts +6 -7
- package/node_modules/typebox/build/schema/engine/_context.mjs +23 -15
- package/node_modules/typebox/build/schema/engine/_functions.d.mts +2 -2
- package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/_reducer.d.mts +3 -3
- package/node_modules/typebox/build/schema/engine/_refine.d.mts +5 -5
- package/node_modules/typebox/build/schema/engine/_refine.mjs +4 -7
- package/node_modules/typebox/build/schema/engine/_stack.d.mts +34 -16
- package/node_modules/typebox/build/schema/engine/_stack.mjs +148 -104
- package/node_modules/typebox/build/schema/engine/additionalItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/additionalProperties.d.mts +8 -8
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +26 -18
- package/node_modules/typebox/build/schema/engine/allOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/allOf.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/anyOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/anyOf.mjs +5 -10
- package/node_modules/typebox/build/schema/engine/boolean.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/boolean.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/const.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/const.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/contains.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/contains.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/dependencies.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dependencies.mjs +3 -6
- package/node_modules/typebox/build/schema/engine/dependentRequired.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dependentRequired.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/dependentSchemas.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dynamicRef.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +11 -7
- package/node_modules/typebox/build/schema/engine/enum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/enum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/exclusiveMaximum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/exclusiveMaximum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/exclusiveMinimum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/exclusiveMinimum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/format.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/format.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/if.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/if.mjs +7 -15
- package/node_modules/typebox/build/schema/engine/items.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/items.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/maxContains.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maxItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxItems.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maxLength.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxLength.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maxProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxProperties.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maximum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maximum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minContains.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minContains.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minItems.d.mts +5 -5
- package/node_modules/typebox/build/schema/engine/minItems.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minLength.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minLength.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minProperties.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minimum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minimum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/multipleOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/multipleOf.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/not.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/not.mjs +4 -8
- package/node_modules/typebox/build/schema/engine/oneOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +6 -11
- package/node_modules/typebox/build/schema/engine/pattern.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -7
- package/node_modules/typebox/build/schema/engine/patternProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/prefixItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/prefixItems.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/properties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/properties.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/propertyNames.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/propertyNames.mjs +4 -10
- package/node_modules/typebox/build/schema/engine/recursiveRef.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +11 -7
- package/node_modules/typebox/build/schema/engine/ref.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/ref.mjs +19 -15
- package/node_modules/typebox/build/schema/engine/required.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/required.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/schema.d.mts +7 -7
- package/node_modules/typebox/build/schema/engine/schema.mjs +137 -133
- package/node_modules/typebox/build/schema/engine/type.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/type.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +5 -9
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +5 -9
- package/node_modules/typebox/build/schema/engine/uniqueItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/uniqueItems.mjs +2 -6
- package/node_modules/typebox/build/schema/errors.d.mts +2 -2
- package/node_modules/typebox/build/schema/errors.mjs +8 -14
- package/node_modules/typebox/build/schema/intern/index.d.mts +1 -0
- package/node_modules/typebox/build/schema/intern/index.mjs +1 -0
- package/node_modules/typebox/build/schema/intern/intern.d.mts +11 -0
- package/node_modules/typebox/build/schema/intern/intern.mjs +293 -0
- package/node_modules/typebox/build/schema/meta/draft_2019_09.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_2019_09.mjs +288 -0
- package/node_modules/typebox/build/schema/meta/draft_2020_12.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_2020_12.mjs +300 -0
- package/node_modules/typebox/build/schema/meta/draft_3.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_3.mjs +143 -0
- package/node_modules/typebox/build/schema/meta/draft_4.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_4.mjs +149 -0
- package/node_modules/typebox/build/schema/meta/draft_6.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_6.mjs +155 -0
- package/node_modules/typebox/build/schema/meta/draft_7.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_7.mjs +172 -0
- package/node_modules/typebox/build/schema/meta/index.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/index.mjs +2 -0
- package/node_modules/typebox/build/schema/meta/meta.d.mts +9 -0
- package/node_modules/typebox/build/schema/meta/meta.mjs +15 -0
- package/node_modules/typebox/build/schema/meta/schema.d.mts +6 -0
- package/node_modules/typebox/build/schema/meta/schema.mjs +1 -0
- package/node_modules/typebox/build/schema/parse.d.mts +1 -0
- package/node_modules/typebox/build/schema/parse.mjs +10 -5
- package/node_modules/typebox/build/schema/resolve/resolve.d.mts +8 -3
- package/node_modules/typebox/build/schema/resolve/resolve.mjs +268 -139
- package/node_modules/typebox/build/schema/schema.d.mts +2 -0
- package/node_modules/typebox/build/schema/schema.mjs +2 -0
- package/node_modules/typebox/build/value/errors/errors.d.mts +2 -12
- package/node_modules/typebox/build/value/errors/errors.mjs +2 -7
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +59 -89
- package/node_modules/zod/README.md +29 -2
- package/node_modules/zod/compile.cjs +96 -0
- package/node_modules/zod/compile.d.cts +1 -0
- package/node_modules/zod/compile.d.ts +1 -0
- package/node_modules/zod/compile.js +52 -0
- package/node_modules/zod/index.cjs +21 -2
- package/node_modules/zod/index.d.cts +1 -2
- package/node_modules/zod/index.d.ts +1 -2
- package/node_modules/zod/index.js +5 -2
- package/node_modules/zod/locales/index.cjs +19 -0
- package/node_modules/zod/mini/index.cjs +19 -0
- package/node_modules/zod/package.json +20 -8
- package/node_modules/zod/src/compile.ts +56 -0
- package/node_modules/zod/src/index.ts +5 -2
- package/node_modules/zod/src/v3/ZodError.ts +22 -12
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
- package/node_modules/zod/src/v3/tests/error.test.ts +35 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +18 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +1 -2
- package/node_modules/zod/src/v3/tests/object.test.ts +3 -6
- package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -80
- package/node_modules/zod/src/v3/tests/string.test.ts +6 -0
- package/node_modules/zod/src/v3/types.ts +5 -5
- package/node_modules/zod/src/v4/classic/checks.ts +1 -0
- package/node_modules/zod/src/v4/classic/compat.ts +26 -18
- package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
- package/node_modules/zod/src/v4/classic/errors.ts +59 -44
- package/node_modules/zod/src/v4/classic/external.ts +14 -9
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +363 -78
- package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
- package/node_modules/zod/src/v4/classic/index.ts +2 -2
- package/node_modules/zod/src/v4/classic/iso.ts +2 -72
- package/node_modules/zod/src/v4/classic/parse.ts +10 -4
- package/node_modules/zod/src/v4/classic/schemas.ts +640 -375
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +186 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +36 -1
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +278 -0
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +1 -2
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +2 -1
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +3 -3
- package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -0
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +985 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +30 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +32 -18
- package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +380 -0
- package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +46 -0
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +31 -7
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +261 -13
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +112 -2
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +403 -6
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +582 -10
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +31 -0
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +2 -9
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +1 -2
- package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +159 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +21 -2
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +319 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +67 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +136 -0
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +215 -0
- package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +3 -10
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +36 -1
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +12 -1
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +12 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +85 -9
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +301 -12
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +235 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +49 -16
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +51 -4
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +20 -2
- package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -68
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +186 -18
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +79 -3
- package/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +60 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +9 -0
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +222 -6
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +18 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +44 -3
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +1812 -204
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +45 -30
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +39 -2
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +645 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +2 -2
- package/node_modules/zod/src/v4/core/api.ts +87 -35
- package/node_modules/zod/src/v4/core/checks.ts +119 -146
- package/node_modules/zod/src/v4/core/compile.ts +2313 -0
- package/node_modules/zod/src/v4/core/core.ts +99 -22
- package/node_modules/zod/src/v4/core/doc.ts +17 -9
- package/node_modules/zod/src/v4/core/errors.ts +113 -25
- package/node_modules/zod/src/v4/core/index.ts +3 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +8 -3
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +424 -156
- package/node_modules/zod/src/v4/core/json-schema.ts +2 -1
- package/node_modules/zod/src/v4/core/memoizer.ts +331 -0
- package/node_modules/zod/src/v4/core/parse.ts +164 -50
- package/node_modules/zod/src/v4/core/regexes.ts +42 -15
- package/node_modules/zod/src/v4/core/registries.ts +2 -2
- package/node_modules/zod/src/v4/core/schemas.ts +1000 -538
- package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +1004 -0
- package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
- package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +89 -0
- package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
- package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +34 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +2036 -0
- package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
- package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +1 -2
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +1 -2
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +3 -3
- package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -0
- package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
- package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +51 -0
- package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +133 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +283 -48
- package/node_modules/zod/src/v4/core/util.ts +454 -157
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/core/visit.ts +193 -0
- package/node_modules/zod/src/v4/index.ts +3 -3
- package/node_modules/zod/src/v4/locales/ar.ts +5 -0
- package/node_modules/zod/src/v4/locales/az.ts +5 -0
- package/node_modules/zod/src/v4/locales/be.ts +12 -0
- package/node_modules/zod/src/v4/locales/bg.ts +5 -0
- package/node_modules/zod/src/v4/locales/bn.ts +123 -0
- package/node_modules/zod/src/v4/locales/ca.ts +5 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +140 -0
- package/node_modules/zod/src/v4/locales/cs.ts +5 -0
- package/node_modules/zod/src/v4/locales/da.ts +7 -2
- package/node_modules/zod/src/v4/locales/de.ts +5 -0
- package/node_modules/zod/src/v4/locales/el.ts +3 -0
- package/node_modules/zod/src/v4/locales/en.ts +17 -4
- package/node_modules/zod/src/v4/locales/eo.ts +5 -0
- package/node_modules/zod/src/v4/locales/es.ts +4 -0
- package/node_modules/zod/src/v4/locales/fa.ts +5 -0
- package/node_modules/zod/src/v4/locales/fi.ts +5 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +5 -0
- package/node_modules/zod/src/v4/locales/fr.ts +21 -14
- package/node_modules/zod/src/v4/locales/gu.ts +123 -0
- package/node_modules/zod/src/v4/locales/he.ts +8 -1
- package/node_modules/zod/src/v4/locales/hi.ts +126 -0
- package/node_modules/zod/src/v4/locales/hr.ts +4 -0
- package/node_modules/zod/src/v4/locales/hu.ts +5 -0
- package/node_modules/zod/src/v4/locales/hy.ts +11 -0
- package/node_modules/zod/src/v4/locales/id.ts +5 -0
- package/node_modules/zod/src/v4/locales/index.ts +11 -0
- package/node_modules/zod/src/v4/locales/is.ts +5 -0
- package/node_modules/zod/src/v4/locales/it.ts +5 -0
- package/node_modules/zod/src/v4/locales/ja.ts +5 -0
- package/node_modules/zod/src/v4/locales/ka.ts +5 -0
- package/node_modules/zod/src/v4/locales/km.ts +5 -0
- package/node_modules/zod/src/v4/locales/kn.ts +126 -0
- package/node_modules/zod/src/v4/locales/ko.ts +5 -0
- package/node_modules/zod/src/v4/locales/lt.ts +4 -0
- package/node_modules/zod/src/v4/locales/mk.ts +5 -0
- package/node_modules/zod/src/v4/locales/ms.ts +5 -0
- package/node_modules/zod/src/v4/locales/ne.ts +128 -0
- package/node_modules/zod/src/v4/locales/nl.ts +5 -0
- package/node_modules/zod/src/v4/locales/nn.ts +121 -0
- package/node_modules/zod/src/v4/locales/no.ts +7 -2
- package/node_modules/zod/src/v4/locales/ota.ts +5 -0
- package/node_modules/zod/src/v4/locales/pl.ts +5 -0
- package/node_modules/zod/src/v4/locales/ps.ts +5 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +161 -0
- package/node_modules/zod/src/v4/locales/pt.ts +101 -58
- package/node_modules/zod/src/v4/locales/ro.ts +3 -0
- package/node_modules/zod/src/v4/locales/ru.ts +12 -0
- package/node_modules/zod/src/v4/locales/sk.ts +123 -0
- package/node_modules/zod/src/v4/locales/sl.ts +5 -0
- package/node_modules/zod/src/v4/locales/sv.ts +7 -2
- package/node_modules/zod/src/v4/locales/ta.ts +5 -0
- package/node_modules/zod/src/v4/locales/tg.ts +135 -0
- package/node_modules/zod/src/v4/locales/th.ts +5 -0
- package/node_modules/zod/src/v4/locales/tk.ts +113 -0
- package/node_modules/zod/src/v4/locales/tr.ts +5 -0
- package/node_modules/zod/src/v4/locales/uk.ts +5 -0
- package/node_modules/zod/src/v4/locales/ur.ts +5 -0
- package/node_modules/zod/src/v4/locales/uz.ts +3 -0
- package/node_modules/zod/src/v4/locales/vi.ts +5 -0
- package/node_modules/zod/src/v4/locales/yo.ts +5 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +5 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +5 -0
- package/node_modules/zod/src/v4/mini/checks.ts +1 -0
- package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
- package/node_modules/zod/src/v4/mini/external.ts +12 -1
- package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
- package/node_modules/zod/src/v4/mini/parse.ts +2 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +167 -63
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +33 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +62 -1
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +35 -1
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
- package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +84 -0
- package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +54 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +23 -4
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +9 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +158 -5
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +65 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +44 -0
- package/node_modules/zod/v3/ZodError.cjs +41 -12
- package/node_modules/zod/v3/ZodError.d.cts +1 -1
- package/node_modules/zod/v3/ZodError.d.ts +1 -1
- package/node_modules/zod/v3/ZodError.js +22 -12
- package/node_modules/zod/v3/errors.cjs +19 -0
- package/node_modules/zod/v3/external.cjs +19 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
- package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
- package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
- package/node_modules/zod/v3/helpers/util.cjs +19 -0
- package/node_modules/zod/v3/index.cjs +19 -0
- package/node_modules/zod/v3/standard-schema.cjs +19 -0
- package/node_modules/zod/v3/types.cjs +26 -5
- package/node_modules/zod/v3/types.js +7 -5
- package/node_modules/zod/v4/classic/checks.cjs +21 -1
- package/node_modules/zod/v4/classic/checks.d.cts +1 -1
- package/node_modules/zod/v4/classic/checks.d.ts +1 -1
- package/node_modules/zod/v4/classic/checks.js +1 -1
- package/node_modules/zod/v4/classic/coerce.cjs +19 -0
- package/node_modules/zod/v4/classic/compat.cjs +19 -0
- package/node_modules/zod/v4/classic/compat.d.cts +9 -11
- package/node_modules/zod/v4/classic/compat.d.ts +9 -11
- package/node_modules/zod/v4/classic/deep-partial.cjs +58 -0
- package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.js +13 -0
- package/node_modules/zod/v4/classic/errors.cjs +62 -34
- package/node_modules/zod/v4/classic/errors.d.cts +3 -4
- package/node_modules/zod/v4/classic/errors.d.ts +3 -4
- package/node_modules/zod/v4/classic/errors.js +43 -34
- package/node_modules/zod/v4/classic/external.cjs +51 -27
- package/node_modules/zod/v4/classic/external.d.cts +5 -2
- package/node_modules/zod/v4/classic/external.d.ts +5 -2
- package/node_modules/zod/v4/classic/external.js +5 -8
- package/node_modules/zod/v4/classic/from-json-schema.cjs +376 -75
- package/node_modules/zod/v4/classic/from-json-schema.js +357 -75
- package/node_modules/zod/v4/classic/in-out.cjs +82 -0
- package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
- package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
- package/node_modules/zod/v4/classic/in-out.js +36 -0
- package/node_modules/zod/v4/classic/index.cjs +21 -2
- package/node_modules/zod/v4/classic/index.d.cts +1 -2
- package/node_modules/zod/v4/classic/index.d.ts +1 -2
- package/node_modules/zod/v4/classic/index.js +2 -2
- package/node_modules/zod/v4/classic/iso.cjs +30 -22
- package/node_modules/zod/v4/classic/iso.d.cts +2 -17
- package/node_modules/zod/v4/classic/iso.d.ts +2 -17
- package/node_modules/zod/v4/classic/iso.js +2 -17
- package/node_modules/zod/v4/classic/parse.cjs +23 -1
- package/node_modules/zod/v4/classic/parse.d.cts +17 -4
- package/node_modules/zod/v4/classic/parse.d.ts +17 -4
- package/node_modules/zod/v4/classic/parse.js +1 -0
- package/node_modules/zod/v4/classic/schemas.cjs +591 -426
- package/node_modules/zod/v4/classic/schemas.d.cts +68 -19
- package/node_modules/zod/v4/classic/schemas.d.ts +68 -19
- package/node_modules/zod/v4/classic/schemas.js +564 -424
- package/node_modules/zod/v4/core/api.cjs +66 -24
- package/node_modules/zod/v4/core/api.d.cts +22 -12
- package/node_modules/zod/v4/core/api.d.ts +22 -12
- package/node_modules/zod/v4/core/api.js +44 -24
- package/node_modules/zod/v4/core/checks.cjs +88 -128
- package/node_modules/zod/v4/core/checks.d.cts +29 -13
- package/node_modules/zod/v4/core/checks.d.ts +29 -13
- package/node_modules/zod/v4/core/checks.js +68 -127
- package/node_modules/zod/v4/core/compile.cjs +1908 -0
- package/node_modules/zod/v4/core/compile.d.cts +65 -0
- package/node_modules/zod/v4/core/compile.d.ts +65 -0
- package/node_modules/zod/v4/core/compile.js +1858 -0
- package/node_modules/zod/v4/core/core.cjs +101 -19
- package/node_modules/zod/v4/core/core.d.cts +16 -4
- package/node_modules/zod/v4/core/core.d.ts +16 -4
- package/node_modules/zod/v4/core/core.js +83 -20
- package/node_modules/zod/v4/core/doc.cjs +31 -9
- package/node_modules/zod/v4/core/doc.d.cts +3 -1
- package/node_modules/zod/v4/core/doc.d.ts +3 -1
- package/node_modules/zod/v4/core/doc.js +12 -9
- package/node_modules/zod/v4/core/errors.cjs +126 -25
- package/node_modules/zod/v4/core/errors.d.cts +4 -0
- package/node_modules/zod/v4/core/errors.d.ts +4 -0
- package/node_modules/zod/v4/core/errors.js +107 -25
- package/node_modules/zod/v4/core/index.cjs +24 -1
- package/node_modules/zod/v4/core/index.d.cts +3 -0
- package/node_modules/zod/v4/core/index.d.ts +3 -0
- package/node_modules/zod/v4/core/index.js +3 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +24 -1
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +2 -2
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +2 -2
- package/node_modules/zod/v4/core/json-schema-generator.js +6 -2
- package/node_modules/zod/v4/core/json-schema-processors.cjs +441 -156
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +400 -158
- package/node_modules/zod/v4/core/json-schema.cjs +19 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +2 -1
- package/node_modules/zod/v4/core/json-schema.d.ts +2 -1
- package/node_modules/zod/v4/core/memoizer.cjs +360 -0
- package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
- package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
- package/node_modules/zod/v4/core/memoizer.js +311 -0
- package/node_modules/zod/v4/core/parse.cjs +148 -46
- package/node_modules/zod/v4/core/parse.d.cts +14 -11
- package/node_modules/zod/v4/core/parse.d.ts +14 -11
- package/node_modules/zod/v4/core/parse.js +127 -45
- package/node_modules/zod/v4/core/regexes.cjs +54 -17
- package/node_modules/zod/v4/core/regexes.d.cts +5 -0
- package/node_modules/zod/v4/core/regexes.d.ts +5 -0
- package/node_modules/zod/v4/core/regexes.js +32 -15
- package/node_modules/zod/v4/core/registries.cjs +19 -0
- package/node_modules/zod/v4/core/registries.js +2 -2
- package/node_modules/zod/v4/core/schemas.cjs +785 -386
- package/node_modules/zod/v4/core/schemas.d.cts +123 -34
- package/node_modules/zod/v4/core/schemas.d.ts +123 -34
- package/node_modules/zod/v4/core/schemas.js +753 -386
- package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +269 -45
- package/node_modules/zod/v4/core/to-json-schema.d.cts +45 -5
- package/node_modules/zod/v4/core/to-json-schema.d.ts +45 -5
- package/node_modules/zod/v4/core/to-json-schema.js +247 -44
- package/node_modules/zod/v4/core/util.cjs +372 -157
- package/node_modules/zod/v4/core/util.d.cts +79 -1
- package/node_modules/zod/v4/core/util.d.ts +79 -1
- package/node_modules/zod/v4/core/util.js +341 -156
- package/node_modules/zod/v4/core/versions.cjs +21 -2
- package/node_modules/zod/v4/core/versions.d.cts +1 -1
- package/node_modules/zod/v4/core/versions.d.ts +1 -1
- package/node_modules/zod/v4/core/versions.js +2 -2
- package/node_modules/zod/v4/core/visit.cjs +214 -0
- package/node_modules/zod/v4/core/visit.d.cts +30 -0
- package/node_modules/zod/v4/core/visit.d.ts +30 -0
- package/node_modules/zod/v4/core/visit.js +169 -0
- package/node_modules/zod/v4/index.cjs +34 -5
- package/node_modules/zod/v4/index.d.cts +2 -2
- package/node_modules/zod/v4/index.d.ts +2 -2
- package/node_modules/zod/v4/index.js +3 -2
- package/node_modules/zod/v4/locales/ar.cjs +5 -0
- package/node_modules/zod/v4/locales/ar.js +5 -0
- package/node_modules/zod/v4/locales/az.cjs +5 -0
- package/node_modules/zod/v4/locales/az.js +5 -0
- package/node_modules/zod/v4/locales/be.cjs +12 -0
- package/node_modules/zod/v4/locales/be.js +12 -0
- package/node_modules/zod/v4/locales/bg.cjs +5 -0
- package/node_modules/zod/v4/locales/bg.js +5 -0
- package/node_modules/zod/v4/locales/bn.cjs +140 -0
- package/node_modules/zod/v4/locales/bn.d.cts +5 -0
- package/node_modules/zod/v4/locales/bn.d.ts +4 -0
- package/node_modules/zod/v4/locales/bn.js +113 -0
- package/node_modules/zod/v4/locales/ca.cjs +5 -0
- package/node_modules/zod/v4/locales/ca.js +5 -0
- package/node_modules/zod/v4/locales/ckb.cjs +160 -0
- package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
- package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
- package/node_modules/zod/v4/locales/ckb.js +133 -0
- package/node_modules/zod/v4/locales/cs.cjs +5 -0
- package/node_modules/zod/v4/locales/cs.js +5 -0
- package/node_modules/zod/v4/locales/da.cjs +7 -2
- package/node_modules/zod/v4/locales/da.js +7 -2
- package/node_modules/zod/v4/locales/de.cjs +5 -0
- package/node_modules/zod/v4/locales/de.js +5 -0
- package/node_modules/zod/v4/locales/el.cjs +3 -0
- package/node_modules/zod/v4/locales/el.js +3 -0
- package/node_modules/zod/v4/locales/en.cjs +16 -4
- package/node_modules/zod/v4/locales/en.js +16 -4
- package/node_modules/zod/v4/locales/eo.cjs +5 -0
- package/node_modules/zod/v4/locales/eo.js +5 -0
- package/node_modules/zod/v4/locales/es.cjs +4 -0
- package/node_modules/zod/v4/locales/es.js +4 -0
- package/node_modules/zod/v4/locales/fa.cjs +5 -0
- package/node_modules/zod/v4/locales/fa.js +5 -0
- package/node_modules/zod/v4/locales/fi.cjs +5 -0
- package/node_modules/zod/v4/locales/fi.js +5 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +5 -0
- package/node_modules/zod/v4/locales/fr-CA.js +5 -0
- package/node_modules/zod/v4/locales/fr.cjs +18 -14
- package/node_modules/zod/v4/locales/fr.js +18 -14
- package/node_modules/zod/v4/locales/gu.cjs +140 -0
- package/node_modules/zod/v4/locales/gu.d.cts +5 -0
- package/node_modules/zod/v4/locales/gu.d.ts +4 -0
- package/node_modules/zod/v4/locales/gu.js +113 -0
- package/node_modules/zod/v4/locales/he.cjs +7 -0
- package/node_modules/zod/v4/locales/he.js +7 -0
- package/node_modules/zod/v4/locales/hi.cjs +138 -0
- package/node_modules/zod/v4/locales/hi.d.cts +5 -0
- package/node_modules/zod/v4/locales/hi.d.ts +4 -0
- package/node_modules/zod/v4/locales/hi.js +111 -0
- package/node_modules/zod/v4/locales/hr.cjs +4 -0
- package/node_modules/zod/v4/locales/hr.js +4 -0
- package/node_modules/zod/v4/locales/hu.cjs +5 -0
- package/node_modules/zod/v4/locales/hu.js +5 -0
- package/node_modules/zod/v4/locales/hy.cjs +11 -0
- package/node_modules/zod/v4/locales/hy.js +11 -0
- package/node_modules/zod/v4/locales/id.cjs +5 -0
- package/node_modules/zod/v4/locales/id.js +5 -0
- package/node_modules/zod/v4/locales/index.cjs +43 -2
- package/node_modules/zod/v4/locales/index.d.cts +11 -0
- package/node_modules/zod/v4/locales/index.d.ts +11 -0
- package/node_modules/zod/v4/locales/index.js +11 -0
- package/node_modules/zod/v4/locales/is.cjs +5 -0
- package/node_modules/zod/v4/locales/is.js +5 -0
- package/node_modules/zod/v4/locales/it.cjs +5 -0
- package/node_modules/zod/v4/locales/it.js +5 -0
- package/node_modules/zod/v4/locales/ja.cjs +5 -0
- package/node_modules/zod/v4/locales/ja.js +5 -0
- package/node_modules/zod/v4/locales/ka.cjs +5 -0
- package/node_modules/zod/v4/locales/ka.js +5 -0
- package/node_modules/zod/v4/locales/km.cjs +5 -0
- package/node_modules/zod/v4/locales/km.js +5 -0
- package/node_modules/zod/v4/locales/kn.cjs +143 -0
- package/node_modules/zod/v4/locales/kn.d.cts +5 -0
- package/node_modules/zod/v4/locales/kn.d.ts +4 -0
- package/node_modules/zod/v4/locales/kn.js +116 -0
- package/node_modules/zod/v4/locales/ko.cjs +5 -0
- package/node_modules/zod/v4/locales/ko.js +5 -0
- package/node_modules/zod/v4/locales/lt.cjs +4 -0
- package/node_modules/zod/v4/locales/lt.js +4 -0
- package/node_modules/zod/v4/locales/mk.cjs +5 -0
- package/node_modules/zod/v4/locales/mk.js +5 -0
- package/node_modules/zod/v4/locales/ms.cjs +5 -0
- package/node_modules/zod/v4/locales/ms.js +5 -0
- package/node_modules/zod/v4/locales/ne.cjs +138 -0
- package/node_modules/zod/v4/locales/ne.d.cts +5 -0
- package/node_modules/zod/v4/locales/ne.d.ts +4 -0
- package/node_modules/zod/v4/locales/ne.js +111 -0
- package/node_modules/zod/v4/locales/nl.cjs +5 -0
- package/node_modules/zod/v4/locales/nl.js +5 -0
- package/node_modules/zod/v4/locales/nn.cjs +140 -0
- package/node_modules/zod/v4/locales/nn.d.cts +5 -0
- package/node_modules/zod/v4/locales/nn.d.ts +4 -0
- package/node_modules/zod/v4/locales/nn.js +113 -0
- package/node_modules/zod/v4/locales/no.cjs +7 -2
- package/node_modules/zod/v4/locales/no.js +7 -2
- package/node_modules/zod/v4/locales/ota.cjs +5 -0
- package/node_modules/zod/v4/locales/ota.js +5 -0
- package/node_modules/zod/v4/locales/pl.cjs +5 -0
- package/node_modules/zod/v4/locales/pl.js +5 -0
- package/node_modules/zod/v4/locales/ps.cjs +5 -0
- package/node_modules/zod/v4/locales/ps.js +5 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +170 -0
- package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt-BR.js +143 -0
- package/node_modules/zod/v4/locales/pt.cjs +89 -55
- package/node_modules/zod/v4/locales/pt.js +89 -55
- package/node_modules/zod/v4/locales/ro.cjs +3 -0
- package/node_modules/zod/v4/locales/ro.js +3 -0
- package/node_modules/zod/v4/locales/ru.cjs +12 -0
- package/node_modules/zod/v4/locales/ru.js +12 -0
- package/node_modules/zod/v4/locales/sk.cjs +143 -0
- package/node_modules/zod/v4/locales/sk.d.cts +5 -0
- package/node_modules/zod/v4/locales/sk.d.ts +4 -0
- package/node_modules/zod/v4/locales/sk.js +116 -0
- package/node_modules/zod/v4/locales/sl.cjs +5 -0
- package/node_modules/zod/v4/locales/sl.js +5 -0
- package/node_modules/zod/v4/locales/sv.cjs +7 -2
- package/node_modules/zod/v4/locales/sv.js +7 -2
- package/node_modules/zod/v4/locales/ta.cjs +5 -0
- package/node_modules/zod/v4/locales/ta.js +5 -0
- package/node_modules/zod/v4/locales/tg.cjs +144 -0
- package/node_modules/zod/v4/locales/tg.d.cts +5 -0
- package/node_modules/zod/v4/locales/tg.d.ts +4 -0
- package/node_modules/zod/v4/locales/tg.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +5 -0
- package/node_modules/zod/v4/locales/th.js +5 -0
- package/node_modules/zod/v4/locales/tk.cjs +134 -0
- package/node_modules/zod/v4/locales/tk.d.cts +5 -0
- package/node_modules/zod/v4/locales/tk.d.ts +4 -0
- package/node_modules/zod/v4/locales/tk.js +107 -0
- package/node_modules/zod/v4/locales/tr.cjs +5 -0
- package/node_modules/zod/v4/locales/tr.js +5 -0
- package/node_modules/zod/v4/locales/uk.cjs +5 -0
- package/node_modules/zod/v4/locales/uk.js +5 -0
- package/node_modules/zod/v4/locales/ur.cjs +5 -0
- package/node_modules/zod/v4/locales/ur.js +5 -0
- package/node_modules/zod/v4/locales/uz.cjs +3 -0
- package/node_modules/zod/v4/locales/uz.js +3 -0
- package/node_modules/zod/v4/locales/vi.cjs +5 -0
- package/node_modules/zod/v4/locales/vi.js +5 -0
- package/node_modules/zod/v4/locales/yo.cjs +5 -0
- package/node_modules/zod/v4/locales/yo.js +5 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +5 -0
- package/node_modules/zod/v4/locales/zh-CN.js +5 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +5 -0
- package/node_modules/zod/v4/locales/zh-TW.js +5 -0
- package/node_modules/zod/v4/mini/checks.cjs +21 -1
- package/node_modules/zod/v4/mini/checks.d.cts +1 -1
- package/node_modules/zod/v4/mini/checks.d.ts +1 -1
- package/node_modules/zod/v4/mini/checks.js +1 -1
- package/node_modules/zod/v4/mini/coerce.cjs +19 -0
- package/node_modules/zod/v4/mini/deep-partial.cjs +58 -0
- package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.js +13 -0
- package/node_modules/zod/v4/mini/external.cjs +33 -1
- package/node_modules/zod/v4/mini/external.d.cts +5 -2
- package/node_modules/zod/v4/mini/external.d.ts +5 -2
- package/node_modules/zod/v4/mini/external.js +3 -1
- package/node_modules/zod/v4/mini/in-out.cjs +82 -0
- package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
- package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
- package/node_modules/zod/v4/mini/in-out.js +36 -0
- package/node_modules/zod/v4/mini/index.cjs +19 -0
- package/node_modules/zod/v4/mini/iso.cjs +19 -0
- package/node_modules/zod/v4/mini/parse.cjs +22 -1
- package/node_modules/zod/v4/mini/parse.d.cts +1 -1
- package/node_modules/zod/v4/mini/parse.d.ts +1 -1
- package/node_modules/zod/v4/mini/parse.js +1 -1
- package/node_modules/zod/v4/mini/schemas.cjs +117 -53
- package/node_modules/zod/v4/mini/schemas.d.cts +49 -14
- package/node_modules/zod/v4/mini/schemas.d.ts +49 -14
- package/node_modules/zod/v4/mini/schemas.js +92 -51
- package/node_modules/zod/v4-mini/index.cjs +19 -0
- package/openclaw.plugin.json +222 -45
- package/package.json +14 -11
- package/dist/direct-room-RinHjtqX.js +0 -71
- package/dist/probe.runtime-DWdw74_H.js +0 -2
- package/dist/runtime-6S3DNFNv.js +0 -8
- package/dist/types-DzSc7Sqm.js +0 -32
- package/node_modules/markdown-it/node_modules/entities/dist/internal/encode-shared.d.ts +0 -33
- package/node_modules/markdown-it/node_modules/entities/dist/internal/encode-shared.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/dist/internal/encode-shared.js +0 -93
- package/node_modules/markdown-it/node_modules/entities/dist/internal/encode-shared.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/src/internal/encode-shared.ts +0 -123
- package/node_modules/zod/src/v4/core/config.ts +0 -15
- /package/dist/{account-config-CRsKoMqJ.js → .setup/account-config-CRsKoMqJ.mjs} +0 -0
- /package/dist/{backup-health-Dm_YMVFT.js → .setup/backup-health-Dm_YMVFT.mjs} +0 -0
- /package/dist/{config-paths-CnREYb1Y.js → .setup/config-paths-CnREYb1Y.mjs} +0 -0
- /package/dist/{config-secret-input.runtime-CwsP3--c.js → .setup/config-secret-input.runtime-CwsP3--c.mjs} +0 -0
- /package/dist/{credentials-state-B3cuUFwZ.js → .setup/credentials-state-B3cuUFwZ.mjs} +0 -0
- /package/dist/{crypto-node.runtime-6Aj_ltHQ.js → .setup/crypto-node.runtime-6Aj_ltHQ.mjs} +0 -0
- /package/dist/{deps-mtxF2mHI.js → .setup/deps-mtxF2mHI.mjs} +0 -0
- /package/dist/{doctor-contract-HyWFZQVG.js → .setup/doctor-contract-HyWFZQVG.mjs} +0 -0
- /package/dist/{env-vars-dGqak9dN.js → .setup/env-vars-dGqak9dN.mjs} +0 -0
- /package/dist/{errors-DKVS3_DO.js → .setup/errors-DKVS3_DO.mjs} +0 -0
- /package/dist/{event-helpers-CspuhE9k.js → .setup/event-helpers-CspuhE9k.mjs} +0 -0
- /package/dist/{idb-persistence-lock-B3fZXyF_.js → .setup/idb-persistence-lock-B3fZXyF_.mjs} +0 -0
- /package/dist/{rolldown-runtime-8H4AJuhK.js → .setup/rolldown-runtime-8H4AJuhK.mjs} +0 -0
- /package/dist/{storage-paths-DVCANXTc.js → .setup/storage-paths-DVCANXTc.mjs} +0 -0
- /package/dist/{target-ids-Nwx7cMVE.js → .setup/target-ids-Nwx7cMVE.mjs} +0 -0
- /package/dist/{thread-bindings-shared-oNPiyMWY.js → .setup/thread-bindings-shared-oNPiyMWY.mjs} +0 -0
- /package/dist/{url-validation-GRHde6lq.js → .setup/url-validation-GRHde6lq.mjs} +0 -0
|
@@ -7,38 +7,38 @@ exports.PostmessageTransport = void 0;
|
|
|
7
7
|
var _events = require("events");
|
|
8
8
|
var _ = require("..");
|
|
9
9
|
var _excluded = ["message"];
|
|
10
|
-
function _typeof(
|
|
11
|
-
function _objectWithoutProperties(
|
|
12
|
-
function _objectWithoutPropertiesLoose(
|
|
13
|
-
function ownKeys(
|
|
14
|
-
function _objectSpread(
|
|
15
|
-
function _classCallCheck(
|
|
16
|
-
function _defineProperties(
|
|
17
|
-
function _createClass(
|
|
18
|
-
function _inherits(
|
|
19
|
-
function _setPrototypeOf(
|
|
20
|
-
function _createSuper(
|
|
21
|
-
function _possibleConstructorReturn(
|
|
22
|
-
function _assertThisInitialized(
|
|
23
|
-
function _isNativeReflectConstruct() {
|
|
24
|
-
function _getPrototypeOf(
|
|
25
|
-
function _defineProperty(
|
|
26
|
-
function _toPropertyKey(
|
|
27
|
-
function _toPrimitive(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
10
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
11
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
12
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
13
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
16
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
17
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
18
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
19
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
20
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
21
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
22
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
23
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
24
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
25
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
26
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
27
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
|
|
28
|
+
* Copyright 2020 - 2024 The Matrix.org Foundation C.I.C.
|
|
29
|
+
*
|
|
30
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
31
|
+
* you may not use this file except in compliance with the License.
|
|
32
|
+
* You may obtain a copy of the License at
|
|
33
|
+
*
|
|
34
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
35
|
+
*
|
|
36
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
37
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
38
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
39
|
+
* See the License for the specific language governing permissions and
|
|
40
|
+
* limitations under the License.
|
|
41
|
+
*/
|
|
42
42
|
/**
|
|
43
43
|
* Transport for the Widget API over postMessage.
|
|
44
44
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostmessageTransport.js","names":["_events","require","_","_excluded","_typeof","obj","Symbol","iterator","constructor","prototype","_objectWithoutProperties","source","excluded","target","_objectWithoutPropertiesLoose","key","i","Object","getOwnPropertySymbols","sourceSymbolKeys","length","indexOf","propertyIsEnumerable","call","sourceKeys","keys","ownKeys","object","enumerableOnly","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_classCallCheck","instance","Constructor","TypeError","_defineProperties","props","descriptor","configurable","writable","_toPropertyKey","_createClass","protoProps","staticProps","_inherits","subClass","superClass","create","value","_setPrototypeOf","o","p","setPrototypeOf","bind","__proto__","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf","result","NewTarget","Reflect","construct","_possibleConstructorReturn","self","_assertThisInitialized","ReferenceError","sham","Proxy","Boolean","valueOf","e","getPrototypeOf","arg","_toPrimitive","String","input","hint","prim","toPrimitive","undefined","res","Number","PostmessageTransport","_EventEmitter","_super","sendDirection","initialWidgetId","transportWindow","inboundWindow","_this","Map","AbortController","ev","stopController","signal","aborted","data","strictOriginCheck","origin","globalThis","response","action","requestId","widgetId","api","handleResponse","request","invertedDirection","handleRequest","_widgetId","get","_ready","idBase","concat","Date","now","index","id","outboundRequests","has","set","sendInternal","message","console","log","targetOrigin","postMessage","reply","responseData","send","sendComplete","then","r","_this2","ready","Promise","reject","Error","nextRequestId","WidgetApiToWidgetAction","UpdateVisibility","prResolve","prReject","resolve","cleanUp","err","timerId","setTimeout","timeoutSeconds","onStop","addEventListener","clearTimeout","removeEventListener","start","handleMessage","stop","abort","emit","CustomEvent","detail","req","isErrorResponse","_response$response$er","error","WidgetApiResponseError","EventEmitter","exports"],"sources":["../../src/transport/PostmessageTransport.ts"],"sourcesContent":["/*\n * Copyright 2020 - 2024 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { EventEmitter } from \"events\";\n\nimport { ITransport } from \"./ITransport\";\nimport {\n invertedDirection,\n isErrorResponse,\n IWidgetApiRequest,\n IWidgetApiRequestData,\n IWidgetApiResponse,\n IWidgetApiResponseData,\n WidgetApiResponseError,\n WidgetApiAction,\n WidgetApiDirection,\n WidgetApiToWidgetAction,\n} from \"..\";\n\ninterface IOutboundRequest {\n request: IWidgetApiRequest;\n resolve: (response: IWidgetApiResponse) => void;\n reject: (err: Error) => void;\n}\n\n/**\n * Transport for the Widget API over postMessage.\n */\nexport class PostmessageTransport extends EventEmitter implements ITransport {\n public strictOriginCheck = false;\n public targetOrigin = \"*\";\n public timeoutSeconds = 10;\n\n private _ready = false;\n private _widgetId: string | null;\n private readonly outboundRequests = new Map<string, IOutboundRequest | null>();\n private readonly stopController = new AbortController();\n\n public get ready(): boolean {\n return this._ready;\n }\n\n public get widgetId(): string | null {\n return this._widgetId || null;\n }\n\n public constructor(\n private readonly sendDirection: WidgetApiDirection,\n initialWidgetId: string | null,\n private readonly transportWindow: Window | typeof globalThis,\n private readonly inboundWindow: Window | typeof globalThis,\n ) {\n super();\n this._widgetId = initialWidgetId;\n }\n\n private get nextRequestId(): string {\n const idBase = `widgetapi-${Date.now()}`;\n let index = 0;\n let id = idBase;\n while (this.outboundRequests.has(id)) {\n id = `${idBase}-${index++}`;\n }\n\n // reserve the ID\n this.outboundRequests.set(id, null);\n\n return id;\n }\n\n private sendInternal(message: IWidgetApiRequest | IWidgetApiResponse): void {\n console.log(`[PostmessageTransport] Sending object to ${this.targetOrigin}: `, message);\n this.transportWindow.postMessage(message, this.targetOrigin);\n }\n\n public reply<T extends IWidgetApiResponseData>(request: IWidgetApiRequest, responseData: T): void {\n return this.sendInternal(<IWidgetApiResponse>{\n ...request,\n response: responseData,\n });\n }\n\n public send<T extends IWidgetApiRequestData, R extends IWidgetApiResponseData>(\n action: WidgetApiAction,\n data: T,\n ): Promise<R> {\n return this.sendComplete(action, data).then((r) => <R>r.response);\n }\n\n public sendComplete<T extends IWidgetApiRequestData, R extends IWidgetApiResponse>(\n action: WidgetApiAction,\n data: T,\n ): Promise<R> {\n if (!this.ready || !this.widgetId) {\n return Promise.reject(new Error(\"Not ready or unknown widget ID\"));\n }\n const request: IWidgetApiRequest = {\n api: this.sendDirection,\n widgetId: this.widgetId,\n requestId: this.nextRequestId,\n action: action,\n data: data,\n };\n if (action === WidgetApiToWidgetAction.UpdateVisibility) {\n request[\"visible\"] = data[\"visible\"];\n }\n return new Promise<R>((prResolve, prReject) => {\n const resolve = (response: IWidgetApiResponse): void => {\n cleanUp();\n prResolve(<R>response);\n };\n const reject = (err: Error): void => {\n cleanUp();\n prReject(err);\n };\n\n const timerId = setTimeout(() => reject(new Error(\"Request timed out\")), (this.timeoutSeconds || 1) * 1000);\n\n const onStop = (): void => reject(new Error(\"Transport stopped\"));\n this.stopController.signal.addEventListener(\"abort\", onStop);\n\n const cleanUp = (): void => {\n this.outboundRequests.delete(request.requestId);\n clearTimeout(timerId);\n this.stopController.signal.removeEventListener(\"abort\", onStop);\n };\n\n this.outboundRequests.set(request.requestId, { request, resolve, reject });\n this.sendInternal(request);\n });\n }\n\n public start(): void {\n this.inboundWindow.addEventListener(\"message\", this.handleMessage);\n this._ready = true;\n }\n\n public stop(): void {\n this._ready = false;\n this.stopController.abort();\n this.inboundWindow.removeEventListener(\"message\", this.handleMessage);\n }\n\n private readonly handleMessage = (ev: MessageEvent): void => {\n if (this.stopController.signal.aborted) return;\n if (!ev.data) return; // invalid event\n\n if (this.strictOriginCheck && ev.origin !== globalThis.origin) return; // bad origin\n\n // treat the message as a response first, then downgrade to a request\n const response = <IWidgetApiResponse>ev.data;\n if (!response.action || !response.requestId || !response.widgetId) return; // invalid request/response\n\n if (response.response) {\n if (response.api !== this.sendDirection) return; // wrong direction\n this.handleResponse(response);\n } else {\n const request = <IWidgetApiRequest>response;\n if (request.api !== invertedDirection(this.sendDirection)) return; // wrong direction\n this.handleRequest(request);\n }\n };\n\n private handleRequest(request: IWidgetApiRequest): void {\n if (this.widgetId) {\n if (this.widgetId !== request.widgetId) return; // wrong widget\n } else {\n this._widgetId = request.widgetId;\n }\n\n this.emit(\"message\", new CustomEvent(\"message\", { detail: request }));\n }\n\n private handleResponse(response: IWidgetApiResponse): void {\n if (response.widgetId !== this.widgetId) return; // wrong widget\n\n const req = this.outboundRequests.get(response.requestId);\n if (!req) return; // response to an unknown request\n\n if (isErrorResponse(response.response)) {\n const { message, ...data } = response.response.error;\n req.reject(new WidgetApiResponseError(message, data));\n } else {\n req.resolve(response);\n }\n }\n}\n"],"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SAAS,GAAGH,OAAO,CAACH,QAAQ;MACrC;MAEA,IAAI,CAACsD,IAAI,CAAC,SAAS,EAAE,IAAIC,WAAW,CAAC,SAAS,EAAE;QAAEC,MAAM,EAAErD;MAAQ,CAAC,CAAC,CAAC;IACzE;EAAC;IAAA3G,GAAA;IAAA6C,KAAA,EAED,SAAA6D,eAAuBL,QAA4B,EAAQ;MACvD,IAAIA,QAAQ,CAACG,QAAQ,KAAK,IAAI,CAACA,QAAQ,EAAE,OAAO,CAAC;;MAEjD,IAAMyD,GAAG,GAAG,IAAI,CAAC1C,gBAAgB,CAACR,GAAG,CAACV,QAAQ,CAACE,SAAS,CAAC;MACzD,IAAI,CAAC0D,GAAG,EAAE,OAAO,CAAC;;MAElB,IAAI,IAAAC,iBAAe,EAAC7D,QAAQ,CAACA,QAAQ,CAAC,EAAE;QACpC,IAAA8D,qBAAA,GAA6B9D,QAAQ,CAACA,QAAQ,CAAC+D,KAAK;UAA5CzC,OAAO,GAAAwC,qBAAA,CAAPxC,OAAO;UAAK1B,IAAI,GAAAtG,wBAAA,CAAAwK,qBAAA,EAAA/K,SAAA;QACxB6K,GAAG,CAACxB,MAAM,CAAC,IAAI4B,wBAAsB,CAAC1C,OAAO,EAAE1B,IAAI,CAAC,CAAC;MACzD,CAAC,MAAM;QACHgE,GAAG,CAACjB,OAAO,CAAC3C,QAAQ,CAAC;MACzB;IACJ;EAAC;EAAA,OAAAlB,oBAAA;AAAA,EA7JqCmF,oBAAY;AAAAC,OAAA,CAAApF,oBAAA,GAAAA,oBAAA"}
|
|
1
|
+
{"version":3,"file":"PostmessageTransport.js","names":["_events","require","_","_excluded","_typeof","o","Symbol","iterator","constructor","prototype","_objectWithoutProperties","e","t","r","i","_objectWithoutPropertiesLoose","Object","getOwnPropertySymbols","n","length","indexOf","propertyIsEnumerable","call","hasOwnProperty","ownKeys","keys","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_classCallCheck","a","TypeError","_defineProperties","configurable","writable","_toPropertyKey","key","_createClass","_inherits","create","value","_setPrototypeOf","setPrototypeOf","bind","__proto__","_createSuper","_isNativeReflectConstruct","_getPrototypeOf","s","Reflect","construct","_possibleConstructorReturn","_assertThisInitialized","ReferenceError","Boolean","valueOf","getPrototypeOf","_toPrimitive","toPrimitive","String","Number","PostmessageTransport","_EventEmitter","_super","sendDirection","initialWidgetId","transportWindow","inboundWindow","_this","Map","AbortController","ev","stopController","signal","aborted","data","strictOriginCheck","origin","globalThis","response","action","requestId","widgetId","api","handleResponse","request","invertedDirection","handleRequest","_widgetId","get","_ready","idBase","concat","Date","now","index","id","outboundRequests","has","set","sendInternal","message","console","log","targetOrigin","postMessage","reply","responseData","send","sendComplete","then","_this2","ready","Promise","reject","Error","nextRequestId","WidgetApiToWidgetAction","UpdateVisibility","prResolve","prReject","resolve","cleanUp","err","timerId","setTimeout","timeoutSeconds","onStop","addEventListener","clearTimeout","removeEventListener","start","handleMessage","stop","abort","emit","CustomEvent","detail","req","isErrorResponse","_response$response$er","error","WidgetApiResponseError","EventEmitter","exports"],"sources":["../../src/transport/PostmessageTransport.ts"],"sourcesContent":["/*\n * Copyright 2020 - 2024 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { EventEmitter } from \"events\";\n\nimport { ITransport } from \"./ITransport\";\nimport {\n invertedDirection,\n isErrorResponse,\n IWidgetApiRequest,\n IWidgetApiRequestData,\n IWidgetApiResponse,\n IWidgetApiResponseData,\n WidgetApiResponseError,\n WidgetApiAction,\n WidgetApiDirection,\n WidgetApiToWidgetAction,\n} from \"..\";\n\ninterface IOutboundRequest {\n request: IWidgetApiRequest;\n resolve: (response: IWidgetApiResponse) => void;\n reject: (err: Error) => void;\n}\n\n/**\n * Transport for the Widget API over postMessage.\n */\nexport class PostmessageTransport extends EventEmitter implements ITransport {\n public strictOriginCheck = false;\n public targetOrigin = \"*\";\n public timeoutSeconds = 10;\n\n private _ready = false;\n private _widgetId: string | null;\n private readonly outboundRequests = new Map<string, IOutboundRequest | null>();\n private readonly stopController = new AbortController();\n\n public get ready(): boolean {\n return this._ready;\n }\n\n public get widgetId(): string | null {\n return this._widgetId || null;\n }\n\n public constructor(\n private readonly sendDirection: WidgetApiDirection,\n initialWidgetId: string | null,\n private readonly transportWindow: Window | typeof globalThis,\n private readonly inboundWindow: Window | typeof globalThis,\n ) {\n super();\n this._widgetId = initialWidgetId;\n }\n\n private get nextRequestId(): string {\n const idBase = `widgetapi-${Date.now()}`;\n let index = 0;\n let id = idBase;\n while (this.outboundRequests.has(id)) {\n id = `${idBase}-${index++}`;\n }\n\n // reserve the ID\n this.outboundRequests.set(id, null);\n\n return id;\n }\n\n private sendInternal(message: IWidgetApiRequest | IWidgetApiResponse): void {\n console.log(`[PostmessageTransport] Sending object to ${this.targetOrigin}: `, message);\n this.transportWindow.postMessage(message, this.targetOrigin);\n }\n\n public reply<T extends IWidgetApiResponseData>(request: IWidgetApiRequest, responseData: T): void {\n return this.sendInternal(<IWidgetApiResponse>{\n ...request,\n response: responseData,\n });\n }\n\n public send<T extends IWidgetApiRequestData, R extends IWidgetApiResponseData>(\n action: WidgetApiAction,\n data: T,\n ): Promise<R> {\n return this.sendComplete(action, data).then((r) => <R>r.response);\n }\n\n public sendComplete<T extends IWidgetApiRequestData, R extends IWidgetApiResponse>(\n action: WidgetApiAction,\n data: T,\n ): Promise<R> {\n if (!this.ready || !this.widgetId) {\n return Promise.reject(new Error(\"Not ready or unknown widget ID\"));\n }\n const request: IWidgetApiRequest = {\n api: this.sendDirection,\n widgetId: this.widgetId,\n requestId: this.nextRequestId,\n action: action,\n data: data,\n };\n if (action === WidgetApiToWidgetAction.UpdateVisibility) {\n request[\"visible\"] = data[\"visible\"];\n }\n return new Promise<R>((prResolve, prReject) => {\n const resolve = (response: IWidgetApiResponse): void => {\n cleanUp();\n prResolve(<R>response);\n };\n const reject = (err: Error): void => {\n cleanUp();\n prReject(err);\n };\n\n const timerId = setTimeout(() => reject(new Error(\"Request timed out\")), (this.timeoutSeconds || 1) * 1000);\n\n const onStop = (): void => reject(new Error(\"Transport stopped\"));\n this.stopController.signal.addEventListener(\"abort\", onStop);\n\n const cleanUp = (): void => {\n this.outboundRequests.delete(request.requestId);\n clearTimeout(timerId);\n this.stopController.signal.removeEventListener(\"abort\", onStop);\n };\n\n this.outboundRequests.set(request.requestId, { request, resolve, reject });\n this.sendInternal(request);\n });\n }\n\n public start(): void {\n this.inboundWindow.addEventListener(\"message\", this.handleMessage);\n this._ready = true;\n }\n\n public stop(): void {\n this._ready = false;\n this.stopController.abort();\n this.inboundWindow.removeEventListener(\"message\", this.handleMessage);\n }\n\n private readonly handleMessage = (ev: MessageEvent): void => {\n if (this.stopController.signal.aborted) return;\n if (!ev.data) return; // invalid event\n\n if (this.strictOriginCheck && ev.origin !== globalThis.origin) return; // bad origin\n\n // treat the message as a response first, then downgrade to a request\n const response = <IWidgetApiResponse>ev.data;\n if (!response.action || !response.requestId || !response.widgetId) return; // invalid request/response\n\n if (response.response) {\n if (response.api !== this.sendDirection) return; // wrong direction\n this.handleResponse(response);\n } else {\n const request = <IWidgetApiRequest>response;\n if (request.api !== invertedDirection(this.sendDirection)) return; // wrong direction\n this.handleRequest(request);\n }\n };\n\n private handleRequest(request: IWidgetApiRequest): void {\n if (this.widgetId) {\n if (this.widgetId !== request.widgetId) return; // wrong widget\n } else {\n this._widgetId = request.widgetId;\n }\n\n this.emit(\"message\", new CustomEvent(\"message\", { detail: request }));\n }\n\n private handleResponse(response: IWidgetApiResponse): void {\n if (response.widgetId !== this.widgetId) return; // wrong widget\n\n const req = this.outboundRequests.get(response.requestId);\n if (!req) return; // response to an unknown request\n\n if (isErrorResponse(response.response)) {\n const { message, ...data } = response.response.error;\n req.reject(new WidgetApiResponseError(message, data));\n } else {\n req.resolve(response);\n }\n }\n}\n"],"mappings":";;;;;;AAgBA,IAAAA,OAAA,GAAAC,OAAA;AAGA,IAAAC,CAAA,GAAAD,OAAA;AAWY,IAAAE,SAAA;AAAA,SAAAC,QAAAC,CAAA,sCAAAD,OAAA,wBAAAE,MAAA,uBAAAA,MAAA,CAAAC,QAAA,aAAAF,CAAA,kBAAAA,CAAA,gBAAAA,CAAA,WAAAA,CAAA,yBAAAC,MAAA,IAAAD,CAAA,CAAAG,WAAA,KAAAF,MAAA,IAAAD,CAAA,KAAAC,MAAA,CAAAG,SAAA,qBAAAJ,CAAA,KAAAD,OAAA,CAAAC,CAAA;AAAA,SAAAK,yBAAAC,CAAA,EAAAC,CAAA,gBAAAD,CAAA,iBAAAN,CAAA,EAAAQ,CAAA,EAAAC,CAAA,GAAAC,6BAAA,CAAAJ,CAAA,EAAAC,CAAA,OAAAI,MAAA,CAAAC,qBAAA,QAAAC,CAAA,GAAAF,MAAA,CAAAC,qBAAA,CAAAN,CAAA,QAAAE,CAAA,MAAAA,CAAA,GAAAK,CAAA,CAAAC,MAAA,EAAAN,CAAA,IAAAR,CAAA,GAAAa,CAAA,CAAAL,CAAA,UAAAD,CAAA,CAAAQ,OAAA,CAAAf,CAAA,QAAAgB,oBAAA,CAAAC,IAAA,CAAAX,CAAA,EAAAN,CAAA,MAAAS,CAAA,CAAAT,CAAA,IAAAM,CAAA,CAAAN,CAAA,aAAAS,CAAA;AAAA,SAAAC,8BAAAF,CAAA,EAAAF,CAAA,gBAAAE,CAAA,iBAAAD,CAAA,gBAAAM,CAAA,IAAAL,CAAA,SAAAU,cAAA,CAAAD,IAAA,CAAAT,CAAA,EAAAK,CAAA,gBAAAP,CAAA,CAAAS,OAAA,CAAAF,CAAA,aAAAN,CA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,OAAO,CAACH,QAAQ;MACrC;MAEA,IAAI,CAACqD,IAAI,CAAC,SAAS,EAAE,IAAIC,WAAW,CAAC,SAAS,EAAE;QAAEC,MAAM,EAAEpD;MAAQ,CAAC,CAAC,CAAC;IACzE;EAAC;IAAAjD,GAAA;IAAAI,KAAA,EAED,SAAA4C,eAAuBL,QAA4B,EAAQ;MACvD,IAAIA,QAAQ,CAACG,QAAQ,KAAK,IAAI,CAACA,QAAQ,EAAE,OAAO,CAAC;;MAEjD,IAAMwD,GAAG,GAAG,IAAI,CAACzC,gBAAgB,CAACR,GAAG,CAACV,QAAQ,CAACE,SAAS,CAAC;MACzD,IAAI,CAACyD,GAAG,EAAE,OAAO,CAAC;;MAElB,IAAI,IAAAC,iBAAe,EAAC5D,QAAQ,CAACA,QAAQ,CAAC,EAAE;QACpC,IAAA6D,qBAAA,GAA6B7D,QAAQ,CAACA,QAAQ,CAAC8D,KAAK;UAA5CxC,OAAO,GAAAuC,qBAAA,CAAPvC,OAAO;UAAK1B,IAAI,GAAA1E,wBAAA,CAAA2I,qBAAA,EAAAlJ,SAAA;QACxBgJ,GAAG,CAACxB,MAAM,CAAC,IAAI4B,wBAAsB,CAACzC,OAAO,EAAE1B,IAAI,CAAC,CAAC;MACzD,CAAC,MAAM;QACH+D,GAAG,CAACjB,OAAO,CAAC1C,QAAQ,CAAC;MACzB;IACJ;EAAC;EAAA,OAAAlB,oBAAA;AAAA,EA7JqCkF,oBAAY;AAAAC,OAAA,CAAAnF,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/util/SimpleObservable.js
CHANGED
|
@@ -4,16 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.SimpleObservable = void 0;
|
|
7
|
-
function _typeof(
|
|
8
|
-
function _createForOfIteratorHelper(
|
|
9
|
-
function _unsupportedIterableToArray(
|
|
10
|
-
function _arrayLikeToArray(
|
|
11
|
-
function _classCallCheck(
|
|
12
|
-
function _defineProperties(
|
|
13
|
-
function _createClass(
|
|
14
|
-
function _defineProperty(
|
|
15
|
-
function _toPropertyKey(
|
|
16
|
-
function _toPrimitive(
|
|
7
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
8
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
9
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
11
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
12
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
13
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
14
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
17
17
|
/*
|
|
18
18
|
* Copyright 2020 The Matrix.org Foundation C.I.C.
|
|
19
19
|
*
|
package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/lib/util/SimpleObservable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleObservable.js","names":["SimpleObservable","initialFn","_classCallCheck","_defineProperty","listeners","push","_createClass","key","value","onUpdate","fn","update","val","_iterator","_createForOfIteratorHelper","_step","s","n","done","listener","err","e","f","close","exports"],"sources":["../../src/util/SimpleObservable.ts"],"sourcesContent":["/*\n * Copyright 2020 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport type ObservableFunction<T> = (val: T) => void;\n\nexport class SimpleObservable<T> {\n private listeners: ObservableFunction<T>[] = [];\n\n public constructor(initialFn?: ObservableFunction<T>) {\n if (initialFn) this.listeners.push(initialFn);\n }\n\n public onUpdate(fn: ObservableFunction<T>): void {\n this.listeners.push(fn);\n }\n\n public update(val: T): void {\n for (const listener of this.listeners) {\n listener(val);\n }\n }\n\n public close(): void {\n this.listeners = []; // reset\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,IAkBaA,gBAAgB;EAGzB,SAAAA,iBAAmBC,SAAiC,EAAE;IAAAC,eAAA,OAAAF,gBAAA;IAAAG,eAAA,oBAFT,EAAE;IAG3C,IAAIF,SAAS,EAAE,IAAI,CAACG,SAAS,CAACC,IAAI,CAACJ,SAAS,CAAC;EACjD;EAACK,YAAA,CAAAN,gBAAA;IAAAO,GAAA;IAAAC,KAAA,EAED,SAAAC,SAAgBC,EAAyB,EAAQ;MAC7C,IAAI,CAACN,SAAS,CAACC,IAAI,CAACK,EAAE,CAAC;IAC3B;EAAC;IAAAH,GAAA;IAAAC,KAAA,EAED,SAAAG,OAAcC,GAAM,EAAQ;MAAA,IAAAC,SAAA,GAAAC,0BAAA,CACD,IAAI,CAACV,SAAS;QAAAW,KAAA;MAAA;QAArC,KAAAF,SAAA,CAAAG,CAAA,MAAAD,KAAA,GAAAF,SAAA,CAAAI,CAAA,IAAAC,IAAA,GAAuC;UAAA,IAA5BC,QAAQ,GAAAJ,KAAA,CAAAP,KAAA;UACfW,QAAQ,CAACP,GAAG,CAAC;QACjB;MAAC,SAAAQ,GAAA;QAAAP,SAAA,CAAAQ,CAAA,CAAAD,GAAA;MAAA;QAAAP,SAAA,CAAAS,CAAA;MAAA;IACL;EAAC;IAAAf,GAAA;IAAAC,KAAA,EAED,SAAAe,MAAA,EAAqB;MACjB,IAAI,CAACnB,SAAS,GAAG,EAAE,CAAC,CAAC;IACzB;EAAC;EAAA,OAAAJ,gBAAA;AAAA;AAAAwB,OAAA,CAAAxB,gBAAA,GAAAA,gBAAA"}
|
|
1
|
+
{"version":3,"file":"SimpleObservable.js","names":["SimpleObservable","initialFn","_classCallCheck","_defineProperty","listeners","push","_createClass","key","value","onUpdate","fn","update","val","_iterator","_createForOfIteratorHelper","_step","s","n","done","listener","err","e","f","close","exports"],"sources":["../../src/util/SimpleObservable.ts"],"sourcesContent":["/*\n * Copyright 2020 The Matrix.org Foundation C.I.C.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport type ObservableFunction<T> = (val: T) => void;\n\nexport class SimpleObservable<T> {\n private listeners: ObservableFunction<T>[] = [];\n\n public constructor(initialFn?: ObservableFunction<T>) {\n if (initialFn) this.listeners.push(initialFn);\n }\n\n public onUpdate(fn: ObservableFunction<T>): void {\n this.listeners.push(fn);\n }\n\n public update(val: T): void {\n for (const listener of this.listeners) {\n listener(val);\n }\n }\n\n public close(): void {\n this.listeners = []; // reset\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdA,IAkBaA,gBAAgB;EAGzB,SAAAA,iBAAmBC,SAAiC,EAAE;IAAAC,eAAA,OAAAF,gBAAA;IAAAG,eAAA,oBAFT,EAAE;IAG3C,IAAIF,SAAS,EAAE,IAAI,CAACG,SAAS,CAACC,IAAI,CAACJ,SAAS,CAAC;EACjD;EAACK,YAAA,CAAAN,gBAAA;IAAAO,GAAA;IAAAC,KAAA,EAED,SAAAC,SAAgBC,EAAyB,EAAQ;MAC7C,IAAI,CAACN,SAAS,CAACC,IAAI,CAACK,EAAE,CAAC;IAC3B;EAAC;IAAAH,GAAA;IAAAC,KAAA,EAED,SAAAG,OAAcC,GAAM,EAAQ;MAAA,IAAAC,SAAA,GAAAC,0BAAA,CACD,IAAI,CAACV,SAAS;QAAAW,KAAA;MAAA;QAArC,KAAAF,SAAA,CAAAG,CAAA,MAAAD,KAAA,GAAAF,SAAA,CAAAI,CAAA,IAAAC,IAAA,GAAuC;UAAA,IAA5BC,QAAQ,GAAAJ,KAAA,CAAAP,KAAA;UACfW,QAAQ,CAACP,GAAG,CAAC;QACjB;MAAC,SAAAQ,GAAA;QAAAP,SAAA,CAAAQ,CAAA,CAAAD,GAAA;MAAA;QAAAP,SAAA,CAAAS,CAAA;MAAA;IACL;EAAC;IAAAf,GAAA;IAAAC,KAAA,EAED,SAAAe,MAAA,EAAqB;MACjB,IAAI,CAACnB,SAAS,GAAG,EAAE,CAAC,CAAC;IACzB;EAAC;EAAA,OAAAJ,gBAAA;AAAA;AAAAwB,OAAA,CAAAxB,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matrix-widget-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.19.0",
|
|
4
4
|
"description": "Matrix Widget API SDK",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@babel/preset-env": "^7.11.5",
|
|
46
46
|
"@babel/preset-typescript": "^7.10.4",
|
|
47
47
|
"@casualbot/jest-sonar-reporter": "^2.2.7",
|
|
48
|
-
"@stylistic/eslint-plugin": "^
|
|
48
|
+
"@stylistic/eslint-plugin": "^5.0.0",
|
|
49
49
|
"@testing-library/dom": "^8.0.0",
|
|
50
50
|
"@types/jest": "^29.5.12",
|
|
51
51
|
"@types/node": "^24",
|
|
@@ -111,6 +111,12 @@ import {
|
|
|
111
111
|
IDownloadFileActionFromWidgetActionRequest,
|
|
112
112
|
IDownloadFileActionFromWidgetResponseData,
|
|
113
113
|
} from "./interfaces/DownloadFileAction";
|
|
114
|
+
import {
|
|
115
|
+
IRtcLivekitDelegateDelayedLeaveFromWidgetActionRequest,
|
|
116
|
+
IRtcLivekitDelegateDelayedLeaveFromWidgetResponseData,
|
|
117
|
+
IRtcLivekitGetTokenFromWidgetActionRequest,
|
|
118
|
+
IRtcLivekitGetTokenFromWidgetResponseData,
|
|
119
|
+
} from "./interfaces/RtcLivekitActions";
|
|
114
120
|
import { IThemeChangeActionRequestData } from "./interfaces/ThemeChangeAction";
|
|
115
121
|
import { IUpdateStateToWidgetRequestData } from "./interfaces/UpdateStateAction";
|
|
116
122
|
import { IToDeviceMessage } from "./interfaces/IToDeviceMessage";
|
|
@@ -1030,6 +1036,42 @@ export class ClientWidgetApi extends EventEmitter {
|
|
|
1030
1036
|
}
|
|
1031
1037
|
}
|
|
1032
1038
|
|
|
1039
|
+
private async handleRtcLivekitGetToken(request: IRtcLivekitGetTokenFromWidgetActionRequest): Promise<void> {
|
|
1040
|
+
if (!this.hasCapability(MatrixCapabilities.MSC4533RtcLivekitGetToken)) {
|
|
1041
|
+
return this.transport.reply<IWidgetApiErrorResponseData>(request, {
|
|
1042
|
+
error: { message: "Missing capability" },
|
|
1043
|
+
});
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
try {
|
|
1047
|
+
const result = await this.driver.getRtcLivekitToken(request.data);
|
|
1048
|
+
|
|
1049
|
+
return this.transport.reply<IRtcLivekitGetTokenFromWidgetResponseData>(request, result);
|
|
1050
|
+
} catch (e) {
|
|
1051
|
+
console.error("error while getting a LiveKit token", e);
|
|
1052
|
+
this.handleDriverError(e, request, "Unexpected error while getting a LiveKit token");
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
private async handleRtcLivekitDelegateDelayedLeave(
|
|
1057
|
+
request: IRtcLivekitDelegateDelayedLeaveFromWidgetActionRequest,
|
|
1058
|
+
): Promise<void> {
|
|
1059
|
+
if (!this.hasCapability(MatrixCapabilities.MSC4533RtcLivekitDelegateDelayedLeave)) {
|
|
1060
|
+
return this.transport.reply<IWidgetApiErrorResponseData>(request, {
|
|
1061
|
+
error: { message: "Missing capability" },
|
|
1062
|
+
});
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
try {
|
|
1066
|
+
const result = await this.driver.delegateRtcLivekitDelayedLeave(request.data);
|
|
1067
|
+
|
|
1068
|
+
return this.transport.reply<IRtcLivekitDelegateDelayedLeaveFromWidgetResponseData>(request, result);
|
|
1069
|
+
} catch (e) {
|
|
1070
|
+
console.error("error while delegating a LiveKit delayed leave", e);
|
|
1071
|
+
this.handleDriverError(e, request, "Unexpected error while delegating a LiveKit delayed leave");
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1033
1075
|
private handleDriverError(e: unknown, request: IWidgetApiRequest, message: string): void {
|
|
1034
1076
|
const data = this.driver.processError(e);
|
|
1035
1077
|
this.transport.reply<IWidgetApiErrorResponseData>(request, {
|
|
@@ -1085,6 +1127,12 @@ export class ClientWidgetApi extends EventEmitter {
|
|
|
1085
1127
|
return this.handleDownloadFile(<IDownloadFileActionFromWidgetActionRequest>ev.detail);
|
|
1086
1128
|
case WidgetApiFromWidgetAction.MSC4157UpdateDelayedEvent:
|
|
1087
1129
|
return this.handleUpdateDelayedEvent(<IUpdateDelayedEventFromWidgetActionRequest>ev.detail);
|
|
1130
|
+
case WidgetApiFromWidgetAction.MSC4533RtcLivekitGetToken:
|
|
1131
|
+
return this.handleRtcLivekitGetToken(<IRtcLivekitGetTokenFromWidgetActionRequest>ev.detail);
|
|
1132
|
+
case WidgetApiFromWidgetAction.MSC4533RtcLivekitDelegateDelayedLeave:
|
|
1133
|
+
return this.handleRtcLivekitDelegateDelayedLeave(
|
|
1134
|
+
<IRtcLivekitDelegateDelayedLeaveFromWidgetActionRequest>ev.detail,
|
|
1135
|
+
);
|
|
1088
1136
|
|
|
1089
1137
|
default:
|
|
1090
1138
|
return this.transport.reply(ev.detail, <IWidgetApiErrorResponseData>{
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import { EventEmitter } from "events";
|
|
18
18
|
|
|
19
|
-
import { Capability } from "./interfaces/Capabilities";
|
|
19
|
+
import { Capability, MatrixCapabilities } from "./interfaces/Capabilities";
|
|
20
20
|
import { IWidgetApiRequest, IWidgetApiRequestEmptyData } from "./interfaces/IWidgetApiRequest";
|
|
21
21
|
import { IWidgetApiAcknowledgeResponseData } from "./interfaces/IWidgetApiResponse";
|
|
22
22
|
import { WidgetApiDirection } from "./interfaces/WidgetApiDirection";
|
|
@@ -94,6 +94,12 @@ import {
|
|
|
94
94
|
IDownloadFileActionFromWidgetRequestData,
|
|
95
95
|
IDownloadFileActionFromWidgetResponseData,
|
|
96
96
|
} from "./interfaces/DownloadFileAction";
|
|
97
|
+
import {
|
|
98
|
+
IRtcLivekitDelegateDelayedLeaveFromWidgetRequestData,
|
|
99
|
+
IRtcLivekitDelegateDelayedLeaveFromWidgetResponseData,
|
|
100
|
+
IRtcLivekitGetTokenFromWidgetRequestData,
|
|
101
|
+
IRtcLivekitGetTokenFromWidgetResponseData,
|
|
102
|
+
} from "./interfaces/RtcLivekitActions";
|
|
97
103
|
import {
|
|
98
104
|
IUpdateDelayedEventFromWidgetRequestData,
|
|
99
105
|
IUpdateDelayedEventFromWidgetResponseData,
|
|
@@ -305,6 +311,26 @@ export class WidgetApi extends EventEmitter {
|
|
|
305
311
|
this.requestCapability(WidgetEventCapability.forRoomAccountData(EventDirection.Receive, eventType).raw);
|
|
306
312
|
}
|
|
307
313
|
|
|
314
|
+
/**
|
|
315
|
+
* Requests the capability to obtain a JWT for a LiveKit SFU through the client.
|
|
316
|
+
* It is not guaranteed to be allowed, but will be asked for if the negotiation
|
|
317
|
+
* has not already happened.
|
|
318
|
+
* @see {@link https://github.com/matrix-org/matrix-spec-proposals/pull/4533|MSC4533}
|
|
319
|
+
*/
|
|
320
|
+
public requestCapabilityToGetRtcLivekitToken(): void {
|
|
321
|
+
this.requestCapability(MatrixCapabilities.MSC4533RtcLivekitGetToken);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Requests the capability to hand a MatrixRTC session's delayed leave event over
|
|
326
|
+
* to the server through the client. It is not guaranteed to be allowed, but will
|
|
327
|
+
* be asked for if the negotiation has not already happened.
|
|
328
|
+
* @see {@link https://github.com/matrix-org/matrix-spec-proposals/pull/4533|MSC4533}
|
|
329
|
+
*/
|
|
330
|
+
public requestCapabilityToDelegateRtcLivekitDelayedLeave(): void {
|
|
331
|
+
this.requestCapability(MatrixCapabilities.MSC4533RtcLivekitDelegateDelayedLeave);
|
|
332
|
+
}
|
|
333
|
+
|
|
308
334
|
/**
|
|
309
335
|
* Requests an OpenID Connect token from the client for the currently logged in
|
|
310
336
|
* user. This token can be validated server-side with the federation API. Note
|
|
@@ -903,6 +929,54 @@ export class WidgetApi extends EventEmitter {
|
|
|
903
929
|
);
|
|
904
930
|
}
|
|
905
931
|
|
|
932
|
+
/**
|
|
933
|
+
* Obtains a JWT for a LiveKit SFU, by asking the client to call the homeserver's
|
|
934
|
+
* `/rtc/livekit/get_token` endpoint on the widget's behalf.
|
|
935
|
+
* @param data The request data, which the client uses as the request body verbatim.
|
|
936
|
+
* @returns Resolves to the response body of the endpoint, verbatim.
|
|
937
|
+
* @see {@link https://github.com/matrix-org/matrix-spec-proposals/pull/4533|MSC4533}
|
|
938
|
+
*/
|
|
939
|
+
public async getRtcLivekitToken(
|
|
940
|
+
data: IRtcLivekitGetTokenFromWidgetRequestData,
|
|
941
|
+
): Promise<IRtcLivekitGetTokenFromWidgetResponseData> {
|
|
942
|
+
const versions = await this.getClientVersions();
|
|
943
|
+
if (!versions.includes(UnstableApiVersion.MSC4533)) {
|
|
944
|
+
throw new Error("The rtc_livekit_get_token action is not supported by the client.");
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
return this.transport.send<IRtcLivekitGetTokenFromWidgetRequestData, IRtcLivekitGetTokenFromWidgetResponseData>(
|
|
948
|
+
WidgetApiFromWidgetAction.MSC4533RtcLivekitGetToken,
|
|
949
|
+
data,
|
|
950
|
+
);
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
/**
|
|
954
|
+
* Hands a MatrixRTC session's delayed leave event over to the server, by asking the
|
|
955
|
+
* client to call the homeserver's `/rtc/livekit/delegate_delayed_leave` endpoint on
|
|
956
|
+
* the widget's behalf.
|
|
957
|
+
*
|
|
958
|
+
* Homeservers may not support this endpoint, in which case the request rejects with a
|
|
959
|
+
* {@link WidgetApiResponseError} whose `matrix_api_error` reports an HTTP 404 with
|
|
960
|
+
* `M_UNRECOGNIZED`. The widget is then responsible for refreshing the delayed leave
|
|
961
|
+
* event itself.
|
|
962
|
+
* @param data The request data, which the client uses as the request body verbatim.
|
|
963
|
+
* @returns Resolves to the response body of the endpoint, verbatim.
|
|
964
|
+
* @see {@link https://github.com/matrix-org/matrix-spec-proposals/pull/4533|MSC4533}
|
|
965
|
+
*/
|
|
966
|
+
public async delegateRtcLivekitDelayedLeave(
|
|
967
|
+
data: IRtcLivekitDelegateDelayedLeaveFromWidgetRequestData,
|
|
968
|
+
): Promise<IRtcLivekitDelegateDelayedLeaveFromWidgetResponseData> {
|
|
969
|
+
const versions = await this.getClientVersions();
|
|
970
|
+
if (!versions.includes(UnstableApiVersion.MSC4533)) {
|
|
971
|
+
throw new Error("The rtc_livekit_delegate_delayed_leave action is not supported by the client.");
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
return this.transport.send<
|
|
975
|
+
IRtcLivekitDelegateDelayedLeaveFromWidgetRequestData,
|
|
976
|
+
IRtcLivekitDelegateDelayedLeaveFromWidgetResponseData
|
|
977
|
+
>(WidgetApiFromWidgetAction.MSC4533RtcLivekitDelegateDelayedLeave, data);
|
|
978
|
+
}
|
|
979
|
+
|
|
906
980
|
/**
|
|
907
981
|
* Starts the communication channel. This should be done early to ensure
|
|
908
982
|
* that messages are not missed. Communication can only be stopped by the client.
|
package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/src/driver/WidgetDriver.ts
CHANGED
|
@@ -24,6 +24,10 @@ import {
|
|
|
24
24
|
ITurnServer,
|
|
25
25
|
IWidgetApiErrorResponseDataDetails,
|
|
26
26
|
IRtcTransport,
|
|
27
|
+
IRtcLivekitGetTokenFromWidgetRequestData,
|
|
28
|
+
IRtcLivekitGetTokenFromWidgetResponseData,
|
|
29
|
+
IRtcLivekitDelegateDelayedLeaveFromWidgetRequestData,
|
|
30
|
+
IRtcLivekitDelegateDelayedLeaveFromWidgetResponseData,
|
|
27
31
|
} from "..";
|
|
28
32
|
|
|
29
33
|
export interface ISendEventDetails {
|
|
@@ -491,6 +495,35 @@ export abstract class WidgetDriver {
|
|
|
491
495
|
throw new Error("Download file is not implemented");
|
|
492
496
|
}
|
|
493
497
|
|
|
498
|
+
/**
|
|
499
|
+
* Obtains a JWT for a LiveKit SFU by calling the homeserver's
|
|
500
|
+
* `/rtc/livekit/get_token` endpoint on the widget's behalf. The widget API
|
|
501
|
+
* will have already verified that the widget has permission to do so.
|
|
502
|
+
* @param data The request data, to be used as the request body verbatim.
|
|
503
|
+
* @returns Resolves to the response body of the endpoint, verbatim.
|
|
504
|
+
* @see {@link https://github.com/matrix-org/matrix-spec-proposals/pull/4533|MSC4533}
|
|
505
|
+
*/
|
|
506
|
+
public getRtcLivekitToken(
|
|
507
|
+
data: IRtcLivekitGetTokenFromWidgetRequestData,
|
|
508
|
+
): Promise<IRtcLivekitGetTokenFromWidgetResponseData> {
|
|
509
|
+
throw new Error("Getting a LiveKit token is not implemented");
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Hands a MatrixRTC session's delayed leave event over to the server by
|
|
514
|
+
* calling the homeserver's `/rtc/livekit/delegate_delayed_leave` endpoint on
|
|
515
|
+
* the widget's behalf. The widget API will have already verified that the
|
|
516
|
+
* widget has permission to do so.
|
|
517
|
+
* @param data The request data, to be used as the request body verbatim.
|
|
518
|
+
* @returns Resolves to the response body of the endpoint, verbatim.
|
|
519
|
+
* @see {@link https://github.com/matrix-org/matrix-spec-proposals/pull/4533|MSC4533}
|
|
520
|
+
*/
|
|
521
|
+
public delegateRtcLivekitDelayedLeave(
|
|
522
|
+
data: IRtcLivekitDelegateDelayedLeaveFromWidgetRequestData,
|
|
523
|
+
): Promise<IRtcLivekitDelegateDelayedLeaveFromWidgetResponseData> {
|
|
524
|
+
throw new Error("Delegating a LiveKit delayed leave is not implemented");
|
|
525
|
+
}
|
|
526
|
+
|
|
494
527
|
/**
|
|
495
528
|
* Gets the IDs of all joined or invited rooms currently known to the
|
|
496
529
|
* client.
|
|
@@ -64,6 +64,7 @@ export * from "./interfaces/UpdateDelayedEventAction";
|
|
|
64
64
|
export type * from "./interfaces/UpdateStateAction";
|
|
65
65
|
export type * from "./interfaces/UploadFileAction";
|
|
66
66
|
export type * from "./interfaces/DownloadFileAction";
|
|
67
|
+
export type * from "./interfaces/RtcLivekitActions";
|
|
67
68
|
export type * from "./interfaces/ThemeChangeAction";
|
|
68
69
|
export type * from "./interfaces/LanguageChangeAction";
|
|
69
70
|
|
package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/src/interfaces/ApiVersion.ts
CHANGED
|
@@ -34,6 +34,7 @@ export enum UnstableApiVersion {
|
|
|
34
34
|
MSC3973 = "org.matrix.msc3973",
|
|
35
35
|
MSC4039 = "org.matrix.msc4039",
|
|
36
36
|
MSC4515 = "org.matrix.msc4515",
|
|
37
|
+
MSC4533 = "org.matrix.msc4533",
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
export type ApiVersion = MatrixApiVersion | UnstableApiVersion | string;
|
|
@@ -55,4 +56,5 @@ export const CurrentApiVersions: ApiVersion[] = [
|
|
|
55
56
|
UnstableApiVersion.MSC3973,
|
|
56
57
|
UnstableApiVersion.MSC4039,
|
|
57
58
|
UnstableApiVersion.MSC4515,
|
|
59
|
+
UnstableApiVersion.MSC4533,
|
|
58
60
|
];
|
package/node_modules/matrix-js-sdk/node_modules/matrix-widget-api/src/interfaces/Capabilities.ts
CHANGED
|
@@ -65,6 +65,14 @@ export enum MatrixCapabilities {
|
|
|
65
65
|
* @experimental It is not recommended to rely on this existing - it can be removed without notice.
|
|
66
66
|
*/
|
|
67
67
|
MSC4515RtcTransports = "org.matrix.msc4515.rtc_transports",
|
|
68
|
+
/**
|
|
69
|
+
* @experimental It is not recommended to rely on this existing - it can be removed without notice.
|
|
70
|
+
*/
|
|
71
|
+
MSC4533RtcLivekitGetToken = "org.matrix.msc4533.rtc_livekit_get_token",
|
|
72
|
+
/**
|
|
73
|
+
* @experimental It is not recommended to rely on this existing - it can be removed without notice.
|
|
74
|
+
*/
|
|
75
|
+
MSC4533RtcLivekitDelegateDelayedLeave = "org.matrix.msc4533.rtc_livekit_delegate_delayed_leave",
|
|
68
76
|
}
|
|
69
77
|
|
|
70
78
|
export type Capability = MatrixCapabilities | string;
|