@monimesl/dot-renderer-react 0.1.0-alpha.4 → 0.1.0-alpha.41
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/README.md +43 -1
- package/dist/LICENSE-PHOSPHOR +21 -0
- package/dist/_virtual/_rolldown/runtime.js +14 -0
- package/dist/_virtual/builtin_esm-external-require-react.js +9 -0
- package/dist/color.js +94 -0
- package/dist/components/amount-input.d.ts +6 -0
- package/dist/components/amount-input.js +111 -0
- package/dist/components/avatar.d.ts +6 -0
- package/dist/components/avatar.js +68 -0
- package/dist/components/box.js +56 -0
- package/dist/components/button.d.ts +6 -0
- package/dist/components/button.js +42 -0
- package/dist/components/carousel.d.ts +6 -0
- package/dist/components/carousel.js +258 -0
- package/dist/components/chip.d.ts +6 -0
- package/dist/components/chip.js +41 -0
- package/dist/components/code-input.d.ts +6 -0
- package/dist/components/code-input.js +96 -0
- package/dist/components/detail-row.d.ts +6 -0
- package/dist/components/detail-row.js +40 -0
- package/dist/components/disclosure.d.ts +6 -0
- package/dist/components/disclosure.js +76 -0
- package/dist/components/divider.d.ts +6 -0
- package/dist/components/divider.js +18 -0
- package/dist/components/empty-state.d.ts +6 -0
- package/dist/components/empty-state.js +64 -0
- package/dist/components/feedback.d.ts +8 -0
- package/dist/components/feedback.js +101 -0
- package/dist/components/field-box.js +44 -0
- package/dist/components/field.js +43 -0
- package/dist/components/footer.d.ts +6 -0
- package/dist/components/footer.js +25 -0
- package/dist/components/grid.d.ts +7 -0
- package/dist/components/grid.js +97 -0
- package/dist/components/https.js +11 -0
- package/dist/components/icon-artwork.js +143 -0
- package/dist/components/icon-button.js +28 -0
- package/dist/components/icon-svg.js +27 -0
- package/dist/components/icon.d.ts +6 -0
- package/dist/components/icon.js +25 -0
- package/dist/components/image.d.ts +6 -0
- package/dist/components/image.js +40 -0
- package/dist/components/index.d.ts +38 -0
- package/dist/components/index.js +92 -0
- package/dist/components/input.d.ts +6 -0
- package/dist/components/input.js +108 -0
- package/dist/components/link.d.ts +6 -0
- package/dist/components/link.js +32 -0
- package/dist/components/list.d.ts +7 -0
- package/dist/components/list.js +143 -0
- package/dist/components/numbers.js +9 -0
- package/dist/components/option-place.js +9 -0
- package/dist/components/option.d.ts +6 -0
- package/dist/components/option.js +44 -0
- package/dist/components/padding.d.ts +2 -0
- package/dist/components/padding.js +38 -0
- package/dist/components/pressable.js +17 -0
- package/dist/components/prose-context.js +5 -0
- package/dist/components/prose.d.ts +9 -0
- package/dist/components/prose.js +67 -0
- package/dist/components/qr-code.d.ts +6 -0
- package/dist/components/qr-code.js +58 -0
- package/dist/components/rich-text.d.ts +6 -0
- package/dist/components/rich-text.js +73 -0
- package/dist/components/scroll.d.ts +6 -0
- package/dist/components/scroll.js +57 -0
- package/dist/components/select.d.ts +6 -0
- package/dist/components/select.js +93 -0
- package/dist/components/sheet.d.ts +8 -0
- package/dist/components/sheet.js +106 -0
- package/dist/components/skeleton.d.ts +6 -0
- package/dist/components/skeleton.js +55 -0
- package/dist/components/slider.d.ts +6 -0
- package/dist/components/slider.js +57 -0
- package/dist/components/spinner.d.ts +6 -0
- package/dist/components/spinner.js +48 -0
- package/dist/components/stack.d.ts +6 -0
- package/dist/components/stack.js +25 -0
- package/dist/components/stepper.d.ts +6 -0
- package/dist/components/stepper.js +92 -0
- package/dist/components/steps.d.ts +7 -0
- package/dist/components/steps.js +110 -0
- package/dist/components/tabs.d.ts +7 -0
- package/dist/components/tabs.js +95 -0
- package/dist/components/text-area.d.ts +6 -0
- package/dist/components/text-area.js +42 -0
- package/dist/components/text.d.ts +6 -0
- package/dist/components/text.js +107 -0
- package/dist/components/toast.d.ts +6 -0
- package/dist/components/toast.js +56 -0
- package/dist/components/toggles.d.ts +9 -0
- package/dist/components/toggles.js +148 -0
- package/dist/components/tokens.js +49 -0
- package/dist/components/tones.js +30 -0
- package/dist/components/typed-text.js +28 -0
- package/dist/components/view.d.ts +6 -0
- package/dist/components/view.js +61 -0
- package/dist/index.d.ts +43 -48
- package/dist/index.js +40 -2086
- package/dist/markdown.js +255 -0
- package/dist/page-root.d.ts +2 -0
- package/dist/page-root.js +20 -0
- package/dist/portal.js +8 -0
- package/dist/pull-to-refresh.js +120 -0
- package/dist/react-host/19.3.0/react-dom.js +3 -0
- package/dist/react-host/19.3.0/react-host.js +6 -6
- package/dist/renderer.d.ts +17 -0
- package/dist/renderer.js +33 -0
- package/dist/root.d.ts +10 -0
- package/dist/root.js +71 -0
- package/dist/styles.css +1 -0
- package/dist/theme.d.ts +26 -0
- package/dist/theme.js +129 -0
- package/dist/types.d.ts +7 -0
- package/dist/vendor/@base-ui/react/checkbox/indicator/CheckboxIndicator.js +51 -0
- package/dist/vendor/@base-ui/react/checkbox/root/CheckboxRoot.js +265 -0
- package/dist/vendor/@base-ui/react/checkbox/root/CheckboxRootContext.js +13 -0
- package/dist/vendor/@base-ui/react/checkbox/root/CheckboxRootDataAttributes.js +11 -0
- package/dist/vendor/@base-ui/react/checkbox/utils/getCheckboxStateAttributesMapping.js +15 -0
- package/dist/vendor/@base-ui/react/checkbox-group/CheckboxGroupContext.js +10 -0
- package/dist/vendor/@base-ui/react/dialog/backdrop/DialogBackdrop.js +40 -0
- package/dist/vendor/@base-ui/react/dialog/close/DialogClose.js +39 -0
- package/dist/vendor/@base-ui/react/dialog/popup/DialogPopup.js +92 -0
- package/dist/vendor/@base-ui/react/dialog/popup/DialogPopupCssVars.js +8 -0
- package/dist/vendor/@base-ui/react/dialog/popup/DialogPopupDataAttributes.js +7 -0
- package/dist/vendor/@base-ui/react/dialog/portal/DialogPortal.js +38 -0
- package/dist/vendor/@base-ui/react/dialog/portal/DialogPortalContext.js +13 -0
- package/dist/vendor/@base-ui/react/dialog/root/DialogRoot.js +16 -0
- package/dist/vendor/@base-ui/react/dialog/root/DialogRootContext.js +13 -0
- package/dist/vendor/@base-ui/react/dialog/root/useDialogRoot.js +77 -0
- package/dist/vendor/@base-ui/react/dialog/root/useRenderDialogRoot.js +65 -0
- package/dist/vendor/@base-ui/react/dialog/store/DialogStore.js +70 -0
- package/dist/vendor/@base-ui/react/dialog/title/DialogTitle.js +25 -0
- package/dist/vendor/@base-ui/react/dialog/utils/stateAttributesMapping.js +17 -0
- package/dist/vendor/@base-ui/react/field/control/FieldControlDataAttributes.js +11 -0
- package/dist/vendor/@base-ui/react/field/item/FieldItemContext.js +10 -0
- package/dist/vendor/@base-ui/react/field/root/useFieldValidation.js +18 -0
- package/dist/vendor/@base-ui/react/fieldset/root/FieldsetRootContext.js +13 -0
- package/dist/vendor/@base-ui/react/floating-ui-react/components/FloatingFocusManager.js +477 -0
- package/dist/vendor/@base-ui/react/floating-ui-react/components/FloatingPortal.js +165 -0
- package/dist/vendor/@base-ui/react/floating-ui-react/components/FloatingRootStore.js +65 -0
- package/dist/vendor/@base-ui/react/floating-ui-react/components/FloatingTree.js +22 -0
- package/dist/vendor/@base-ui/react/floating-ui-react/hooks/useDismiss.js +373 -0
- package/dist/vendor/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.js +58 -0
- package/dist/vendor/@base-ui/react/floating-ui-react/utils/composite.js +40 -0
- package/dist/vendor/@base-ui/react/floating-ui-react/utils/constants.js +5 -0
- package/dist/vendor/@base-ui/react/floating-ui-react/utils/createAttribute.js +6 -0
- package/dist/vendor/@base-ui/react/floating-ui-react/utils/createEventEmitter.js +18 -0
- package/dist/vendor/@base-ui/react/floating-ui-react/utils/element.js +26 -0
- package/dist/vendor/@base-ui/react/floating-ui-react/utils/enqueueFocus.js +25 -0
- package/dist/vendor/@base-ui/react/floating-ui-react/utils/event.js +25 -0
- package/dist/vendor/@base-ui/react/floating-ui-react/utils/markOthers.js +116 -0
- package/dist/vendor/@base-ui/react/floating-ui-react/utils/nodes.js +16 -0
- package/dist/vendor/@base-ui/react/floating-ui-react/utils/tabbable.js +135 -0
- package/dist/vendor/@base-ui/react/internals/TransitionStatusDataAttributes.js +11 -0
- package/dist/vendor/@base-ui/react/internals/composite/composite.js +89 -0
- package/dist/vendor/@base-ui/react/internals/composite/constants.js +4 -0
- package/dist/vendor/@base-ui/react/internals/composite/item/CompositeItem.js +21 -0
- package/dist/vendor/@base-ui/react/internals/composite/item/useCompositeItem.js +31 -0
- package/dist/vendor/@base-ui/react/internals/composite/list/CompositeList.js +180 -0
- package/dist/vendor/@base-ui/react/internals/composite/list/CompositeListContext.js +15 -0
- package/dist/vendor/@base-ui/react/internals/composite/list/useCompositeListItem.js +54 -0
- package/dist/vendor/@base-ui/react/internals/composite/root/CompositeRoot.js +62 -0
- package/dist/vendor/@base-ui/react/internals/composite/root/CompositeRootContext.js +13 -0
- package/dist/vendor/@base-ui/react/internals/composite/root/useCompositeRoot.js +170 -0
- package/dist/vendor/@base-ui/react/internals/constants.js +18 -0
- package/dist/vendor/@base-ui/react/internals/createBaseUIEventDetails.js +40 -0
- package/dist/vendor/@base-ui/react/internals/direction-context/DirectionContext.js +10 -0
- package/dist/vendor/@base-ui/react/internals/field-constants/constants.js +33 -0
- package/dist/vendor/@base-ui/react/internals/field-register-control/useRegisterFieldControl.js +40 -0
- package/dist/vendor/@base-ui/react/internals/field-root-context/FieldRootContext.js +45 -0
- package/dist/vendor/@base-ui/react/internals/form-context/FormContext.js +18 -0
- package/dist/vendor/@base-ui/react/internals/getStateAttributesProps.js +17 -0
- package/dist/vendor/@base-ui/react/internals/labelable-provider/LabelableContext.js +24 -0
- package/dist/vendor/@base-ui/react/internals/labelable-provider/useAriaLabelledBy.js +35 -0
- package/dist/vendor/@base-ui/react/internals/labelable-provider/useLabelableId.js +57 -0
- package/dist/vendor/@base-ui/react/internals/reason-parts.js +14 -0
- package/dist/vendor/@base-ui/react/internals/serializeValue.js +12 -0
- package/dist/vendor/@base-ui/react/internals/stateAttributesMapping.js +11 -0
- package/dist/vendor/@base-ui/react/internals/use-button/useButton.js +137 -0
- package/dist/vendor/@base-ui/react/internals/useAnimationsFinished.js +94 -0
- package/dist/vendor/@base-ui/react/internals/useBaseUiId.js +13 -0
- package/dist/vendor/@base-ui/react/internals/useOpenChangeComplete.js +28 -0
- package/dist/vendor/@base-ui/react/internals/useRenderElement.js +109 -0
- package/dist/vendor/@base-ui/react/internals/useTransitionStatus.js +70 -0
- package/dist/vendor/@base-ui/react/internals/useValueChanged.js +15 -0
- package/dist/vendor/@base-ui/react/merge-props/mergeProps.js +153 -0
- package/dist/vendor/@base-ui/react/radio/indicator/RadioIndicator.js +46 -0
- package/dist/vendor/@base-ui/react/radio/root/RadioRoot.js +179 -0
- package/dist/vendor/@base-ui/react/radio/root/RadioRootContext.js +13 -0
- package/dist/vendor/@base-ui/react/radio/root/RadioRootDataAttributes.js +11 -0
- package/dist/vendor/@base-ui/react/radio/utils/stateAttributesMapping.js +14 -0
- package/dist/vendor/@base-ui/react/radio-group/RadioGroup.js +170 -0
- package/dist/vendor/@base-ui/react/radio-group/RadioGroupContext.js +10 -0
- package/dist/vendor/@base-ui/react/switch/root/SwitchRoot.js +170 -0
- package/dist/vendor/@base-ui/react/switch/root/SwitchRootContext.js +13 -0
- package/dist/vendor/@base-ui/react/switch/root/SwitchRootDataAttributes.js +11 -0
- package/dist/vendor/@base-ui/react/switch/stateAttributesMapping.js +12 -0
- package/dist/vendor/@base-ui/react/switch/thumb/SwitchThumb.js +25 -0
- package/dist/vendor/@base-ui/react/tabs/list/TabsList.js +98 -0
- package/dist/vendor/@base-ui/react/tabs/list/TabsListContext.js +13 -0
- package/dist/vendor/@base-ui/react/tabs/root/TabsRoot.js +213 -0
- package/dist/vendor/@base-ui/react/tabs/root/TabsRootContext.js +16 -0
- package/dist/vendor/@base-ui/react/tabs/root/TabsRootDataAttributes.js +8 -0
- package/dist/vendor/@base-ui/react/tabs/root/stateAttributesMapping.js +5 -0
- package/dist/vendor/@base-ui/react/tabs/tab/TabsTab.js +137 -0
- package/dist/vendor/@base-ui/react/utils/CommonPopupDataAttributes.js +24 -0
- package/dist/vendor/@base-ui/react/utils/CommonTriggerDataAttributes.js +11 -0
- package/dist/vendor/@base-ui/react/utils/FocusGuard.js +32 -0
- package/dist/vendor/@base-ui/react/utils/InternalBackdrop.js +30 -0
- package/dist/vendor/@base-ui/react/utils/dispatchClickWithModifiers.js +25 -0
- package/dist/vendor/@base-ui/react/utils/popupStateMapping.js +22 -0
- package/dist/vendor/@base-ui/react/utils/popups/popupStoreUtils.js +247 -0
- package/dist/vendor/@base-ui/react/utils/popups/popupTriggerMap.js +96 -0
- package/dist/vendor/@base-ui/react/utils/popups/store.js +94 -0
- package/dist/vendor/@base-ui/react/utils/resolveClassName.js +13 -0
- package/dist/vendor/@base-ui/react/utils/resolveRef.js +11 -0
- package/dist/vendor/@base-ui/react/utils/resolveStyle.js +13 -0
- package/dist/vendor/@base-ui/react/utils/useFocusableWhenDisabled.js +30 -0
- package/dist/vendor/@base-ui/utils/addEventListener.js +12 -0
- package/dist/vendor/@base-ui/utils/createLogOnce.js +20 -0
- package/dist/vendor/@base-ui/utils/empty.js +6 -0
- package/dist/vendor/@base-ui/utils/error.js +5 -0
- package/dist/vendor/@base-ui/utils/fastHooks.js +68 -0
- package/dist/vendor/@base-ui/utils/formatErrorMessage.js +27 -0
- package/dist/vendor/@base-ui/utils/getDefaultFormSubmitter.js +25 -0
- package/dist/vendor/@base-ui/utils/getReactElementRef.js +14 -0
- package/dist/vendor/@base-ui/utils/inertValue.js +8 -0
- package/dist/vendor/@base-ui/utils/isElementDisabled.js +6 -0
- package/dist/vendor/@base-ui/utils/mergeCleanups.js +14 -0
- package/dist/vendor/@base-ui/utils/mergeObjects.js +11 -0
- package/dist/vendor/@base-ui/utils/owner.js +7 -0
- package/dist/vendor/@base-ui/utils/platform/engine.js +8 -0
- package/dist/vendor/@base-ui/utils/platform/env.js +6 -0
- package/dist/vendor/@base-ui/utils/platform/os.js +15 -0
- package/dist/vendor/@base-ui/utils/platform/screen-reader.js +9 -0
- package/dist/vendor/@base-ui/utils/platform/shared.js +36 -0
- package/dist/vendor/@base-ui/utils/reactVersion.js +8 -0
- package/dist/vendor/@base-ui/utils/safeReact.js +13 -0
- package/dist/vendor/@base-ui/utils/shadowDom.js +26 -0
- package/dist/vendor/@base-ui/utils/store/ReactStore.js +181 -0
- package/dist/vendor/@base-ui/utils/store/Store.js +102 -0
- package/dist/vendor/@base-ui/utils/store/useStore.js +97 -0
- package/dist/vendor/@base-ui/utils/useAnimationFrame.js +87 -0
- package/dist/vendor/@base-ui/utils/useControlled.js +52 -0
- package/dist/vendor/@base-ui/utils/useId.js +32 -0
- package/dist/vendor/@base-ui/utils/useIsoLayoutEffect.js +7 -0
- package/dist/vendor/@base-ui/utils/useMergedRefs.js +87 -0
- package/dist/vendor/@base-ui/utils/useOnMount.js +12 -0
- package/dist/vendor/@base-ui/utils/useRefWithInit.js +18 -0
- package/dist/vendor/@base-ui/utils/useScrollLock.js +206 -0
- package/dist/vendor/@base-ui/utils/useStableCallback.js +38 -0
- package/dist/vendor/@base-ui/utils/useTimeout.js +43 -0
- package/dist/vendor/@base-ui/utils/useValueAsRef.js +27 -0
- package/dist/vendor/@base-ui/utils/visuallyHidden.js +23 -0
- package/dist/vendor/@base-ui/utils/warn.js +5 -0
- package/dist/vendor/@floating-ui/utils/dist/floating-ui.utils.dom.js +49 -0
- package/dist/vendor/uqr/dist/index.js +858 -0
- package/dist/vendor/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +74 -0
- package/dist/vendor/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +77 -0
- package/dist/vendor/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +69 -0
- package/dist/vendor/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +64 -0
- package/dist/vendor/use-sync-external-store/shim/index.js +11 -0
- package/dist/vendor/use-sync-external-store/shim/with-selector.js +11 -0
- package/package.json +14 -9
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Image","List"],"sources":["../src/theme.ts","../src/components/tokens.ts","../src/components/field.tsx","../src/components/field-box.ts","../src/components/typed-text.ts","../src/components/amount-input.tsx","../src/components/spinner.tsx","../src/components/button.tsx","../src/components/carousel.tsx","../src/components/tones.ts","../src/components/icon.tsx","../src/components/chip.tsx","../src/components/code-input.tsx","../src/components/divider.tsx","../src/components/empty-state.tsx","../src/components/feedback.tsx","../src/components/footer.tsx","../src/components/pill.tsx","../src/components/grid.tsx","../src/components/image.tsx","../src/components/input.tsx","../src/components/list.tsx","../src/components/qr-code.tsx","../src/components/animate.ts","../src/components/sheet.tsx","../src/components/select.tsx","../src/components/skeleton.tsx","../src/components/tabs.tsx","../src/components/text.tsx","../src/components/text-area.tsx","../src/components/toast.tsx","../src/components/toggles.tsx","../src/components/view.tsx","../src/components/index.ts","../src/page-root.tsx","../src/root.tsx","../src/renderer.tsx","../src/index.ts"],"sourcesContent":["import type { ColorScheme, SchemeColor, Theme } from '@monimesl/dot-core';\nimport { createContext, useContext } from 'react';\n\nexport interface ResolvedColors {\n primary: string;\n background: string;\n surface: string;\n text: string;\n subtle: string;\n muted: string;\n border: string;\n info: string;\n success: string;\n warning: string;\n danger: string;\n}\n\nexport interface ResolvedTheme {\n scheme: ColorScheme;\n colors: ResolvedColors;\n radius: number;\n}\n\nexport const FONT_FAMILY = 'system-ui, sans-serif';\n\nconst DEFAULT_RADIUS = 12;\n\n// Dash's own look: black, white and grays, so a dot feels at home in it.\nconst DEFAULT_COLORS: Record<ColorScheme, ResolvedColors> = {\n light: {\n primary: '#1c1c1e',\n background: '#f2f2f2',\n surface: '#ffffff',\n text: '#111111',\n subtle: '#8e8e93',\n muted: '#e9e9eb',\n border: '#e9e9eb',\n info: '#0a64d6',\n success: '#1a8a4a',\n warning: '#b25e00',\n danger: '#d0312d',\n },\n dark: {\n primary: '#f5f5f5',\n background: '#121212',\n surface: '#1e1e1e',\n text: '#f5f5f5',\n subtle: '#8e8e93',\n muted: '#2c2c2e',\n border: '#2a2a2c',\n info: '#4c9dff',\n success: '#3ecf72',\n warning: '#ffb340',\n danger: '#ff6961',\n },\n};\n\nexport function resolveTheme(theme: Theme, systemScheme: ColorScheme): ResolvedTheme {\n const scheme = !theme.scheme || theme.scheme === 'system' ? systemScheme : theme.scheme;\n const defaults = DEFAULT_COLORS[scheme];\n const colors = theme.colors ?? {};\n const pick = (color: SchemeColor | undefined, fallback: string) => color?.[scheme] ?? fallback;\n return {\n scheme,\n colors: {\n primary: pick(colors.primary, defaults.primary),\n background: pick(colors.background, defaults.background),\n surface: pick(colors.surface, defaults.surface),\n text: pick(colors.text, defaults.text),\n subtle: defaults.subtle,\n muted: defaults.muted,\n border: defaults.border,\n info: defaults.info,\n success: defaults.success,\n warning: defaults.warning,\n danger: defaults.danger,\n },\n radius: theme.radius ?? DEFAULT_RADIUS,\n };\n}\n\nexport const ThemeContext = createContext<ResolvedTheme>(resolveTheme({}, 'light'));\n\nexport function useTheme(): ResolvedTheme {\n return useContext(ThemeContext);\n}\n","export const SPACE = { none: 0, small: 4, medium: 8, large: 16 } as const;\n\nexport const FONT_SIZE = { caption: 13, body: 15, title: 20 } as const;\n\n// Cards round a little more than the controls inside them.\nexport const CARD_RADIUS_SCALE = 1.5;\n\nexport const DISABLED_OPACITY = 0.6;\n\nexport const ICON_SIZE = { small: 16, medium: 20, large: 28 } as const;\n\n// At least 16px, or iOS zooms into the page when a field is focused.\nexport const FIELD_FONT_SIZE = 16;\n","import type { ReactNode } from 'react';\n\nimport { useTheme } from '../theme';\nimport { FONT_SIZE, SPACE } from './tokens';\n\ninterface FieldProps {\n label: string | undefined;\n hint: string | undefined;\n error: string | undefined;\n children: ReactNode;\n}\n\nexport function Field({ label, hint, error, children }: FieldProps) {\n const { colors } = useTheme();\n const note = error || hint;\n return (\n <label\n className=\"dot-field\"\n style={{ display: 'flex', flexDirection: 'column', gap: SPACE.small }}\n >\n {label ? <FieldLabel>{label}</FieldLabel> : null}\n {children}\n {note ? (\n <span style={{ fontSize: FONT_SIZE.caption, color: error ? colors.danger : colors.subtle }}>\n {note}\n </span>\n ) : null}\n </label>\n );\n}\n\nexport function FieldLabel({ children }: { children: ReactNode }) {\n return <span style={{ fontSize: FONT_SIZE.caption, fontWeight: 500 }}>{children}</span>;\n}\n","import type { CSSProperties } from 'react';\nimport { useState } from 'react';\n\nimport { useTheme } from '../theme';\nimport { DISABLED_OPACITY, FIELD_FONT_SIZE } from './tokens';\n\nexport function useFieldBox(error: string | undefined, disabled: boolean | undefined) {\n const { colors, radius } = useTheme();\n const [focused, setFocused] = useState(false);\n let borderColor = colors.border;\n if (error) {\n borderColor = colors.danger;\n } else if (focused) {\n borderColor = colors.primary;\n }\n const style: CSSProperties = {\n border: `1px solid ${borderColor}`,\n borderRadius: radius,\n background: colors.surface,\n color: colors.text,\n fontSize: FIELD_FONT_SIZE,\n opacity: disabled ? DISABLED_OPACITY : 1,\n };\n return { style, onFocus: () => setFocused(true), onBlur: () => setFocused(false) };\n}\n","import { useState } from 'react';\n\n// `value` is page state, which the service updates a moment after each keystroke. By the time\n// it sends back \"a\", the user may have typed \"abc\"; showing \"a\" would erase \"bc\". So a value\n// the user already sent is a late echo and is ignored. A value the user never sent, such as\n// a reset, was set by the page and replaces the text, as `show` writes it.\nexport function useTypedText(\n value: string | undefined,\n sendsChanges: boolean,\n show: (value: string) => string = (text) => text,\n): [text: string, type: (next: string, sent?: string) => void] {\n const [text, setText] = useState(() => show(value ?? ''));\n const [awaitingEcho, setAwaitingEcho] = useState<string[]>([]);\n const [previousValue, setPreviousValue] = useState(value);\n\n if (value !== previousValue) {\n setPreviousValue(value);\n const echo = awaitingEcho.indexOf(value ?? '');\n if (echo >= 0) {\n setAwaitingEcho(awaitingEcho.slice(echo + 1));\n } else {\n setAwaitingEcho([]);\n setText(show(value ?? ''));\n }\n }\n\n // `sent` is what the change sends the page, when it differs from the text shown.\n const type = (next: string, sent = next) => {\n setText(next);\n if (sendsChanges && value !== undefined) {\n setAwaitingEcho([...awaitingEcho, sent]);\n }\n };\n return [text, type];\n}\n","import type { AmountInput as AmountInputManifest } from '@monimesl/dot-core';\nimport { createEvent } from '@monimesl/dot-core';\n\nimport { useTheme } from '../theme';\nimport type { ReactComponent } from '../types';\nimport { Field } from './field';\nimport { useFieldBox } from './field-box';\nimport { SPACE } from './tokens';\nimport { useTypedText } from './typed-text';\n\nconst AMOUNT_FONT_SIZE = 28;\n\nexport const AmountInput: ReactComponent<typeof AmountInputManifest> = ({\n value,\n currency,\n decimals = 0,\n label,\n placeholder = '0',\n hint,\n error,\n disabled,\n onChange,\n}) => {\n const { colors } = useTheme();\n const places = Math.max(0, Math.round(decimals));\n const [text, typeText] = useTypedText(amountText(value), onChange !== undefined, (sent) =>\n sent === '' ? '' : formatAmount(Number(sent), places),\n );\n const box = useFieldBox(error, disabled);\n return (\n <Field label={label} hint={hint} error={error}>\n <span\n className=\"dot-amount-input\"\n style={{\n ...box.style,\n display: 'flex',\n alignItems: 'baseline',\n gap: SPACE.medium,\n padding: '10px 14px',\n }}\n >\n {currency ? (\n <span style={{ color: colors.subtle, fontSize: 20, fontWeight: 500 }}>{currency}</span>\n ) : null}\n <input\n value={text}\n placeholder={placeholder}\n inputMode={places > 0 ? 'decimal' : 'numeric'}\n disabled={disabled}\n aria-invalid={error ? true : undefined}\n onFocus={box.onFocus}\n onBlur={box.onBlur}\n onChange={(event) => {\n const typed = cleanAmount(event.currentTarget.value, places);\n const amount = parseAmount(typed);\n const sent = amount === null ? '' : String(amount);\n typeText(typed, sent);\n onChange?.(createEvent('change', { value: amount }));\n }}\n style={{\n flexGrow: 1,\n minWidth: 0,\n padding: 0,\n border: 'none',\n outline: 'none',\n background: 'transparent',\n color: 'inherit',\n font: 'inherit',\n fontSize: AMOUNT_FONT_SIZE,\n fontWeight: 600,\n }}\n />\n </span>\n </Field>\n );\n};\n\n// The page's value as the text a change sends, '' for none, to tell its echoes.\nfunction amountText(value: number | undefined): string | undefined {\n if (value === undefined) {\n return undefined;\n }\n return Number.isFinite(value) ? String(value) : '';\n}\n\n// What was typed, kept to digits and one decimal point, with its thousands grouped: \"1,250.5\".\nfunction cleanAmount(typed: string, places: number): string {\n const [whole = '', ...fractions] = typed.replace(/[^\\d.]/g, '').split('.');\n // Leading zeros go, but a lone 0 stays.\n const digits = whole.replace(/^0+/, '') || whole.slice(0, 1);\n if (places === 0 || fractions.length === 0) {\n return groupThousands(digits);\n }\n const fraction = fractions.join('').slice(0, places);\n return `${groupThousands(digits) || '0'}.${fraction}`;\n}\n\nfunction parseAmount(text: string): number | null {\n const plain = text.replaceAll(',', '');\n return plain === '' ? null : Number(plain);\n}\n\nfunction formatAmount(amount: number, places: number): string {\n const [whole = '', fraction] = Math.abs(amount).toFixed(places).split('.');\n const grouped = groupThousands(whole);\n return fraction === undefined ? grouped : `${grouped}.${fraction}`;\n}\n\n// \"1250000\" -> \"1,250,000\"\nfunction groupThousands(digits: string): string {\n const groups: string[] = [];\n for (let end = digits.length; end > 0; end -= 3) {\n groups.unshift(digits.slice(Math.max(0, end - 3), end));\n }\n return groups.join(',');\n}\n","import type { Spinner as SpinnerManifest } from '@monimesl/dot-core';\n\nimport { useTheme } from '../theme';\nimport type { ReactComponent } from '../types';\nimport { ICON_SIZE } from './tokens';\n\n// A quarter arc turning over a faint full circle, in the current text color.\nexport function LoadingIcon({ size }: { size: number }) {\n return (\n <svg\n className=\"dot-spinner\"\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={3}\n role=\"progressbar\"\n aria-label=\"Loading\"\n style={{ flexShrink: 0 }}\n >\n <circle cx=\"12\" cy=\"12\" r=\"9\" strokeOpacity={0.25} />\n <path d=\"M21 12a9 9 0 0 0-9-9\" strokeLinecap=\"round\">\n <animateTransform\n attributeName=\"transform\"\n type=\"rotate\"\n from=\"0 12 12\"\n to=\"360 12 12\"\n dur=\"0.8s\"\n repeatCount=\"indefinite\"\n />\n </path>\n </svg>\n );\n}\n\nexport const Spinner: ReactComponent<typeof SpinnerManifest> = ({ size = 'medium' }) => {\n const { colors } = useTheme();\n return (\n <span style={{ display: 'inline-flex', alignSelf: 'center', color: colors.subtle }}>\n <LoadingIcon size={ICON_SIZE[size]} />\n </span>\n );\n};\n","import type { Button as ButtonManifest } from '@monimesl/dot-core';\nimport { createEvent } from '@monimesl/dot-core';\n\nimport type { ReactComponent } from '../types';\nimport { useTheme } from '../theme';\nimport { LoadingIcon } from './spinner';\nimport { DISABLED_OPACITY, FONT_SIZE, ICON_SIZE, SPACE } from './tokens';\n\nexport const Button: ReactComponent<typeof ButtonManifest> = ({\n variant = 'primary',\n disabled,\n loading,\n onClick,\n children,\n}) => {\n const { colors, radius } = useTheme();\n const filled = variant === 'primary' && !disabled;\n let color = colors.text;\n if (filled) {\n color = colors.surface;\n } else if (disabled) {\n color = colors.subtle;\n }\n const handleClick = onClick && !loading ? () => onClick(createEvent('click')) : undefined;\n return (\n <button\n type=\"button\"\n className=\"dot-button\"\n data-variant={variant}\n disabled={disabled}\n aria-busy={loading}\n onClick={handleClick}\n style={{\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n gap: SPACE.medium,\n minHeight: 48,\n padding: '12px 20px',\n border: 'none',\n borderRadius: radius,\n background: filled ? colors.primary : colors.muted,\n color,\n font: 'inherit',\n fontSize: FONT_SIZE.body,\n fontWeight: 600,\n opacity: disabled ? DISABLED_OPACITY : 1,\n cursor: disabled || loading ? 'default' : 'pointer',\n }}\n >\n {loading ? <LoadingIcon size={ICON_SIZE.small} /> : null}\n {children}\n </button>\n );\n};\n","import type { Carousel as CarouselManifest } from '@monimesl/dot-core';\nimport { createEvent } from '@monimesl/dot-core';\nimport type { PointerEvent, ReactElement, ReactNode } from 'react';\nimport {\n Children,\n Fragment,\n isValidElement,\n useEffect,\n useEffectEvent,\n useRef,\n useState,\n} from 'react';\n\nimport { useTheme } from '../theme';\nimport type { ReactComponent } from '../types';\nimport { SPACE } from './tokens';\n\nconst SLIDE_DURATION = 350;\nconst SLIDE_EASING = 'cubic-bezier(0.22, 0.61, 0.36, 1)';\n// A swipe moves to the next slide when it covers this share of the width, or is this fast, in\n// pixels per millisecond.\nconst SWIPE_DISTANCE = 0.2;\nconst SWIPE_SPEED = 0.4;\n// Past the first or last slide without `loop`, the slides follow the finger only this much.\nconst EDGE_RESISTANCE = 0.3;\n// A touch that moves less than this is a tap, not a swipe.\nconst TAP_SLOP = 6;\n// With the `scale` effect, how small a slide gets one slide away from the middle.\nconst SCALED_DOWN = 0.85;\n\ninterface Slide {\n readonly key: string;\n readonly node: ReactElement;\n}\n\ninterface Gesture {\n readonly pointerId: number;\n readonly startX: number;\n readonly startY: number;\n readonly startTime: number;\n swiping: boolean;\n}\n\nexport const Carousel: ReactComponent<typeof CarouselManifest> = ({\n autoplay = false,\n interval = 4000,\n loop = false,\n indicator = 'dots',\n gap = 'none',\n effect = 'slide',\n index,\n onChange,\n children,\n}) => {\n const { colors } = useTheme();\n const slides = slidesOf(children);\n const count = slides.length;\n // A looping carousel has a copy of the last slide before the first, and of the first after the\n // last, so moving past either end slides on instead of rewinding.\n const looping = loop && count > 1;\n const first = looping ? 1 : 0;\n const last = looping ? count + 1 : count - 1;\n\n const [position, setPosition] = useState(() => first + slideIndex(index ?? 0, count));\n const [animated, setAnimated] = useState(true);\n const [drag, setDrag] = useState(0);\n const [dragging, setDragging] = useState(false);\n // Measured when a swipe starts, to tell how far it has moved in slides.\n const [width, setWidth] = useState(0);\n const [previousIndex, setPreviousIndex] = useState(index);\n const viewport = useRef<HTMLDivElement>(null);\n const gesture = useRef<Gesture | null>(null);\n const swiped = useRef(false);\n\n if (index !== previousIndex) {\n setPreviousIndex(index);\n if (index !== undefined) {\n setAnimated(true);\n setPosition(first + slideIndex(index, count));\n }\n }\n\n const shown = clamp(position, 0, last);\n const current = count === 0 ? 0 : wrap(shown - first, count);\n\n const moveTo = (target: number) => {\n const next = clamp(target, 0, last);\n setAnimated(true);\n setPosition(next);\n const nextIndex = wrap(next - first, count);\n if (nextIndex !== current) {\n onChange?.(createEvent('change', { index: nextIndex }));\n }\n };\n\n const step = (direction: 1 | -1) => {\n const beyondEnd = current + direction < 0 || current + direction >= count;\n moveTo(!looping && beyondEnd ? shown : shown + direction);\n };\n\n const advance = useEffectEvent(() => {\n if (!looping && current === count - 1) {\n moveTo(first);\n } else {\n moveTo(shown + 1);\n }\n });\n useEffect(() => {\n if (!autoplay || count < 2 || dragging) {\n return undefined;\n }\n const timer = setTimeout(advance, interval);\n return () => clearTimeout(timer);\n }, [autoplay, count, dragging, interval, current]);\n\n // Once the slide to a copy ends, jumps to the slide it copies, which looks the same.\n useEffect(() => {\n if (!looping || (position !== 0 && position !== count + 1)) {\n return undefined;\n }\n const timer = setTimeout(() => {\n setAnimated(false);\n setPosition(position === 0 ? count : 1);\n }, SLIDE_DURATION);\n return () => clearTimeout(timer);\n }, [looping, position, count]);\n\n // The swipe `event` belongs to, if it is the one in progress.\n const gestureOf = (event: PointerEvent<HTMLDivElement>) => {\n const touch = gesture.current;\n return touch?.pointerId === event.pointerId ? touch : null;\n };\n\n const endGesture = () => {\n gesture.current = null;\n setDragging(false);\n setDrag(0);\n setAnimated(true);\n };\n\n const onPointerDown = (event: PointerEvent<HTMLDivElement>) => {\n if (count < 2 || !event.isPrimary) {\n return;\n }\n gesture.current = {\n pointerId: event.pointerId,\n startX: event.clientX,\n startY: event.clientY,\n startTime: event.timeStamp,\n swiping: false,\n };\n swiped.current = false;\n setDragging(true);\n setWidth(viewport.current?.clientWidth ?? 0);\n };\n\n const onPointerMove = (event: PointerEvent<HTMLDivElement>) => {\n const touch = gestureOf(event);\n if (!touch) {\n return;\n }\n const dx = event.clientX - touch.startX;\n const dy = event.clientY - touch.startY;\n if (!touch.swiping) {\n if (Math.abs(dx) < TAP_SLOP && Math.abs(dy) < TAP_SLOP) {\n return;\n }\n if (Math.abs(dy) > Math.abs(dx)) {\n // Scrolling the page, not swiping.\n endGesture();\n return;\n }\n touch.swiping = true;\n swiped.current = true;\n // Optional, as the DOM that tests run in has no pointer capture.\n event.currentTarget.setPointerCapture?.(event.pointerId);\n setAnimated(false);\n }\n const pastEnd = !looping && ((current === 0 && dx > 0) || (current === count - 1 && dx < 0));\n setDrag(pastEnd ? dx * EDGE_RESISTANCE : dx);\n };\n\n const onPointerUp = (event: PointerEvent<HTMLDivElement>) => {\n const touch = gestureOf(event);\n if (!touch) {\n return;\n }\n endGesture();\n if (!touch.swiping) {\n return;\n }\n const dx = event.clientX - touch.startX;\n const speed = Math.abs(dx) / Math.max(1, event.timeStamp - touch.startTime);\n if (Math.abs(dx) > width * SWIPE_DISTANCE || speed > SWIPE_SPEED) {\n step(dx < 0 ? 1 : -1);\n } else {\n moveTo(shown);\n }\n };\n\n const gapWidth = SPACE[gap];\n const transition = animated ? `transform ${SLIDE_DURATION}ms ${SLIDE_EASING}` : 'none';\n const swipedSlides = width > 0 ? drag / (width + gapWidth) : 0;\n\n const track: Slide[] = looping\n ? [\n { ...slides[count - 1]!, key: 'copy-of-last' },\n ...slides,\n { ...slides[0]!, key: 'copy-of-first' },\n ]\n : slides;\n\n return (\n <div\n className=\"dot-carousel\"\n role=\"region\"\n aria-roledescription=\"carousel\"\n style={{ display: 'flex', flexDirection: 'column', gap: SPACE.medium, minWidth: 0 }}\n >\n <div\n ref={viewport}\n onPointerDown={onPointerDown}\n onPointerMove={onPointerMove}\n onPointerUp={onPointerUp}\n onPointerCancel={endGesture}\n onDragStart={(event) => event.preventDefault()}\n // A swipe that ends over a button doesn't also press it.\n onClickCapture={(event) => {\n if (swiped.current) {\n swiped.current = false;\n event.stopPropagation();\n }\n }}\n style={{\n overflow: 'hidden',\n // Vertical moves still scroll the page.\n touchAction: 'pan-y',\n userSelect: dragging ? 'none' : undefined,\n }}\n >\n <div\n style={{\n display: 'flex',\n gap: gapWidth,\n // Each slide is the width of the carousel, and the gap after it.\n transform: `translateX(calc(${-shown} * (100% + ${gapWidth}px) + ${drag}px))`,\n transition,\n }}\n >\n {track.map((slide, trackPosition) => {\n const visible = trackPosition === shown;\n // How many slides away from the middle this one is, as the swipe moves it.\n const distance = Math.abs(trackPosition - shown + swipedSlides);\n const scale = 1 - Math.min(distance, 1) * (1 - SCALED_DOWN);\n return (\n <div\n key={slide.key}\n role=\"group\"\n aria-roledescription=\"slide\"\n aria-label={`${wrap(trackPosition - first, count) + 1} of ${count}`}\n aria-hidden={!visible}\n inert={!visible}\n // A grid stretches the slide's content to the height of the tallest slide.\n style={{\n display: 'grid',\n flex: '0 0 100%',\n minWidth: 0,\n transform: effect === 'scale' ? `scale(${scale})` : undefined,\n transition: effect === 'scale' ? transition : undefined,\n }}\n >\n {slide.node}\n </div>\n );\n })}\n </div>\n </div>\n {indicator === 'dots' && count > 1 ? (\n <div style={{ display: 'flex', justifyContent: 'center' }}>\n {slides.map((slide, slideIndex) => {\n const active = slideIndex === current;\n return (\n <button\n key={slide.key}\n type=\"button\"\n aria-label={`Slide ${slideIndex + 1} of ${count}`}\n aria-current={active}\n onClick={() => moveTo(first + slideIndex)}\n style={{\n padding: '6px 3px',\n border: 'none',\n background: 'none',\n cursor: 'pointer',\n }}\n >\n <span\n style={{\n display: 'block',\n width: active ? 18 : 6,\n height: 6,\n borderRadius: 3,\n background: active ? colors.primary : colors.subtle,\n transition: 'width 0.3s, background 0.3s',\n }}\n />\n </button>\n );\n })}\n </div>\n ) : null}\n </div>\n );\n};\n\n// Each element among the children is a slide, those a <For> or <If> gives included.\nfunction slidesOf(children: ReactNode, keyPrefix = ''): Slide[] {\n const slides: Slide[] = [];\n for (const child of Children.toArray(children)) {\n if (!isValidElement<{ children?: ReactNode }>(child)) {\n continue;\n }\n const key = `${keyPrefix}${String(child.key)}`;\n if (child.type === Fragment) {\n slides.push(...slidesOf(child.props.children, `${key}/`));\n } else {\n slides.push({ key, node: child });\n }\n }\n return slides;\n}\n\nfunction clamp(value: number, min: number, max: number): number {\n return Math.max(min, Math.min(value, max));\n}\n\n// The slide an `index` from the page names, kept to the slides there are.\nfunction slideIndex(index: number, count: number): number {\n return clamp(Math.round(index), 0, count - 1);\n}\n\n// `value` brought into 0 to count - 1, counting on from the start past the end.\nfunction wrap(value: number, count: number): number {\n return ((value % count) + count) % count;\n}\n","import type { IconName, STATUS_TONES, TONES } from '@monimesl/dot-core';\n\nimport type { ResolvedColors } from '../theme';\n\nexport type Tone = (typeof TONES)[number];\n\nexport const STATUS_ICONS: Record<(typeof STATUS_TONES)[number], IconName> = {\n default: 'info',\n info: 'info',\n success: 'success',\n warning: 'warning',\n danger: 'error',\n};\n\nexport function toneColor(colors: ResolvedColors, tone: Tone): string {\n switch (tone) {\n case 'default':\n return colors.text;\n case 'muted':\n return colors.subtle;\n default:\n return colors[tone];\n }\n}\n\nexport function toneBackground(colors: ResolvedColors, tone: Tone): string {\n if (tone === 'default' || tone === 'muted') {\n return colors.muted;\n }\n return withOpacity(colors[tone], 0.14);\n}\n\n// Appends an alpha channel to a #rrggbb color.\nfunction withOpacity(color: string, opacity: number): string {\n const alpha = Math.round(opacity * 255)\n .toString(16)\n .padStart(2, '0');\n return `${color}${alpha}`;\n}\n","import type { IconName, Icon as IconManifest } from '@monimesl/dot-core';\nimport type { IconNode } from 'lucide';\nimport {\n ArrowDown,\n ArrowLeft,\n ArrowRight,\n ArrowUp,\n Banknote,\n Bell,\n Calendar,\n Check,\n ChevronDown,\n ChevronLeft,\n ChevronRight,\n ChevronUp,\n CircleAlert,\n CircleCheck,\n CircleHelp,\n Clock,\n Copy,\n CreditCard,\n Download,\n Droplet,\n Ellipsis,\n Eye,\n EyeOff,\n File,\n Gift,\n Heart,\n History,\n House,\n Image,\n Info,\n Landmark,\n LayoutGrid,\n List,\n Lock,\n LogOut,\n Mail,\n MapPin,\n Minus,\n Pencil,\n Phone,\n Plus,\n QrCode,\n Receipt,\n RefreshCw,\n Search,\n Send,\n Settings,\n Share2,\n ShoppingCart,\n Smartphone,\n Star,\n Trash2,\n TriangleAlert,\n Upload,\n User,\n Users,\n Wallet,\n Wifi,\n X,\n Zap,\n} from 'lucide';\nimport { createElement } from 'react';\n\nimport { useTheme } from '../theme';\nimport type { ReactComponent } from '../types';\nimport { ICON_SIZE } from './tokens';\nimport { toneColor } from './tones';\n\n// Drawn by Lucide (lucide.dev, ISC license).\nconst ICONS: Record<IconName, IconNode> = {\n 'arrow-down': ArrowDown,\n 'arrow-left': ArrowLeft,\n 'arrow-right': ArrowRight,\n 'arrow-up': ArrowUp,\n bank: Landmark,\n bell: Bell,\n bolt: Zap,\n calendar: Calendar,\n card: CreditCard,\n cart: ShoppingCart,\n cash: Banknote,\n check: Check,\n 'chevron-down': ChevronDown,\n 'chevron-left': ChevronLeft,\n 'chevron-right': ChevronRight,\n 'chevron-up': ChevronUp,\n clock: Clock,\n close: X,\n copy: Copy,\n download: Download,\n edit: Pencil,\n error: CircleAlert,\n eye: Eye,\n 'eye-off': EyeOff,\n file: File,\n gift: Gift,\n grid: LayoutGrid,\n heart: Heart,\n help: CircleHelp,\n history: History,\n home: House,\n image: Image,\n info: Info,\n list: List,\n location: MapPin,\n lock: Lock,\n logout: LogOut,\n mail: Mail,\n minus: Minus,\n mobile: Smartphone,\n more: Ellipsis,\n phone: Phone,\n plus: Plus,\n 'qr-code': QrCode,\n receipt: Receipt,\n refresh: RefreshCw,\n search: Search,\n send: Send,\n settings: Settings,\n share: Share2,\n star: Star,\n success: CircleCheck,\n trash: Trash2,\n upload: Upload,\n user: User,\n users: Users,\n wallet: Wallet,\n warning: TriangleAlert,\n water: Droplet,\n wifi: Wifi,\n};\n\ninterface IconGraphicProps {\n name: IconName;\n size: number;\n color: string;\n}\n\nexport function IconGraphic({ name, size, color }: IconGraphicProps) {\n return (\n <svg\n className=\"dot-icon\"\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n style={{ display: 'inline-block', verticalAlign: 'middle', flexShrink: 0 }}\n >\n {ICONS[name].map(([tag, attributes], index) =>\n createElement(tag, { key: index, ...attributes }),\n )}\n </svg>\n );\n}\n\nexport const Icon: ReactComponent<typeof IconManifest> = ({\n name,\n size = 'medium',\n tone = 'default',\n}) => {\n const { colors } = useTheme();\n if (!name) {\n return null;\n }\n return <IconGraphic name={name} size={ICON_SIZE[size]} color={toneColor(colors, tone)} />;\n};\n","import type { Chip as ChipManifest } from '@monimesl/dot-core';\nimport { createEvent } from '@monimesl/dot-core';\n\nimport { useTheme } from '../theme';\nimport type { ReactComponent } from '../types';\nimport { IconGraphic } from './icon';\nimport { DISABLED_OPACITY, FONT_SIZE, ICON_SIZE } from './tokens';\n\nexport const Chip: ReactComponent<typeof ChipManifest> = ({\n label,\n icon,\n selected = false,\n disabled,\n onTap,\n}) => {\n const { colors } = useTheme();\n const color = selected ? colors.surface : colors.text;\n return (\n <button\n type=\"button\"\n className=\"dot-chip\"\n aria-pressed={selected}\n disabled={disabled}\n onClick={onTap ? () => onTap(createEvent('tap')) : undefined}\n style={{\n display: 'inline-flex',\n alignItems: 'center',\n gap: 6,\n flexShrink: 0,\n minHeight: 34,\n padding: '0 14px',\n borderRadius: 17,\n border: `1px solid ${selected ? colors.primary : colors.border}`,\n background: selected ? colors.primary : colors.surface,\n color,\n font: 'inherit',\n fontSize: FONT_SIZE.caption,\n fontWeight: 500,\n whiteSpace: 'nowrap',\n opacity: disabled ? DISABLED_OPACITY : 1,\n cursor: disabled ? 'default' : 'pointer',\n }}\n >\n {icon ? <IconGraphic name={icon} size={ICON_SIZE.small} color={color} /> : null}\n {label}\n </button>\n );\n};\n","import type { CodeInput as CodeInputManifest } from '@monimesl/dot-core';\nimport { createEvent } from '@monimesl/dot-core';\nimport { useState } from 'react';\n\nimport { useTheme } from '../theme';\nimport type { ReactComponent } from '../types';\nimport { Field } from './field';\nimport { DISABLED_OPACITY, FIELD_FONT_SIZE, SPACE } from './tokens';\nimport { useTypedText } from './typed-text';\n\nexport const CodeInput: ReactComponent<typeof CodeInputManifest> = ({\n value,\n length = 6,\n label,\n hint,\n error,\n secure,\n disabled,\n onChange,\n onComplete,\n}) => {\n const { colors, radius } = useTheme();\n const [text, typeText] = useTypedText(value, onChange !== undefined);\n const [focused, setFocused] = useState(false);\n const count = Math.max(1, Math.round(length));\n const digits = text.slice(0, count);\n // The box the next digit goes in, or the last box once all are filled.\n const next = Math.min(digits.length, count - 1);\n\n const boxes = Array.from({ length: count }, (_, index) => {\n const digit = digits[index];\n let borderColor = colors.border;\n if (error) {\n borderColor = colors.danger;\n } else if (focused && index === next) {\n borderColor = colors.primary;\n }\n return (\n <span\n key={index}\n style={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flex: '1 1 0',\n maxWidth: 52,\n height: 52,\n border: `1.5px solid ${borderColor}`,\n borderRadius: radius,\n background: colors.surface,\n fontSize: 22,\n fontWeight: 600,\n }}\n >\n {digit !== undefined && secure ? (\n <span\n aria-hidden=\"true\"\n style={{ width: 12, height: 12, borderRadius: '50%', background: colors.text }}\n />\n ) : (\n digit\n )}\n </span>\n );\n });\n\n return (\n <Field label={label} hint={hint} error={error}>\n <span\n className=\"dot-code-input\"\n style={{\n position: 'relative',\n display: 'flex',\n gap: SPACE.medium,\n color: colors.text,\n opacity: disabled ? DISABLED_OPACITY : 1,\n }}\n >\n {boxes}\n {/* One invisible field over the boxes takes the typing, pasting and a code from an SMS. */}\n <input\n value={digits}\n inputMode=\"numeric\"\n autoComplete=\"one-time-code\"\n maxLength={count}\n disabled={disabled}\n aria-invalid={error ? true : undefined}\n onFocus={() => setFocused(true)}\n onBlur={() => setFocused(false)}\n // Keeps the cursor at the end, where the next digit goes, wherever the boxes are tapped.\n onSelect={(event) => {\n const input = event.currentTarget;\n const end = input.value.length;\n if (input.selectionStart !== end || input.selectionEnd !== end) {\n input.setSelectionRange(end, end);\n }\n }}\n onChange={(event) => {\n const typed = event.currentTarget.value.replace(/\\D/g, '').slice(0, count);\n if (typed === digits) {\n return;\n }\n typeText(typed);\n onChange?.(createEvent('change', { value: typed }));\n if (typed.length === count) {\n onComplete?.(createEvent('complete', { value: typed }));\n }\n }}\n style={{\n position: 'absolute',\n inset: 0,\n width: '100%',\n height: '100%',\n padding: 0,\n border: 'none',\n opacity: 0,\n fontSize: FIELD_FONT_SIZE,\n cursor: disabled ? 'default' : 'text',\n }}\n />\n </span>\n </Field>\n );\n};\n","import type { Divider as DividerManifest } from '@monimesl/dot-core';\n\nimport { useTheme } from '../theme';\nimport type { ReactComponent } from '../types';\n\nexport const Divider: ReactComponent<typeof DividerManifest> = () => {\n const { colors } = useTheme();\n return (\n <div\n className=\"dot-divider\"\n role=\"separator\"\n style={{ height: 1, alignSelf: 'stretch', flexShrink: 0, background: colors.border }}\n />\n );\n};\n","import type { EmptyState as EmptyStateManifest } from '@monimesl/dot-core';\n\nimport { useTheme } from '../theme';\nimport type { ReactComponent } from '../types';\nimport { IconGraphic } from './icon';\nimport { FONT_SIZE, ICON_SIZE, SPACE } from './tokens';\n\nexport const EmptyState: ReactComponent<typeof EmptyStateManifest> = ({\n icon,\n title,\n text,\n children,\n}) => {\n const { colors } = useTheme();\n return (\n <div\n className=\"dot-empty-state\"\n style={{\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n gap: SPACE.medium,\n padding: '32px 16px',\n textAlign: 'center',\n color: colors.text,\n }}\n >\n {icon ? (\n <span\n style={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 64,\n height: 64,\n borderRadius: '50%',\n background: colors.muted,\n }}\n >\n <IconGraphic name={icon} size={ICON_SIZE.large} color={colors.subtle} />\n </span>\n ) : null}\n {title ? <span style={{ fontSize: 17, fontWeight: 600 }}>{title}</span> : null}\n {text ? (\n <span style={{ maxWidth: 300, fontSize: FONT_SIZE.body, color: colors.subtle }}>\n {text}\n </span>\n ) : null}\n {children ? (\n <div style={{ display: 'flex', gap: SPACE.medium, paddingTop: SPACE.small }}>\n {children}\n </div>\n ) : null}\n </div>\n );\n};\n","import type {\n Badge as BadgeManifest,\n Notice as NoticeManifest,\n ProgressBar as ProgressBarManifest,\n} from '@monimesl/dot-core';\n\nimport { useTheme } from '../theme';\nimport type { ReactComponent } from '../types';\nimport { IconGraphic } from './icon';\nimport { FONT_SIZE, ICON_SIZE, SPACE } from './tokens';\nimport { STATUS_ICONS, toneBackground, toneColor } from './tones';\n\nexport const ProgressBar: ReactComponent<typeof ProgressBarManifest> = ({ value = 0 }) => {\n const { colors } = useTheme();\n const percent = Math.min(100, Math.max(0, value));\n return (\n <div\n className=\"dot-progress-bar\"\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={percent}\n style={{ height: 6, borderRadius: 3, background: colors.muted, overflow: 'hidden' }}\n >\n <div\n style={{\n width: `${percent}%`,\n height: '100%',\n background: colors.primary,\n transition: 'width 0.2s',\n }}\n />\n </div>\n );\n};\n\nexport const Notice: ReactComponent<typeof NoticeManifest> = ({\n tone = 'default',\n title,\n children,\n}) => {\n const { colors, radius } = useTheme();\n return (\n <div\n className=\"dot-notice\"\n role={tone === 'danger' ? 'alert' : 'status'}\n style={{\n display: 'flex',\n gap: SPACE.medium,\n padding: '12px 14px',\n borderRadius: radius,\n background: toneBackground(colors, tone),\n color: colors.text,\n fontSize: FONT_SIZE.body,\n }}\n >\n <IconGraphic\n name={STATUS_ICONS[tone]}\n size={ICON_SIZE.medium}\n color={toneColor(colors, tone)}\n />\n <div style={{ display: 'flex', flexDirection: 'column', gap: 2 }}>\n {title ? <span style={{ fontWeight: 600 }}>{title}</span> : null}\n {children ? <span>{children}</span> : null}\n </div>\n </div>\n );\n};\n\nexport const Badge: ReactComponent<typeof BadgeManifest> = ({ tone = 'default', children }) => {\n const { colors } = useTheme();\n return (\n <span\n className=\"dot-badge\"\n style={{\n display: 'inline-flex',\n alignItems: 'center',\n // Keeps its own width in a column, which would otherwise stretch it.\n width: 'fit-content',\n padding: '2px 8px',\n borderRadius: 999,\n background: toneBackground(colors, tone),\n color: toneColor(colors, tone),\n fontSize: FONT_SIZE.caption,\n fontWeight: 600,\n whiteSpace: 'nowrap',\n }}\n >\n {children}\n </span>\n );\n};\n","import type { Footer as FooterManifest } from '@monimesl/dot-core';\n\nimport { useTheme } from '../theme';\nimport type { ReactComponent } from '../types';\nimport { SPACE } from './tokens';\n\nexport const Footer: ReactComponent<typeof FooterManifest> = ({ children }) => {\n const { colors } = useTheme();\n return (\n <div\n className=\"dot-footer\"\n style={{\n position: 'sticky',\n bottom: 0,\n // Sits at the bottom of a short page too.\n marginTop: 'auto',\n display: 'flex',\n flexDirection: 'column',\n gap: SPACE.medium,\n paddingTop: SPACE.medium,\n paddingBottom: SPACE.medium,\n background: colors.background,\n }}\n >\n {children}\n </div>\n );\n};\n","import type { ReactNode } from 'react';\n\n// A small rounded count or note, such as on a tab or at the corner of a grid item.\nexport function Pill({\n background,\n color,\n children,\n}: {\n background: string;\n color: string;\n children: ReactNode;\n}) {\n return (\n <span\n style={{\n minWidth: 18,\n padding: '1px 6px',\n borderRadius: 9,\n background,\n color,\n fontSize: 11,\n fontWeight: 600,\n lineHeight: '16px',\n textAlign: 'center',\n whiteSpace: 'nowrap',\n }}\n >\n {children}\n </span>\n );\n}\n","import type { Grid as GridManifest, GridItem as GridItemManifest } from '@monimesl/dot-core';\nimport { createEvent } from '@monimesl/dot-core';\nimport type { ReactNode } from 'react';\n\nimport { useTheme } from '../theme';\nimport type { ReactComponent } from '../types';\nimport { IconGraphic } from './icon';\nimport { Pill } from './pill';\nimport { CARD_RADIUS_SCALE, FONT_SIZE, SPACE } from './tokens';\n\nconst TILE_SIZE = 52;\n\nexport const Grid: ReactComponent<typeof GridManifest> = ({\n columns = 4,\n gap = 'medium',\n children,\n}) => (\n <div\n className=\"dot-grid\"\n style={{\n display: 'grid',\n // Equal columns, however long what's in them is.\n gridTemplateColumns: `repeat(${Math.max(1, Math.round(columns))}, minmax(0, 1fr))`,\n gap: SPACE[gap],\n }}\n >\n {children}\n </div>\n);\n\nexport const GridItem: ReactComponent<typeof GridItemManifest> = ({\n label,\n icon,\n image,\n badge,\n onTap,\n}) => {\n const { colors, radius } = useTheme();\n const tileRadius = radius * CARD_RADIUS_SCALE;\n let picture: ReactNode = null;\n if (image) {\n picture = (\n <img\n src={image}\n alt=\"\"\n width={TILE_SIZE}\n height={TILE_SIZE}\n style={{ display: 'block', borderRadius: tileRadius, objectFit: 'cover' }}\n />\n );\n } else if (icon) {\n picture = <IconGraphic name={icon} size={24} color={colors.primary} />;\n }\n return (\n <div\n className=\"dot-grid-item\"\n role={onTap ? 'button' : undefined}\n onClick={onTap ? () => onTap(createEvent('tap')) : undefined}\n style={{\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n gap: 6,\n padding: `${SPACE.small}px 0`,\n cursor: onTap ? 'pointer' : undefined,\n }}\n >\n <span\n style={{\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: TILE_SIZE,\n height: TILE_SIZE,\n borderRadius: tileRadius,\n background: colors.muted,\n }}\n >\n {picture}\n {badge ? (\n <span style={{ position: 'absolute', top: -6, right: -10 }}>\n <Pill background={colors.danger} color=\"#ffffff\">\n {badge}\n </Pill>\n </span>\n ) : null}\n </span>\n {label ? (\n <span\n style={{\n display: '-webkit-box',\n WebkitLineClamp: 2,\n WebkitBoxOrient: 'vertical',\n overflow: 'hidden',\n width: '100%',\n textAlign: 'center',\n fontSize: FONT_SIZE.caption,\n color: colors.text,\n }}\n >\n {label}\n </span>\n ) : null}\n </div>\n );\n};\n","import type { Image as ImageManifest } from '@monimesl/dot-core';\nimport { createEvent } from '@monimesl/dot-core';\nimport type { SyntheticEvent } from 'react';\n\nimport type { ReactComponent } from '../types';\nimport { useTheme } from '../theme';\n\nexport const Image: ReactComponent<typeof ImageManifest> = ({\n src,\n alt,\n width,\n height,\n fit = 'cover',\n shape = 'rounded',\n onLoad,\n onError,\n}) => {\n const { radius } = useTheme();\n const corners = { rounded: radius, square: 0, circle: '50%' }[shape];\n const handleLoad = onLoad\n ? (event: SyntheticEvent<HTMLImageElement>) => {\n const { naturalWidth, naturalHeight } = event.currentTarget;\n onLoad(createEvent('load', { width: naturalWidth, height: naturalHeight }));\n }\n : undefined;\n const handleError = onError\n ? () => onError(createEvent('error', { message: `Failed to load ${src}` }))\n : undefined;\n return (\n <img\n className=\"dot-image\"\n src={src}\n alt={alt ?? ''}\n width={width}\n height={height}\n style={{ borderRadius: corners, objectFit: fit }}\n onLoad={handleLoad}\n onError={handleError}\n />\n );\n};\n","import type { Input as InputManifest } from '@monimesl/dot-core';\nimport { createEvent } from '@monimesl/dot-core';\n\nimport { useTheme } from '../theme';\nimport type { ReactComponent } from '../types';\nimport { Field } from './field';\nimport { useFieldBox } from './field-box';\nimport { SPACE } from './tokens';\nimport { useTypedText } from './typed-text';\n\nconst HTML_TYPES = {\n text: { type: 'text', inputMode: 'text' },\n number: { type: 'text', inputMode: 'decimal' },\n email: { type: 'email', inputMode: 'email' },\n phone: { type: 'tel', inputMode: 'tel' },\n password: { type: 'password', inputMode: 'text' },\n} as const;\n\nexport const Input: ReactComponent<typeof InputManifest> = ({\n value,\n placeholder,\n label,\n hint,\n error,\n prefix,\n suffix,\n type = 'text',\n maxLength,\n disabled,\n onChange,\n onSubmit,\n}) => {\n const { colors } = useTheme();\n const [text, typeText] = useTypedText(value, onChange !== undefined);\n const box = useFieldBox(error, disabled);\n return (\n <Field label={label} hint={hint} error={error}>\n <span\n className=\"dot-input\"\n style={{\n ...box.style,\n display: 'flex',\n alignItems: 'center',\n gap: SPACE.medium,\n padding: '0 14px',\n }}\n >\n {prefix ? <span style={{ color: colors.subtle }}>{prefix}</span> : null}\n <input\n {...HTML_TYPES[type]}\n value={text}\n placeholder={placeholder}\n maxLength={maxLength}\n disabled={disabled}\n aria-invalid={error ? true : undefined}\n onFocus={box.onFocus}\n onBlur={box.onBlur}\n onChange={(event) => {\n const next = event.currentTarget.value;\n typeText(next);\n onChange?.(createEvent('change', { value: next }));\n }}\n onKeyDown={(event) => {\n if (event.key === 'Enter' && onSubmit) {\n onSubmit(createEvent('submit', { value: text }));\n }\n }}\n style={{\n flexGrow: 1,\n minWidth: 0,\n padding: '12px 0',\n border: 'none',\n outline: 'none',\n background: 'transparent',\n color: 'inherit',\n font: 'inherit',\n }}\n />\n {suffix ? <span style={{ color: colors.subtle }}>{suffix}</span> : null}\n </span>\n </Field>\n );\n};\n","import type { List as ListManifest, ListItem as ListItemManifest } from '@monimesl/dot-core';\nimport { createEvent } from '@monimesl/dot-core';\nimport type { ReactNode } from 'react';\n\nimport { useTheme } from '../theme';\nimport type { ReactComponent } from '../types';\nimport { IconGraphic } from './icon';\nimport { CARD_RADIUS_SCALE, FONT_SIZE, ICON_SIZE, SPACE } from './tokens';\n\nexport const List: ReactComponent<typeof ListManifest> = ({ children }) => {\n const { colors, radius } = useTheme();\n // Rows are drawn in the surface color, so the 1px gaps between them show as lines.\n return (\n <div\n className=\"dot-list\"\n style={{\n display: 'flex',\n flexDirection: 'column',\n gap: 1,\n overflow: 'hidden',\n borderRadius: radius * CARD_RADIUS_SCALE,\n border: `1px solid ${colors.border}`,\n background: colors.border,\n }}\n >\n {children}\n </div>\n );\n};\n\nexport const ListItem: ReactComponent<typeof ListItemManifest> = ({\n title,\n subtitle,\n value,\n icon,\n image,\n onTap,\n children,\n}) => {\n const { colors, radius } = useTheme();\n let leading: ReactNode = null;\n if (image) {\n leading = (\n <img\n src={image}\n alt=\"\"\n width={40}\n height={40}\n style={{ borderRadius: radius, objectFit: 'cover', flexShrink: 0 }}\n />\n );\n } else if (icon) {\n leading = (\n <span\n style={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 36,\n height: 36,\n borderRadius: '50%',\n background: colors.muted,\n flexShrink: 0,\n }}\n >\n <IconGraphic name={icon} size={ICON_SIZE.medium} color={colors.text} />\n </span>\n );\n }\n let trailing: ReactNode = children;\n if (!trailing && value) {\n trailing = <span style={{ color: colors.subtle }}>{value}</span>;\n }\n const handleClick = onTap ? () => onTap(createEvent('tap')) : undefined;\n return (\n <div\n className=\"dot-list-item\"\n role={onTap ? 'button' : undefined}\n onClick={handleClick}\n style={{\n display: 'flex',\n alignItems: 'center',\n gap: 12,\n padding: '12px 16px',\n background: colors.surface,\n fontSize: FONT_SIZE.body,\n cursor: onTap ? 'pointer' : undefined,\n }}\n >\n {leading}\n <span style={{ display: 'flex', flexDirection: 'column', flexGrow: 1, minWidth: 0 }}>\n {title ? <span style={{ fontWeight: 500 }}>{title}</span> : null}\n {subtitle ? (\n <span style={{ fontSize: FONT_SIZE.caption, color: colors.subtle }}>{subtitle}</span>\n ) : null}\n </span>\n {trailing ? (\n <span style={{ display: 'flex', alignItems: 'center', gap: SPACE.small, flexShrink: 0 }}>\n {trailing}\n </span>\n ) : null}\n {onTap ? (\n <IconGraphic name=\"chevron-right\" size={ICON_SIZE.small} color={colors.subtle} />\n ) : null}\n </div>\n );\n};\n","import type { QRCode as QRCodeManifest } from '@monimesl/dot-core';\nimport { useMemo } from 'react';\nimport { encode } from 'uqr';\n\nimport { useTheme } from '../theme';\nimport type { ReactComponent } from '../types';\n\n// Scanners need dark squares on a light ground, so the code keeps these in a dark theme too.\nconst DARK = '#000000';\nconst LIGHT = '#ffffff';\n// Light squares around the code, which scanners need to find its edges.\nconst QUIET_ZONE = 2;\n\nexport const QRCode: ReactComponent<typeof QRCodeManifest> = ({ value, size = 200, label }) => {\n const { radius } = useTheme();\n const drawing = useMemo(() => (value ? drawCode(value) : null), [value]);\n return (\n <svg\n className=\"dot-qr-code\"\n role=\"img\"\n aria-label={label ?? value}\n width={size}\n height={size}\n viewBox={drawing ? `0 0 ${drawing.size} ${drawing.size}` : '0 0 1 1'}\n shapeRendering=\"crispEdges\"\n style={{ display: 'block', flexShrink: 0, borderRadius: radius, background: LIGHT }}\n >\n {drawing ? <path d={drawing.path} fill={DARK} /> : null}\n </svg>\n );\n};\n\n// One square of path for each dark module of the code.\nfunction drawCode(value: string): { size: number; path: string } | null {\n let modules: boolean[][];\n try {\n modules = encode(value, { ecc: 'M', border: QUIET_ZONE }).data;\n } catch {\n // Too long to fit in a QR code.\n return null;\n }\n const squares: string[] = [];\n modules.forEach((row, y) => {\n row.forEach((dark, x) => {\n if (dark) {\n squares.push(`M${x} ${y}h1v1h-1z`);\n }\n });\n });\n return { size: modules.length, path: squares.join('') };\n}\n","// Runs a Web Animation where the browser has them; the DOM that tests run in doesn't.\nexport function animate(\n element: HTMLElement | null,\n keyframes: Keyframe[],\n options: KeyframeAnimationOptions,\n): Animation | undefined {\n if (!element || typeof element.animate !== 'function') {\n return undefined;\n }\n return element.animate(keyframes, options);\n}\n","import type { Sheet as SheetManifest } from '@monimesl/dot-core';\nimport { createEvent } from '@monimesl/dot-core';\nimport type { ReactNode } from 'react';\nimport { useEffect, useRef } from 'react';\n\nimport { useTheme } from '../theme';\nimport type { ReactComponent } from '../types';\nimport { animate } from './animate';\nimport { CARD_RADIUS_SCALE, FONT_SIZE, SPACE } from './tokens';\n\nconst SLIDE_UP: Keyframe[] = [{ transform: 'translateY(100%)' }, { transform: 'translateY(0)' }];\n\ninterface SheetPanelProps {\n open: boolean;\n title: string | undefined;\n onClose: () => void;\n children: ReactNode;\n}\n\n// The panel and the dimmed page behind it, which Sheet and Select share.\nexport function SheetPanel({ open, title, onClose, children }: SheetPanelProps) {\n const { colors, radius } = useTheme();\n const panel = useRef<HTMLDivElement>(null);\n useEffect(() => {\n if (open) {\n animate(panel.current, SLIDE_UP, { duration: 200, easing: 'ease-out' });\n }\n }, [open]);\n if (!open) {\n return null;\n }\n const corner = radius * CARD_RADIUS_SCALE;\n return (\n <div\n className=\"dot-sheet\"\n onClick={onClose}\n style={{\n position: 'fixed',\n inset: 0,\n zIndex: 100,\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'flex-end',\n background: 'rgba(0, 0, 0, 0.4)',\n }}\n >\n <div\n ref={panel}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label={title}\n // Taps inside the panel don't close it.\n onClick={(event) => event.stopPropagation()}\n style={{\n display: 'flex',\n flexDirection: 'column',\n gap: SPACE.medium,\n maxHeight: '85vh',\n overflowY: 'auto',\n padding: `${SPACE.large}px ${SPACE.large}px 24px`,\n borderTopLeftRadius: corner,\n borderTopRightRadius: corner,\n background: colors.surface,\n color: colors.text,\n }}\n >\n {title ? (\n <span style={{ fontSize: FONT_SIZE.body, fontWeight: 600, textAlign: 'center' }}>\n {title}\n </span>\n ) : null}\n {children}\n </div>\n </div>\n );\n}\n\nexport const Sheet: ReactComponent<typeof SheetManifest> = ({\n open = false,\n title,\n onClose,\n children,\n}) => (\n <SheetPanel open={open} title={title} onClose={() => onClose?.(createEvent('close'))}>\n {children}\n </SheetPanel>\n);\n","import type { Option as OptionManifest, Select as SelectManifest } from '@monimesl/dot-core';\nimport { createEvent } from '@monimesl/dot-core';\nimport { createContext, useContext, useState } from 'react';\n\nimport { useTheme } from '../theme';\nimport type { ReactComponent } from '../types';\nimport { Field } from './field';\nimport { useFieldBox } from './field-box';\nimport { IconGraphic } from './icon';\nimport { SheetPanel } from './sheet';\nimport { FONT_SIZE, ICON_SIZE, SPACE } from './tokens';\n\n// Select shows its options twice: in the field, where only the chosen one shows its label, and in\n// the sheet, where each is a row to choose.\ninterface OptionPlace {\n inField: boolean;\n value: string | undefined;\n choose: ((value: string) => void) | undefined;\n}\n\nconst OptionPlaceContext = createContext<OptionPlace>({\n inField: false,\n value: undefined,\n choose: undefined,\n});\n\nexport const Select: ReactComponent<typeof SelectManifest> = ({\n value,\n label,\n placeholder,\n hint,\n error,\n disabled,\n onChange,\n children,\n}) => {\n const { colors } = useTheme();\n const [open, setOpen] = useState(false);\n const box = useFieldBox(error, disabled);\n const choose = (next: string) => {\n setOpen(false);\n onChange?.(createEvent('change', { value: next }));\n };\n return (\n <>\n <Field label={label} hint={hint} error={error}>\n <button\n type=\"button\"\n className=\"dot-select\"\n disabled={disabled}\n onClick={() => setOpen(true)}\n onFocus={box.onFocus}\n onBlur={box.onBlur}\n style={{\n font: 'inherit',\n ...box.style,\n display: 'flex',\n alignItems: 'center',\n gap: SPACE.medium,\n width: '100%',\n padding: '12px 14px',\n textAlign: 'start',\n cursor: disabled ? 'default' : 'pointer',\n }}\n >\n <span style={{ flexGrow: 1 }}>\n {value ? (\n <OptionPlaceContext.Provider value={{ inField: true, value, choose: undefined }}>\n {children}\n </OptionPlaceContext.Provider>\n ) : (\n <span style={{ color: colors.subtle }}>{placeholder}</span>\n )}\n </span>\n <IconGraphic name=\"chevron-down\" size={ICON_SIZE.small} color={colors.subtle} />\n </button>\n </Field>\n <SheetPanel open={open} title={label} onClose={() => setOpen(false)}>\n <div role=\"listbox\" style={{ display: 'flex', flexDirection: 'column' }}>\n <OptionPlaceContext.Provider value={{ inField: false, value, choose }}>\n {children}\n </OptionPlaceContext.Provider>\n </div>\n </SheetPanel>\n </>\n );\n};\n\nexport const Option: ReactComponent<typeof OptionManifest> = ({ value, label }) => {\n const { colors } = useTheme();\n const place = useContext(OptionPlaceContext);\n const chosen = value !== undefined && value === place.value;\n if (place.inField) {\n return chosen ? <>{label}</> : null;\n }\n const { choose } = place;\n const select = choose && value !== undefined ? () => choose(value) : undefined;\n return (\n <button\n type=\"button\"\n className=\"dot-option\"\n role=\"option\"\n aria-selected={chosen}\n onClick={select}\n style={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n padding: '14px 4px',\n border: 'none',\n borderBottom: `1px solid ${colors.border}`,\n background: 'transparent',\n color: colors.text,\n font: 'inherit',\n fontSize: FONT_SIZE.body,\n fontWeight: chosen ? 600 : 400,\n textAlign: 'start',\n cursor: 'pointer',\n }}\n >\n <span>{label}</span>\n {chosen ? <IconGraphic name=\"check\" size={ICON_SIZE.medium} color={colors.primary} /> : null}\n </button>\n );\n};\n","import type { Skeleton as SkeletonManifest } from '@monimesl/dot-core';\nimport type { ReactNode } from 'react';\nimport { useEffect, useRef } from 'react';\n\nimport { useTheme } from '../theme';\nimport type { ReactComponent } from '../types';\nimport { animate } from './animate';\nimport { SPACE } from './tokens';\n\nconst PULSE: Keyframe[] = [{ opacity: 1 }, { opacity: 0.4 }, { opacity: 1 }];\n\nconst LINE_HEIGHT = 12;\n\nexport const Skeleton: ReactComponent<typeof SkeletonManifest> = ({\n shape = 'text',\n lines = 1,\n height,\n}) => {\n const { colors, radius } = useTheme();\n const placeholder = useRef<HTMLDivElement>(null);\n useEffect(() => {\n const pulse = animate(placeholder.current, PULSE, { duration: 1200, iterations: Infinity });\n return () => pulse?.cancel();\n }, []);\n\n let content: ReactNode;\n if (shape === 'circle') {\n const size = height ?? 40;\n content = (\n <div style={{ width: size, height: size, borderRadius: '50%', background: colors.muted }} />\n );\n } else if (shape === 'box') {\n content = (\n <div style={{ height: height ?? 80, borderRadius: radius, background: colors.muted }} />\n );\n } else {\n const count = Math.max(1, lines);\n content = Array.from({ length: count }, (_, index) => {\n // A paragraph's last line is shorter than the others.\n const last = count > 1 && index === count - 1;\n return (\n <div\n key={index}\n style={{\n width: last ? '60%' : '100%',\n height: LINE_HEIGHT,\n borderRadius: LINE_HEIGHT / 2,\n background: colors.muted,\n }}\n />\n );\n });\n }\n return (\n <div\n ref={placeholder}\n className=\"dot-skeleton\"\n aria-busy=\"true\"\n style={{\n display: 'flex',\n flexDirection: 'column',\n gap: SPACE.medium,\n // Text and boxes take the width they're given; a circle keeps its size.\n width: shape === 'circle' ? undefined : '100%',\n flexShrink: shape === 'circle' ? 0 : 1,\n }}\n >\n {content}\n </div>\n );\n};\n","import type { Tab as TabManifest, Tabs as TabsManifest } from '@monimesl/dot-core';\nimport { createEvent } from '@monimesl/dot-core';\nimport { createContext, useContext } from 'react';\n\nimport { useTheme } from '../theme';\nimport type { ReactComponent } from '../types';\nimport { Pill } from './pill';\nimport { FONT_SIZE } from './tokens';\n\ninterface TabChoice {\n value: string | undefined;\n segmented: boolean;\n choose: ((value: string) => void) | undefined;\n}\n\nconst TabsContext = createContext<TabChoice>({\n value: undefined,\n segmented: false,\n choose: undefined,\n});\n\nexport const Tabs: ReactComponent<typeof TabsManifest> = ({\n value,\n variant = 'underline',\n onChange,\n children,\n}) => {\n const { colors, radius } = useTheme();\n const segmented = variant === 'segmented';\n const choose = onChange\n ? (next: string) => {\n if (next !== value) {\n onChange(createEvent('change', { value: next }));\n }\n }\n : undefined;\n return (\n <div\n className=\"dot-tabs\"\n role=\"tablist\"\n style={{\n display: 'flex',\n overflowX: 'auto',\n ...(segmented\n ? { gap: 2, padding: 3, borderRadius: radius, background: colors.muted }\n : { borderBottom: `1px solid ${colors.border}` }),\n }}\n >\n <TabsContext.Provider value={{ value, segmented, choose }}>{children}</TabsContext.Provider>\n </div>\n );\n};\n\nexport const Tab: ReactComponent<typeof TabManifest> = ({ value, label, badge }) => {\n const { colors, radius } = useTheme();\n const { value: chosen, segmented, choose } = useContext(TabsContext);\n const selected = value !== undefined && value === chosen;\n let color = colors.subtle;\n if (selected) {\n color = segmented ? colors.text : colors.primary;\n }\n return (\n <button\n type=\"button\"\n role=\"tab\"\n aria-selected={selected}\n onClick={choose && value !== undefined ? () => choose(value) : undefined}\n style={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n gap: 6,\n flex: '1 0 auto',\n minHeight: segmented ? 36 : 44,\n padding: '0 12px',\n border: 'none',\n font: 'inherit',\n fontSize: FONT_SIZE.body,\n fontWeight: selected ? 600 : 500,\n whiteSpace: 'nowrap',\n color,\n cursor: 'pointer',\n ...(segmented\n ? {\n borderRadius: radius - 2,\n background: selected ? colors.surface : 'transparent',\n boxShadow: selected ? '0 1px 3px rgba(0, 0, 0, 0.15)' : 'none',\n }\n : {\n // Over the Tabs' own bottom line, so the chosen tab's line replaces it.\n marginBottom: -1,\n background: 'transparent',\n borderBottom: `2px solid ${selected ? colors.primary : 'transparent'}`,\n }),\n }}\n >\n {label}\n {badge ? (\n <Pill background={colors.primary} color={colors.surface}>\n {badge}\n </Pill>\n ) : null}\n </button>\n );\n};\n","import type { Text as TextManifest } from '@monimesl/dot-core';\nimport type { CSSProperties } from 'react';\n\nimport { useTheme } from '../theme';\nimport type { ReactComponent } from '../types';\nimport { FONT_SIZE } from './tokens';\nimport { toneColor } from './tones';\n\nconst VARIANTS = {\n body: { fontSize: FONT_SIZE.body },\n caption: { fontSize: FONT_SIZE.caption },\n title: { fontSize: FONT_SIZE.title, fontWeight: 600 },\n} as const;\n\nconst WEIGHTS = { regular: 400, medium: 500, bold: 600 } as const;\n\nexport const Text: ReactComponent<typeof TextManifest> = ({\n variant = 'body',\n tone,\n weight,\n align,\n maxLines,\n children,\n}) => {\n const { colors } = useTheme();\n const style: CSSProperties = { ...VARIANTS[variant], textAlign: align };\n if (tone) {\n style.color = toneColor(colors, tone);\n }\n if (weight) {\n style.fontWeight = WEIGHTS[weight];\n }\n if (maxLines) {\n Object.assign(style, {\n display: '-webkit-box',\n WebkitLineClamp: maxLines,\n WebkitBoxOrient: 'vertical',\n overflow: 'hidden',\n });\n }\n return (\n <span className=\"dot-text\" style={style}>\n {children}\n </span>\n );\n};\n","import type { TextArea as TextAreaManifest } from '@monimesl/dot-core';\nimport { createEvent } from '@monimesl/dot-core';\n\nimport type { ReactComponent } from '../types';\nimport { Field } from './field';\nimport { useFieldBox } from './field-box';\nimport { useTypedText } from './typed-text';\n\nexport const TextArea: ReactComponent<typeof TextAreaManifest> = ({\n value,\n placeholder,\n label,\n hint,\n error,\n rows = 3,\n maxLength,\n disabled,\n onChange,\n}) => {\n const [text, typeText] = useTypedText(value, onChange !== undefined);\n const box = useFieldBox(error, disabled);\n return (\n <Field label={label} hint={hint} error={error}>\n <textarea\n className=\"dot-text-area\"\n value={text}\n placeholder={placeholder}\n rows={rows}\n maxLength={maxLength}\n disabled={disabled}\n aria-invalid={error ? true : undefined}\n onFocus={box.onFocus}\n onBlur={box.onBlur}\n onChange={(event) => {\n const next = event.currentTarget.value;\n typeText(next);\n onChange?.(createEvent('change', { value: next }));\n }}\n style={{\n font: 'inherit',\n ...box.style,\n boxSizing: 'border-box',\n width: '100%',\n padding: '12px 14px',\n outline: 'none',\n resize: 'none',\n }}\n />\n </Field>\n );\n};\n","import type { Toast as ToastManifest } from '@monimesl/dot-core';\nimport { createEvent } from '@monimesl/dot-core';\nimport { useEffect, useEffectEvent, useState } from 'react';\n\nimport { useTheme } from '../theme';\nimport type { ReactComponent } from '../types';\nimport { IconGraphic } from './icon';\nimport { FONT_SIZE, ICON_SIZE, SPACE } from './tokens';\nimport { STATUS_ICONS, toneColor } from './tones';\n\nexport const Toast: ReactComponent<typeof ToastManifest> = ({\n message,\n tone = 'default',\n duration = 2500,\n onHide,\n}) => {\n const { colors, radius } = useTheme();\n const [hidden, setHidden] = useState(false);\n const [previousMessage, setPreviousMessage] = useState(message);\n // A new message shows, even after the one before it hid.\n if (message !== previousMessage) {\n setPreviousMessage(message);\n setHidden(false);\n }\n const hide = useEffectEvent(() => {\n setHidden(true);\n onHide?.(createEvent('hide'));\n });\n useEffect(() => {\n if (!message) {\n return undefined;\n }\n const timer = setTimeout(hide, duration);\n return () => clearTimeout(timer);\n }, [message, duration]);\n\n if (!message || hidden) {\n return null;\n }\n return (\n <div\n className=\"dot-toast\"\n role=\"status\"\n style={{\n position: 'fixed',\n top: SPACE.large,\n left: '50%',\n transform: 'translateX(-50%)',\n zIndex: 110,\n display: 'flex',\n alignItems: 'center',\n gap: SPACE.medium,\n maxWidth: 'calc(100% - 32px)',\n width: 'max-content',\n padding: '10px 16px',\n borderRadius: radius,\n background: colors.primary,\n color: colors.surface,\n fontSize: FONT_SIZE.body,\n boxShadow: '0 4px 16px rgba(0, 0, 0, 0.2)',\n }}\n >\n {tone === 'default' ? null : (\n <IconGraphic\n name={STATUS_ICONS[tone]}\n size={ICON_SIZE.medium}\n color={toneColor(colors, tone)}\n />\n )}\n <span>{message}</span>\n </div>\n );\n};\n","import type {\n Checkbox as CheckboxManifest,\n Radio as RadioManifest,\n RadioGroup as RadioGroupManifest,\n Switch as SwitchManifest,\n} from '@monimesl/dot-core';\nimport type { DotEvent } from '@monimesl/dot-core';\nimport { createEvent } from '@monimesl/dot-core';\nimport type { CSSProperties, ReactNode } from 'react';\nimport { createContext, useContext } from 'react';\n\nimport type { ResolvedColors } from '../theme';\nimport { useTheme } from '../theme';\nimport type { ReactComponent } from '../types';\nimport { FieldLabel } from './field';\nimport { IconGraphic } from './icon';\nimport { DISABLED_OPACITY, FONT_SIZE, ICON_SIZE, SPACE } from './tokens';\n\n// The whole row, label included, is one button, so a tap anywhere on it toggles.\nfunction rowStyle(colors: ResolvedColors, disabled: boolean | undefined): CSSProperties {\n return {\n display: 'flex',\n alignItems: 'center',\n gap: 12,\n width: '100%',\n padding: '6px 0',\n border: 'none',\n background: 'transparent',\n color: colors.text,\n font: 'inherit',\n fontSize: FONT_SIZE.body,\n textAlign: 'start',\n opacity: disabled ? DISABLED_OPACITY : 1,\n cursor: disabled ? 'default' : 'pointer',\n };\n}\n\nfunction changeTo(checked: boolean, onChange: ((event: DotEvent) => void) | undefined) {\n return onChange ? () => onChange(createEvent('change', { checked })) : undefined;\n}\n\n// The box of a Checkbox, or the circle of a Radio.\nfunction ChoiceMark({\n round,\n checked,\n children,\n}: {\n round: boolean;\n checked: boolean;\n children: ReactNode;\n}) {\n const { colors } = useTheme();\n // A checked box fills in; a chosen circle shows a dot inside instead.\n const filled = checked && !round;\n return (\n <span\n style={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flexShrink: 0,\n width: 22,\n height: 22,\n boxSizing: 'border-box',\n borderRadius: round ? '50%' : 6,\n border: `2px solid ${checked ? colors.primary : colors.subtle}`,\n background: filled ? colors.primary : 'transparent',\n }}\n >\n {children}\n </span>\n );\n}\n\nexport const Switch: ReactComponent<typeof SwitchManifest> = ({\n checked = false,\n label,\n disabled,\n onChange,\n}) => {\n const { colors } = useTheme();\n return (\n <button\n type=\"button\"\n className=\"dot-switch\"\n role=\"switch\"\n aria-checked={checked}\n disabled={disabled}\n onClick={changeTo(!checked, onChange)}\n style={{ ...rowStyle(colors, disabled), justifyContent: 'space-between' }}\n >\n {label ? <span>{label}</span> : null}\n <span\n style={{\n position: 'relative',\n flexShrink: 0,\n width: 44,\n height: 26,\n borderRadius: 13,\n background: checked ? colors.primary : colors.subtle,\n transition: 'background 0.2s',\n }}\n >\n <span\n style={{\n position: 'absolute',\n top: 2,\n left: checked ? 20 : 2,\n width: 22,\n height: 22,\n borderRadius: '50%',\n background: colors.surface,\n transition: 'left 0.2s',\n }}\n />\n </span>\n </button>\n );\n};\n\nexport const Checkbox: ReactComponent<typeof CheckboxManifest> = ({\n checked = false,\n label,\n disabled,\n onChange,\n}) => {\n const { colors } = useTheme();\n return (\n <button\n type=\"button\"\n className=\"dot-checkbox\"\n role=\"checkbox\"\n aria-checked={checked}\n disabled={disabled}\n onClick={changeTo(!checked, onChange)}\n style={rowStyle(colors, disabled)}\n >\n <ChoiceMark round={false} checked={checked}>\n {checked ? (\n <IconGraphic name=\"check\" size={ICON_SIZE.small} color={colors.surface} />\n ) : null}\n </ChoiceMark>\n {label ? <span>{label}</span> : null}\n </button>\n );\n};\n\ninterface RadioChoice {\n value: string | undefined;\n disabled: boolean;\n choose: ((value: string) => void) | undefined;\n}\n\nconst RadioGroupContext = createContext<RadioChoice>({\n value: undefined,\n disabled: true,\n choose: undefined,\n});\n\nexport const RadioGroup: ReactComponent<typeof RadioGroupManifest> = ({\n value,\n label,\n disabled = false,\n onChange,\n children,\n}) => {\n const choose = onChange\n ? (next: string) => onChange(createEvent('change', { value: next }))\n : undefined;\n return (\n <div\n className=\"dot-radio-group\"\n role=\"radiogroup\"\n aria-label={label}\n style={{ display: 'flex', flexDirection: 'column', gap: SPACE.small }}\n >\n {label ? <FieldLabel>{label}</FieldLabel> : null}\n <RadioGroupContext.Provider value={{ value, disabled, choose }}>\n {children}\n </RadioGroupContext.Provider>\n </div>\n );\n};\n\nexport const Radio: ReactComponent<typeof RadioManifest> = ({ value, label, disabled }) => {\n const { colors } = useTheme();\n const group = useContext(RadioGroupContext);\n const selected = value !== undefined && value === group.value;\n const inactive = disabled || group.disabled;\n const { choose } = group;\n const select = choose && value !== undefined ? () => choose(value) : undefined;\n return (\n <button\n type=\"button\"\n className=\"dot-radio\"\n role=\"radio\"\n aria-checked={selected}\n disabled={inactive}\n onClick={select}\n style={rowStyle(colors, inactive)}\n >\n <ChoiceMark round checked={selected}>\n {selected ? (\n <span\n style={{ width: 10, height: 10, borderRadius: '50%', background: colors.primary }}\n />\n ) : null}\n </ChoiceMark>\n {label ? <span>{label}</span> : null}\n </button>\n );\n};\n","import { createEvent } from '@monimesl/dot-core';\nimport type { View as ViewManifest } from '@monimesl/dot-core';\n\nimport { useTheme } from '../theme';\nimport type { ReactComponent } from '../types';\nimport { CARD_RADIUS_SCALE, SPACE } from './tokens';\n\nconst ALIGN = {\n stretch: 'stretch',\n start: 'flex-start',\n center: 'center',\n end: 'flex-end',\n} as const;\n\nconst JUSTIFY = {\n start: 'flex-start',\n center: 'center',\n end: 'flex-end',\n between: 'space-between',\n} as const;\n\nexport const View: ReactComponent<typeof ViewManifest> = ({\n direction = 'column',\n gap = 'medium',\n align = 'stretch',\n justify = 'start',\n wrap = false,\n grow = false,\n padding,\n paddingTop,\n paddingStart,\n paddingEnd,\n paddingBottom,\n variant = 'plain',\n onTap,\n children,\n}) => {\n const { colors, radius } = useTheme();\n const card = variant === 'card';\n const allSides = padding ?? (card ? 'large' : 'none');\n const handleClick = onTap ? () => onTap(createEvent('tap')) : undefined;\n return (\n <div\n className=\"dot-view\"\n onClick={handleClick}\n style={{\n display: 'flex',\n flexDirection: direction,\n gap: SPACE[gap],\n alignItems: ALIGN[align],\n justifyContent: JUSTIFY[justify],\n flexWrap: wrap ? 'wrap' : undefined,\n flexGrow: grow ? 1 : undefined,\n // Lets a growing view shrink below its content's width, so long text wraps.\n minWidth: grow ? 0 : undefined,\n paddingTop: SPACE[paddingTop ?? allSides],\n paddingInlineStart: SPACE[paddingStart ?? allSides],\n paddingInlineEnd: SPACE[paddingEnd ?? allSides],\n paddingBottom: SPACE[paddingBottom ?? allSides],\n borderRadius: card ? radius * CARD_RADIUS_SCALE : undefined,\n background: card ? colors.surface : undefined,\n border: card ? `1px solid ${colors.border}` : undefined,\n cursor: onTap ? 'pointer' : undefined,\n }}\n >\n {children}\n </div>\n );\n};\n","import type { BuiltinReactComponents } from '../types';\nimport { AmountInput } from './amount-input';\nimport { Button } from './button';\nimport { Carousel } from './carousel';\nimport { Chip } from './chip';\nimport { CodeInput } from './code-input';\nimport { Divider } from './divider';\nimport { EmptyState } from './empty-state';\nimport { Badge, Notice, ProgressBar } from './feedback';\nimport { Footer } from './footer';\nimport { Grid, GridItem } from './grid';\nimport { Icon } from './icon';\nimport { Image } from './image';\nimport { Input } from './input';\nimport { List, ListItem } from './list';\nimport { QRCode } from './qr-code';\nimport { Option, Select } from './select';\nimport { Sheet } from './sheet';\nimport { Skeleton } from './skeleton';\nimport { Spinner } from './spinner';\nimport { Tab, Tabs } from './tabs';\nimport { Text } from './text';\nimport { TextArea } from './text-area';\nimport { Toast } from './toast';\nimport { Checkbox, Radio, RadioGroup, Switch } from './toggles';\nimport { View } from './view';\n\nexport const builtins: BuiltinReactComponents = {\n AmountInput,\n Badge,\n Button,\n Carousel,\n Checkbox,\n Chip,\n CodeInput,\n Divider,\n EmptyState,\n Footer,\n Grid,\n GridItem,\n Icon,\n Image,\n Input,\n List,\n ListItem,\n Notice,\n Option,\n ProgressBar,\n QRCode,\n Radio,\n RadioGroup,\n Select,\n Sheet,\n Skeleton,\n Spinner,\n Switch,\n Tab,\n Tabs,\n Text,\n TextArea,\n Toast,\n View,\n};\n","import type { ComponentType, ReactNode } from 'react';\nimport { toList, toText } from '@monimesl/dot-core';\nimport type { RenderContext } from '@monimesl/dot-core';\nimport type { PageController } from '@monimesl/dot-webview';\nimport { createElement, Fragment, useMemo, useSyncExternalStore } from 'react';\n\nexport type ComponentMap = Readonly<Record<string, ComponentType<Record<string, unknown>>>>;\n\ninterface PageRootProps {\n page: PageController;\n components: ComponentMap;\n}\n\nexport function PageRoot({ page, components }: PageRootProps) {\n const state = useSyncExternalStore(page.subscribe, page.getState);\n const context = useMemo<RenderContext<ReactNode>>(\n () => ({\n h(type, props, ...children) {\n const component = components[type];\n if (!component) {\n throw new Error(`The renderer has no component registered for tag '<${type}>'`);\n }\n return createElement(component, props, ...children);\n },\n text: toText,\n on: (handler, data) => page.on(handler, data),\n each: (items, render, key) =>\n createElement(\n Fragment,\n null,\n toList(items).map((item, index) =>\n createElement(\n Fragment,\n { key: key ? String(key(item, index)) : index },\n ...render(item, index),\n ),\n ),\n ),\n }),\n [page, components],\n );\n if (!state) {\n return null;\n }\n return page.viewRenderer(state, context);\n}\n","import type { Theme } from '@monimesl/dot-core';\nimport type { ComponentType, ReactNode } from 'react';\nimport { useMemo, useSyncExternalStore } from 'react';\nimport type { DotContext, PageController } from '@monimesl/dot-webview';\n\nimport { PageRoot } from './page-root';\nimport type { ComponentMap } from './page-root';\nimport { FONT_FAMILY, resolveTheme, ThemeContext, useTheme } from './theme';\n\nexport type Wrapper = ComponentType<{ theme: Theme; children: ReactNode }>;\n\ninterface RootProps {\n page: PageController;\n dotContext: DotContext;\n components: ComponentMap;\n wrapper: Wrapper | undefined;\n}\n\nexport function Root({ page, dotContext, components, wrapper: Wrapper }: RootProps) {\n const theme = useSyncExternalStore(dotContext.theme.subscribe, dotContext.theme.get);\n const systemContext = useSyncExternalStore(\n dotContext.systemContext.subscribe,\n dotContext.systemContext.get,\n );\n const resolved = useMemo(\n () => resolveTheme(theme, systemContext.scheme),\n [theme, systemContext.scheme],\n );\n const content = <PageRoot page={page} components={components} />;\n\n return (\n <ThemeContext.Provider value={resolved}>\n {Wrapper ? (\n <Wrapper theme={{ ...theme, scheme: resolved.scheme }}>{content}</Wrapper>\n ) : (\n <DefaultSurface>{content}</DefaultSurface>\n )}\n </ThemeContext.Provider>\n );\n}\n\nfunction DefaultSurface({ children }: { children: ReactNode }) {\n const { colors } = useTheme();\n return (\n <div\n className=\"dot-surface\"\n style={{\n minHeight: '100vh',\n display: 'flex',\n flexDirection: 'column',\n background: colors.background,\n color: colors.text,\n fontFamily: FONT_FAMILY,\n }}\n >\n {children}\n </div>\n );\n}\n","import type { Renderer } from '@monimesl/dot-webview';\nimport type { JSXElementConstructor } from 'react';\nimport { createRoot } from 'react-dom/client';\n\nimport { builtins } from './components';\nimport type { ComponentMap } from './page-root';\nimport type { Wrapper } from './root';\nimport { Root } from './root';\nimport type { BuiltinReactComponents } from './types';\n\nexport interface ReactRendererOptions {\n components?: Partial<BuiltinReactComponents> &\n Readonly<Record<string, JSXElementConstructor<never>>>;\n wrapper?: Wrapper;\n}\n\nexport function reactRenderer({ components = {}, wrapper }: ReactRendererOptions = {}): Renderer {\n const registry = { ...builtins, ...components } as unknown as ComponentMap;\n\n return {\n name: 'react',\n mount(container, page, dotContext) {\n const root = createRoot(container);\n root.render(\n <Root page={page} dotContext={dotContext} components={registry} wrapper={wrapper} />,\n );\n return () => root.unmount();\n },\n };\n}\n","export type { Wrapper } from './root';\nexport { builtins } from './components';\nimport { reactRenderer } from './renderer';\n\nexport type { ReactRendererOptions } from './renderer';\n\nexport { resolveTheme, useTheme } from './theme';\nexport type { ResolvedColors, ResolvedTheme } from './theme';\n\nexport type { BuiltinReactComponents, ReactComponent, ReactComponents } from './types';\n\nexport default reactRenderer;\n"],"mappings":";;;;;;;AAuBA,MAAa,cAAc;AAE3B,MAAM,iBAAiB;AAGvB,MAAM,iBAAsD;CAC1D,OAAO;EACL,SAAS;EACT,YAAY;EACZ,SAAS;EACT,MAAM;EACN,QAAQ;EACR,OAAO;EACP,QAAQ;EACR,MAAM;EACN,SAAS;EACT,SAAS;EACT,QAAQ;CACV;CACA,MAAM;EACJ,SAAS;EACT,YAAY;EACZ,SAAS;EACT,MAAM;EACN,QAAQ;EACR,OAAO;EACP,QAAQ;EACR,MAAM;EACN,SAAS;EACT,SAAS;EACT,QAAQ;CACV;AACF;AAEA,SAAgB,aAAa,OAAc,cAA0C;CACnF,MAAM,SAAS,CAAC,MAAM,UAAU,MAAM,WAAW,WAAW,eAAe,MAAM;CACjF,MAAM,WAAW,eAAe;CAChC,MAAM,SAAS,MAAM,UAAU,CAA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