jazz-tools 0.14.27 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.svelte-kit/__package__/Provider.svelte +61 -0
- package/.svelte-kit/__package__/Provider.svelte.d.ts +19 -0
- package/.svelte-kit/__package__/Provider.svelte.d.ts.map +1 -0
- package/.svelte-kit/__package__/auth/PasskeyAuth.svelte.d.ts +11 -0
- package/.svelte-kit/__package__/auth/PasskeyAuth.svelte.d.ts.map +1 -0
- package/.svelte-kit/__package__/auth/PasskeyAuth.svelte.js +20 -0
- package/.svelte-kit/__package__/auth/PasskeyAuthBasicUI.svelte +81 -0
- package/.svelte-kit/__package__/auth/PasskeyAuthBasicUI.svelte.d.ts +9 -0
- package/.svelte-kit/__package__/auth/PasskeyAuthBasicUI.svelte.d.ts.map +1 -0
- package/.svelte-kit/__package__/auth/PassphraseAuth.svelte.d.ts +12 -0
- package/.svelte-kit/__package__/auth/PassphraseAuth.svelte.d.ts.map +1 -0
- package/.svelte-kit/__package__/auth/PassphraseAuth.svelte.js +30 -0
- package/.svelte-kit/__package__/auth/index.d.ts +4 -0
- package/.svelte-kit/__package__/auth/index.d.ts.map +1 -0
- package/.svelte-kit/__package__/auth/index.js +3 -0
- package/.svelte-kit/__package__/auth/useIsAuthenticated.svelte.d.ts +6 -0
- package/.svelte-kit/__package__/auth/useIsAuthenticated.svelte.d.ts.map +1 -0
- package/.svelte-kit/__package__/auth/useIsAuthenticated.svelte.js +22 -0
- package/.svelte-kit/__package__/index.d.ts +6 -0
- package/.svelte-kit/__package__/index.d.ts.map +1 -0
- package/.svelte-kit/__package__/index.js +5 -0
- package/.svelte-kit/__package__/jazz.class.svelte.d.ts +21 -0
- package/.svelte-kit/__package__/jazz.class.svelte.d.ts.map +1 -0
- package/.svelte-kit/__package__/jazz.class.svelte.js +117 -0
- package/.svelte-kit/__package__/jazz.svelte.d.ts +39 -0
- package/.svelte-kit/__package__/jazz.svelte.d.ts.map +1 -0
- package/.svelte-kit/__package__/jazz.svelte.js +70 -0
- package/.svelte-kit/__package__/testing.d.ts +10 -0
- package/.svelte-kit/__package__/testing.d.ts.map +1 -0
- package/.svelte-kit/__package__/testing.js +23 -0
- package/.turbo/turbo-build.log +180 -11
- package/CHANGELOG.md +21 -0
- package/README.md +2 -2
- package/dist/browser/BrowserContextManager.d.ts +31 -0
- package/dist/browser/BrowserContextManager.d.ts.map +1 -0
- package/dist/browser/auth/LocalStorageKVStore.d.ts +9 -0
- package/dist/browser/auth/LocalStorageKVStore.d.ts.map +1 -0
- package/dist/browser/auth/PasskeyAuth.d.ts +27 -0
- package/dist/browser/auth/PasskeyAuth.d.ts.map +1 -0
- package/dist/browser/createBrowserContext.d.ts +47 -0
- package/dist/browser/createBrowserContext.d.ts.map +1 -0
- package/dist/browser/index.d.ts +23 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +469 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/storageOptions.d.ts +8 -0
- package/dist/browser/storageOptions.d.ts.map +1 -0
- package/dist/browser/tests/LocalStorageKVStore.test.d.ts +2 -0
- package/dist/browser/tests/LocalStorageKVStore.test.d.ts.map +1 -0
- package/dist/browser/tests/PasskeyAuth.test.d.ts +2 -0
- package/dist/browser/tests/PasskeyAuth.test.d.ts.map +1 -0
- package/dist/browser/tests/createInviteLink.test.d.ts +2 -0
- package/dist/browser/tests/createInviteLink.test.d.ts.map +1 -0
- package/dist/browser/tests/storageOptions.test.d.ts +2 -0
- package/dist/browser/tests/storageOptions.test.d.ts.map +1 -0
- package/dist/browser/tests/utils.d.ts +11 -0
- package/dist/browser/tests/utils.d.ts.map +1 -0
- package/dist/browser/utils/export-account-inspector.d.ts +6 -0
- package/dist/browser/utils/export-account-inspector.d.ts.map +1 -0
- package/dist/browser-media-images/index.d.ts +7 -0
- package/dist/browser-media-images/index.d.ts.map +1 -0
- package/dist/browser-media-images/index.js +70 -0
- package/dist/browser-media-images/index.js.map +1 -0
- package/dist/chunk-FSIM7N33.js +4827 -0
- package/dist/chunk-FSIM7N33.js.map +1 -0
- package/dist/expo/auth/clerk/index.d.ts +7 -0
- package/dist/expo/auth/clerk/index.d.ts.map +1 -0
- package/dist/expo/crypto.d.ts +2 -0
- package/dist/expo/crypto.d.ts.map +1 -0
- package/dist/expo/crypto.js +3 -0
- package/dist/expo/crypto.js.map +1 -0
- package/dist/expo/index.d.ts +6 -0
- package/dist/expo/index.d.ts.map +1 -0
- package/dist/expo/index.js +168 -0
- package/dist/expo/index.js.map +1 -0
- package/dist/expo/provider.d.ts +4 -0
- package/dist/expo/provider.d.ts.map +1 -0
- package/dist/expo/storage/expo-secure-store-adapter.d.ts +8 -0
- package/dist/expo/storage/expo-secure-store-adapter.d.ts.map +1 -0
- package/dist/expo/storage/expo-sqlite-adapter.d.ts +18 -0
- package/dist/expo/storage/expo-sqlite-adapter.d.ts.map +1 -0
- package/dist/expo/testing.d.ts +2 -0
- package/dist/expo/testing.d.ts.map +1 -0
- package/dist/expo/testing.js +3 -0
- package/dist/expo/testing.js.map +1 -0
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +172 -6
- package/dist/index.js.map +1 -1
- package/dist/inspector/custom-element-CWW72LEG.js +31971 -0
- package/dist/inspector/custom-element-CWW72LEG.js.map +1 -0
- package/dist/inspector/custom-element.d.ts +13 -0
- package/dist/inspector/custom-element.d.ts.map +1 -0
- package/dist/inspector/index.d.ts +12 -0
- package/dist/inspector/index.d.ts.map +1 -0
- package/dist/inspector/index.js +2027 -0
- package/dist/inspector/index.js.map +1 -0
- package/dist/inspector/register-custom-element.d.ts +2 -0
- package/dist/inspector/register-custom-element.d.ts.map +1 -0
- package/dist/inspector/register-custom-element.js +5 -0
- package/dist/inspector/register-custom-element.js.map +1 -0
- package/dist/inspector/ui/badge.d.ts +4 -0
- package/dist/inspector/ui/badge.d.ts.map +1 -0
- package/dist/inspector/ui/button.d.ts +9 -0
- package/dist/inspector/ui/button.d.ts.map +1 -0
- package/dist/inspector/ui/card.d.ts +10 -0
- package/dist/inspector/ui/card.d.ts.map +1 -0
- package/dist/inspector/ui/global-styles.d.ts +4 -0
- package/dist/inspector/ui/global-styles.d.ts.map +1 -0
- package/dist/inspector/ui/grid.d.ts +4 -0
- package/dist/inspector/ui/grid.d.ts.map +1 -0
- package/dist/inspector/ui/heading.d.ts +4 -0
- package/dist/inspector/ui/heading.d.ts.map +1 -0
- package/dist/inspector/ui/icon.d.ts +30 -0
- package/dist/inspector/ui/icon.d.ts.map +1 -0
- package/dist/inspector/ui/icons/chevron-down-icon.d.ts +2 -0
- package/dist/inspector/ui/icons/chevron-down-icon.d.ts.map +1 -0
- package/dist/inspector/ui/icons/delete-icon.d.ts +2 -0
- package/dist/inspector/ui/icons/delete-icon.d.ts.map +1 -0
- package/dist/inspector/ui/icons/link-icon.d.ts +2 -0
- package/dist/inspector/ui/icons/link-icon.d.ts.map +1 -0
- package/dist/inspector/ui/input.d.ts +11 -0
- package/dist/inspector/ui/input.d.ts.map +1 -0
- package/dist/inspector/ui/select.d.ts +5 -0
- package/dist/inspector/ui/select.d.ts.map +1 -0
- package/dist/inspector/ui/table.d.ts +8 -0
- package/dist/inspector/ui/table.d.ts.map +1 -0
- package/dist/inspector/ui/text.d.ts +10 -0
- package/dist/inspector/ui/text.d.ts.map +1 -0
- package/dist/inspector/viewer/account-or-group-text.d.ts +8 -0
- package/dist/inspector/viewer/account-or-group-text.d.ts.map +1 -0
- package/dist/inspector/viewer/account-view.d.ts +8 -0
- package/dist/inspector/viewer/account-view.d.ts.map +1 -0
- package/dist/inspector/viewer/breadcrumbs.d.ts +9 -0
- package/dist/inspector/viewer/breadcrumbs.d.ts.map +1 -0
- package/dist/inspector/viewer/co-stream-view.d.ts +18 -0
- package/dist/inspector/viewer/co-stream-view.d.ts.map +1 -0
- package/dist/inspector/viewer/grid-view.d.ts +9 -0
- package/dist/inspector/viewer/grid-view.d.ts.map +1 -0
- package/dist/inspector/viewer/group-view.d.ts +8 -0
- package/dist/inspector/viewer/group-view.d.ts.map +1 -0
- package/dist/inspector/viewer/inpsector-button.d.ts +6 -0
- package/dist/inspector/viewer/inpsector-button.d.ts.map +1 -0
- package/dist/inspector/viewer/new-app.d.ts +11 -0
- package/dist/inspector/viewer/new-app.d.ts.map +1 -0
- package/dist/inspector/viewer/page-stack.d.ts +15 -0
- package/dist/inspector/viewer/page-stack.d.ts.map +1 -0
- package/dist/inspector/viewer/page.d.ts +16 -0
- package/dist/inspector/viewer/page.d.ts.map +1 -0
- package/dist/inspector/viewer/raw-data-card.d.ts +5 -0
- package/dist/inspector/viewer/raw-data-card.d.ts.map +1 -0
- package/dist/inspector/viewer/role-display.d.ts +6 -0
- package/dist/inspector/viewer/role-display.d.ts.map +1 -0
- package/dist/inspector/viewer/table-viewer.d.ts +9 -0
- package/dist/inspector/viewer/table-viewer.d.ts.map +1 -0
- package/dist/inspector/viewer/type-icon.d.ts +11 -0
- package/dist/inspector/viewer/type-icon.d.ts.map +1 -0
- package/dist/inspector/viewer/types.d.ts +7 -0
- package/dist/inspector/viewer/types.d.ts.map +1 -0
- package/dist/inspector/viewer/use-page-path.d.ts +10 -0
- package/dist/inspector/viewer/use-page-path.d.ts.map +1 -0
- package/dist/inspector/viewer/use-resolve-covalue.d.ts +67 -0
- package/dist/inspector/viewer/use-resolve-covalue.d.ts.map +1 -0
- package/dist/inspector/viewer/value-renderer.d.ts +12 -0
- package/dist/inspector/viewer/value-renderer.d.ts.map +1 -0
- package/dist/prosemirror/index.d.ts +3 -0
- package/dist/prosemirror/index.d.ts.map +1 -0
- package/dist/prosemirror/index.js +2185 -0
- package/dist/prosemirror/index.js.map +1 -0
- package/dist/prosemirror/lib/converter.d.ts +33 -0
- package/dist/prosemirror/lib/converter.d.ts.map +1 -0
- package/dist/prosemirror/lib/plugin.d.ts +43 -0
- package/dist/prosemirror/lib/plugin.d.ts.map +1 -0
- package/dist/prosemirror/lib/sync.d.ts +35 -0
- package/dist/prosemirror/lib/sync.d.ts.map +1 -0
- package/dist/prosemirror/tests/plugin.test.d.ts +2 -0
- package/dist/prosemirror/tests/plugin.test.d.ts.map +1 -0
- package/dist/react/auth/Clerk.d.ts +7 -0
- package/dist/react/auth/Clerk.d.ts.map +1 -0
- package/dist/react/auth/DemoAuth.d.ts +5 -0
- package/dist/react/auth/DemoAuth.d.ts.map +1 -0
- package/dist/react/auth/PasskeyAuth.d.ts +24 -0
- package/dist/react/auth/PasskeyAuth.d.ts.map +1 -0
- package/dist/react/auth/PassphraseAuth.d.ts +6 -0
- package/dist/react/auth/PassphraseAuth.d.ts.map +1 -0
- package/dist/react/auth/auth.d.ts +6 -0
- package/dist/react/auth/auth.d.ts.map +1 -0
- package/dist/react/hooks.d.ts +9 -0
- package/dist/react/hooks.d.ts.map +1 -0
- package/dist/react/index.d.ts +8 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +700 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react/media.d.ts +24 -0
- package/dist/react/media.d.ts.map +1 -0
- package/dist/react/provider.d.ts +10 -0
- package/dist/react/provider.d.ts.map +1 -0
- package/dist/react/ssr.d.ts +4 -0
- package/dist/react/ssr.d.ts.map +1 -0
- package/dist/react/ssr.js +25 -0
- package/dist/react/ssr.js.map +1 -0
- package/dist/react/testing.d.ts +2 -0
- package/dist/react/testing.d.ts.map +1 -0
- package/dist/react/testing.js +5 -0
- package/dist/react/testing.js.map +1 -0
- package/dist/react/tests/testUtils.d.ts +14 -0
- package/dist/react/tests/testUtils.d.ts.map +1 -0
- package/dist/react/tests/useAcceptInvite.test.d.ts +2 -0
- package/dist/react/tests/useAcceptInvite.test.d.ts.map +1 -0
- package/dist/react-core/auth/DemoAuth.d.ts +17 -0
- package/dist/react-core/auth/DemoAuth.d.ts.map +1 -0
- package/dist/react-core/auth/PassphraseAuth.d.ts +21 -0
- package/dist/react-core/auth/PassphraseAuth.d.ts.map +1 -0
- package/dist/react-core/auth/index.d.ts +3 -0
- package/dist/react-core/auth/index.d.ts.map +1 -0
- package/dist/react-core/chunk-7DYMJ74I.js +12 -0
- package/dist/react-core/chunk-7DYMJ74I.js.map +1 -0
- package/dist/react-core/hooks.d.ts +17 -0
- package/dist/react-core/hooks.d.ts.map +1 -0
- package/dist/react-core/index.d.ts +4 -0
- package/dist/react-core/index.d.ts.map +1 -0
- package/dist/react-core/index.js +302 -0
- package/dist/react-core/index.js.map +1 -0
- package/dist/react-core/provider.d.ts +5 -0
- package/dist/react-core/provider.d.ts.map +1 -0
- package/dist/react-core/testing.d.ts +10 -0
- package/dist/react-core/testing.d.ts.map +1 -0
- package/dist/react-core/testing.js +43 -0
- package/dist/react-core/testing.js.map +1 -0
- package/dist/react-core/tests/fixtures.d.ts.map +1 -0
- package/dist/react-core/tests/testUtils.d.ts +15 -0
- package/dist/react-core/tests/testUtils.d.ts.map +1 -0
- package/dist/react-core/tests/useAccount.test.d.ts +2 -0
- package/dist/react-core/tests/useAccount.test.d.ts.map +1 -0
- package/dist/react-core/tests/useCoState.test.d.ts +2 -0
- package/dist/react-core/tests/useCoState.test.d.ts.map +1 -0
- package/dist/react-core/tests/useInboxSender.test.d.ts +2 -0
- package/dist/react-core/tests/useInboxSender.test.d.ts.map +1 -0
- package/dist/react-core/tests/useIsAuthenticated.test.d.ts +2 -0
- package/dist/react-core/tests/useIsAuthenticated.test.d.ts.map +1 -0
- package/dist/react-core/tests/usePassPhraseAuth.test.d.ts +2 -0
- package/dist/react-core/tests/usePassPhraseAuth.test.d.ts.map +1 -0
- package/dist/react-core/utils.d.ts +4 -0
- package/dist/react-core/utils.d.ts.map +1 -0
- package/dist/react-native/crypto.d.ts +2 -0
- package/dist/react-native/crypto.d.ts.map +1 -0
- package/dist/react-native/crypto.js +3 -0
- package/dist/react-native/crypto.js.map +1 -0
- package/dist/react-native/index.d.ts +5 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +103 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/provider.d.ts +4 -0
- package/dist/react-native/provider.d.ts.map +1 -0
- package/dist/react-native/storage/mmkv-store-adapter.d.ts +8 -0
- package/dist/react-native/storage/mmkv-store-adapter.d.ts.map +1 -0
- package/dist/react-native/storage/op-sqlite-adapter.d.ts +13 -0
- package/dist/react-native/storage/op-sqlite-adapter.d.ts.map +1 -0
- package/dist/react-native/testing.d.ts +2 -0
- package/dist/react-native/testing.d.ts.map +1 -0
- package/dist/react-native/testing.js +3 -0
- package/dist/react-native/testing.js.map +1 -0
- package/dist/react-native-core/ReactNativeContextManager.d.ts +31 -0
- package/dist/react-native-core/ReactNativeContextManager.d.ts.map +1 -0
- package/dist/react-native-core/auth/DemoAuthUI.d.ts +8 -0
- package/dist/react-native-core/auth/DemoAuthUI.d.ts.map +1 -0
- package/dist/react-native-core/auth/auth.d.ts +3 -0
- package/dist/react-native-core/auth/auth.d.ts.map +1 -0
- package/dist/react-native-core/crypto/RNQuickCrypto.d.ts +15 -0
- package/dist/react-native-core/crypto/RNQuickCrypto.d.ts.map +1 -0
- package/dist/react-native-core/crypto/index.d.ts +2 -0
- package/dist/react-native-core/crypto/index.d.ts.map +1 -0
- package/dist/react-native-core/crypto.js +65 -0
- package/dist/react-native-core/crypto.js.map +1 -0
- package/dist/react-native-core/hooks.d.ts +8 -0
- package/dist/react-native-core/hooks.d.ts.map +1 -0
- package/dist/react-native-core/index.d.ts +9 -0
- package/dist/react-native-core/index.d.ts.map +1 -0
- package/dist/react-native-core/index.js +669 -0
- package/dist/react-native-core/index.js.map +1 -0
- package/dist/react-native-core/media.d.ts +24 -0
- package/dist/react-native-core/media.d.ts.map +1 -0
- package/dist/react-native-core/platform.d.ts +45 -0
- package/dist/react-native-core/platform.d.ts.map +1 -0
- package/dist/react-native-core/provider.d.ts +10 -0
- package/dist/react-native-core/provider.d.ts.map +1 -0
- package/dist/react-native-core/storage/kv-store-context.d.ts +17 -0
- package/dist/react-native-core/storage/kv-store-context.d.ts.map +1 -0
- package/dist/react-native-core/storage/sqlite-react-native.d.ts +9 -0
- package/dist/react-native-core/storage/sqlite-react-native.d.ts.map +1 -0
- package/dist/react-native-core/testing.js +3 -0
- package/dist/react-native-core/testing.js.map +1 -0
- package/dist/react-native-media-images/index.d.ts +7 -0
- package/dist/react-native-media-images/index.d.ts.map +1 -0
- package/dist/react-native-media-images/index.js +177 -0
- package/dist/react-native-media-images/index.js.map +1 -0
- package/dist/svelte/Provider.svelte +61 -0
- package/dist/svelte/Provider.svelte.d.ts +19 -0
- package/dist/svelte/Provider.svelte.d.ts.map +1 -0
- package/dist/svelte/auth/PasskeyAuth.svelte.d.ts +11 -0
- package/dist/svelte/auth/PasskeyAuth.svelte.d.ts.map +1 -0
- package/dist/svelte/auth/PasskeyAuth.svelte.js +20 -0
- package/dist/svelte/auth/PasskeyAuthBasicUI.svelte +81 -0
- package/dist/svelte/auth/PasskeyAuthBasicUI.svelte.d.ts +9 -0
- package/dist/svelte/auth/PasskeyAuthBasicUI.svelte.d.ts.map +1 -0
- package/dist/svelte/auth/PassphraseAuth.svelte.d.ts +12 -0
- package/dist/svelte/auth/PassphraseAuth.svelte.d.ts.map +1 -0
- package/dist/svelte/auth/PassphraseAuth.svelte.js +30 -0
- package/dist/svelte/auth/index.d.ts +4 -0
- package/dist/svelte/auth/index.d.ts.map +1 -0
- package/dist/svelte/auth/index.js +3 -0
- package/dist/svelte/auth/useIsAuthenticated.svelte.d.ts +6 -0
- package/dist/svelte/auth/useIsAuthenticated.svelte.d.ts.map +1 -0
- package/dist/svelte/auth/useIsAuthenticated.svelte.js +22 -0
- package/dist/svelte/index.d.ts +6 -0
- package/dist/svelte/index.d.ts.map +1 -0
- package/dist/svelte/index.js +5 -0
- package/dist/svelte/jazz.class.svelte.d.ts +21 -0
- package/dist/svelte/jazz.class.svelte.d.ts.map +1 -0
- package/dist/svelte/jazz.class.svelte.js +117 -0
- package/dist/svelte/jazz.svelte.d.ts +39 -0
- package/dist/svelte/jazz.svelte.d.ts.map +1 -0
- package/dist/svelte/jazz.svelte.js +70 -0
- package/dist/svelte/testing.d.ts +10 -0
- package/dist/svelte/testing.d.ts.map +1 -0
- package/dist/svelte/testing.js +23 -0
- package/dist/testing.d.ts +1 -42
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js +2 -2
- package/dist/testing.js.map +1 -1
- package/dist/tiptap/index.d.ts +11 -0
- package/dist/tiptap/index.d.ts.map +1 -0
- package/dist/tiptap/index.js +22 -0
- package/dist/tiptap/index.js.map +1 -0
- package/dist/tools/auth/AuthSecretStorage.d.ts.map +1 -0
- package/dist/tools/auth/DemoAuth.d.ts.map +1 -0
- package/dist/tools/auth/InMemoryKVStore.d.ts.map +1 -0
- package/dist/tools/auth/KvStoreContext.d.ts.map +1 -0
- package/dist/tools/auth/PassphraseAuth.d.ts.map +1 -0
- package/dist/tools/auth/clerk/getClerkUsername.d.ts +3 -0
- package/dist/tools/auth/clerk/getClerkUsername.d.ts.map +1 -0
- package/dist/tools/auth/clerk/index.d.ts +25 -0
- package/dist/tools/auth/clerk/index.d.ts.map +1 -0
- package/dist/tools/auth/clerk/tests/JazzClerkAuth.test.d.ts +2 -0
- package/dist/tools/auth/clerk/tests/JazzClerkAuth.test.d.ts.map +1 -0
- package/dist/tools/auth/clerk/tests/getClerkUsername.test.d.ts +2 -0
- package/dist/tools/auth/clerk/tests/getClerkUsername.test.d.ts.map +1 -0
- package/dist/tools/auth/clerk/tests/types.test.d.ts +2 -0
- package/dist/tools/auth/clerk/tests/types.test.d.ts.map +1 -0
- package/dist/tools/auth/clerk/types.d.ts +32 -0
- package/dist/tools/auth/clerk/types.d.ts.map +1 -0
- package/dist/tools/coValues/CoValueBase.d.ts.map +1 -0
- package/dist/tools/coValues/account.d.ts.map +1 -0
- package/dist/tools/coValues/coFeed.d.ts +368 -0
- package/dist/tools/coValues/coFeed.d.ts.map +1 -0
- package/dist/tools/coValues/coList.d.ts.map +1 -0
- package/dist/tools/coValues/coMap.d.ts.map +1 -0
- package/dist/tools/coValues/coPlainText.d.ts.map +1 -0
- package/dist/tools/coValues/coRichText.d.ts.map +1 -0
- package/dist/tools/coValues/deepLoading.d.ts.map +1 -0
- package/dist/tools/coValues/extensions/imageDef.d.ts.map +1 -0
- package/dist/tools/coValues/group.d.ts.map +1 -0
- package/dist/tools/coValues/inbox.d.ts.map +1 -0
- package/dist/tools/coValues/interfaces.d.ts.map +1 -0
- package/dist/tools/coValues/profile.d.ts.map +1 -0
- package/dist/tools/coValues/registeredSchemas.d.ts.map +1 -0
- package/dist/tools/coValues/schemaUnion.d.ts.map +1 -0
- package/dist/tools/exports.d.ts +24 -0
- package/dist/tools/exports.d.ts.map +1 -0
- package/dist/tools/implementation/ContextManager.d.ts.map +1 -0
- package/dist/tools/implementation/activeAccountContext.d.ts.map +1 -0
- package/dist/tools/implementation/anonymousJazzAgent.d.ts.map +1 -0
- package/dist/tools/implementation/createContext.d.ts.map +1 -0
- package/dist/tools/implementation/devtoolsFormatters.d.ts.map +1 -0
- package/dist/tools/implementation/errors.d.ts.map +1 -0
- package/dist/tools/implementation/inspect.d.ts.map +1 -0
- package/dist/tools/implementation/invites.d.ts.map +1 -0
- package/dist/tools/implementation/refs.d.ts.map +1 -0
- package/dist/tools/implementation/schema.d.ts.map +1 -0
- package/dist/tools/implementation/symbols.d.ts.map +1 -0
- package/dist/tools/implementation/zodSchema/coExport.d.ts.map +1 -0
- package/dist/tools/implementation/zodSchema/runtimeConverters/zodFieldToCoFieldDef.d.ts.map +1 -0
- package/dist/tools/implementation/zodSchema/runtimeConverters/zodSchemaToCoSchema.d.ts.map +1 -0
- package/dist/tools/implementation/zodSchema/schemaTypes/AccountSchema.d.ts.map +1 -0
- package/dist/tools/implementation/zodSchema/schemaTypes/CoFeedSchema.d.ts.map +1 -0
- package/dist/tools/implementation/zodSchema/schemaTypes/CoListSchema.d.ts.map +1 -0
- package/dist/tools/implementation/zodSchema/schemaTypes/CoMapSchema.d.ts.map +1 -0
- package/dist/tools/implementation/zodSchema/schemaTypes/CoRecordSchema.d.ts.map +1 -0
- package/dist/tools/implementation/zodSchema/schemaTypes/FileStreamSchema.d.ts.map +1 -0
- package/dist/tools/implementation/zodSchema/schemaTypes/PlainTextSchema.d.ts.map +1 -0
- package/dist/tools/implementation/zodSchema/schemaTypes/RichTextSchema.d.ts.map +1 -0
- package/dist/tools/implementation/zodSchema/typeConverters/InstanceOfSchema.d.ts.map +1 -0
- package/dist/tools/implementation/zodSchema/typeConverters/InstanceOfSchemaCoValuesNullable.d.ts.map +1 -0
- package/dist/tools/implementation/zodSchema/typeConverters/InstanceOrPrimitiveOfSchema.d.ts.map +1 -0
- package/dist/tools/implementation/zodSchema/typeConverters/InstanceOrPrimitiveOfSchemaCoValuesNullable.d.ts.map +1 -0
- package/dist/tools/implementation/zodSchema/unionUtils.d.ts.map +1 -0
- package/dist/tools/implementation/zodSchema/zodCo.d.ts.map +1 -0
- package/dist/tools/implementation/zodSchema/zodReExport.d.ts.map +1 -0
- package/dist/tools/implementation/zodSchema/zodSchema.d.ts.map +1 -0
- package/dist/tools/index.d.ts +3 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/internal.d.ts.map +1 -0
- package/dist/tools/lib/cache.d.ts.map +1 -0
- package/dist/tools/lib/cache.test.d.ts.map +1 -0
- package/dist/tools/lib/migration.d.ts.map +1 -0
- package/dist/tools/subscribe/CoValueCoreSubscription.d.ts.map +1 -0
- package/dist/tools/subscribe/JazzError.d.ts.map +1 -0
- package/dist/tools/subscribe/SubscriptionScope.d.ts.map +1 -0
- package/dist/tools/subscribe/index.d.ts.map +1 -0
- package/dist/tools/subscribe/types.d.ts.map +1 -0
- package/dist/tools/subscribe/utils.d.ts.map +1 -0
- package/dist/tools/testing.d.ts +43 -0
- package/dist/tools/testing.d.ts.map +1 -0
- package/dist/tools/tests/AuthSecretStorage.test.d.ts.map +1 -0
- package/dist/tools/tests/ContextManager.test.d.ts.map +1 -0
- package/dist/tools/tests/DemoAuth.test.d.ts.map +1 -0
- package/dist/tools/tests/PassphraseAuth.test.d.ts.map +1 -0
- package/dist/tools/tests/account.test.d.ts.map +1 -0
- package/dist/tools/tests/coFeed.test-d.d.ts.map +1 -0
- package/dist/tools/tests/coFeed.test.d.ts.map +1 -0
- package/dist/tools/tests/coList.test-d.d.ts.map +1 -0
- package/dist/tools/tests/coList.test.d.ts.map +1 -0
- package/dist/tools/tests/coMap.record.test-d.d.ts.map +1 -0
- package/dist/tools/tests/coMap.record.test.d.ts.map +1 -0
- package/dist/tools/tests/coMap.test-d.d.ts.map +1 -0
- package/dist/tools/tests/coMap.test.d.ts.map +1 -0
- package/dist/tools/tests/coPlainText.test.d.ts.map +1 -0
- package/dist/tools/tests/createContext.test.d.ts.map +1 -0
- package/dist/tools/tests/deepLoading.test.d.ts.map +1 -0
- package/dist/tools/tests/fixtures.d.ts +2 -0
- package/dist/tools/tests/fixtures.d.ts.map +1 -0
- package/dist/tools/tests/groupsAndAccounts.test.d.ts.map +1 -0
- package/dist/tools/tests/imageDef.test.d.ts.map +1 -0
- package/dist/tools/tests/inbox.test.d.ts.map +1 -0
- package/dist/tools/tests/interfaces.test.d.ts.map +1 -0
- package/dist/tools/tests/invites.test.d.ts.map +1 -0
- package/dist/tools/tests/load.test.d.ts.map +1 -0
- package/dist/tools/tests/patterns/notifications.test.d.ts.map +1 -0
- package/dist/tools/tests/patterns/requestToJoin.test.d.ts.map +1 -0
- package/dist/tools/tests/schema.test.d.ts.map +1 -0
- package/dist/tools/tests/schemaUnion.test.d.ts.map +1 -0
- package/dist/tools/tests/subscribe.test.d.ts.map +1 -0
- package/dist/tools/tests/testing.test.d.ts.map +1 -0
- package/dist/tools/tests/utils.d.ts.map +1 -0
- package/dist/tools/tests/zod.test.d.ts.map +1 -0
- package/dist/tools/types.d.ts.map +1 -0
- package/dist/worker/index.d.ts +25 -0
- package/dist/worker/index.d.ts.map +1 -0
- package/dist/worker/index.js +93 -0
- package/dist/worker/index.js.map +1 -0
- package/package.json +193 -11
- package/src/browser/BrowserContextManager.ts +85 -0
- package/src/browser/auth/LocalStorageKVStore.ts +21 -0
- package/src/browser/auth/PasskeyAuth.ts +175 -0
- package/src/browser/createBrowserContext.ts +326 -0
- package/src/browser/index.ts +72 -0
- package/src/browser/storageOptions.ts +17 -0
- package/src/browser/tests/LocalStorageKVStore.test.ts +67 -0
- package/src/browser/tests/PasskeyAuth.test.ts +242 -0
- package/src/browser/tests/createInviteLink.test.ts +18 -0
- package/src/browser/tests/storageOptions.test.ts +33 -0
- package/src/browser/tests/utils.ts +93 -0
- package/src/browser/utils/export-account-inspector.ts +58 -0
- package/src/browser-media-images/index.ts +130 -0
- package/src/expo/auth/clerk/README.md +44 -0
- package/src/expo/auth/clerk/index.tsx +80 -0
- package/src/expo/crypto.ts +1 -0
- package/src/expo/index.ts +6 -0
- package/src/expo/provider.tsx +29 -0
- package/src/expo/storage/expo-secure-store-adapter.ts +29 -0
- package/src/expo/storage/expo-sqlite-adapter.ts +94 -0
- package/src/expo/testing.ts +1 -0
- package/src/index.ts +1 -3
- package/src/inspector/custom-element.tsx +63 -0
- package/src/inspector/index.ts +23 -0
- package/src/inspector/register-custom-element.ts +3 -0
- package/src/inspector/ui/badge.tsx +20 -0
- package/src/inspector/ui/button.tsx +81 -0
- package/src/inspector/ui/card.tsx +23 -0
- package/src/inspector/ui/global-styles.tsx +74 -0
- package/src/inspector/ui/grid.tsx +48 -0
- package/src/inspector/ui/heading.tsx +15 -0
- package/src/inspector/ui/icon.tsx +71 -0
- package/src/inspector/ui/icons/chevron-down-icon.tsx +16 -0
- package/src/inspector/ui/icons/delete-icon.tsx +19 -0
- package/src/inspector/ui/icons/link-icon.tsx +18 -0
- package/src/inspector/ui/input.tsx +51 -0
- package/src/inspector/ui/select.tsx +73 -0
- package/src/inspector/ui/table.tsx +90 -0
- package/src/inspector/ui/text.tsx +62 -0
- package/src/inspector/viewer/account-or-group-text.tsx +52 -0
- package/src/inspector/viewer/account-view.tsx +34 -0
- package/src/inspector/viewer/breadcrumbs.tsx +52 -0
- package/src/inspector/viewer/co-stream-view.tsx +374 -0
- package/src/inspector/viewer/grid-view.tsx +90 -0
- package/src/inspector/viewer/group-view.tsx +67 -0
- package/src/inspector/viewer/inpsector-button.tsx +89 -0
- package/src/inspector/viewer/new-app.tsx +171 -0
- package/src/inspector/viewer/page-stack.tsx +56 -0
- package/src/inspector/viewer/page.tsx +199 -0
- package/src/inspector/viewer/raw-data-card.tsx +53 -0
- package/src/inspector/viewer/role-display.tsx +28 -0
- package/src/inspector/viewer/table-viewer.tsx +184 -0
- package/src/inspector/viewer/type-icon.tsx +63 -0
- package/src/inspector/viewer/types.ts +11 -0
- package/src/inspector/viewer/use-page-path.ts +52 -0
- package/src/inspector/viewer/use-resolve-covalue.ts +214 -0
- package/src/inspector/viewer/value-renderer.tsx +266 -0
- package/src/prosemirror/index.ts +2 -0
- package/src/prosemirror/lib/converter.ts +50 -0
- package/src/prosemirror/lib/plugin.ts +120 -0
- package/src/prosemirror/lib/sync.ts +96 -0
- package/src/prosemirror/tests/plugin.test.ts +127 -0
- package/src/react/auth/Clerk.tsx +82 -0
- package/src/react/auth/DemoAuth.tsx +121 -0
- package/src/react/auth/PasskeyAuth.tsx +168 -0
- package/src/react/auth/PassphraseAuth.tsx +196 -0
- package/src/react/auth/auth.ts +9 -0
- package/src/react/hooks.tsx +53 -0
- package/src/react/index.ts +16 -0
- package/src/react/media.tsx +74 -0
- package/src/react/provider.tsx +114 -0
- package/src/react/scratch.tsx +50 -0
- package/src/react/ssr.ts +25 -0
- package/src/react/testing.tsx +1 -0
- package/src/react/tests/testUtils.tsx +54 -0
- package/src/react/tests/useAcceptInvite.test.ts +55 -0
- package/src/react-core/auth/DemoAuth.tsx +47 -0
- package/src/react-core/auth/PassphraseAuth.tsx +58 -0
- package/src/react-core/auth/index.ts +2 -0
- package/src/react-core/hooks.ts +310 -0
- package/src/react-core/index.ts +3 -0
- package/src/react-core/provider.tsx +11 -0
- package/src/react-core/testing.tsx +42 -0
- package/src/react-core/tests/testUtils.tsx +65 -0
- package/src/react-core/tests/useAccount.test.ts +238 -0
- package/src/react-core/tests/useCoState.test.ts +553 -0
- package/src/react-core/tests/useDemoAuth.test.tsx +84 -0
- package/src/react-core/tests/useInboxSender.test.ts +58 -0
- package/src/react-core/tests/useIsAuthenticated.test.ts +34 -0
- package/src/react-core/tests/usePassPhraseAuth.test.ts +180 -0
- package/src/react-core/utils.ts +28 -0
- package/src/react-native/crypto.ts +1 -0
- package/src/react-native/index.ts +5 -0
- package/src/react-native/provider.tsx +30 -0
- package/src/react-native/storage/mmkv-store-adapter.ts +24 -0
- package/src/react-native/storage/op-sqlite-adapter.ts +79 -0
- package/src/react-native/testing.ts +1 -0
- package/src/react-native-core/ReactNativeContextManager.ts +84 -0
- package/src/react-native-core/auth/DemoAuthUI.tsx +202 -0
- package/src/react-native-core/auth/auth.ts +14 -0
- package/src/react-native-core/crypto/RNQuickCrypto.ts +92 -0
- package/src/react-native-core/crypto/index.ts +1 -0
- package/src/react-native-core/hooks.tsx +64 -0
- package/src/react-native-core/index.ts +9 -0
- package/src/react-native-core/media.tsx +99 -0
- package/src/react-native-core/platform.ts +250 -0
- package/src/react-native-core/provider.tsx +115 -0
- package/src/react-native-core/storage/sqlite-react-native.ts +19 -0
- package/src/react-native-core/testing.tsx +1 -0
- package/src/react-native-media-images/index.ts +238 -0
- package/src/svelte/Provider.svelte +61 -0
- package/src/svelte/auth/PasskeyAuth.svelte.ts +42 -0
- package/src/svelte/auth/PasskeyAuthBasicUI.svelte +81 -0
- package/src/svelte/auth/PassphraseAuth.svelte.ts +49 -0
- package/src/svelte/auth/index.ts +3 -0
- package/src/svelte/auth/useIsAuthenticated.svelte.ts +28 -0
- package/src/svelte/index.ts +5 -0
- package/src/svelte/jazz.class.svelte.ts +172 -0
- package/src/svelte/jazz.svelte.ts +109 -0
- package/src/svelte/testing.ts +42 -0
- package/src/testing.ts +1 -312
- package/src/tiptap/index.ts +28 -0
- package/src/tools/auth/KvStoreContext.ts +39 -0
- package/src/tools/auth/clerk/getClerkUsername.ts +36 -0
- package/src/tools/auth/clerk/index.ts +174 -0
- package/src/tools/auth/clerk/tests/JazzClerkAuth.test.ts +284 -0
- package/src/tools/auth/clerk/tests/getClerkUsername.test.ts +81 -0
- package/src/tools/auth/clerk/tests/types.test.ts +49 -0
- package/src/tools/auth/clerk/types.ts +56 -0
- package/src/tools/coValues/coFeed.ts +943 -0
- package/src/tools/exports.ts +117 -0
- package/src/tools/index.ts +8 -0
- package/src/tools/testing.ts +301 -0
- package/src/tools/tests/coFeed.test.ts +771 -0
- package/src/tools/tests/fixtures.ts +2050 -0
- package/src/worker/index.ts +127 -0
- package/tsconfig.json +10 -3
- package/tsconfig.svelte.json +6 -0
- package/tsup.config.ts +143 -9
- package/dist/auth/AuthSecretStorage.d.ts.map +0 -1
- package/dist/auth/DemoAuth.d.ts.map +0 -1
- package/dist/auth/InMemoryKVStore.d.ts.map +0 -1
- package/dist/auth/KvStoreContext.d.ts.map +0 -1
- package/dist/auth/PassphraseAuth.d.ts.map +0 -1
- package/dist/chunk-G3QC4FAY.js +0 -4826
- package/dist/chunk-G3QC4FAY.js.map +0 -1
- package/dist/coValues/CoValueBase.d.ts.map +0 -1
- package/dist/coValues/account.d.ts.map +0 -1
- package/dist/coValues/coFeed.d.ts +0 -367
- package/dist/coValues/coFeed.d.ts.map +0 -1
- package/dist/coValues/coList.d.ts.map +0 -1
- package/dist/coValues/coMap.d.ts.map +0 -1
- package/dist/coValues/coPlainText.d.ts.map +0 -1
- package/dist/coValues/coRichText.d.ts.map +0 -1
- package/dist/coValues/deepLoading.d.ts.map +0 -1
- package/dist/coValues/extensions/imageDef.d.ts.map +0 -1
- package/dist/coValues/group.d.ts.map +0 -1
- package/dist/coValues/inbox.d.ts.map +0 -1
- package/dist/coValues/interfaces.d.ts.map +0 -1
- package/dist/coValues/profile.d.ts.map +0 -1
- package/dist/coValues/registeredSchemas.d.ts.map +0 -1
- package/dist/coValues/schemaUnion.d.ts.map +0 -1
- package/dist/exports.d.ts +0 -23
- package/dist/exports.d.ts.map +0 -1
- package/dist/implementation/ContextManager.d.ts.map +0 -1
- package/dist/implementation/activeAccountContext.d.ts.map +0 -1
- package/dist/implementation/anonymousJazzAgent.d.ts.map +0 -1
- package/dist/implementation/createContext.d.ts.map +0 -1
- package/dist/implementation/devtoolsFormatters.d.ts.map +0 -1
- package/dist/implementation/errors.d.ts.map +0 -1
- package/dist/implementation/inspect.d.ts.map +0 -1
- package/dist/implementation/invites.d.ts.map +0 -1
- package/dist/implementation/refs.d.ts.map +0 -1
- package/dist/implementation/schema.d.ts.map +0 -1
- package/dist/implementation/symbols.d.ts.map +0 -1
- package/dist/implementation/zodSchema/coExport.d.ts.map +0 -1
- package/dist/implementation/zodSchema/runtimeConverters/zodFieldToCoFieldDef.d.ts.map +0 -1
- package/dist/implementation/zodSchema/runtimeConverters/zodSchemaToCoSchema.d.ts.map +0 -1
- package/dist/implementation/zodSchema/schemaTypes/AccountSchema.d.ts.map +0 -1
- package/dist/implementation/zodSchema/schemaTypes/CoFeedSchema.d.ts.map +0 -1
- package/dist/implementation/zodSchema/schemaTypes/CoListSchema.d.ts.map +0 -1
- package/dist/implementation/zodSchema/schemaTypes/CoMapSchema.d.ts.map +0 -1
- package/dist/implementation/zodSchema/schemaTypes/CoRecordSchema.d.ts.map +0 -1
- package/dist/implementation/zodSchema/schemaTypes/FileStreamSchema.d.ts.map +0 -1
- package/dist/implementation/zodSchema/schemaTypes/PlainTextSchema.d.ts.map +0 -1
- package/dist/implementation/zodSchema/schemaTypes/RichTextSchema.d.ts.map +0 -1
- package/dist/implementation/zodSchema/typeConverters/InstanceOfSchema.d.ts.map +0 -1
- package/dist/implementation/zodSchema/typeConverters/InstanceOfSchemaCoValuesNullable.d.ts.map +0 -1
- package/dist/implementation/zodSchema/typeConverters/InstanceOrPrimitiveOfSchema.d.ts.map +0 -1
- package/dist/implementation/zodSchema/typeConverters/InstanceOrPrimitiveOfSchemaCoValuesNullable.d.ts.map +0 -1
- package/dist/implementation/zodSchema/unionUtils.d.ts.map +0 -1
- package/dist/implementation/zodSchema/zodCo.d.ts.map +0 -1
- package/dist/implementation/zodSchema/zodReExport.d.ts.map +0 -1
- package/dist/implementation/zodSchema/zodSchema.d.ts.map +0 -1
- package/dist/internal.d.ts.map +0 -1
- package/dist/lib/cache.d.ts.map +0 -1
- package/dist/lib/cache.test.d.ts.map +0 -1
- package/dist/lib/migration.d.ts.map +0 -1
- package/dist/subscribe/CoValueCoreSubscription.d.ts.map +0 -1
- package/dist/subscribe/JazzError.d.ts.map +0 -1
- package/dist/subscribe/SubscriptionScope.d.ts.map +0 -1
- package/dist/subscribe/index.d.ts.map +0 -1
- package/dist/subscribe/types.d.ts.map +0 -1
- package/dist/subscribe/utils.d.ts.map +0 -1
- package/dist/tests/AuthSecretStorage.test.d.ts.map +0 -1
- package/dist/tests/ContextManager.test.d.ts.map +0 -1
- package/dist/tests/DemoAuth.test.d.ts.map +0 -1
- package/dist/tests/PassphraseAuth.test.d.ts.map +0 -1
- package/dist/tests/account.test.d.ts.map +0 -1
- package/dist/tests/coFeed.test-d.d.ts.map +0 -1
- package/dist/tests/coFeed.test.d.ts.map +0 -1
- package/dist/tests/coList.test-d.d.ts.map +0 -1
- package/dist/tests/coList.test.d.ts.map +0 -1
- package/dist/tests/coMap.record.test-d.d.ts.map +0 -1
- package/dist/tests/coMap.record.test.d.ts.map +0 -1
- package/dist/tests/coMap.test-d.d.ts.map +0 -1
- package/dist/tests/coMap.test.d.ts.map +0 -1
- package/dist/tests/coPlainText.test.d.ts.map +0 -1
- package/dist/tests/createContext.test.d.ts.map +0 -1
- package/dist/tests/deepLoading.test.d.ts.map +0 -1
- package/dist/tests/fixtures.d.ts.map +0 -1
- package/dist/tests/groupsAndAccounts.test.d.ts.map +0 -1
- package/dist/tests/imageDef.test.d.ts.map +0 -1
- package/dist/tests/inbox.test.d.ts.map +0 -1
- package/dist/tests/interfaces.test.d.ts.map +0 -1
- package/dist/tests/invites.test.d.ts.map +0 -1
- package/dist/tests/load.test.d.ts.map +0 -1
- package/dist/tests/patterns/notifications.test.d.ts.map +0 -1
- package/dist/tests/patterns/requestToJoin.test.d.ts.map +0 -1
- package/dist/tests/schema.test.d.ts.map +0 -1
- package/dist/tests/schemaUnion.test.d.ts.map +0 -1
- package/dist/tests/subscribe.test.d.ts.map +0 -1
- package/dist/tests/testing.test.d.ts.map +0 -1
- package/dist/tests/utils.d.ts.map +0 -1
- package/dist/tests/zod.test.d.ts.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/src/coValues/coFeed.ts +0 -938
- package/src/exports.ts +0 -108
- package/src/tests/coFeed.test.ts +0 -722
- /package/dist/{tests → react-core/tests}/fixtures.d.ts +0 -0
- /package/dist/{auth → tools/auth}/AuthSecretStorage.d.ts +0 -0
- /package/dist/{auth → tools/auth}/DemoAuth.d.ts +0 -0
- /package/dist/{auth → tools/auth}/InMemoryKVStore.d.ts +0 -0
- /package/dist/{auth → tools/auth}/KvStoreContext.d.ts +0 -0
- /package/dist/{auth → tools/auth}/PassphraseAuth.d.ts +0 -0
- /package/dist/{coValues → tools/coValues}/CoValueBase.d.ts +0 -0
- /package/dist/{coValues → tools/coValues}/account.d.ts +0 -0
- /package/dist/{coValues → tools/coValues}/coList.d.ts +0 -0
- /package/dist/{coValues → tools/coValues}/coMap.d.ts +0 -0
- /package/dist/{coValues → tools/coValues}/coPlainText.d.ts +0 -0
- /package/dist/{coValues → tools/coValues}/coRichText.d.ts +0 -0
- /package/dist/{coValues → tools/coValues}/deepLoading.d.ts +0 -0
- /package/dist/{coValues → tools/coValues}/extensions/imageDef.d.ts +0 -0
- /package/dist/{coValues → tools/coValues}/group.d.ts +0 -0
- /package/dist/{coValues → tools/coValues}/inbox.d.ts +0 -0
- /package/dist/{coValues → tools/coValues}/interfaces.d.ts +0 -0
- /package/dist/{coValues → tools/coValues}/profile.d.ts +0 -0
- /package/dist/{coValues → tools/coValues}/registeredSchemas.d.ts +0 -0
- /package/dist/{coValues → tools/coValues}/schemaUnion.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/ContextManager.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/activeAccountContext.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/anonymousJazzAgent.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/createContext.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/devtoolsFormatters.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/errors.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/inspect.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/invites.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/refs.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/schema.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/symbols.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/zodSchema/coExport.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/zodSchema/runtimeConverters/zodFieldToCoFieldDef.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/zodSchema/runtimeConverters/zodSchemaToCoSchema.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/zodSchema/schemaTypes/AccountSchema.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/zodSchema/schemaTypes/CoFeedSchema.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/zodSchema/schemaTypes/CoListSchema.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/zodSchema/schemaTypes/CoMapSchema.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/zodSchema/schemaTypes/CoRecordSchema.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/zodSchema/schemaTypes/FileStreamSchema.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/zodSchema/schemaTypes/PlainTextSchema.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/zodSchema/schemaTypes/RichTextSchema.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/zodSchema/typeConverters/InstanceOfSchema.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/zodSchema/typeConverters/InstanceOfSchemaCoValuesNullable.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/zodSchema/typeConverters/InstanceOrPrimitiveOfSchema.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/zodSchema/typeConverters/InstanceOrPrimitiveOfSchemaCoValuesNullable.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/zodSchema/unionUtils.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/zodSchema/zodCo.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/zodSchema/zodReExport.d.ts +0 -0
- /package/dist/{implementation → tools/implementation}/zodSchema/zodSchema.d.ts +0 -0
- /package/dist/{internal.d.ts → tools/internal.d.ts} +0 -0
- /package/dist/{lib → tools/lib}/cache.d.ts +0 -0
- /package/dist/{lib → tools/lib}/cache.test.d.ts +0 -0
- /package/dist/{lib → tools/lib}/migration.d.ts +0 -0
- /package/dist/{subscribe → tools/subscribe}/CoValueCoreSubscription.d.ts +0 -0
- /package/dist/{subscribe → tools/subscribe}/JazzError.d.ts +0 -0
- /package/dist/{subscribe → tools/subscribe}/SubscriptionScope.d.ts +0 -0
- /package/dist/{subscribe → tools/subscribe}/index.d.ts +0 -0
- /package/dist/{subscribe → tools/subscribe}/types.d.ts +0 -0
- /package/dist/{subscribe → tools/subscribe}/utils.d.ts +0 -0
- /package/dist/{tests → tools/tests}/AuthSecretStorage.test.d.ts +0 -0
- /package/dist/{tests → tools/tests}/ContextManager.test.d.ts +0 -0
- /package/dist/{tests → tools/tests}/DemoAuth.test.d.ts +0 -0
- /package/dist/{tests → tools/tests}/PassphraseAuth.test.d.ts +0 -0
- /package/dist/{tests → tools/tests}/account.test.d.ts +0 -0
- /package/dist/{tests → tools/tests}/coFeed.test-d.d.ts +0 -0
- /package/dist/{tests → tools/tests}/coFeed.test.d.ts +0 -0
- /package/dist/{tests → tools/tests}/coList.test-d.d.ts +0 -0
- /package/dist/{tests → tools/tests}/coList.test.d.ts +0 -0
- /package/dist/{tests → tools/tests}/coMap.record.test-d.d.ts +0 -0
- /package/dist/{tests → tools/tests}/coMap.record.test.d.ts +0 -0
- /package/dist/{tests → tools/tests}/coMap.test-d.d.ts +0 -0
- /package/dist/{tests → tools/tests}/coMap.test.d.ts +0 -0
- /package/dist/{tests → tools/tests}/coPlainText.test.d.ts +0 -0
- /package/dist/{tests → tools/tests}/createContext.test.d.ts +0 -0
- /package/dist/{tests → tools/tests}/deepLoading.test.d.ts +0 -0
- /package/dist/{tests → tools/tests}/groupsAndAccounts.test.d.ts +0 -0
- /package/dist/{tests → tools/tests}/imageDef.test.d.ts +0 -0
- /package/dist/{tests → tools/tests}/inbox.test.d.ts +0 -0
- /package/dist/{tests → tools/tests}/interfaces.test.d.ts +0 -0
- /package/dist/{tests → tools/tests}/invites.test.d.ts +0 -0
- /package/dist/{tests → tools/tests}/load.test.d.ts +0 -0
- /package/dist/{tests → tools/tests}/patterns/notifications.test.d.ts +0 -0
- /package/dist/{tests → tools/tests}/patterns/requestToJoin.test.d.ts +0 -0
- /package/dist/{tests → tools/tests}/schema.test.d.ts +0 -0
- /package/dist/{tests → tools/tests}/schemaUnion.test.d.ts +0 -0
- /package/dist/{tests → tools/tests}/subscribe.test.d.ts +0 -0
- /package/dist/{tests → tools/tests}/testing.test.d.ts +0 -0
- /package/dist/{tests → tools/tests}/utils.d.ts +0 -0
- /package/dist/{tests → tools/tests}/zod.test.d.ts +0 -0
- /package/dist/{types.d.ts → tools/types.d.ts} +0 -0
- /package/src/{tests → react-core/tests}/fixtures.ts +0 -0
- /package/src/{auth/KvStoreContext.ts → react-native-core/storage/kv-store-context.ts} +0 -0
- /package/src/{auth → tools/auth}/AuthSecretStorage.ts +0 -0
- /package/src/{auth → tools/auth}/DemoAuth.ts +0 -0
- /package/src/{auth → tools/auth}/InMemoryKVStore.ts +0 -0
- /package/src/{auth → tools/auth}/PassphraseAuth.ts +0 -0
- /package/src/{coValues → tools/coValues}/CoValueBase.ts +0 -0
- /package/src/{coValues → tools/coValues}/account.ts +0 -0
- /package/src/{coValues → tools/coValues}/coList.ts +0 -0
- /package/src/{coValues → tools/coValues}/coMap.ts +0 -0
- /package/src/{coValues → tools/coValues}/coPlainText.ts +0 -0
- /package/src/{coValues → tools/coValues}/coRichText.ts +0 -0
- /package/src/{coValues → tools/coValues}/deepLoading.ts +0 -0
- /package/src/{coValues → tools/coValues}/extensions/imageDef.ts +0 -0
- /package/src/{coValues → tools/coValues}/group.ts +0 -0
- /package/src/{coValues → tools/coValues}/inbox.ts +0 -0
- /package/src/{coValues → tools/coValues}/interfaces.ts +0 -0
- /package/src/{coValues → tools/coValues}/profile.ts +0 -0
- /package/src/{coValues → tools/coValues}/registeredSchemas.ts +0 -0
- /package/src/{coValues → tools/coValues}/schemaUnion.ts +0 -0
- /package/src/{implementation → tools/implementation}/ContextManager.ts +0 -0
- /package/src/{implementation → tools/implementation}/activeAccountContext.ts +0 -0
- /package/src/{implementation → tools/implementation}/anonymousJazzAgent.ts +0 -0
- /package/src/{implementation → tools/implementation}/createContext.ts +0 -0
- /package/src/{implementation → tools/implementation}/devtoolsFormatters.ts +0 -0
- /package/src/{implementation → tools/implementation}/errors.ts +0 -0
- /package/src/{implementation → tools/implementation}/inspect.ts +0 -0
- /package/src/{implementation → tools/implementation}/invites.ts +0 -0
- /package/src/{implementation → tools/implementation}/refs.ts +0 -0
- /package/src/{implementation → tools/implementation}/schema.ts +0 -0
- /package/src/{implementation → tools/implementation}/symbols.ts +0 -0
- /package/src/{implementation → tools/implementation}/zodSchema/coExport.ts +0 -0
- /package/src/{implementation → tools/implementation}/zodSchema/runtimeConverters/zodFieldToCoFieldDef.ts +0 -0
- /package/src/{implementation → tools/implementation}/zodSchema/runtimeConverters/zodSchemaToCoSchema.ts +0 -0
- /package/src/{implementation → tools/implementation}/zodSchema/schemaTypes/AccountSchema.ts +0 -0
- /package/src/{implementation → tools/implementation}/zodSchema/schemaTypes/CoFeedSchema.ts +0 -0
- /package/src/{implementation → tools/implementation}/zodSchema/schemaTypes/CoListSchema.ts +0 -0
- /package/src/{implementation → tools/implementation}/zodSchema/schemaTypes/CoMapSchema.ts +0 -0
- /package/src/{implementation → tools/implementation}/zodSchema/schemaTypes/CoRecordSchema.ts +0 -0
- /package/src/{implementation → tools/implementation}/zodSchema/schemaTypes/FileStreamSchema.ts +0 -0
- /package/src/{implementation → tools/implementation}/zodSchema/schemaTypes/PlainTextSchema.ts +0 -0
- /package/src/{implementation → tools/implementation}/zodSchema/schemaTypes/RichTextSchema.ts +0 -0
- /package/src/{implementation → tools/implementation}/zodSchema/typeConverters/InstanceOfSchema.ts +0 -0
- /package/src/{implementation → tools/implementation}/zodSchema/typeConverters/InstanceOfSchemaCoValuesNullable.ts +0 -0
- /package/src/{implementation → tools/implementation}/zodSchema/typeConverters/InstanceOrPrimitiveOfSchema.ts +0 -0
- /package/src/{implementation → tools/implementation}/zodSchema/typeConverters/InstanceOrPrimitiveOfSchemaCoValuesNullable.ts +0 -0
- /package/src/{implementation → tools/implementation}/zodSchema/unionUtils.ts +0 -0
- /package/src/{implementation → tools/implementation}/zodSchema/zodCo.ts +0 -0
- /package/src/{implementation → tools/implementation}/zodSchema/zodReExport.ts +0 -0
- /package/src/{implementation → tools/implementation}/zodSchema/zodSchema.ts +0 -0
- /package/src/{internal.ts → tools/internal.ts} +0 -0
- /package/src/{lib → tools/lib}/cache.test.ts +0 -0
- /package/src/{lib → tools/lib}/cache.ts +0 -0
- /package/src/{lib → tools/lib}/migration.ts +0 -0
- /package/src/{subscribe → tools/subscribe}/CoValueCoreSubscription.ts +0 -0
- /package/src/{subscribe → tools/subscribe}/JazzError.ts +0 -0
- /package/src/{subscribe → tools/subscribe}/SubscriptionScope.ts +0 -0
- /package/src/{subscribe → tools/subscribe}/index.ts +0 -0
- /package/src/{subscribe → tools/subscribe}/types.ts +0 -0
- /package/src/{subscribe → tools/subscribe}/utils.ts +0 -0
- /package/src/{tests → tools/tests}/AuthSecretStorage.test.ts +0 -0
- /package/src/{tests → tools/tests}/ContextManager.test.ts +0 -0
- /package/src/{tests → tools/tests}/DemoAuth.test.ts +0 -0
- /package/src/{tests → tools/tests}/PassphraseAuth.test.ts +0 -0
- /package/src/{tests → tools/tests}/account.test.ts +0 -0
- /package/src/{tests → tools/tests}/coFeed.test-d.ts +0 -0
- /package/src/{tests → tools/tests}/coList.test-d.ts +0 -0
- /package/src/{tests → tools/tests}/coList.test.ts +0 -0
- /package/src/{tests → tools/tests}/coMap.record.test-d.ts +0 -0
- /package/src/{tests → tools/tests}/coMap.record.test.ts +0 -0
- /package/src/{tests → tools/tests}/coMap.test-d.ts +0 -0
- /package/src/{tests → tools/tests}/coMap.test.ts +0 -0
- /package/src/{tests → tools/tests}/coPlainText.test.ts +0 -0
- /package/src/{tests → tools/tests}/createContext.test.ts +0 -0
- /package/src/{tests → tools/tests}/deepLoading.test.ts +0 -0
- /package/src/{tests → tools/tests}/groupsAndAccounts.test.ts +0 -0
- /package/src/{tests → tools/tests}/imageDef.test.ts +0 -0
- /package/src/{tests → tools/tests}/inbox.test.ts +0 -0
- /package/src/{tests → tools/tests}/interfaces.test.ts +0 -0
- /package/src/{tests → tools/tests}/invites.test.ts +0 -0
- /package/src/{tests → tools/tests}/load.test.ts +0 -0
- /package/src/{tests → tools/tests}/patterns/notifications.test.ts +0 -0
- /package/src/{tests → tools/tests}/patterns/requestToJoin.test.ts +0 -0
- /package/src/{tests → tools/tests}/schema.test.ts +0 -0
- /package/src/{tests → tools/tests}/schemaUnion.test.ts +0 -0
- /package/src/{tests → tools/tests}/subscribe.test.ts +0 -0
- /package/src/{tests → tools/tests}/testing.test.ts +0 -0
- /package/src/{tests → tools/tests}/utils.ts +0 -0
- /package/src/{tests → tools/tests}/zod.test.ts +0 -0
- /package/src/{types.ts → tools/types.ts} +0 -0
@@ -0,0 +1,29 @@
|
|
1
|
+
import {
|
2
|
+
Account,
|
3
|
+
AccountClass,
|
4
|
+
AnyAccountSchema,
|
5
|
+
CoValueFromRaw,
|
6
|
+
} from "jazz-tools";
|
7
|
+
import {
|
8
|
+
JazzProviderCore,
|
9
|
+
JazzProviderProps,
|
10
|
+
} from "jazz-tools/react-native-core";
|
11
|
+
import React, { useMemo } from "react";
|
12
|
+
import { ExpoSecureStoreAdapter } from "./storage/expo-secure-store-adapter.js";
|
13
|
+
import { ExpoSQLiteAdapter } from "./storage/expo-sqlite-adapter.js";
|
14
|
+
|
15
|
+
export function JazzExpoProvider<
|
16
|
+
S extends
|
17
|
+
| (AccountClass<Account> & CoValueFromRaw<Account>)
|
18
|
+
| AnyAccountSchema,
|
19
|
+
>(props: JazzProviderProps<S>) {
|
20
|
+
const storage = useMemo(() => {
|
21
|
+
return props.storage ?? new ExpoSQLiteAdapter();
|
22
|
+
}, [props.storage]);
|
23
|
+
|
24
|
+
const kvStore = useMemo(() => {
|
25
|
+
return props.kvStore ?? new ExpoSecureStoreAdapter();
|
26
|
+
}, [props.kvStore]);
|
27
|
+
|
28
|
+
return <JazzProviderCore {...props} storage={storage} kvStore={kvStore} />;
|
29
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import * as SecureStore from "expo-secure-store";
|
2
|
+
import type { KvStore } from "jazz-tools/react-native-core";
|
3
|
+
|
4
|
+
export class ExpoSecureStoreAdapter implements KvStore {
|
5
|
+
async get(key: string): Promise<string | null> {
|
6
|
+
return SecureStore.getItemAsync(key, {
|
7
|
+
requireAuthentication: false,
|
8
|
+
keychainAccessible: SecureStore.AFTER_FIRST_UNLOCK,
|
9
|
+
});
|
10
|
+
}
|
11
|
+
|
12
|
+
async set(key: string, value: string): Promise<void> {
|
13
|
+
return SecureStore.setItemAsync(key, value, {
|
14
|
+
requireAuthentication: false,
|
15
|
+
keychainAccessible: SecureStore.AFTER_FIRST_UNLOCK,
|
16
|
+
});
|
17
|
+
}
|
18
|
+
|
19
|
+
async delete(key: string): Promise<void> {
|
20
|
+
return SecureStore.deleteItemAsync(key, {
|
21
|
+
requireAuthentication: false,
|
22
|
+
keychainAccessible: SecureStore.AFTER_FIRST_UNLOCK,
|
23
|
+
});
|
24
|
+
}
|
25
|
+
|
26
|
+
async clearAll(): Promise<void> {
|
27
|
+
throw new Error("Not implemented");
|
28
|
+
}
|
29
|
+
}
|
@@ -0,0 +1,94 @@
|
|
1
|
+
import { deleteDatabaseAsync, openDatabaseAsync } from "expo-sqlite";
|
2
|
+
import type { SQLiteBindValue, SQLiteDatabase } from "expo-sqlite";
|
3
|
+
import { type SQLiteDatabaseDriverAsync } from "jazz-tools/react-native-core";
|
4
|
+
|
5
|
+
export class ExpoSQLiteAdapter implements SQLiteDatabaseDriverAsync {
|
6
|
+
private db: SQLiteDatabase | null = null;
|
7
|
+
private dbName: string;
|
8
|
+
|
9
|
+
public constructor(dbName: string = "jazz-storage") {
|
10
|
+
this.dbName = dbName;
|
11
|
+
}
|
12
|
+
|
13
|
+
public async initialize(): Promise<void> {
|
14
|
+
if (this.db) {
|
15
|
+
return;
|
16
|
+
}
|
17
|
+
|
18
|
+
const db = await openDatabaseAsync(this.dbName, {
|
19
|
+
useNewConnection: true,
|
20
|
+
});
|
21
|
+
await db.execAsync("PRAGMA journal_mode = WAL");
|
22
|
+
this.db = db;
|
23
|
+
}
|
24
|
+
|
25
|
+
public async query<T>(sql: string, params?: unknown[]): Promise<T[]> {
|
26
|
+
if (!this.db) {
|
27
|
+
throw new Error("Database not initialized");
|
28
|
+
}
|
29
|
+
|
30
|
+
const result = await this.db.getAllAsync(
|
31
|
+
sql,
|
32
|
+
params?.map((p) => p as SQLiteBindValue) ?? [],
|
33
|
+
);
|
34
|
+
|
35
|
+
return result as T[];
|
36
|
+
}
|
37
|
+
|
38
|
+
public async get<T>(sql: string, params?: unknown[]): Promise<T | undefined> {
|
39
|
+
if (!this.db) {
|
40
|
+
throw new Error("Database not initialized");
|
41
|
+
}
|
42
|
+
|
43
|
+
const result = await this.db.getFirstAsync(
|
44
|
+
sql,
|
45
|
+
params?.map((p) => p as SQLiteBindValue) ?? [],
|
46
|
+
);
|
47
|
+
|
48
|
+
return (result as T) ?? undefined;
|
49
|
+
}
|
50
|
+
|
51
|
+
public async run(sql: string, params?: unknown[]) {
|
52
|
+
if (!this.db) {
|
53
|
+
throw new Error("Database not initialized");
|
54
|
+
}
|
55
|
+
|
56
|
+
await this.db.runAsync(sql, params?.map((p) => p as SQLiteBindValue) ?? []);
|
57
|
+
}
|
58
|
+
|
59
|
+
public async transaction(callback: () => unknown) {
|
60
|
+
if (!this.db) {
|
61
|
+
throw new Error("Database not initialized");
|
62
|
+
}
|
63
|
+
|
64
|
+
await this.db.withTransactionAsync(async () => {
|
65
|
+
await callback();
|
66
|
+
});
|
67
|
+
}
|
68
|
+
|
69
|
+
/**
|
70
|
+
* Deletes and re-initialises the database.
|
71
|
+
* Dropping every table would not account for internal data, such as PRAGMAs, so deletion is required to completely clear the database.
|
72
|
+
*/
|
73
|
+
public async clearLocalData(): Promise<void> {
|
74
|
+
if (!this.db) {
|
75
|
+
throw new Error("Database not initialized");
|
76
|
+
}
|
77
|
+
|
78
|
+
// We must close the database before attempting to delete it.
|
79
|
+
// However, this may fail if the database was already closed; if so, we can still proceed to deletion.
|
80
|
+
try {
|
81
|
+
await this.db.closeAsync();
|
82
|
+
} catch (e) {
|
83
|
+
console.error(e);
|
84
|
+
}
|
85
|
+
|
86
|
+
await deleteDatabaseAsync(this.dbName);
|
87
|
+
this.db = null;
|
88
|
+
await this.initialize();
|
89
|
+
}
|
90
|
+
|
91
|
+
public async closeDb(): Promise<void> {
|
92
|
+
// Keeping the database open and reusing the same connection over multiple ctx instances.
|
93
|
+
}
|
94
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "jazz-tools/react-native-core/testing";
|
package/src/index.ts
CHANGED
@@ -0,0 +1,63 @@
|
|
1
|
+
import { Account } from "jazz-tools";
|
2
|
+
import { JazzInspectorInternal } from "jazz-tools/inspector";
|
3
|
+
import { createRoot } from "react-dom/client";
|
4
|
+
|
5
|
+
export class JazzInspectorElement extends HTMLElement {
|
6
|
+
private root: ReturnType<typeof createRoot> | null = null;
|
7
|
+
|
8
|
+
account: Account | null = null;
|
9
|
+
|
10
|
+
private interval: ReturnType<typeof setInterval> | undefined;
|
11
|
+
|
12
|
+
loadAccount() {
|
13
|
+
try {
|
14
|
+
const value = Account.getMe();
|
15
|
+
|
16
|
+
if (value !== this.account) {
|
17
|
+
this.account = value;
|
18
|
+
this.render();
|
19
|
+
}
|
20
|
+
} catch {}
|
21
|
+
}
|
22
|
+
|
23
|
+
startAccountPolling() {
|
24
|
+
if (this.interval) return;
|
25
|
+
|
26
|
+
this.loadAccount();
|
27
|
+
|
28
|
+
this.interval = setInterval(() => {
|
29
|
+
this.loadAccount();
|
30
|
+
}, 1000);
|
31
|
+
}
|
32
|
+
|
33
|
+
stopAccountPolling() {
|
34
|
+
if (this.interval) clearInterval(this.interval);
|
35
|
+
}
|
36
|
+
|
37
|
+
connectedCallback() {
|
38
|
+
this.root = createRoot(this);
|
39
|
+
this.startAccountPolling();
|
40
|
+
this.render();
|
41
|
+
}
|
42
|
+
|
43
|
+
disconnectedCallback() {
|
44
|
+
this.root?.unmount();
|
45
|
+
this.root = null;
|
46
|
+
this.stopAccountPolling();
|
47
|
+
}
|
48
|
+
|
49
|
+
private render() {
|
50
|
+
if (!this.account) {
|
51
|
+
return;
|
52
|
+
}
|
53
|
+
|
54
|
+
this.root?.render(
|
55
|
+
<JazzInspectorInternal
|
56
|
+
localNode={this.account._raw.core.node}
|
57
|
+
accountId={this.account._raw.id}
|
58
|
+
/>,
|
59
|
+
);
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
customElements.define("jazz-inspector", JazzInspectorElement);
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import React from "react";
|
2
|
+
|
3
|
+
export { JazzInspector, JazzInspectorInternal } from "./viewer/new-app.js";
|
4
|
+
export { PageStack } from "./viewer/page-stack.js";
|
5
|
+
export { Breadcrumbs } from "./viewer/breadcrumbs.js";
|
6
|
+
export { AccountOrGroupText } from "./viewer/account-or-group-text.js";
|
7
|
+
|
8
|
+
export { Button } from "./ui/button.js";
|
9
|
+
export { Input } from "./ui/input.js";
|
10
|
+
export { Select } from "./ui/select.js";
|
11
|
+
export { Icon } from "./ui/icon.js";
|
12
|
+
export { GlobalStyles } from "./ui/global-styles.js";
|
13
|
+
|
14
|
+
export {
|
15
|
+
resolveCoValue,
|
16
|
+
useResolvedCoValue,
|
17
|
+
} from "./viewer/use-resolve-covalue.js";
|
18
|
+
|
19
|
+
export type { PageInfo } from "./viewer/types.js";
|
20
|
+
|
21
|
+
import { setup } from "goober";
|
22
|
+
|
23
|
+
setup(React.createElement);
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { styled } from "goober";
|
2
|
+
|
3
|
+
const StyledBadge = styled("span")<{ className?: string }>`
|
4
|
+
font-size: 0.875rem;
|
5
|
+
font-weight: 500;
|
6
|
+
padding: 0.125rem 0.25rem;
|
7
|
+
margin-left: -0.125rem;
|
8
|
+
border-radius: var(--j-radius-sm);
|
9
|
+
background-color: var(--j-foreground);
|
10
|
+
display: inline-block;
|
11
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
12
|
+
color: var(--j-text-color-strong);
|
13
|
+
`;
|
14
|
+
|
15
|
+
export function Badge({
|
16
|
+
children,
|
17
|
+
className,
|
18
|
+
}: React.PropsWithChildren<{ className?: string }>) {
|
19
|
+
return <StyledBadge className={className}>{children}</StyledBadge>;
|
20
|
+
}
|
@@ -0,0 +1,81 @@
|
|
1
|
+
import { styled } from "goober";
|
2
|
+
import { forwardRef } from "react";
|
3
|
+
|
4
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
5
|
+
variant?: "primary" | "secondary" | "link" | "plain";
|
6
|
+
children?: React.ReactNode;
|
7
|
+
className?: string;
|
8
|
+
disabled?: boolean;
|
9
|
+
}
|
10
|
+
|
11
|
+
const StyledButton = styled("button")<{ variant: string; disabled?: boolean }>`
|
12
|
+
display: inline-flex;
|
13
|
+
align-items: center;
|
14
|
+
justify-content: center;
|
15
|
+
gap: 0.5rem;
|
16
|
+
text-align: center;
|
17
|
+
transition: colors 0.2s;
|
18
|
+
border-radius: var(--j-radius-lg);
|
19
|
+
pointer-events: ${(props) => (props.disabled ? "none" : "auto")};
|
20
|
+
opacity: ${(props) => (props.disabled ? 0.5 : 1)};
|
21
|
+
cursor: ${(props) => (props.disabled ? "not-allowed" : "pointer")};
|
22
|
+
|
23
|
+
${(props) => {
|
24
|
+
switch (props.variant) {
|
25
|
+
case "primary":
|
26
|
+
return `
|
27
|
+
padding: 0.375rem 0.75rem;
|
28
|
+
background-color: var(--j-primary-color);
|
29
|
+
border-color: var(--j-primary-color);
|
30
|
+
color: white;
|
31
|
+
font-weight: 500;
|
32
|
+
`;
|
33
|
+
case "secondary":
|
34
|
+
return `
|
35
|
+
padding: 0.375rem 0.75rem;
|
36
|
+
color: var(--j-text-color-strong);
|
37
|
+
border: 1px solid var(--j-border-color);
|
38
|
+
font-weight: 500;
|
39
|
+
&:hover {
|
40
|
+
border-color: var(--j-border-color-hover);
|
41
|
+
}
|
42
|
+
`;
|
43
|
+
case "link":
|
44
|
+
return `
|
45
|
+
color: var(--j-link-color);
|
46
|
+
&:hover {
|
47
|
+
text-decoration: underline;
|
48
|
+
}
|
49
|
+
`;
|
50
|
+
default:
|
51
|
+
return "";
|
52
|
+
}
|
53
|
+
}}
|
54
|
+
`;
|
55
|
+
|
56
|
+
export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
|
57
|
+
(
|
58
|
+
{
|
59
|
+
className,
|
60
|
+
children,
|
61
|
+
variant = "primary",
|
62
|
+
disabled,
|
63
|
+
type = "button",
|
64
|
+
...buttonProps
|
65
|
+
},
|
66
|
+
ref,
|
67
|
+
) => {
|
68
|
+
return (
|
69
|
+
<StyledButton
|
70
|
+
ref={ref}
|
71
|
+
{...buttonProps}
|
72
|
+
disabled={disabled}
|
73
|
+
className={className}
|
74
|
+
type={type}
|
75
|
+
variant={variant}
|
76
|
+
>
|
77
|
+
{children}
|
78
|
+
</StyledButton>
|
79
|
+
);
|
80
|
+
},
|
81
|
+
);
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { styled } from "goober";
|
2
|
+
export const Card = styled("div")`
|
3
|
+
background-color: var(--j-background);
|
4
|
+
border-radius: var(--j-radius-lg);
|
5
|
+
box-shadow: var(--j-shadow-sm);
|
6
|
+
border: 1px solid var(--j-border-color);
|
7
|
+
padding: 1rem;
|
8
|
+
text-align: left;
|
9
|
+
overflow-x: hidden;
|
10
|
+
display: flex;
|
11
|
+
flex-direction: column;
|
12
|
+
gap: 0.5rem;
|
13
|
+
`;
|
14
|
+
|
15
|
+
export const CardHeader = styled("div")`
|
16
|
+
display: flex;
|
17
|
+
justify-content: space-between;
|
18
|
+
align-items: center;
|
19
|
+
`;
|
20
|
+
|
21
|
+
export const CardBody = styled("div")`
|
22
|
+
flex: 1;
|
23
|
+
`;
|
@@ -0,0 +1,74 @@
|
|
1
|
+
import { styled } from "goober";
|
2
|
+
|
3
|
+
export const GlobalStyles = styled("div")`
|
4
|
+
/* Colors */
|
5
|
+
--j-primary-color: #146AFF;
|
6
|
+
--j-link-color: var(--j-primary-color);
|
7
|
+
--j-success-color: oklch(52.7% 0.154 150.069);
|
8
|
+
--j-destructive-color: oklch(50.5% 0.213 27.518);
|
9
|
+
|
10
|
+
/* Neutral Colors */
|
11
|
+
--j-neutral-100: #faf8f8;
|
12
|
+
--j-neutral-200: #e5e3e4;
|
13
|
+
--j-neutral-300: #d0cecf;
|
14
|
+
--j-neutral-400: #bbbaba;
|
15
|
+
--j-neutral-500: #a8a6a6;
|
16
|
+
--j-neutral-600: #858484;
|
17
|
+
--j-neutral-700: #6b696a;
|
18
|
+
--j-neutral-900: #2f2e2e;
|
19
|
+
--j-neutral-925: #1b1a1a;
|
20
|
+
--j-neutral-950: #151414;
|
21
|
+
|
22
|
+
/* Text Colors */
|
23
|
+
--j-text-color: var(--j-neutral-700);
|
24
|
+
--j-text-color-strong: var(--j-neutral-900);
|
25
|
+
|
26
|
+
/* Border Colors */
|
27
|
+
--j-border-color: var(--j-neutral-200);
|
28
|
+
--j-border-color-hover: var(--j-neutral-300);
|
29
|
+
--j-border-dark: var(--j-neutral-900);
|
30
|
+
--j-border-focus: var(--j-primary-color);
|
31
|
+
|
32
|
+
/* Background Colors */
|
33
|
+
--j-background: #FFFFFF;
|
34
|
+
--j-foreground: var(--j-neutral-100);
|
35
|
+
|
36
|
+
/* Border Radius */
|
37
|
+
--j-radius-sm: 0.25rem;
|
38
|
+
--j-radius-md: 0.375rem;
|
39
|
+
--j-radius-lg: 0.5rem;
|
40
|
+
|
41
|
+
/* Shadows */
|
42
|
+
--j-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
43
|
+
|
44
|
+
@media (prefers-color-scheme: dark) {
|
45
|
+
--j-text-color: var(--j-neutral-400);
|
46
|
+
--j-border-color: var(--j-neutral-900);
|
47
|
+
--j-background: var(--j-neutral-950);
|
48
|
+
--j-foreground: var(--j-neutral-925);
|
49
|
+
--j-border-color-hover: var(--j-neutral-700);
|
50
|
+
--j-text-color-strong: var(--j-neutral-100);
|
51
|
+
--j-success-color: oklch(72.3% 0.219 149.579);
|
52
|
+
--j-destructive-color: oklch(63.7% 0.237 25.331);
|
53
|
+
}
|
54
|
+
|
55
|
+
*:focus {
|
56
|
+
outline: none;
|
57
|
+
}
|
58
|
+
|
59
|
+
*:focus-visible {
|
60
|
+
box-shadow: 0 0 0 2px var(--j-link-color);
|
61
|
+
}
|
62
|
+
|
63
|
+
.j-sr-only {
|
64
|
+
position: absolute;
|
65
|
+
width: 1px;
|
66
|
+
height: 1px;
|
67
|
+
padding: 0;
|
68
|
+
margin: -1px;
|
69
|
+
overflow: hidden;
|
70
|
+
clip: rect(0, 0, 0, 0);
|
71
|
+
white-space: nowrap;
|
72
|
+
border: 0;
|
73
|
+
}
|
74
|
+
`;
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { styled } from "goober";
|
2
|
+
|
3
|
+
const GridThreeColumns = styled("div")`
|
4
|
+
display: grid;
|
5
|
+
grid-template-columns: repeat(1, minmax(0, 1fr));
|
6
|
+
gap: 1rem;
|
7
|
+
|
8
|
+
@media (min-width: 768px) {
|
9
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
10
|
+
}
|
11
|
+
|
12
|
+
@media (min-width: 1280px) {
|
13
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
14
|
+
}
|
15
|
+
`;
|
16
|
+
|
17
|
+
const GridTwoColumns = styled("div")`
|
18
|
+
display: grid;
|
19
|
+
grid-template-columns: repeat(1, minmax(0, 1fr));
|
20
|
+
gap: 1rem;
|
21
|
+
|
22
|
+
@media (min-width: 768px) {
|
23
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
24
|
+
}
|
25
|
+
`;
|
26
|
+
|
27
|
+
const GridOneColumn = styled("div")`
|
28
|
+
display: grid;
|
29
|
+
grid-template-columns: repeat(1, minmax(0, 1fr));
|
30
|
+
gap: 1rem;
|
31
|
+
`;
|
32
|
+
|
33
|
+
export function Grid(
|
34
|
+
props: React.HTMLAttributes<HTMLElement> & { cols: 1 | 2 | 3 },
|
35
|
+
) {
|
36
|
+
const { cols, children, ...rest } = props;
|
37
|
+
|
38
|
+
switch (cols) {
|
39
|
+
case 1:
|
40
|
+
return <GridOneColumn {...rest}>{children}</GridOneColumn>;
|
41
|
+
case 2:
|
42
|
+
return <GridTwoColumns {...rest}>{children}</GridTwoColumns>;
|
43
|
+
case 3:
|
44
|
+
return <GridThreeColumns {...rest}>{children}</GridThreeColumns>;
|
45
|
+
default:
|
46
|
+
throw new Error(`Invalid number of columns: ${cols}`);
|
47
|
+
}
|
48
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { styled } from "goober";
|
2
|
+
|
3
|
+
const StyledHeading = styled("h1")<{ className?: string }>`
|
4
|
+
font-size: 1.125rem;
|
5
|
+
text-align: center;
|
6
|
+
font-weight: 500;
|
7
|
+
color: var(--j-text-color-strong);
|
8
|
+
`;
|
9
|
+
|
10
|
+
export function Heading({
|
11
|
+
children,
|
12
|
+
className,
|
13
|
+
}: React.PropsWithChildren<{ className?: string }>) {
|
14
|
+
return <StyledHeading className={className}>{children}</StyledHeading>;
|
15
|
+
}
|
@@ -0,0 +1,71 @@
|
|
1
|
+
import { ChevronDownIcon } from "./icons/chevron-down-icon.js";
|
2
|
+
import { DeleteIcon } from "./icons/delete-icon.js";
|
3
|
+
import { LinkIcon } from "./icons/link-icon.js";
|
4
|
+
|
5
|
+
const icons = {
|
6
|
+
chevronDown: ChevronDownIcon,
|
7
|
+
delete: DeleteIcon,
|
8
|
+
link: LinkIcon,
|
9
|
+
};
|
10
|
+
|
11
|
+
// copied from tailwind line height https://tailwindcss.com/docs/font-size
|
12
|
+
const sizes = {
|
13
|
+
"2xs": 14,
|
14
|
+
xs: 16,
|
15
|
+
sm: 20,
|
16
|
+
md: 24,
|
17
|
+
lg: 28,
|
18
|
+
xl: 28,
|
19
|
+
"2xl": 32,
|
20
|
+
"3xl": 36,
|
21
|
+
"4xl": 40,
|
22
|
+
"5xl": 48,
|
23
|
+
"6xl": 60,
|
24
|
+
"7xl": 72,
|
25
|
+
"8xl": 96,
|
26
|
+
"9xl": 128,
|
27
|
+
};
|
28
|
+
|
29
|
+
const strokeWidths = {
|
30
|
+
"2xs": 2.5,
|
31
|
+
xs: 2,
|
32
|
+
sm: 2,
|
33
|
+
md: 1.5,
|
34
|
+
lg: 1.5,
|
35
|
+
xl: 1.5,
|
36
|
+
"2xl": 1.25,
|
37
|
+
"3xl": 1.25,
|
38
|
+
"4xl": 1.25,
|
39
|
+
"5xl": 1,
|
40
|
+
"6xl": 1,
|
41
|
+
"7xl": 1,
|
42
|
+
"8xl": 1,
|
43
|
+
"9xl": 1,
|
44
|
+
};
|
45
|
+
|
46
|
+
export function Icon({
|
47
|
+
name,
|
48
|
+
size = "md",
|
49
|
+
className,
|
50
|
+
...svgProps
|
51
|
+
}: {
|
52
|
+
name?: keyof typeof icons;
|
53
|
+
size?: keyof typeof sizes;
|
54
|
+
} & React.SVGProps<SVGSVGElement>) {
|
55
|
+
if (!name || !icons.hasOwnProperty(name)) {
|
56
|
+
throw new Error(`Icon not found: ${name}`);
|
57
|
+
}
|
58
|
+
|
59
|
+
// @ts-ignore
|
60
|
+
const IconComponent = icons?.hasOwnProperty(name) ? icons[name] : icon;
|
61
|
+
|
62
|
+
return (
|
63
|
+
<IconComponent
|
64
|
+
aria-hidden="true"
|
65
|
+
size={sizes[size]}
|
66
|
+
strokeWidth={strokeWidths[size]}
|
67
|
+
strokeLinecap="round"
|
68
|
+
{...svgProps}
|
69
|
+
/>
|
70
|
+
);
|
71
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
export function ChevronDownIcon(props: React.SVGProps<SVGSVGElement>) {
|
2
|
+
return (
|
3
|
+
<svg
|
4
|
+
{...props}
|
5
|
+
xmlns="http://www.w3.org/2000/svg"
|
6
|
+
width="24"
|
7
|
+
height="24"
|
8
|
+
viewBox="0 0 24 24"
|
9
|
+
fill="none"
|
10
|
+
stroke="currentColor"
|
11
|
+
strokeLinejoin="round"
|
12
|
+
>
|
13
|
+
<path d="m6 9 6 6 6-6" />
|
14
|
+
</svg>
|
15
|
+
);
|
16
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
export function DeleteIcon(props: React.SVGProps<SVGSVGElement>) {
|
2
|
+
return (
|
3
|
+
<svg
|
4
|
+
{...props}
|
5
|
+
xmlns="http://www.w3.org/2000/svg"
|
6
|
+
width="24"
|
7
|
+
height="24"
|
8
|
+
viewBox="0 0 24 24"
|
9
|
+
fill="none"
|
10
|
+
stroke="currentColor"
|
11
|
+
strokeLinejoin="round"
|
12
|
+
className="lucide lucide-trash-icon lucide-trash"
|
13
|
+
>
|
14
|
+
<path d="M3 6h18" />
|
15
|
+
<path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" />
|
16
|
+
<path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" />
|
17
|
+
</svg>
|
18
|
+
);
|
19
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
export function LinkIcon(props: React.SVGProps<SVGSVGElement>) {
|
2
|
+
return (
|
3
|
+
<svg
|
4
|
+
xmlns="http://www.w3.org/2000/svg"
|
5
|
+
fill="none"
|
6
|
+
viewBox="0 0 24 24"
|
7
|
+
strokeWidth={1.5}
|
8
|
+
stroke="currentColor"
|
9
|
+
{...props}
|
10
|
+
>
|
11
|
+
<path
|
12
|
+
strokeLinecap="round"
|
13
|
+
strokeLinejoin="round"
|
14
|
+
d="M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244"
|
15
|
+
/>
|
16
|
+
</svg>
|
17
|
+
);
|
18
|
+
}
|