@toa.io/extensions.configuration 1.0.0-alpha.274 → 1.0.0-alpha.276
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/CHANGELOG.md +29 -0
- package/components/configuration.values/operations/create.d.ts +16 -0
- package/components/configuration.values/operations/create.js +58 -0
- package/components/configuration.values/operations/create.js.map +1 -0
- package/components/configuration.values/operations/fetch.d.ts +11 -0
- package/components/configuration.values/operations/fetch.js +17 -0
- package/components/configuration.values/operations/fetch.js.map +1 -0
- package/components/configuration.values/operations/get.d.ts +17 -0
- package/components/configuration.values/operations/get.js +23 -0
- package/components/configuration.values/operations/get.js.map +1 -0
- package/components/configuration.values/operations/lib/map.d.ts +11 -0
- package/components/configuration.values/operations/lib/map.js +26 -0
- package/components/configuration.values/operations/lib/map.js.map +1 -0
- package/components/configuration.values/operations/lib/map.test.d.ts +1 -0
- package/components/configuration.values/operations/lib/map.test.js +26 -0
- package/components/configuration.values/operations/lib/map.test.js.map +1 -0
- package/components/configuration.values/operations/lib/resolve.d.ts +27 -0
- package/components/configuration.values/operations/lib/resolve.js +28 -0
- package/components/configuration.values/operations/lib/resolve.js.map +1 -0
- package/components/configuration.values/operations/list.d.ts +10 -0
- package/components/configuration.values/operations/list.js +15 -0
- package/components/configuration.values/operations/list.js.map +1 -0
- package/components/configuration.values/operations/tsconfig.tsbuildinfo +1 -0
- package/features/site/favicon.ico +0 -0
- package/features/ui.feature +8 -0
- package/package.json +2 -2
- package/source/Aspect.ts +7 -2
- package/source/UI.ts +16 -1
- package/source/deployment.ts +1 -1
- package/transpiled/Aspect.js +3 -2
- package/transpiled/Aspect.js.map +1 -1
- package/transpiled/UI.js +14 -1
- package/transpiled/UI.js.map +1 -1
- package/transpiled/deployment.d.ts +1 -1
- package/transpiled/tsconfig.tsbuildinfo +1 -1
- package/ui/dist/_app/env.js +1 -0
- package/ui/dist/_app/immutable/assets/0.CNS8Cqhc.css +2 -0
- package/ui/dist/_app/immutable/assets/inter-cyrillic-ext-wght-normal.BOeWTOD4.woff2 +0 -0
- package/ui/dist/_app/immutable/assets/inter-cyrillic-wght-normal.DqGufNeO.woff2 +0 -0
- package/ui/dist/_app/immutable/assets/inter-greek-ext-wght-normal.DlzME5K_.woff2 +0 -0
- package/ui/dist/_app/immutable/assets/inter-greek-wght-normal.CkhJZR-_.woff2 +0 -0
- package/ui/dist/_app/immutable/assets/inter-latin-ext-wght-normal.DO1Apj_S.woff2 +0 -0
- package/ui/dist/_app/immutable/assets/inter-latin-wght-normal.Dx4kXJAl.woff2 +0 -0
- package/ui/dist/_app/immutable/assets/inter-vietnamese-wght-normal.CBcvBZtf.woff2 +0 -0
- package/ui/dist/_app/immutable/assets/ui.BghF56l_.css +1 -0
- package/ui/dist/_app/immutable/chunks/Bjy-W4x2.js +81 -0
- package/ui/dist/_app/immutable/chunks/CDKtbN4n.js +6 -0
- package/ui/dist/_app/immutable/chunks/CcD_ISxM.js +3 -0
- package/ui/dist/_app/immutable/chunks/Chb3af1a.js +1 -0
- package/ui/dist/_app/immutable/chunks/Cov6-56A.js +50 -0
- package/ui/dist/_app/immutable/chunks/E7oj41Za.js +1 -0
- package/ui/dist/_app/immutable/chunks/MOpxGoVO.js +8 -0
- package/ui/dist/_app/immutable/chunks/xihTtKlq.js +1 -0
- package/ui/dist/_app/immutable/entry/app.B9v2AwU_.js +2 -0
- package/ui/dist/_app/immutable/entry/start.B97KALv1.js +1 -0
- package/ui/dist/_app/immutable/nodes/0.DKSa6mGa.js +1 -0
- package/ui/dist/_app/immutable/nodes/1.Cnu_jAWf.js +1 -0
- package/ui/dist/_app/immutable/nodes/2.Dg1zeC2b.js +1 -0
- package/ui/dist/_app/immutable/nodes/3.QCbZIibO.js +1 -0
- package/ui/dist/_app/immutable/nodes/4.1bG6DC_9.js +1 -0
- package/ui/dist/_app/version.json +1 -0
- package/ui/dist/apple-touch-icon.png +0 -0
- package/ui/dist/favicon-96x96.png +0 -0
- package/ui/dist/favicon.ico +0 -0
- package/ui/dist/index.html +52 -0
- package/ui/.agents/skills/antcn/SKILL.md +0 -91
- package/ui/.agents/skills/antcn/references/analytics.md +0 -78
- package/ui/.agents/skills/antcn/references/bridge.md +0 -41
- package/ui/.agents/skills/antcn/references/clipboard.md +0 -23
- package/ui/.agents/skills/antcn/references/dismissable.md +0 -75
- package/ui/.agents/skills/antcn/references/dropdown.md +0 -153
- package/ui/.agents/skills/antcn/references/fragments.md +0 -29
- package/ui/.agents/skills/antcn/references/fullscreen.md +0 -157
- package/ui/.agents/skills/antcn/references/geo.md +0 -27
- package/ui/.agents/skills/antcn/references/globals.md +0 -31
- package/ui/.agents/skills/antcn/references/grammatical-form.md +0 -69
- package/ui/.agents/skills/antcn/references/hints.md +0 -44
- package/ui/.agents/skills/antcn/references/hold.md +0 -34
- package/ui/.agents/skills/antcn/references/iam.md +0 -117
- package/ui/.agents/skills/antcn/references/input-form.md +0 -34
- package/ui/.agents/skills/antcn/references/locale.md +0 -66
- package/ui/.agents/skills/antcn/references/net.md +0 -33
- package/ui/.agents/skills/antcn/references/panel.md +0 -44
- package/ui/.agents/skills/antcn/references/passkeys.md +0 -27
- package/ui/.agents/skills/antcn/references/payments.md +0 -99
- package/ui/.agents/skills/antcn/references/realtime.md +0 -69
- package/ui/.agents/skills/antcn/references/scrollable.md +0 -39
- package/ui/.agents/skills/antcn/references/selector.md +0 -71
- package/ui/.agents/skills/antcn/references/shake.md +0 -36
- package/ui/.agents/skills/antcn/references/share.md +0 -28
- package/ui/.agents/skills/antcn/references/shell.md +0 -139
- package/ui/.agents/skills/antcn/references/stack.md +0 -53
- package/ui/.agents/skills/antcn/references/system.md +0 -149
- package/ui/.agents/skills/antcn/references/taptap.md +0 -28
- package/ui/.agents/skills/antcn/references/tools.md +0 -68
- package/ui/.agents/skills/antcn/references/transmission.md +0 -96
- package/ui/.agents/skills/shadcn-svelte/SKILL.md +0 -227
- package/ui/.agents/skills/shadcn-svelte/agents/openai.yml +0 -5
- package/ui/.agents/skills/shadcn-svelte/assets/shadcn-svelte-small.png +0 -0
- package/ui/.agents/skills/shadcn-svelte/assets/shadcn-svelte.png +0 -0
- package/ui/.agents/skills/shadcn-svelte/cli.md +0 -166
- package/ui/.agents/skills/shadcn-svelte/customization.md +0 -213
- package/ui/.agents/skills/shadcn-svelte/evals/evals.json +0 -47
- package/ui/.agents/skills/shadcn-svelte/rules/composition.md +0 -244
- package/ui/.agents/skills/shadcn-svelte/rules/forms.md +0 -234
- package/ui/.agents/skills/shadcn-svelte/rules/icons.md +0 -107
- package/ui/.agents/skills/shadcn-svelte/rules/styling.md +0 -195
- package/ui/.agents/skills/svas/SKILL.md +0 -169
- package/ui/.agents/skills/svas/references/patterns.md +0 -95
- package/ui/.agents/skills/svintl/SKILL.md +0 -176
- package/ui/.claude/settings.json +0 -15
- package/ui/.codex/hooks.json +0 -15
- package/ui/.cursor/hooks.json +0 -11
- package/ui/.env.example +0 -1
- package/ui/.prettierrc +0 -9
- package/ui/.vscode/extensions.json +0 -7
- package/ui/.vscode/settings.json +0 -27
- package/ui/AGENTS.md +0 -51
- package/ui/architecture.md +0 -390
- package/ui/components.json +0 -20
- package/ui/eslint.config.js +0 -152
- package/ui/features/base.ts +0 -2
- package/ui/features/boot.feature +0 -5
- package/ui/features/steps/authentication.ts +0 -34
- package/ui/features/steps/navigaton.ts +0 -37
- package/ui/features/steps/typing.ts +0 -24
- package/ui/package-lock.json +0 -8173
- package/ui/package.json +0 -76
- package/ui/playwright.config.ts +0 -13
- package/ui/skills-lock.json +0 -30
- package/ui/src/@/configuration/index.ts +0 -1
- package/ui/src/@/configuration/svc/create.ts +0 -29
- package/ui/src/@/configuration/svc/index.ts +0 -3
- package/ui/src/@/configuration/svc/net/Configuration.ts +0 -18
- package/ui/src/@/configuration/svc/net/index.ts +0 -2
- package/ui/src/@/configuration/svc/net/interface.ts +0 -35
- package/ui/src/@/configuration/svc/store.ts +0 -14
- package/ui/src/@/configuration/ui/Configurations.svelte +0 -85
- package/ui/src/@/configuration/ui/Configurations.ts +0 -5
- package/ui/src/@/configuration/ui/Create.svelte +0 -64
- package/ui/src/@/configuration/ui/Create.ts +0 -7
- package/ui/src/@/configuration/ui/Form.svelte +0 -75
- package/ui/src/@/configuration/ui/Form.ts +0 -79
- package/ui/src/@/configuration/ui/Row.svelte +0 -44
- package/ui/src/@/configuration/ui/Row.ts +0 -9
- package/ui/src/@/configuration/ui/Value.svelte +0 -33
- package/ui/src/@/configuration/ui/Value.ts +0 -6
- package/ui/src/@/configuration/ui/index.ts +0 -9
- package/ui/src/@/configuration/ui/intl/built.js +0 -38
- package/ui/src/@/configuration/ui/intl/context.yaml +0 -51
- package/ui/src/@/configuration/ui/intl/en-US.yaml +0 -21
- package/ui/src/@/configuration/ui/intl/index.ts +0 -9
- package/ui/src/@/configuration/ui/intl/types.ts +0 -31
- package/ui/src/@/configuration/ui/read.test.ts +0 -75
- package/ui/src/@/configuration/ui/read.ts +0 -102
- package/ui/src/@/configuration/ui/ui.test.ts +0 -69
- package/ui/src/@/configuration/ui/ui.ts +0 -115
- package/ui/src/@/iam/index.ts +0 -1
- package/ui/src/@/iam/rc.ts +0 -22
- package/ui/src/@/iam/svc/authenticated.ts +0 -17
- package/ui/src/@/iam/svc/basic.ts +0 -23
- package/ui/src/@/iam/svc/index.ts +0 -10
- package/ui/src/@/iam/svc/logout.ts +0 -5
- package/ui/src/@/iam/svc/named.ts +0 -16
- package/ui/src/@/iam/svc/net/Echo.ts +0 -9
- package/ui/src/@/iam/svc/net/basic/index.ts +0 -1
- package/ui/src/@/iam/svc/net/basic/interface.ts +0 -15
- package/ui/src/@/iam/svc/net/federation/index.ts +0 -1
- package/ui/src/@/iam/svc/net/federation/interface.ts +0 -12
- package/ui/src/@/iam/svc/net/index.ts +0 -6
- package/ui/src/@/iam/svc/net/interface.ts +0 -17
- package/ui/src/@/iam/svc/net/otp/index.ts +0 -1
- package/ui/src/@/iam/svc/net/otp/interface.ts +0 -14
- package/ui/src/@/iam/svc/net/passkeys/index.ts +0 -1
- package/ui/src/@/iam/svc/net/passkeys/interface.ts +0 -12
- package/ui/src/@/iam/svc/oidc/apple.ts +0 -47
- package/ui/src/@/iam/svc/oidc/authenticate.ts +0 -62
- package/ui/src/@/iam/svc/oidc/google.ts +0 -45
- package/ui/src/@/iam/svc/oidc/hello.ts +0 -82
- package/ui/src/@/iam/svc/oidc/index.ts +0 -3
- package/ui/src/@/iam/svc/oidc/nonce.ts +0 -5
- package/ui/src/@/iam/svc/oidc/providers.ts +0 -28
- package/ui/src/@/iam/svc/oidc/standard.ts +0 -28
- package/ui/src/@/iam/svc/otp.ts +0 -18
- package/ui/src/@/iam/svc/passkeys/create.ts +0 -20
- package/ui/src/@/iam/svc/passkeys/index.ts +0 -2
- package/ui/src/@/iam/svc/passkeys/login.ts +0 -21
- package/ui/src/@/iam/svc/store.ts +0 -36
- package/ui/src/@/iam/svc/sync.ts +0 -18
- package/ui/src/@/iam/svc/transfer.ts +0 -11
- package/ui/src/@/iam/svc/update.ts +0 -8
- package/ui/src/@/iam/ui/AccountLike.ts +0 -4
- package/ui/src/@/iam/ui/Authenticated.svelte +0 -37
- package/ui/src/@/iam/ui/Authenticated.ts +0 -10
- package/ui/src/@/iam/ui/Authentication.svelte +0 -50
- package/ui/src/@/iam/ui/Authentication.ts +0 -9
- package/ui/src/@/iam/ui/Authorized.svelte +0 -32
- package/ui/src/@/iam/ui/Authorized.ts +0 -65
- package/ui/src/@/iam/ui/Card.svelte +0 -14
- package/ui/src/@/iam/ui/Card.ts +0 -7
- package/ui/src/@/iam/ui/Refresh.svelte +0 -39
- package/ui/src/@/iam/ui/credentials/Credentials.svelte +0 -26
- package/ui/src/@/iam/ui/credentials/Credentials.ts +0 -5
- package/ui/src/@/iam/ui/credentials/Provider.svelte +0 -24
- package/ui/src/@/iam/ui/credentials/Provider.ts +0 -5
- package/ui/src/@/iam/ui/credentials/index.ts +0 -1
- package/ui/src/@/iam/ui/credentials/passkeys/Key.svelte +0 -42
- package/ui/src/@/iam/ui/credentials/passkeys/Key.ts +0 -29
- package/ui/src/@/iam/ui/credentials/passkeys/Manager.svelte +0 -83
- package/ui/src/@/iam/ui/credentials/passkeys/Manager.ts +0 -5
- package/ui/src/@/iam/ui/credentials/passkeys/Passkeys.svelte +0 -39
- package/ui/src/@/iam/ui/credentials/passkeys/Summary.svelte +0 -27
- package/ui/src/@/iam/ui/credentials/passkeys/Summary.ts +0 -5
- package/ui/src/@/iam/ui/credentials/passkeys/index.ts +0 -1
- package/ui/src/@/iam/ui/credentials/providers.ts +0 -15
- package/ui/src/@/iam/ui/credentials/transfer/Qr.svelte +0 -24
- package/ui/src/@/iam/ui/credentials/transfer/Qr.ts +0 -3
- package/ui/src/@/iam/ui/credentials/transfer/Transfer.svelte +0 -48
- package/ui/src/@/iam/ui/credentials/transfer/Transfer.ts +0 -5
- package/ui/src/@/iam/ui/credentials/transfer/index.ts +0 -1
- package/ui/src/@/iam/ui/index.ts +0 -3
- package/ui/src/@/iam/ui/intl/built.js +0 -79
- package/ui/src/@/iam/ui/intl/context.yaml +0 -91
- package/ui/src/@/iam/ui/intl/en-US.yaml +0 -64
- package/ui/src/@/iam/ui/intl/index.ts +0 -10
- package/ui/src/@/iam/ui/intl/types.ts +0 -70
- package/ui/src/@/iam/ui/oidc/Authentication.svelte +0 -16
- package/ui/src/@/iam/ui/oidc/Authentication.ts +0 -5
- package/ui/src/@/iam/ui/oidc/Button.svelte +0 -36
- package/ui/src/@/iam/ui/oidc/Button.ts +0 -11
- package/ui/src/@/iam/ui/oidc/Refresh.svelte +0 -16
- package/ui/src/@/iam/ui/oidc/icons/Apple.svelte +0 -19
- package/ui/src/@/iam/ui/oidc/icons/Google.svelte +0 -31
- package/ui/src/@/iam/ui/oidc/icons/index.ts +0 -11
- package/ui/src/@/iam/ui/oidc/index.ts +0 -2
- package/ui/src/@/iam/ui/passkey/Authentication.svelte +0 -64
- package/ui/src/@/iam/ui/passkey/Authentication.ts +0 -8
- package/ui/src/@/iam/ui/passkey/Create.svelte +0 -53
- package/ui/src/@/iam/ui/passkey/Create.ts +0 -7
- package/ui/src/@/iam/ui/passkey/Login.svelte +0 -29
- package/ui/src/@/iam/ui/passkey/Refresh.svelte +0 -29
- package/ui/src/@/iam/ui/passkey/index.ts +0 -2
- package/ui/src/@/iam/ui/password/Authentication.svelte +0 -19
- package/ui/src/@/iam/ui/password/Authentication.ts +0 -8
- package/ui/src/@/iam/ui/password/Form.svelte +0 -151
- package/ui/src/@/iam/ui/password/Form.ts +0 -6
- package/ui/src/@/iam/ui/password/Password.svelte +0 -39
- package/ui/src/@/iam/ui/password/Password.ts +0 -6
- package/ui/src/@/iam/ui/password/Refresh.svelte +0 -5
- package/ui/src/@/iam/ui/password/index.ts +0 -2
- package/ui/src/@/net/index.ts +0 -1
- package/ui/src/@/net/svc/index.ts +0 -3
- package/ui/src/@/net/svc/origin.ts +0 -8
- package/ui/src/@/net/svc/query.test.ts +0 -45
- package/ui/src/@/net/svc/query.ts +0 -25
- package/ui/src/@/passkeys/index.ts +0 -1
- package/ui/src/@/passkeys/svc/add.ts +0 -15
- package/ui/src/@/passkeys/svc/create.ts +0 -58
- package/ui/src/@/passkeys/svc/credentials/convert.ts +0 -32
- package/ui/src/@/passkeys/svc/credentials/create.ts +0 -34
- package/ui/src/@/passkeys/svc/credentials/get.ts +0 -14
- package/ui/src/@/passkeys/svc/credentials/index.ts +0 -3
- package/ui/src/@/passkeys/svc/credentials/key.ts +0 -10
- package/ui/src/@/passkeys/svc/get.ts +0 -10
- package/ui/src/@/passkeys/svc/index.ts +0 -6
- package/ui/src/@/passkeys/svc/net/CreationResponse.ts +0 -15
- package/ui/src/@/passkeys/svc/net/Passkey.ts +0 -8
- package/ui/src/@/passkeys/svc/net/RequestResponse.ts +0 -12
- package/ui/src/@/passkeys/svc/net/challenges/Options.ts +0 -21
- package/ui/src/@/passkeys/svc/net/challenges/index.ts +0 -2
- package/ui/src/@/passkeys/svc/net/challenges/interface.ts +0 -16
- package/ui/src/@/passkeys/svc/net/index.ts +0 -4
- package/ui/src/@/passkeys/svc/net/interface.ts +0 -29
- package/ui/src/@/passkeys/svc/remove.ts +0 -13
- package/ui/src/@/passkeys/svc/request.ts +0 -50
- package/ui/src/@/passkeys/svc/store.ts +0 -13
- package/ui/src/@/passkeys/svc/supported.ts +0 -1
- package/ui/src/@/passkeys/ui/aaguid.json +0 -150
- package/ui/src/@/realtime/events.ts +0 -1
- package/ui/src/@/realtime/index.ts +0 -1
- package/ui/src/@/realtime/rc.ts +0 -13
- package/ui/src/@/realtime/svc/connect.ts +0 -67
- package/ui/src/@/realtime/svc/events.ts +0 -17
- package/ui/src/@/realtime/svc/index.ts +0 -5
- package/ui/src/@/realtime/svc/net/Message.ts +0 -6
- package/ui/src/@/realtime/svc/net/index.ts +0 -2
- package/ui/src/@/realtime/svc/net/interface.ts +0 -13
- package/ui/src/@/realtime/svc/reset.ts +0 -5
- package/ui/src/@/realtime/svc/status.ts +0 -12
- package/ui/src/@/realtime/svc/store.ts +0 -30
- package/ui/src/@/realtime/svc/time.ts +0 -15
- package/ui/src/app.d.ts +0 -20
- package/ui/src/app.html +0 -13
- package/ui/src/config/index.ts +0 -70
- package/ui/src/lib/assets/favicon.svg +0 -1
- package/ui/src/lib/components/clipboard/Clipboard.svelte +0 -63
- package/ui/src/lib/components/clipboard/Clipboard.ts +0 -12
- package/ui/src/lib/components/clipboard/index.ts +0 -1
- package/ui/src/lib/components/dismissable/Dismissable.svelte +0 -81
- package/ui/src/lib/components/dismissable/Dismissable.ts +0 -7
- package/ui/src/lib/components/dismissable/index.ts +0 -1
- package/ui/src/lib/components/dropdown/Back.svelte +0 -14
- package/ui/src/lib/components/dropdown/Back.ts +0 -3
- package/ui/src/lib/components/dropdown/Content.svelte +0 -76
- package/ui/src/lib/components/dropdown/Content.ts +0 -13
- package/ui/src/lib/components/dropdown/Context.ts +0 -18
- package/ui/src/lib/components/dropdown/Group.svelte +0 -24
- package/ui/src/lib/components/dropdown/Group.ts +0 -8
- package/ui/src/lib/components/dropdown/GroupContext.ts +0 -15
- package/ui/src/lib/components/dropdown/Item.svelte +0 -31
- package/ui/src/lib/components/dropdown/Item.ts +0 -5
- package/ui/src/lib/components/dropdown/Layer.svelte +0 -11
- package/ui/src/lib/components/dropdown/Layer.ts +0 -7
- package/ui/src/lib/components/dropdown/Root.svelte +0 -88
- package/ui/src/lib/components/dropdown/Root.ts +0 -6
- package/ui/src/lib/components/dropdown/Separator.svelte +0 -13
- package/ui/src/lib/components/dropdown/Separator.ts +0 -5
- package/ui/src/lib/components/dropdown/Trigger.svelte +0 -33
- package/ui/src/lib/components/dropdown/Trigger.ts +0 -5
- package/ui/src/lib/components/dropdown/index.ts +0 -8
- package/ui/src/lib/components/fullscreen/Fullscreen.svelte +0 -97
- package/ui/src/lib/components/fullscreen/Fullscreen.ts +0 -18
- package/ui/src/lib/components/fullscreen/Overlay.svelte +0 -15
- package/ui/src/lib/components/fullscreen/Overlay.ts +0 -7
- package/ui/src/lib/components/fullscreen/index.ts +0 -2
- package/ui/src/lib/components/hold/Hold.svelte +0 -133
- package/ui/src/lib/components/hold/Hold.ts +0 -23
- package/ui/src/lib/components/hold/index.ts +0 -1
- package/ui/src/lib/components/scrollable/Scrollable.svelte +0 -49
- package/ui/src/lib/components/scrollable/Scrollable.ts +0 -117
- package/ui/src/lib/components/scrollable/index.ts +0 -2
- package/ui/src/lib/components/shake/Shake.svelte +0 -62
- package/ui/src/lib/components/shake/Shake.ts +0 -7
- package/ui/src/lib/components/shake/index.ts +0 -1
- package/ui/src/lib/components/share/Share.svelte +0 -58
- package/ui/src/lib/components/share/Share.ts +0 -9
- package/ui/src/lib/components/share/index.ts +0 -1
- package/ui/src/lib/components/shell/Attention.svelte +0 -11
- package/ui/src/lib/components/shell/Attention.ts +0 -6
- package/ui/src/lib/components/shell/Header.svelte +0 -18
- package/ui/src/lib/components/shell/Header.ts +0 -7
- package/ui/src/lib/components/shell/Screen.svelte +0 -28
- package/ui/src/lib/components/shell/Screen.ts +0 -11
- package/ui/src/lib/components/shell/Sticky.svelte +0 -23
- package/ui/src/lib/components/shell/Sticky.ts +0 -8
- package/ui/src/lib/components/shell/Underlay.svelte +0 -21
- package/ui/src/lib/components/shell/Underlay.ts +0 -6
- package/ui/src/lib/components/shell/index.ts +0 -6
- package/ui/src/lib/components/shell/nav/Actions.svelte +0 -31
- package/ui/src/lib/components/shell/nav/Actions.ts +0 -16
- package/ui/src/lib/components/shell/nav/Back.svelte +0 -20
- package/ui/src/lib/components/shell/nav/Back.ts +0 -9
- package/ui/src/lib/components/shell/nav/Bar.svelte +0 -24
- package/ui/src/lib/components/shell/nav/Bar.ts +0 -3
- package/ui/src/lib/components/shell/nav/Button.svelte +0 -64
- package/ui/src/lib/components/shell/nav/Button.ts +0 -7
- package/ui/src/lib/components/shell/nav/Nav.svelte +0 -62
- package/ui/src/lib/components/shell/nav/Nav.ts +0 -35
- package/ui/src/lib/components/shell/nav/Return.svelte +0 -29
- package/ui/src/lib/components/shell/nav/Return.ts +0 -15
- package/ui/src/lib/components/shell/nav/Sections.svelte +0 -58
- package/ui/src/lib/components/shell/nav/Sections.ts +0 -6
- package/ui/src/lib/components/shell/nav/Toolbar.svelte +0 -73
- package/ui/src/lib/components/shell/nav/Toolbar.ts +0 -3
- package/ui/src/lib/components/shell/nav/history.ts +0 -36
- package/ui/src/lib/components/shell/nav/index.ts +0 -5
- package/ui/src/lib/components/shell/nav/store.ts +0 -24
- package/ui/src/lib/components/ui/alert/alert-action.svelte +0 -20
- package/ui/src/lib/components/ui/alert/alert-description.svelte +0 -23
- package/ui/src/lib/components/ui/alert/alert-title.svelte +0 -23
- package/ui/src/lib/components/ui/alert/alert.svelte +0 -43
- package/ui/src/lib/components/ui/alert/index.ts +0 -17
- package/ui/src/lib/components/ui/alert-dialog/alert-dialog-action.svelte +0 -27
- package/ui/src/lib/components/ui/alert-dialog/alert-dialog-cancel.svelte +0 -27
- package/ui/src/lib/components/ui/alert-dialog/alert-dialog-content.svelte +0 -32
- package/ui/src/lib/components/ui/alert-dialog/alert-dialog-description.svelte +0 -17
- package/ui/src/lib/components/ui/alert-dialog/alert-dialog-footer.svelte +0 -23
- package/ui/src/lib/components/ui/alert-dialog/alert-dialog-header.svelte +0 -20
- package/ui/src/lib/components/ui/alert-dialog/alert-dialog-media.svelte +0 -20
- package/ui/src/lib/components/ui/alert-dialog/alert-dialog-overlay.svelte +0 -17
- package/ui/src/lib/components/ui/alert-dialog/alert-dialog-portal.svelte +0 -7
- package/ui/src/lib/components/ui/alert-dialog/alert-dialog-title.svelte +0 -17
- package/ui/src/lib/components/ui/alert-dialog/alert-dialog-trigger.svelte +0 -7
- package/ui/src/lib/components/ui/alert-dialog/alert-dialog.svelte +0 -7
- package/ui/src/lib/components/ui/alert-dialog/index.ts +0 -40
- package/ui/src/lib/components/ui/badge/badge.svelte +0 -49
- package/ui/src/lib/components/ui/badge/index.ts +0 -2
- package/ui/src/lib/components/ui/button/button.svelte +0 -82
- package/ui/src/lib/components/ui/button/index.ts +0 -17
- package/ui/src/lib/components/ui/button-group/button-group-separator.svelte +0 -23
- package/ui/src/lib/components/ui/button-group/button-group-text.svelte +0 -28
- package/ui/src/lib/components/ui/button-group/button-group.svelte +0 -46
- package/ui/src/lib/components/ui/button-group/index.ts +0 -15
- package/ui/src/lib/components/ui/card/card-action.svelte +0 -23
- package/ui/src/lib/components/ui/card/card-content.svelte +0 -20
- package/ui/src/lib/components/ui/card/card-description.svelte +0 -20
- package/ui/src/lib/components/ui/card/card-footer.svelte +0 -20
- package/ui/src/lib/components/ui/card/card-header.svelte +0 -23
- package/ui/src/lib/components/ui/card/card-title.svelte +0 -20
- package/ui/src/lib/components/ui/card/card.svelte +0 -22
- package/ui/src/lib/components/ui/card/index.ts +0 -25
- package/ui/src/lib/components/ui/checkbox/checkbox.svelte +0 -39
- package/ui/src/lib/components/ui/checkbox/index.ts +0 -6
- package/ui/src/lib/components/ui/collapsible/collapsible-content.svelte +0 -7
- package/ui/src/lib/components/ui/collapsible/collapsible-trigger.svelte +0 -7
- package/ui/src/lib/components/ui/collapsible/collapsible.svelte +0 -20
- package/ui/src/lib/components/ui/collapsible/index.ts +0 -13
- package/ui/src/lib/components/ui/input/index.ts +0 -7
- package/ui/src/lib/components/ui/input/input.svelte +0 -48
- package/ui/src/lib/components/ui/input-otp/index.ts +0 -15
- package/ui/src/lib/components/ui/input-otp/input-otp-group.svelte +0 -20
- package/ui/src/lib/components/ui/input-otp/input-otp-separator.svelte +0 -27
- package/ui/src/lib/components/ui/input-otp/input-otp-slot.svelte +0 -31
- package/ui/src/lib/components/ui/input-otp/input-otp.svelte +0 -23
- package/ui/src/lib/components/ui/item/index.ts +0 -34
- package/ui/src/lib/components/ui/item/item-actions.svelte +0 -20
- package/ui/src/lib/components/ui/item/item-content.svelte +0 -23
- package/ui/src/lib/components/ui/item/item-description.svelte +0 -23
- package/ui/src/lib/components/ui/item/item-footer.svelte +0 -20
- package/ui/src/lib/components/ui/item/item-group.svelte +0 -21
- package/ui/src/lib/components/ui/item/item-header.svelte +0 -20
- package/ui/src/lib/components/ui/item/item-media.svelte +0 -42
- package/ui/src/lib/components/ui/item/item-separator.svelte +0 -19
- package/ui/src/lib/components/ui/item/item-title.svelte +0 -20
- package/ui/src/lib/components/ui/item/item.svelte +0 -61
- package/ui/src/lib/components/ui/kbd/index.ts +0 -10
- package/ui/src/lib/components/ui/kbd/kbd-group.svelte +0 -20
- package/ui/src/lib/components/ui/kbd/kbd.svelte +0 -23
- package/ui/src/lib/components/ui/label/index.ts +0 -7
- package/ui/src/lib/components/ui/label/label.svelte +0 -20
- package/ui/src/lib/components/ui/progress/index.ts +0 -7
- package/ui/src/lib/components/ui/progress/progress.svelte +0 -27
- package/ui/src/lib/components/ui/select/index.ts +0 -37
- package/ui/src/lib/components/ui/select/select-content.svelte +0 -45
- package/ui/src/lib/components/ui/select/select-group-heading.svelte +0 -21
- package/ui/src/lib/components/ui/select/select-group.svelte +0 -17
- package/ui/src/lib/components/ui/select/select-item.svelte +0 -40
- package/ui/src/lib/components/ui/select/select-label.svelte +0 -20
- package/ui/src/lib/components/ui/select/select-portal.svelte +0 -7
- package/ui/src/lib/components/ui/select/select-scroll-down-button.svelte +0 -20
- package/ui/src/lib/components/ui/select/select-scroll-up-button.svelte +0 -20
- package/ui/src/lib/components/ui/select/select-separator.svelte +0 -18
- package/ui/src/lib/components/ui/select/select-trigger.svelte +0 -29
- package/ui/src/lib/components/ui/select/select.svelte +0 -11
- package/ui/src/lib/components/ui/separator/index.ts +0 -7
- package/ui/src/lib/components/ui/separator/separator.svelte +0 -23
- package/ui/src/lib/components/ui/spinner/index.ts +0 -1
- package/ui/src/lib/components/ui/spinner/spinner.svelte +0 -18
- package/ui/src/lib/components/ui/tabs/index.ts +0 -18
- package/ui/src/lib/components/ui/tabs/tabs-content.svelte +0 -17
- package/ui/src/lib/components/ui/tabs/tabs-list.svelte +0 -40
- package/ui/src/lib/components/ui/tabs/tabs-trigger.svelte +0 -23
- package/ui/src/lib/components/ui/tabs/tabs.svelte +0 -19
- package/ui/src/lib/components/ui/textarea/index.ts +0 -7
- package/ui/src/lib/components/ui/textarea/textarea.svelte +0 -22
- package/ui/src/lib/intl/bcp.ts +0 -25
- package/ui/src/lib/intl/built.js +0 -18
- package/ui/src/lib/intl/context.yaml +0 -18
- package/ui/src/lib/intl/en-US.yaml +0 -6
- package/ui/src/lib/intl/index.ts +0 -65
- package/ui/src/lib/intl/types.ts +0 -19
- package/ui/src/lib/tools/ago.ts +0 -10
- package/ui/src/lib/tools/assert.ts +0 -3
- package/ui/src/lib/tools/cap.ts +0 -5
- package/ui/src/lib/tools/clicks.ts +0 -25
- package/ui/src/lib/tools/contextmenu.ts +0 -19
- package/ui/src/lib/tools/convert.ts +0 -32
- package/ui/src/lib/tools/currency.test.ts +0 -10
- package/ui/src/lib/tools/currency.ts +0 -55
- package/ui/src/lib/tools/date.test.ts +0 -21
- package/ui/src/lib/tools/date.ts +0 -35
- package/ui/src/lib/tools/delay.ts +0 -7
- package/ui/src/lib/tools/image.ts +0 -39
- package/ui/src/lib/tools/index.ts +0 -20
- package/ui/src/lib/tools/location.ts +0 -41
- package/ui/src/lib/tools/metronome.ts +0 -11
- package/ui/src/lib/tools/mq.ts +0 -84
- package/ui/src/lib/tools/onsubmit.ts +0 -21
- package/ui/src/lib/tools/random.ts +0 -15
- package/ui/src/lib/tools/search.ts +0 -25
- package/ui/src/lib/tools/timeout.ts +0 -26
- package/ui/src/lib/tools/transition.ts +0 -207
- package/ui/src/lib/tools/types.ts +0 -3
- package/ui/src/lib/tools/uuid.test.ts +0 -28
- package/ui/src/lib/tools/uuid.ts +0 -9
- package/ui/src/lib/typeset.css +0 -502
- package/ui/src/lib/utils.ts +0 -12
- package/ui/src/routes/(private)/+layout.svelte +0 -112
- package/ui/src/routes/(private)/+page.svelte +0 -7
- package/ui/src/routes/(private)/[component]/+page.svelte +0 -77
- package/ui/src/routes/+layout.svelte +0 -25
- package/ui/src/routes/+layout.ts +0 -14
- package/ui/src/routes/layout.css +0 -232
- package/ui/svelte.config.js +0 -36
- package/ui/tools/feat.js +0 -43
- package/ui/tools/hooks/README.md +0 -13
- package/ui/tools/hooks/guard-intl.sh +0 -40
- package/ui/tools/shad.js +0 -7
- package/ui/tsconfig.json +0 -20
- package/ui/vite.config.ts +0 -8
- /package/ui/{static → dist}/robots.txt +0 -0
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# bridge
|
|
2
|
-
|
|
3
|
-
## Notes
|
|
4
|
-
|
|
5
|
-
You build the native side. It is reachable through two contracts the CLI cannot wire for you:
|
|
6
|
-
|
|
7
|
-
- **The message channel.** Your native host receives requests on `window.webkit.messageHandlers.bridge` and must post each reply/event back as a `window` `'bridge'` `CustomEvent` (a `Detail`). `available()` is `true` only inside such a host; in a plain browser `platform`/`version` are `null` and `semver()` is `false`, so gate any request on `available()` (a request fired with no host never gets a reply).
|
|
8
|
-
- **The detection markers** — change these to match your wrapper:
|
|
9
|
-
- **Android package id** (`svc/bridge.ts`) — detected by `document.referrer.startsWith('android-app://com.example.twa')`. Replace the placeholder `com.example.twa` with your Trusted Web Activity package id.
|
|
10
|
-
- **`PWAShell` UA marker** (`svc/bridge.ts`) — iOS is detected by a `PWAShell` token in `navigator.userAgent`, with the version parsed from `PWAShell/<version>`. Have your iOS WebView host append the same marker (`… PWAShell/1.2.3`), or change both regexes to your own.
|
|
11
|
-
|
|
12
|
-
## Usage
|
|
13
|
-
|
|
14
|
-
```ts
|
|
15
|
-
import { bridge } from '@/bridge'
|
|
16
|
-
|
|
17
|
-
if (bridge.platform === 'ios' && bridge.semver('>=1.2.0')) {
|
|
18
|
-
if (await bridge.purchases.available()) {
|
|
19
|
-
const products = await bridge.purchases.products(['premium_yearly'])
|
|
20
|
-
// …drive a purchase, then bridge.purchases.finish(transactionID)
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
bridge.transmission.onNotificationClick((n) => {
|
|
25
|
-
if (n.action) location.assign(n.action)
|
|
26
|
-
})
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## API
|
|
30
|
-
|
|
31
|
-
| Symbol | Description |
|
|
32
|
-
| ------------------------------- | -------------------------------------------------------------------------------------------- |
|
|
33
|
-
| `bridge.platform` | `'ios' \| 'android' \| null` — native host detected from UA / referrer; `null` in a browser. |
|
|
34
|
-
| `bridge.version` | Native host version string parsed from the `PWAShell/<version>` UA marker, else `null`. |
|
|
35
|
-
| `bridge.semver(pattern)` | `true` when `version` satisfies the semver `pattern`; `false` when there is no native host. |
|
|
36
|
-
| `bridge.available()` | `true` when the native message handler is reachable in the current environment. |
|
|
37
|
-
| `bridge.purchases` | StoreKit operations: `available()`, `products(ids)`, `purchase(id, token)`, `restore()`, `manage()`, `finish(txId)`. |
|
|
38
|
-
| `bridge.transmission` | Push channel: `address()`, `permission()`, `request()`, `delete()`, `onNotification(cb)`, `onNotificationClick(cb)`. |
|
|
39
|
-
| `on(key, cb)` / `send(label, args?)` | Low-level transport: subscribe to a reply id / event label, or fire-and-forget a message. |
|
|
40
|
-
|
|
41
|
-
Every `purchases`/`transmission` request resolves to its typed result **or** an `Error` (a native-side failure) — narrow with `instanceof Error` before use.
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# Clipboard
|
|
2
|
-
|
|
3
|
-
Copies `text` (string or async retriever) to the system clipboard. Shows a checkmark for 2s after success. Disabled when `navigator.clipboard` is unavailable (non-secure context).
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
```svelte
|
|
8
|
-
<script lang="ts">
|
|
9
|
-
import { Clipboard } from '$com/clipboard'
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<Clipboard text="https://example.com/join/abc" label="Copy link" variant="outline" />
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Props
|
|
16
|
-
|
|
17
|
-
| Prop | Type | Default | Notes |
|
|
18
|
-
| -------- | ---------------------------- | ------- | -------------------------------------------------- |
|
|
19
|
-
| `text` | `string \| () => Promise<string>` | — | Value to copy. Retriever may return `null` to skip. |
|
|
20
|
-
| `label` | `string` | — | Button label. Omit for icon-only. |
|
|
21
|
-
| `oncopy` | `() => void` | — | Fires after a successful copy. |
|
|
22
|
-
|
|
23
|
-
All other props pass through to the underlying `Button`.
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
# Dismissable
|
|
2
|
-
|
|
3
|
-
Horizontal swipe-to-dismiss wrapper with optional slide-out animation. Swiping far enough triggers `ondismiss` immediately; calling `dismiss()` on a bound instance plays the slide-out first, then `ondismiss`. `remove()` animates out without calling `ondismiss`.
|
|
4
|
-
|
|
5
|
-
Set `dismissable={false}` to disable the swipe sentinel — use when dismissal is programmatic only.
|
|
6
|
-
|
|
7
|
-
## Usage
|
|
8
|
-
|
|
9
|
-
### Swipe to dismiss
|
|
10
|
-
|
|
11
|
-
```svelte
|
|
12
|
-
<script lang="ts">
|
|
13
|
-
import { Dismissable } from '$com/dismissable'
|
|
14
|
-
|
|
15
|
-
let visible = $state(true)
|
|
16
|
-
|
|
17
|
-
async function ondismiss() {
|
|
18
|
-
visible = false
|
|
19
|
-
}
|
|
20
|
-
</script>
|
|
21
|
-
|
|
22
|
-
{#if visible}
|
|
23
|
-
<Dismissable {ondismiss}>
|
|
24
|
-
<div class="rounded-lg border bg-muted px-4 py-3">Swipe left to dismiss</div>
|
|
25
|
-
</Dismissable>
|
|
26
|
-
{/if}
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
### Clear all
|
|
30
|
-
|
|
31
|
-
Bind each row, call `remove()` on every ref with a short stagger (`delay` from `$lib/tools`), then drop them from state — `remove()` skips per-row `ondismiss`.
|
|
32
|
-
|
|
33
|
-
```svelte
|
|
34
|
-
<script lang="ts">
|
|
35
|
-
import { Dismissable } from '$com/dismissable'
|
|
36
|
-
import { delay } from '$lib/tools'
|
|
37
|
-
|
|
38
|
-
type Ref = { remove: () => Promise<void> | void }
|
|
39
|
-
|
|
40
|
-
let items = $state(['One', 'Two', 'Three'])
|
|
41
|
-
const refs = $state<Array<Ref | undefined>>([])
|
|
42
|
-
|
|
43
|
-
async function clearAll() {
|
|
44
|
-
const removed = refs.map((ref, i) => delay(() => ref?.remove(), i * 50))
|
|
45
|
-
|
|
46
|
-
await Promise.all(removed)
|
|
47
|
-
items = []
|
|
48
|
-
}
|
|
49
|
-
</script>
|
|
50
|
-
|
|
51
|
-
<button onclick={clearAll}>Clear all</button>
|
|
52
|
-
|
|
53
|
-
{#each items as item, i (item)}
|
|
54
|
-
<Dismissable bind:this={refs[i]} ondismiss={() => (items = items.filter((x) => x !== item))}>
|
|
55
|
-
<div class="rounded-lg border bg-muted px-4 py-3">{item}</div>
|
|
56
|
-
</Dismissable>
|
|
57
|
-
{/each}
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## Props
|
|
61
|
-
|
|
62
|
-
| Prop | Type | Default | Notes |
|
|
63
|
-
| ------------- | --------------------------------- | ------- | --------------------------------------------------------------------- |
|
|
64
|
-
| `children` | `Snippet` | — | Content inside the swipe track. |
|
|
65
|
-
| `ondismiss` | `() => Promise<void> \| void` | — | Swipe-to-sentinel fires immediately; `dismiss()` fires after animation. |
|
|
66
|
-
| `dismissable` | `boolean` | `true` | When `false`, hides the swipe sentinel and disables swipe dismissal. |
|
|
67
|
-
|
|
68
|
-
## Instance methods
|
|
69
|
-
|
|
70
|
-
Bind with `bind:this` to call programmatic dismissal:
|
|
71
|
-
|
|
72
|
-
| Method | Notes |
|
|
73
|
-
| ---------- | -------------------------------------------------------------- |
|
|
74
|
-
| `dismiss()` | Slide-out animation, then `ondismiss`. |
|
|
75
|
-
| `remove()` | Slide-out animation only — no `ondismiss`. |
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
# Dropdown
|
|
2
|
-
|
|
3
|
-
Composable action menu with CSS anchor positioning, view-transition morph on open/close, and optional nested layers. Import as a namespace (`import * as Dropdown from '$com/dropdown'`).
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
### Basic
|
|
8
|
-
|
|
9
|
-
```svelte
|
|
10
|
-
<script lang="ts">
|
|
11
|
-
import { Ellipsis } from '@lucide/svelte'
|
|
12
|
-
import * as Dropdown from '$com/dropdown'
|
|
13
|
-
|
|
14
|
-
let menu: Dropdown.Root | undefined
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
<Dropdown.Root bind:this={menu}>
|
|
18
|
-
<Dropdown.Trigger variant="outline" size="icon">
|
|
19
|
-
<Ellipsis />
|
|
20
|
-
</Dropdown.Trigger>
|
|
21
|
-
<Dropdown.Content>
|
|
22
|
-
<Dropdown.Group direction="col">
|
|
23
|
-
<Dropdown.Item onclick={() => menu?.close()}>Edit</Dropdown.Item>
|
|
24
|
-
<Dropdown.Item>More…</Dropdown.Item>
|
|
25
|
-
</Dropdown.Group>
|
|
26
|
-
</Dropdown.Content>
|
|
27
|
-
</Dropdown.Root>
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### Nested layers
|
|
31
|
-
|
|
32
|
-
Initially layers with `name` are hidden. Items with `layer` push a named layer. `Back` pops the current layer.
|
|
33
|
-
|
|
34
|
-
```svelte
|
|
35
|
-
<script lang="ts">
|
|
36
|
-
import { Ellipsis } from '@lucide/svelte'
|
|
37
|
-
import * as Dropdown from '$com/dropdown'
|
|
38
|
-
|
|
39
|
-
let menu: Dropdown.Root | undefined
|
|
40
|
-
</script>
|
|
41
|
-
|
|
42
|
-
<Dropdown.Root bind:this={menu}>
|
|
43
|
-
<Dropdown.Trigger variant="outline" size="icon">
|
|
44
|
-
<Ellipsis />
|
|
45
|
-
</Dropdown.Trigger>
|
|
46
|
-
<Dropdown.Content>
|
|
47
|
-
<Dropdown.Layer>
|
|
48
|
-
<Dropdown.Group direction="col">
|
|
49
|
-
<Dropdown.Item onclick={() => menu?.close()}>Edit</Dropdown.Item>
|
|
50
|
-
<Dropdown.Item layer="more">More…</Dropdown.Item>
|
|
51
|
-
</Dropdown.Group>
|
|
52
|
-
</Dropdown.Layer>
|
|
53
|
-
<Dropdown.Layer name="more">
|
|
54
|
-
<Dropdown.Group direction="col">
|
|
55
|
-
<Dropdown.Back />
|
|
56
|
-
<Dropdown.Item onclick={() => menu?.close()}>Archive</Dropdown.Item>
|
|
57
|
-
</Dropdown.Group>
|
|
58
|
-
</Dropdown.Layer>
|
|
59
|
-
</Dropdown.Content>
|
|
60
|
-
</Dropdown.Root>
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### Actions
|
|
64
|
-
|
|
65
|
-
Typical use case for Dropdown is navigation actions.
|
|
66
|
-
Wrap it with `<Actions>` from `shell` component, pass `active` store to control mute of the main navigation.
|
|
67
|
-
|
|
68
|
-
```svelte
|
|
69
|
-
<script lang="ts">
|
|
70
|
-
import { writable } from 'svelte/store'
|
|
71
|
-
import { Actions } from '$com/shell'
|
|
72
|
-
import * as Dropdown from '$com/dropdown'
|
|
73
|
-
|
|
74
|
-
const active = writable(false)
|
|
75
|
-
</script>
|
|
76
|
-
|
|
77
|
-
<Actions active={active}>
|
|
78
|
-
<Dropdown.Root bind:this={menu} onopen={(open) => active.set(open)}>
|
|
79
|
-
<Dropdown.Trigger variant="outline" size="icon">
|
|
80
|
-
<Ellipsis />
|
|
81
|
-
</Dropdown.Trigger>
|
|
82
|
-
<Dropdown.Content>
|
|
83
|
-
<Dropdown.Group direction="col">
|
|
84
|
-
<Dropdown.Item onclick={() => menu?.close()}>Edit</Dropdown.Item>
|
|
85
|
-
<Dropdown.Item>More…</Dropdown.Item>
|
|
86
|
-
</Dropdown.Group>
|
|
87
|
-
</Dropdown.Content>
|
|
88
|
-
</Dropdown.Root>
|
|
89
|
-
</Actions>
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
## Props
|
|
93
|
-
|
|
94
|
-
### Root
|
|
95
|
-
|
|
96
|
-
| Prop | Type | Default | Notes |
|
|
97
|
-
| ---------- | ------------------------- | ------- | ------------------------------------------ |
|
|
98
|
-
| `children` | `Snippet` | — | `Trigger` and `Content` slots. |
|
|
99
|
-
| `onopen` | `(open: boolean) => void` | — | Fires when open state changes. |
|
|
100
|
-
|
|
101
|
-
**Methods** (via `bind:this`): `open()`, `close()`.
|
|
102
|
-
|
|
103
|
-
### Trigger
|
|
104
|
-
|
|
105
|
-
Extends shadcn `Button` props (`variant`, `size`, `class`, …).
|
|
106
|
-
|
|
107
|
-
| Prop | Type | Default | Notes |
|
|
108
|
-
| ---------- | --------- | ------- | ------------------------------------ |
|
|
109
|
-
| `children` | `Snippet` | — | Trigger label or icon. |
|
|
110
|
-
| `id` | `string` | — | Passed to the underlying `Button`. |
|
|
111
|
-
|
|
112
|
-
### Content
|
|
113
|
-
|
|
114
|
-
| Prop | Type | Default | Notes |
|
|
115
|
-
| ---------- | -------------------------------------------------------------------- | --------------- | --------------------------------------------------------------------- |
|
|
116
|
-
| `children` | `Snippet` | — | `Layer`, `Group`, `Item`, `Separator` slots. |
|
|
117
|
-
| `class` | `ClassValue` | — | Panel wrapper classes. |
|
|
118
|
-
| `position` | `'start-top' \| 'start-bottom' \| 'end-top' \| 'end-bottom'` | `'end-bottom'` | Corner where menu aligns with the trigger; menu grows outward from it. |
|
|
119
|
-
|
|
120
|
-
### Layer
|
|
121
|
-
|
|
122
|
-
| Prop | Type | Default | Notes |
|
|
123
|
-
| ---------- | --------- | ------- | --------------------------------------------------------------------- |
|
|
124
|
-
| `name` | `string` | `''` | Layer id. Default layer uses `''`; push targets use a non-empty name. |
|
|
125
|
-
| `children` | `Snippet` | — | Shown when this layer is active. |
|
|
126
|
-
|
|
127
|
-
### Group
|
|
128
|
-
|
|
129
|
-
| Prop | Type | Default | Notes |
|
|
130
|
-
| ----------- | ------------------ | ------- | ------------------------------------------ |
|
|
131
|
-
| `children` | `Snippet` | — | `Item` or custom content. |
|
|
132
|
-
| `direction` | `'col' \| 'row'` | `'col'` | Layout for items; affects `itemVariants`. |
|
|
133
|
-
| `class` | `ClassValue` | — | Wrapper classes. |
|
|
134
|
-
|
|
135
|
-
### Item
|
|
136
|
-
|
|
137
|
-
Extends shadcn `Button` props. Export `itemVariants` for custom buttons in a row group.
|
|
138
|
-
|
|
139
|
-
| Prop | Type | Default | Notes |
|
|
140
|
-
| ---------- | --------- | --------- | ------------------------------------------------------------- |
|
|
141
|
-
| `children` | `Snippet` | — | Row content (icon + label). |
|
|
142
|
-
| `layer` | `string` | — | When set, click pushes this layer instead of calling `onclick`. |
|
|
143
|
-
| `variant` | `string` | `'ghost'` | Button variant. |
|
|
144
|
-
|
|
145
|
-
### Back
|
|
146
|
-
|
|
147
|
-
Same props as `Item` except `onclick` / `layer` (handled internally). Optional label snippet after the back arrow.
|
|
148
|
-
|
|
149
|
-
### Separator
|
|
150
|
-
|
|
151
|
-
| Prop | Type | Default | Notes |
|
|
152
|
-
| ---------- | --------- | ------- | ---------------------------------- |
|
|
153
|
-
| `children` | `Snippet` | — | Optional centered label between rules. |
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# fragments
|
|
2
|
-
|
|
3
|
-
## Notes
|
|
4
|
-
|
|
5
|
-
- **Mount `<Fragments />` once** in your root `+layout.svelte`. It runs on the first (landing) navigation only and drives the consume-on-read cleanup; without it, read values are never stripped from the hash.
|
|
6
|
-
- `fragment(name)` returns the value present in the landing URL's hash, or `null` when absent. The hash is snapshotted once at module load, so reads are stable across the session even as the bar is rewritten; the actual URL is cleaned on the next navigation.
|
|
7
|
-
- SSR-safe: on the server the hash is empty, so `fragment()` returns `null` and `<Fragments />` is inert until hydration.
|
|
8
|
-
|
|
9
|
-
## Usage
|
|
10
|
-
|
|
11
|
-
```svelte
|
|
12
|
-
<!-- src/routes/+layout.svelte -->
|
|
13
|
-
<script lang="ts">
|
|
14
|
-
import { Fragments } from '@/fragments/ui'
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
<Fragments />
|
|
18
|
-
{@render children()}
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
```ts
|
|
22
|
-
// anywhere a one-shot hash value is expected, e.g. a returning redirect
|
|
23
|
-
import { fragment } from '@/fragments'
|
|
24
|
-
|
|
25
|
-
const session = fragment('stripe')
|
|
26
|
-
if (session) {
|
|
27
|
-
// …resume the flow for this session id; the hash is cleaned on next navigation
|
|
28
|
-
}
|
|
29
|
-
```
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
# Fullscreen
|
|
2
|
-
|
|
3
|
-
Tap-to-expand overlay portaled to `body`. Wraps open/close in `transit()` for view transitions. Default mode: `children` is the trigger and the fullscreen body. Use `content` when the trigger and the overlay body should differ.
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
### Zoom a thumbnail
|
|
8
|
-
|
|
9
|
-
Same markup in the trigger and in fullscreen — good for photo zoom. Put `view-transition-name` on the image; add `fullscreen-content` for correct morph stacking.
|
|
10
|
-
|
|
11
|
-
```svelte
|
|
12
|
-
<script lang="ts">
|
|
13
|
-
import { Fullscreen } from '$com/fullscreen'
|
|
14
|
-
|
|
15
|
-
const id = 'photo-1'
|
|
16
|
-
let zoomed = $state<string | null>(null)
|
|
17
|
-
</script>
|
|
18
|
-
|
|
19
|
-
<Fullscreen class="h-[300px]" fragile onshow={() => (zoomed = id)} x={false}>
|
|
20
|
-
<img
|
|
21
|
-
src="/photo.jpg"
|
|
22
|
-
alt=""
|
|
23
|
-
class="h-full object-contain fullscreen-content"
|
|
24
|
-
style={`${zoomed === id ? 'view-transition-name: photo;' : ''} view-transition-class: transition-spring transition-morph;`} />
|
|
25
|
-
</Fullscreen>
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Set the transition name only while open (`onshow` + conditional style) when several Fullscreens sit in a list — otherwise every thumbnail joins the same morph.
|
|
29
|
-
|
|
30
|
-
### Button → content
|
|
31
|
-
|
|
32
|
-
When a button (or file input, share target, …) opens different fullscreen UI, split trigger and body: `controlled`, `content`, and `bind:this` → `show()` / `hide()`.
|
|
33
|
-
|
|
34
|
-
Morph from the button into `content` with `takeoff` + `styles` (same transition name on both sides):
|
|
35
|
-
|
|
36
|
-
```svelte
|
|
37
|
-
<script lang="ts">
|
|
38
|
-
import { Button } from '$ui/button'
|
|
39
|
-
import { styles, takeoff } from '$lib/tools'
|
|
40
|
-
import { Fullscreen } from '$com/fullscreen'
|
|
41
|
-
|
|
42
|
-
const morph = 'transition-spring transition-morph fullscreen-content'
|
|
43
|
-
|
|
44
|
-
let fullscreen = $state<Fullscreen | null>(null)
|
|
45
|
-
const contentStyle = styles('upload', morph)
|
|
46
|
-
|
|
47
|
-
function open() {
|
|
48
|
-
takeoff('upload-button', 'upload', morph)
|
|
49
|
-
fullscreen?.show()
|
|
50
|
-
}
|
|
51
|
-
</script>
|
|
52
|
-
|
|
53
|
-
<Fullscreen bind:this={fullscreen} controlled>
|
|
54
|
-
<Button id="upload-button" onclick={open}>Upload</Button>
|
|
55
|
-
{#snippet content()}
|
|
56
|
-
<div class="max-w-md p-4 fullscreen-content" style={$contentStyle}>
|
|
57
|
-
<!-- progress, preview, … -->
|
|
58
|
-
</div>
|
|
59
|
-
{/snippet}
|
|
60
|
-
</Fullscreen>
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
No visible trigger? Pass an empty `<div></div>` as `children` and call `show()` from `onMount` (share-target flow).
|
|
64
|
-
|
|
65
|
-
### Overlay toolbar
|
|
66
|
-
|
|
67
|
-
Actions above the content — delete, share, etc. Disable the default ✕ (`x={false}`) when the overlay dismisses.
|
|
68
|
-
|
|
69
|
-
```svelte
|
|
70
|
-
<script lang="ts">
|
|
71
|
-
import { Hold } from '$com/hold'
|
|
72
|
-
import { Fullscreen } from '$com/fullscreen'
|
|
73
|
-
|
|
74
|
-
let fullscreen = $state<Fullscreen | null>(null)
|
|
75
|
-
</script>
|
|
76
|
-
|
|
77
|
-
<Fullscreen bind:this={fullscreen} fragile x={false}>
|
|
78
|
-
<img src="/photo.jpg" alt="" class="fullscreen-content" style="view-transition-name: photo; …" />
|
|
79
|
-
{#snippet overlay()}
|
|
80
|
-
<div class="flex justify-end p-4 tim:pt-[env(safe-area-inset-top)]">
|
|
81
|
-
<Hold label="hold to delete" variant="outline" size="icon" onclick={() => fullscreen?.hide()}>
|
|
82
|
-
<!-- icon -->
|
|
83
|
-
</Hold>
|
|
84
|
-
</div>
|
|
85
|
-
{/snippet}
|
|
86
|
-
</Fullscreen>
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### Store-driven open
|
|
90
|
-
|
|
91
|
-
When `open` comes from a store or parent, still wrap the flip in `transit()` — `show()` / `hide()` do that; raw `open = true` skips the animation.
|
|
92
|
-
|
|
93
|
-
```svelte
|
|
94
|
-
<script lang="ts">
|
|
95
|
-
import { transit } from '$lib/tools'
|
|
96
|
-
import { Fullscreen } from '$com/fullscreen'
|
|
97
|
-
|
|
98
|
-
let open = $state(false)
|
|
99
|
-
|
|
100
|
-
async function present() {
|
|
101
|
-
await transit(() => (open = true))
|
|
102
|
-
}
|
|
103
|
-
</script>
|
|
104
|
-
|
|
105
|
-
<Fullscreen bind:open>
|
|
106
|
-
<div></div>
|
|
107
|
-
{#snippet content()}
|
|
108
|
-
<!-- paywall, modal flow, … -->
|
|
109
|
-
{/snippet}
|
|
110
|
-
</Fullscreen>
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
Optional: `takeoff(sourceId, name, classes)` before `transit` when morphing from another element on the page (CTA button → paywall card).
|
|
114
|
-
|
|
115
|
-
## Props
|
|
116
|
-
|
|
117
|
-
| Prop | Type | Default | Notes |
|
|
118
|
-
| ------------ | -------------- | ------- | --------------------------------------------------------------------- |
|
|
119
|
-
| `children` | `Snippet` | — | Trigger markup; also fullscreen body when `content` is omitted. |
|
|
120
|
-
| `content` | `Snippet` | — | Fullscreen-only body; trigger stays on the page. |
|
|
121
|
-
| `overlay` | `Snippet` | — | Toolbar/actions above content; rendered inside `Overlay`. |
|
|
122
|
-
| `open` | `boolean` | `false` | Bindable. Mutate inside `transit()` unless using `show()` / `hide()`. |
|
|
123
|
-
| `onshow` | `() => void` | — | Fires when `show()` starts. |
|
|
124
|
-
| `onhide` | `() => void` | — | Fires after the close transition finishes. |
|
|
125
|
-
| `class` | `ClassValue` | — | Classes on the trigger button (ignored when `controlled`). |
|
|
126
|
-
| `fragile` | `boolean` | `false` | Close on backdrop pointer down. |
|
|
127
|
-
| `controlled` | `boolean` | `false` | No built-in trigger; call `show()` / `hide()` yourself. |
|
|
128
|
-
| `x` | `boolean` | `true` | Top-trailing close button. |
|
|
129
|
-
|
|
130
|
-
`bind:this` exposes `show()` and `hide()`. `Overlay` accepts `children` and optional `class`.
|
|
131
|
-
|
|
132
|
-
## Notes
|
|
133
|
-
|
|
134
|
-
### Opening and closing
|
|
135
|
-
|
|
136
|
-
- Prefer `show()` / `hide()` or `await transit(() => (open = …))`. Assigning `open` directly bypasses the view transition.
|
|
137
|
-
- In `controlled` mode, Escape and backdrop tap (`fragile`) do nothing — close with `hide()`, `transit(() => (open = false))`, or a control in `overlay`.
|
|
138
|
-
- Pair `controlled` + `bind:open` when async work should finish only while open: `if (open) callback?.(id)`.
|
|
139
|
-
|
|
140
|
-
### `children` vs `content`
|
|
141
|
-
|
|
142
|
-
| Setup | Trigger | Fullscreen body | Typical use |
|
|
143
|
-
| ----- | ------- | --------------- | ----------- |
|
|
144
|
-
| `children` only | wrapped in a button | same `children` | Thumbnail zoom |
|
|
145
|
-
| `controlled` + `content` | `children` stays in place | `content` snippet | Button → upload progress, paywall |
|
|
146
|
-
|
|
147
|
-
### View transitions
|
|
148
|
-
|
|
149
|
-
- Shared name on source and target: inline `view-transition-name` on the thumbnail, or `takeoff(id, name, classes)` + `styles(name, classes)` on `content`.
|
|
150
|
-
- Add `view-transition-class: transition-spring transition-morph` and class `fullscreen-content` on the morphing element — matches built-in z-index (`::view-transition-group(.fullscreen-content)`).
|
|
151
|
-
- Content above the default stack? Add a scoped rule, e.g. `::view-transition-group(paywall) { z-index: 4; }`.
|
|
152
|
-
- List of items: unique name per row; set it only for the open item (see thumbnail example above).
|
|
153
|
-
|
|
154
|
-
### Overlay
|
|
155
|
-
|
|
156
|
-
- Set `x={false}` when `overlay` owns dismiss/delete.
|
|
157
|
-
- The built-in trigger hides `[data-slot=fullscreen-overlay]` descendants so overlay chrome does not appear in the thumbnail.
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# geo
|
|
2
|
-
|
|
3
|
-
Consent-zone lookup. Resolves whether the current visitor sits in a prior-consent jurisdiction (where a consent banner must be shown before loading trackers) by querying your API through the `@/net` origin. Headless — service only, no UI.
|
|
4
|
-
|
|
5
|
-
## Notes
|
|
6
|
-
|
|
7
|
-
- **Backend contract** — exposes `geo()`, which `GET`s `/geo/` on your API (resolved against `$config.origin` via `@/net`). The endpoint must answer with `{ "privacy": boolean, "country"?: string }`, where `privacy: true` means the visitor is inside a prior-consent zone. Typically your backend derives this from the request IP / edge geolocation headers.
|
|
8
|
-
- **Dev override** — when running in dev, a `?privacy=0|1` query param short-circuits the backend lookup so you can force either branch locally (`?privacy=1` → in-zone, `?privacy=0` → out-of-zone). The override is dev-only and browser-only; production always defers to the API.
|
|
9
|
-
- **Failure** — a network/parse failure resolves to an `Error` (not a throw); the caller decides the safe default (typically: show the banner).
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
```ts
|
|
14
|
-
import { geo } from '@/geo'
|
|
15
|
-
|
|
16
|
-
const zone = await geo()
|
|
17
|
-
|
|
18
|
-
if (zone instanceof Error) {
|
|
19
|
-
// lookup failed — default to the privacy-safe path (show the banner)
|
|
20
|
-
} else if (zone.privacy) {
|
|
21
|
-
// prior-consent jurisdiction — collect consent before loading trackers
|
|
22
|
-
}
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Props
|
|
26
|
-
|
|
27
|
-
None — this Solution exports a single `geo()` function and the `Geo` type. It renders nothing.
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# Globals
|
|
2
|
-
|
|
3
|
-
Shared theme tokens, Tailwind variants, and utility classes for antcn components.
|
|
4
|
-
|
|
5
|
-
## What's included
|
|
6
|
-
|
|
7
|
-
| Kind | Examples |
|
|
8
|
-
| --- | --- |
|
|
9
|
-
| CSS variables | `--constructive`, `--constructive-foreground`, `--destructive-foreground`, `--shadow-color` → `bg-constructive`, `text-constructive-foreground`, `text-destructive-foreground`, popover shadows |
|
|
10
|
-
| Custom variants | `standalone:`, `tim:` |
|
|
11
|
-
| Shared layers | `@layer transitions` — `transition-morph` / `transition-spring` / `transition-instant` timing, reduced-motion guard |
|
|
12
|
-
| Utility classes | `.no-scrollbar` — hide scrollbars while keeping scroll; `.selected` — accent ring for selected rows |
|
|
13
|
-
| Typography | `.typeset` — document rhythm for rendered Markdown, sized relative to its container |
|
|
14
|
-
|
|
15
|
-
Component-specific view-transition rules stay in each component's `<style>` block.
|
|
16
|
-
|
|
17
|
-
## Typography
|
|
18
|
-
|
|
19
|
-
`.typeset` is [shadcn/typeset](https://ui.shadcn.com/docs/typeset), snapshotted from <https://ui.shadcn.com/typeset.css> on 2026-08-05. It has no registry entry and no npm package — it ships as a file plus a web builder, so it is vendored here as `typeset.css` and refreshing it is a diff against a fresh download.
|
|
20
|
-
|
|
21
|
-
The file ships verbatim: `globals` carries it as a `registry:file` targeting `src/lib/typeset.css`, and its `css` carries the matching `@import '$lib/typeset.css'` key, which the CLI merges into your stylesheet — so after install you own a readable `typeset.css` and it is already wired. Edit it like any other file in your project.
|
|
22
|
-
|
|
23
|
-
The deviation, one rule: upstream nests lists with a bare `:where(ul ul)`, so a structural `<ul>` _outside_ the typeset container counts as a nesting level and Markdown lists render `circle`. It is scoped to `.typeset ul ul` (and `.typeset ul ul ul`) instead. This is generic — any layout that puts a Markdown container inside a list hits it.
|
|
24
|
-
|
|
25
|
-
Put the class on the element that roots a whole document, not on each Markdown fragment, so headings and prose share one typographic root. Elements inside it that are structure rather than prose opt out with explicit utilities — note that Tailwind v4 implements `space-y-*` as `margin-block-end`, which collides with typeset's list spacing, so spacing between structural items wants an explicit margin instead.
|
|
26
|
-
|
|
27
|
-
## After install
|
|
28
|
-
|
|
29
|
-
Installing or re-installing globals merges its `css` and `cssVars` into your project CSS (usually `src/app.css`). Simple tokens dedupe reliably; **complex selectors** — `@layer transitions`, `@custom-variant`, comma-grouped `::view-transition-*` rules — match by exact formatting. If your file is pretty-printed differently from what the CLI emits, overwrite may fail and rules get **appended as duplicates**.
|
|
30
|
-
|
|
31
|
-
After each install, check your CSS and **delete duplicate blocks** (most often under `@layer transitions`). Replace the whole bloated section with one copy — don't leave stacked repeats.
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# Grammatical form
|
|
2
|
-
|
|
3
|
-
In some languages the wording of a message depends on the subject's grammatical gender (`{name} added` vs Russian `{name} добавил` / `добавила`). svintl turns this into a translation concern, and the app stores a per-user choice — the same way it stores a chosen locale. It is **not** part of any one Solution: the mechanics live in the svintl host, the field on the account, and the picker in the consumer's profile.
|
|
4
|
-
|
|
5
|
-
## How svintl exposes it
|
|
6
|
-
|
|
7
|
-
Enable gender guidance once on the host dictionary (`$lib/intl`), listing the gender tokens your strings vary by — the **last** one is treated as the neutral/fallback form:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npx intl genders he she none # writes `genders: [he, she, none]` to context.yaml
|
|
11
|
-
npx intl genders # prints the current values
|
|
12
|
-
npx intl build # regenerates types + dictionaries
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
`build` then emits a `Grammar` union from those tokens:
|
|
16
|
-
|
|
17
|
-
```ts
|
|
18
|
-
// $lib/intl
|
|
19
|
-
export type Grammar = 'he' | 'she' | 'none' // = string when genders is unset
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Gender-dependent phrases become `!js` functions whose **last** argument is the gender; the phrase's own arguments (if any) come first. A phrase with no other placeholders is just `(gender) => …`:
|
|
23
|
-
|
|
24
|
-
```yaml
|
|
25
|
-
# one own argument (name) + gender
|
|
26
|
-
example:
|
|
27
|
-
!js
|
|
28
|
-
(name, gender) => gender === 'he' ? `${name} добавил` : gender === 'she' ? `${name} добавила` : `${name} добавил(а)`
|
|
29
|
-
# no own arguments — single gender param
|
|
30
|
-
status:
|
|
31
|
-
!js
|
|
32
|
-
(gender) => gender === 'she' ? 'готова' : gender === 'he' ? 'готов' : 'готов(а)'
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
A language with no gender distinction for a phrase returns a plain string, not a function.
|
|
36
|
-
|
|
37
|
-
## API field
|
|
38
|
-
|
|
39
|
-
The subject's gender lives on the account as `grammar?: Grammar | null` (`Grammar` imported from `$lib/intl`). antcn's `iam` Solution already carries it on `Echo`. Persist the user's choice there.
|
|
40
|
-
|
|
41
|
-
## Two consumption modes
|
|
42
|
-
|
|
43
|
-
- **Current user** — for "you did X" texts, feed a `grammar` store derived from the active account (`$lib/intl` can expose `grammar = derived(account, $a => $a?.grammar ?? 'none')`).
|
|
44
|
-
- **Per subject** — for "{name} did X" texts about *other* people, pass that account's own field explicitly: `$dict.contacts.transferred.received(name, amount, account.grammar)`. Forgetting this is the common bug — the dictionary function needs the *subject's* gender, not the viewer's.
|
|
45
|
-
|
|
46
|
-
## Picker (interface pattern — not shipped by antcn)
|
|
47
|
-
|
|
48
|
-
Mirror the language switcher: a small control that edits `account.grammar` and reports the choice for persistence, exactly like the `locale` Solution's `Languages` / `Language` report a `Locale` via `onselect`.
|
|
49
|
-
|
|
50
|
-
```svelte
|
|
51
|
-
<script lang="ts">
|
|
52
|
-
import type { Grammar } from '$lib/intl'
|
|
53
|
-
import { me } from '@/accounts'
|
|
54
|
-
|
|
55
|
-
// value seeded from account.grammar; toggle-group over the gender tokens
|
|
56
|
-
function persist(grammar: Grammar) {
|
|
57
|
-
void me.update({ grammar })
|
|
58
|
-
}
|
|
59
|
-
</script>
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Suggested interface:
|
|
63
|
-
|
|
64
|
-
| Prop | Type | Notes |
|
|
65
|
-
| ---------- | ----------------------------- | -------------------------------------------------- |
|
|
66
|
-
| `value` | `Grammar \| ''` | Current account gender; `''` for unset |
|
|
67
|
-
| `onselect` | `(grammar: Grammar) => void` | Fires after the choice changes; persist it |
|
|
68
|
-
|
|
69
|
-
A toggle-group of the gender tokens (e.g. `he` / `she` / `none` with icons) is the proven shape.
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
## hint
|
|
2
|
-
|
|
3
|
-
Per-account dismissable onboarding hints — acknowledge a hint permanently, or snooze it until a timestamp. State is persisted under the signed-in `@/iam` account, so each user sees each hint once (or once per snooze window).
|
|
4
|
-
|
|
5
|
-
`Hints` is intentionally an **empty interface extending `Record<string, Hint | undefined>`**. Declare your hint keys by extending it; `acknowledge` / `later` / `unfamiliar` then narrow to those keys.
|
|
6
|
-
|
|
7
|
-
## Notes
|
|
8
|
-
|
|
9
|
-
- **Requires `@/iam`.** The hint store binds to `@/iam`'s `account` and clears on logout — no account, no persisted hints. Pulled automatically via `local:iam`.
|
|
10
|
-
- **No UI ships.** This Solution is service-only; render the prompt with whatever surface you like (a `Card`, banner, dialog). `unfamiliar(key)` gates rendering; `acknowledge` / `later` dismiss it.
|
|
11
|
-
- **Extending `Hints` is how you wire keys.** Without an `interface Hints` augmentation in your project, every key is valid but untyped. The `transmission` Solution does this for `transmission_permission`.
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
Declare a hint key, then gate a prompt on `unfamiliar`:
|
|
16
|
-
|
|
17
|
-
```ts
|
|
18
|
-
// src/@/your-feature/svc/hints.ts
|
|
19
|
-
import type { Hint } from '@/hints'
|
|
20
|
-
|
|
21
|
-
declare module '@/hints' {
|
|
22
|
-
interface Hints {
|
|
23
|
-
welcome?: Hint
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
```svelte
|
|
29
|
-
<script lang="ts">
|
|
30
|
-
import { unfamiliar, acknowledge, later } from '@/hints'
|
|
31
|
-
|
|
32
|
-
const day = 24 * 60 * 60 * 1000
|
|
33
|
-
</script>
|
|
34
|
-
|
|
35
|
-
{#if unfamiliar('welcome')}
|
|
36
|
-
<Card>
|
|
37
|
-
<p>Welcome aboard.</p>
|
|
38
|
-
<Button onclick={() => later('welcome', 7 * day)}>Later</Button>
|
|
39
|
-
<Button onclick={() => acknowledge('welcome')}>Got it</Button>
|
|
40
|
-
</Card>
|
|
41
|
-
{/if}
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
`unfamiliar(key)` returns `true` when there is no record for `key` **or** the record is a snooze (`value: false`) whose `expiration` has passed. `acknowledge(key)` writes `{ value: true }` (hides forever). `later(key, delay)` writes `{ value: false, expiration: Date.now() + delay }` (hides until then).
|