@mangtre/ui 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/LICENSE +26 -0
  2. package/dist/MangThemeProvider-BqdGKBP2.d.ts +34 -0
  3. package/dist/Money-Dw3GnUvX.d.ts +27 -0
  4. package/dist/actions.d.ts +31 -0
  5. package/dist/actions.js +13 -0
  6. package/dist/ai.d.ts +58 -0
  7. package/dist/ai.js +13 -0
  8. package/dist/analytics.d.ts +40 -0
  9. package/dist/analytics.js +15 -0
  10. package/dist/app.d.ts +24 -0
  11. package/dist/app.js +9 -0
  12. package/dist/catalog.d.ts +76 -0
  13. package/dist/catalog.js +1210 -0
  14. package/dist/charts.d.ts +89 -0
  15. package/dist/charts.js +34 -0
  16. package/dist/chunk-3AL4SUFD.js +301 -0
  17. package/dist/chunk-4XNSYKQE.js +142 -0
  18. package/dist/chunk-5Z4VLQKH.js +43 -0
  19. package/dist/chunk-7P2EQZYD.js +59 -0
  20. package/dist/chunk-7WHNIEDV.js +120 -0
  21. package/dist/chunk-ASZKHSMG.js +82 -0
  22. package/dist/chunk-BCBN2EGH.js +216 -0
  23. package/dist/chunk-BLYAFV45.js +320 -0
  24. package/dist/chunk-DLKEXWPA.js +90 -0
  25. package/dist/chunk-DTASXPTB.js +70 -0
  26. package/dist/chunk-FZRXVRC7.js +63 -0
  27. package/dist/chunk-ID233AGM.js +108 -0
  28. package/dist/chunk-IVYXOKMO.js +74 -0
  29. package/dist/chunk-IX3DYETF.js +61 -0
  30. package/dist/chunk-JJB4PJC3.js +166 -0
  31. package/dist/chunk-K5Q3RCV6.js +119 -0
  32. package/dist/chunk-LNRUPJDF.js +161 -0
  33. package/dist/chunk-LZORNMBL.js +0 -0
  34. package/dist/chunk-OBPXCUVF.js +282 -0
  35. package/dist/chunk-OJX2EIMB.js +145 -0
  36. package/dist/chunk-PPOYMKV3.js +170 -0
  37. package/dist/chunk-PQGUWJG4.js +47 -0
  38. package/dist/chunk-RE7OWRA4.js +187 -0
  39. package/dist/chunk-SJF3CHAW.js +108 -0
  40. package/dist/chunk-UF6ANDJZ.js +112 -0
  41. package/dist/chunk-VGC5DMOM.js +107 -0
  42. package/dist/chunk-VP56Z4BS.js +0 -0
  43. package/dist/chunk-VRD66FIA.js +77 -0
  44. package/dist/chunk-X7T2DJLU.js +113 -0
  45. package/dist/chunk-XPV3OOLU.js +147 -0
  46. package/dist/chunk-YN5O6YL6.js +69 -0
  47. package/dist/chunk-Z4ANGBPC.js +94 -0
  48. package/dist/creator.d.ts +55 -0
  49. package/dist/creator.js +20 -0
  50. package/dist/data-room.d.ts +50 -0
  51. package/dist/data-room.js +17 -0
  52. package/dist/editor.d.ts +32 -0
  53. package/dist/editor.js +14 -0
  54. package/dist/feedback.d.ts +48 -0
  55. package/dist/feedback.js +16 -0
  56. package/dist/forms.d.ts +91 -0
  57. package/dist/forms.js +26 -0
  58. package/dist/handoff.d.ts +37 -0
  59. package/dist/handoff.js +13 -0
  60. package/dist/index.css +2 -0
  61. package/dist/index.d.ts +62 -0
  62. package/dist/index.js +338 -0
  63. package/dist/layout.d.ts +57 -0
  64. package/dist/layout.js +22 -0
  65. package/dist/learning.d.ts +46 -0
  66. package/dist/learning.js +15 -0
  67. package/dist/media.d.ts +48 -0
  68. package/dist/media.js +16 -0
  69. package/dist/monetization.d.ts +30 -0
  70. package/dist/monetization.js +14 -0
  71. package/dist/money.d.ts +45 -0
  72. package/dist/money.js +28 -0
  73. package/dist/navigation.d.ts +36 -0
  74. package/dist/navigation.js +14 -0
  75. package/dist/overlay.d.ts +72 -0
  76. package/dist/overlay.js +20 -0
  77. package/dist/platform.d.ts +94 -0
  78. package/dist/platform.js +42 -0
  79. package/dist/primitives.d.ts +83 -0
  80. package/dist/primitives.js +22 -0
  81. package/dist/privacy.d.ts +28 -0
  82. package/dist/privacy.js +15 -0
  83. package/dist/sandbox.d.ts +40 -0
  84. package/dist/sandbox.js +15 -0
  85. package/dist/settings.d.ts +29 -0
  86. package/dist/settings.js +13 -0
  87. package/dist/surface.d.ts +33 -0
  88. package/dist/surface.js +16 -0
  89. package/dist/theme.css +63 -0
  90. package/dist/theme.d.ts +64 -0
  91. package/dist/theme.js +27 -0
  92. package/dist/tokens.css +119 -0
  93. package/dist/tokens.d.ts +128 -0
  94. package/dist/tokens.js +8 -0
  95. package/package.json +151 -0
@@ -0,0 +1,40 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { Locale } from '@mangtre/core';
4
+ import { T as ThemeMode } from './MangThemeProvider-BqdGKBP2.js';
5
+
6
+ interface Themed {
7
+ theme?: ThemeMode;
8
+ className?: string;
9
+ }
10
+ type ScanLevel = "safe" | "review" | "blocked";
11
+ interface SafetyScanBadgeProps extends Themed {
12
+ level: ScanLevel;
13
+ locale?: Locale;
14
+ }
15
+ declare function SafetyScanBadge({ level, locale, theme, className }: SafetyScanBadgeProps): react.JSX.Element;
16
+ interface SandboxFrameProps extends Themed {
17
+ /** The sandboxed iframe (or a probe slot). */
18
+ children: ReactNode;
19
+ /** Display origin (e.g. mang-apps.com) shown in the chrome bar. */
20
+ origin?: string;
21
+ /** Source label (e.g. "sandbox" / "creator"). */
22
+ source?: ReactNode;
23
+ }
24
+ declare function SandboxFrame({ children, origin, source, theme, className }: SandboxFrameProps): react.JSX.Element;
25
+ interface SandboxErrorProps extends Themed {
26
+ message?: ReactNode;
27
+ }
28
+ declare function SandboxError({ message, theme, className }: SandboxErrorProps): react.JSX.Element;
29
+ interface ScanFinding {
30
+ severity: "error" | "warn" | "info";
31
+ message: ReactNode;
32
+ }
33
+ interface StaticScanResultProps extends Themed {
34
+ findings: ScanFinding[];
35
+ /** Shown when there are no findings. */
36
+ emptyLabel?: ReactNode;
37
+ }
38
+ declare function StaticScanResult({ findings, emptyLabel, theme, className, }: StaticScanResultProps): react.JSX.Element;
39
+
40
+ export { SafetyScanBadge, type SafetyScanBadgeProps, SandboxError, type SandboxErrorProps, SandboxFrame, type SandboxFrameProps, type ScanFinding, type ScanLevel, StaticScanResult, type StaticScanResultProps };
@@ -0,0 +1,15 @@
1
+ import "./chunk-VP56Z4BS.js";
2
+ import {
3
+ SafetyScanBadge,
4
+ SandboxError,
5
+ SandboxFrame,
6
+ StaticScanResult
7
+ } from "./chunk-X7T2DJLU.js";
8
+ import "./chunk-3AL4SUFD.js";
9
+ import "./chunk-PPOYMKV3.js";
10
+ export {
11
+ SafetyScanBadge,
12
+ SandboxError,
13
+ SandboxFrame,
14
+ StaticScanResult
15
+ };
@@ -0,0 +1,29 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { T as ThemeMode } from './MangThemeProvider-BqdGKBP2.js';
4
+ import '@mangtre/core';
5
+
6
+ interface Themed {
7
+ theme?: ThemeMode;
8
+ className?: string;
9
+ children?: ReactNode;
10
+ }
11
+ declare function SettingsSection({ title, theme, className, children, }: Themed & {
12
+ title?: ReactNode;
13
+ }): react.JSX.Element;
14
+ interface SettingsRowProps extends Themed {
15
+ label: ReactNode;
16
+ description?: ReactNode;
17
+ /** Trailing control (Switch/Select/Button/…). */
18
+ control?: ReactNode;
19
+ }
20
+ declare function SettingsRow({ label, description, control, theme, className }: SettingsRowProps): react.JSX.Element;
21
+ interface SettingsToggleProps extends Themed {
22
+ label: ReactNode;
23
+ description?: ReactNode;
24
+ checked: boolean;
25
+ onChange: (checked: boolean) => void;
26
+ }
27
+ declare function SettingsToggle({ label, description, checked, onChange, theme, className, }: SettingsToggleProps): react.JSX.Element;
28
+
29
+ export { SettingsRow, type SettingsRowProps, SettingsSection, SettingsToggle, type SettingsToggleProps };
@@ -0,0 +1,13 @@
1
+ import {
2
+ SettingsRow,
3
+ SettingsSection,
4
+ SettingsToggle
5
+ } from "./chunk-VRD66FIA.js";
6
+ import "./chunk-PQGUWJG4.js";
7
+ import "./chunk-3AL4SUFD.js";
8
+ import "./chunk-PPOYMKV3.js";
9
+ export {
10
+ SettingsRow,
11
+ SettingsSection,
12
+ SettingsToggle
13
+ };
@@ -0,0 +1,33 @@
1
+ import * as react from 'react';
2
+ import { HTMLAttributes, ReactNode, CSSProperties } from 'react';
3
+ import { T as ThemeMode } from './MangThemeProvider-BqdGKBP2.js';
4
+ import '@mangtre/core';
5
+
6
+ interface CardProps extends HTMLAttributes<HTMLDivElement> {
7
+ /** Adds hover lift + pointer affordance. */
8
+ interactive?: boolean;
9
+ theme?: ThemeMode;
10
+ }
11
+ declare function Card({ interactive, theme, className, children, ...rest }: CardProps): react.JSX.Element;
12
+ declare const CardHeader: ({ className, children, style, }: {
13
+ className?: string;
14
+ children?: ReactNode;
15
+ style?: CSSProperties;
16
+ }) => react.JSX.Element;
17
+ declare const CardBody: ({ className, children, style, }: {
18
+ className?: string;
19
+ children?: ReactNode;
20
+ style?: CSSProperties;
21
+ }) => react.JSX.Element;
22
+ declare const CardFooter: ({ className, children, style, }: {
23
+ className?: string;
24
+ children?: ReactNode;
25
+ style?: CSSProperties;
26
+ }) => react.JSX.Element;
27
+ interface PanelProps extends HTMLAttributes<HTMLDivElement> {
28
+ theme?: ThemeMode;
29
+ }
30
+ /** A sunken, bordered panel for grouping secondary content. */
31
+ declare function Panel({ theme, className, children, ...rest }: PanelProps): react.JSX.Element;
32
+
33
+ export { Card, CardBody, CardFooter, CardHeader, type CardProps, Panel, type PanelProps };
@@ -0,0 +1,16 @@
1
+ import {
2
+ Card,
3
+ CardBody,
4
+ CardFooter,
5
+ CardHeader,
6
+ Panel
7
+ } from "./chunk-5Z4VLQKH.js";
8
+ import "./chunk-3AL4SUFD.js";
9
+ import "./chunk-PPOYMKV3.js";
10
+ export {
11
+ Card,
12
+ CardBody,
13
+ CardFooter,
14
+ CardHeader,
15
+ Panel
16
+ };
package/dist/theme.css ADDED
@@ -0,0 +1,63 @@
1
+ /*
2
+ * Măng Tailwind v4 theme preset — import this into a Tailwind entry to get Măng color +
3
+ * font utilities (bg-mang-green, text-content-muted, border-line-default, bg-accent-soft,
4
+ * bg-state-success, font-heading, …) WITHOUT re-declaring them.
5
+ *
6
+ * Shell / Tailwind mini-app CSS entry:
7
+ * @layer theme, base, components, utilities;
8
+ * @import "tailwindcss/theme.css" layer(theme);
9
+ * @import "@mangtre/ui/theme.css" layer(theme);
10
+ * @import "tailwindcss/utilities.css" layer(utilities);
11
+ *
12
+ * ADDITIVE on purpose: no `--*: initial` reset, so Tailwind's built-in spacing/radius/etc.
13
+ * scales survive alongside these brand tokens. Ships ZERO base/reset rules (Preflight stays
14
+ * the consumer's choice — mini-apps keep it OFF).
15
+ *
16
+ * MIRROR of packages/ui/src/tokens.ts (color + font subset) — parity-checked by tokens.test.ts.
17
+ */
18
+ @theme {
19
+ /* --- brand (7) --- */
20
+ --color-mang-green: #37b693;
21
+ --color-mang-shoot: #8fe3b8;
22
+ --color-mang-bamboo: #1f7a5c;
23
+ --color-mang-soil: #b5793a;
24
+ --color-mang-sun: #e8c547;
25
+ --color-mang-paper: #f4f1e8;
26
+ --color-mang-dark: #14201c;
27
+
28
+ /* --- semantic: surface --- */
29
+ --color-surface-base: #ffffff;
30
+ --color-surface-sunken: #f6faf9;
31
+ --color-surface-inverse: #14201c;
32
+
33
+ /* --- semantic: content (text) --- */
34
+ --color-content-default: #16242c;
35
+ --color-content-strong: #14201c;
36
+ --color-content-muted: #5d6f78;
37
+ --color-content-inverse: #f4f1e8;
38
+ --color-content-on-accent: #ffffff;
39
+
40
+ /* --- semantic: line (borders) --- */
41
+ --color-line-subtle: #eef3f2;
42
+ --color-line-default: #e4eceb;
43
+ --color-line-strong: #cdd9d6;
44
+
45
+ /* --- semantic: accent --- */
46
+ --color-accent-default: #37b693;
47
+ --color-accent-hover: #2e9e80;
48
+ --color-accent-soft: #e7f6f1;
49
+
50
+ /* --- semantic: state --- */
51
+ --color-state-success: #1f9c7e;
52
+ --color-state-success-soft: #e7f6f1;
53
+ --color-state-danger: #d2674a;
54
+ --color-state-danger-soft: #fbeee9;
55
+ --color-state-warning: #c77d2e;
56
+ --color-state-warning-soft: #fbf1e2;
57
+ --color-state-info: #2e7cb8;
58
+ --color-state-info-soft: #e6f0f8;
59
+
60
+ /* --- fonts --- */
61
+ --font-heading: "Quicksand Variable", system-ui, sans-serif;
62
+ --font-body: "Inter", system-ui, sans-serif;
63
+ }
@@ -0,0 +1,64 @@
1
+ import { T as ThemeMode } from './MangThemeProvider-BqdGKBP2.js';
2
+ export { D as Density, M as MangThemeContextValue, a as MangThemeProvider, b as MangThemeProviderProps, u as useDensity, c as useLocale, d as useMangTheme, e as useResolvedTheme } from './MangThemeProvider-BqdGKBP2.js';
3
+ import 'react';
4
+ import '@mangtre/core';
5
+
6
+ /**
7
+ * `useScopedStyle` — mount a refcounted, id-keyed `<style>` for a component's lifetime.
8
+ *
9
+ * Thin React wrapper over `mountScopedStyle` (`../scopedStyle`): inject `css` under `id` on
10
+ * mount, dispose on unmount. Many component instances share one id → one `<style>` tag (the
11
+ * refcount keeps it alive until the last unmounts). This is how every `@mangtre/ui` component
12
+ * ships its CSS without Tailwind and without a build step.
13
+ */
14
+ declare function useScopedStyle(id: string, css: string): void;
15
+
16
+ /**
17
+ * The ONE shared stylesheet for every `@mangtre/ui` P0 component.
18
+ *
19
+ * Why one sheet: each component calls `useKitStyles()` which mounts this string under a single
20
+ * refcounted id (`mountScopedStyle`), so N components share ONE `<style>` tag — no per-component
21
+ * duplication, no Tailwind dependency, works bundled into a mini-app (incl. sandboxed) exactly as
22
+ * in the shell. Built once from the canonical Măng tokens (`../tokens`).
23
+ *
24
+ * Theming: every color-bearing component roots `class="mang-ui-scope mang-…" data-theme="light|dark
25
+ * |auto"`. `.mang-ui-scope` declares the semantic CSS vars (`--m-*`); `[data-theme="dark"]` overrides
26
+ * them; `[data-theme="auto"]` follows the OS. Components then style themselves with `var(--m-*)`, so a
27
+ * single rule set serves both surfaces (AD v0.2 §9: dark shell · light mini-app interiors).
28
+ *
29
+ * All motion is transform/opacity + the Măng ease, disabled under `prefers-reduced-motion`.
30
+ * Canonical spec: `sot/Mang_UI_Component_Library_v0.1.md`.
31
+ */
32
+ declare const KIT_STYLE_ID = "mang-ui-kit";
33
+ /** Mount the shared kit stylesheet (refcounted; one `<style>` for the whole kit). */
34
+ declare function useKitStyles(): void;
35
+
36
+ /**
37
+ * Shared helpers every color-bearing `@mangtre/ui` component uses on its root element:
38
+ * - `useKitStyles()` mounts the one shared sheet (re-exported for convenience),
39
+ * - `useScope(theme)` returns the `class="mang-ui-scope" data-theme data-density` props that
40
+ * establish the `--m-*` CSS vars for that subtree (resolving prop → ambient context),
41
+ * - `cx(...)` joins class names (drops falsy).
42
+ */
43
+
44
+ /**
45
+ * Mount the base kit sheet (the `.mang-ui-scope` `--m-*` vars + P0 component styles) PLUS an
46
+ * area-specific sheet under its own refcounted id. P1/P2 component groups call this so they get
47
+ * the shared theme vars without duplicating them, and their own CSS lives in a separate `<style>`.
48
+ */
49
+ declare function useAreaStyles(id: string, css: string): void;
50
+ /** Join class names; falsy entries are dropped. */
51
+ declare function cx(...parts: Array<string | false | null | undefined>): string;
52
+ interface ScopeProps {
53
+ className: string;
54
+ "data-theme": ThemeMode;
55
+ "data-density": string;
56
+ }
57
+ /**
58
+ * Root props that turn an element into a Măng UI scope: the `mang-ui-scope` class (declares the
59
+ * `--m-*` vars) + the resolved `data-theme`/`data-density`. Spread onto a component's root, then
60
+ * append the component class via `cx`.
61
+ */
62
+ declare function useScope(theme?: ThemeMode): ScopeProps;
63
+
64
+ export { KIT_STYLE_ID, type ScopeProps, ThemeMode, cx, useAreaStyles, useKitStyles, useScope, useScopedStyle };
package/dist/theme.js ADDED
@@ -0,0 +1,27 @@
1
+ import {
2
+ KIT_STYLE_ID,
3
+ MangThemeProvider,
4
+ cx,
5
+ useAreaStyles,
6
+ useDensity,
7
+ useKitStyles,
8
+ useLocale,
9
+ useMangTheme,
10
+ useResolvedTheme,
11
+ useScope,
12
+ useScopedStyle
13
+ } from "./chunk-3AL4SUFD.js";
14
+ import "./chunk-PPOYMKV3.js";
15
+ export {
16
+ KIT_STYLE_ID,
17
+ MangThemeProvider,
18
+ cx,
19
+ useAreaStyles,
20
+ useDensity,
21
+ useKitStyles,
22
+ useLocale,
23
+ useMangTheme,
24
+ useResolvedTheme,
25
+ useScope,
26
+ useScopedStyle
27
+ };
@@ -0,0 +1,119 @@
1
+ /*
2
+ * Măng design tokens as plain CSS custom properties — framework-agnostic, no Tailwind.
3
+ *
4
+ * This is the file a NON-Tailwind mini-app imports to "match Măng":
5
+ * @import "@mangtre/ui/tokens.css";
6
+ * .my-scope { color: var(--mang-content-default); border-radius: var(--mang-radius-lg); }
7
+ *
8
+ * MIRROR of packages/ui/src/tokens.ts — the TS object is the source of truth; this file is
9
+ * parity-checked against it by tokens.test.ts. Edit tokens.ts first, then update here.
10
+ */
11
+ :root {
12
+ /* --- brand (7) --- */
13
+ --mang-color-mangGreen: #37b693;
14
+ --mang-color-shoot: #8fe3b8;
15
+ --mang-color-bamboo: #1f7a5c;
16
+ --mang-color-soil: #b5793a;
17
+ --mang-color-sun: #e8c547;
18
+ --mang-color-paper: #f4f1e8;
19
+ --mang-color-dark: #14201c;
20
+
21
+ /* --- semantic: surface --- */
22
+ --mang-surface-base: #ffffff;
23
+ --mang-surface-sunken: #f6faf9;
24
+ --mang-surface-inverse: #14201c;
25
+
26
+ /* --- semantic: content (text) --- */
27
+ --mang-content-default: #16242c;
28
+ --mang-content-strong: #14201c;
29
+ --mang-content-muted: #5d6f78;
30
+ --mang-content-inverse: #f4f1e8;
31
+ --mang-content-on-accent: #ffffff;
32
+
33
+ /* --- semantic: line (borders) --- */
34
+ --mang-line-subtle: #eef3f2;
35
+ --mang-line-default: #e4eceb;
36
+ --mang-line-strong: #cdd9d6;
37
+
38
+ /* --- semantic: accent --- */
39
+ --mang-accent-default: #37b693;
40
+ --mang-accent-hover: #2e9e80;
41
+ --mang-accent-soft: #e7f6f1;
42
+
43
+ /* --- semantic: state --- */
44
+ --mang-state-success: #1f9c7e;
45
+ --mang-state-success-soft: #e7f6f1;
46
+ --mang-state-danger: #d2674a;
47
+ --mang-state-danger-soft: #fbeee9;
48
+ --mang-state-warning: #c77d2e;
49
+ --mang-state-warning-soft: #fbf1e2;
50
+ --mang-state-info: #2e7cb8;
51
+ --mang-state-info-soft: #e6f0f8;
52
+
53
+ /* --- spacing --- */
54
+ --mang-space-0: 0;
55
+ --mang-space-1: 0.25rem;
56
+ --mang-space-2: 0.5rem;
57
+ --mang-space-3: 0.75rem;
58
+ --mang-space-4: 1rem;
59
+ --mang-space-5: 1.25rem;
60
+ --mang-space-6: 1.5rem;
61
+ --mang-space-8: 2rem;
62
+ --mang-space-10: 2.5rem;
63
+ --mang-space-12: 3rem;
64
+ --mang-space-16: 4rem;
65
+
66
+ /* --- radius --- */
67
+ --mang-radius-none: 0;
68
+ --mang-radius-sm: 0.5rem;
69
+ --mang-radius-md: 0.6875rem;
70
+ --mang-radius-lg: 1rem;
71
+ --mang-radius-xl: 1.375rem;
72
+ --mang-radius-full: 999px;
73
+
74
+ /* --- shadow --- */
75
+ --mang-shadow-sm: 0 1px 2px rgba(11, 30, 45, 0.05);
76
+ --mang-shadow-md: 0 1px 2px rgba(11, 30, 45, 0.05), 0 12px 28px -16px rgba(11, 30, 45, 0.28);
77
+ --mang-shadow-lg: 0 18px 40px -18px rgba(11, 30, 45, 0.32);
78
+
79
+ /* --- font sizes --- */
80
+ --mang-font-size-xs: 0.75rem;
81
+ --mang-font-size-sm: 0.85rem;
82
+ --mang-font-size-base: 1rem;
83
+ --mang-font-size-lg: 1.15rem;
84
+ --mang-font-size-xl: 1.35rem;
85
+ --mang-font-size-2xl: 1.6rem;
86
+ --mang-font-size-3xl: 2.1rem;
87
+
88
+ /* --- font weights --- */
89
+ --mang-font-weight-normal: 400;
90
+ --mang-font-weight-medium: 600;
91
+ --mang-font-weight-semibold: 700;
92
+ --mang-font-weight-bold: 800;
93
+
94
+ /* --- line heights --- */
95
+ --mang-leading-tight: 1.15;
96
+ --mang-leading-snug: 1.3;
97
+ --mang-leading-normal: 1.5;
98
+ --mang-leading-relaxed: 1.7;
99
+
100
+ /* --- motion --- */
101
+ --mang-duration-fast: 140ms;
102
+ --mang-duration-base: 180ms;
103
+ --mang-duration-slow: 240ms;
104
+ --mang-ease-standard: cubic-bezier(0.16, 1, 0.3, 1);
105
+ --mang-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
106
+ --mang-ease-in: cubic-bezier(0.4, 0, 1, 1);
107
+
108
+ /* --- z-index --- */
109
+ --mang-z-base: 0;
110
+ --mang-z-dropdown: 100;
111
+ --mang-z-sticky: 200;
112
+ --mang-z-overlay: 900;
113
+ --mang-z-modal: 1000;
114
+ --mang-z-toast: 1100;
115
+
116
+ /* --- fonts (quoted — ready to drop into font-family) --- */
117
+ --mang-font-heading: "Quicksand Variable";
118
+ --mang-font-body: "Inter";
119
+ }
@@ -0,0 +1,128 @@
1
+ import { ThemeTokens } from '@mangtre/core';
2
+
3
+ /** The full Măng design-token object. Single source of truth. */
4
+ declare const tokens: {
5
+ readonly color: {
6
+ readonly mangGreen: "#37B693";
7
+ readonly shoot: "#8FE3B8";
8
+ readonly bamboo: "#1F7A5C";
9
+ readonly soil: "#B5793A";
10
+ readonly sun: "#E8C547";
11
+ readonly paper: "#F4F1E8";
12
+ readonly dark: "#14201C";
13
+ };
14
+ readonly font: {
15
+ readonly heading: "Quicksand Variable";
16
+ readonly body: "Inter";
17
+ };
18
+ readonly semantic: {
19
+ readonly surface: {
20
+ readonly base: "#FFFFFF";
21
+ readonly sunken: "#F6FAF9";
22
+ readonly inverse: "#14201C";
23
+ };
24
+ readonly content: {
25
+ readonly default: "#16242C";
26
+ readonly strong: "#14201C";
27
+ readonly muted: "#5D6F78";
28
+ readonly inverse: "#F4F1E8";
29
+ readonly onAccent: "#FFFFFF";
30
+ };
31
+ readonly line: {
32
+ readonly subtle: "#EEF3F2";
33
+ readonly default: "#E4ECEB";
34
+ readonly strong: "#CDD9D6";
35
+ };
36
+ readonly accent: {
37
+ readonly default: "#37B693";
38
+ readonly hover: "#2E9E80";
39
+ readonly soft: "#E7F6F1";
40
+ };
41
+ readonly state: {
42
+ readonly success: "#1F9C7E";
43
+ readonly successSoft: "#E7F6F1";
44
+ readonly danger: "#D2674A";
45
+ readonly dangerSoft: "#FBEEE9";
46
+ readonly warning: "#C77D2E";
47
+ readonly warningSoft: "#FBF1E2";
48
+ readonly info: "#2E7CB8";
49
+ readonly infoSoft: "#E6F0F8";
50
+ };
51
+ };
52
+ readonly space: {
53
+ readonly 0: "0";
54
+ readonly 1: "0.25rem";
55
+ readonly 2: "0.5rem";
56
+ readonly 3: "0.75rem";
57
+ readonly 4: "1rem";
58
+ readonly 5: "1.25rem";
59
+ readonly 6: "1.5rem";
60
+ readonly 8: "2rem";
61
+ readonly 10: "2.5rem";
62
+ readonly 12: "3rem";
63
+ readonly 16: "4rem";
64
+ };
65
+ readonly radius: {
66
+ readonly none: "0";
67
+ readonly sm: "0.5rem";
68
+ readonly md: "0.6875rem";
69
+ readonly lg: "1rem";
70
+ readonly xl: "1.375rem";
71
+ readonly full: "999px";
72
+ };
73
+ readonly shadow: {
74
+ readonly sm: "0 1px 2px rgba(11, 30, 45, 0.05)";
75
+ readonly md: "0 1px 2px rgba(11, 30, 45, 0.05), 0 12px 28px -16px rgba(11, 30, 45, 0.28)";
76
+ readonly lg: "0 18px 40px -18px rgba(11, 30, 45, 0.32)";
77
+ };
78
+ readonly fontSize: {
79
+ readonly xs: "0.75rem";
80
+ readonly sm: "0.85rem";
81
+ readonly base: "1rem";
82
+ readonly lg: "1.15rem";
83
+ readonly xl: "1.35rem";
84
+ readonly "2xl": "1.6rem";
85
+ readonly "3xl": "2.1rem";
86
+ };
87
+ readonly fontWeight: {
88
+ readonly normal: "400";
89
+ readonly medium: "600";
90
+ readonly semibold: "700";
91
+ readonly bold: "800";
92
+ };
93
+ readonly lineHeight: {
94
+ readonly tight: "1.15";
95
+ readonly snug: "1.3";
96
+ readonly normal: "1.5";
97
+ readonly relaxed: "1.7";
98
+ };
99
+ readonly motion: {
100
+ readonly duration: {
101
+ readonly fast: "140ms";
102
+ readonly base: "180ms";
103
+ readonly slow: "240ms";
104
+ };
105
+ readonly ease: {
106
+ readonly standard: "cubic-bezier(0.16, 1, 0.3, 1)";
107
+ readonly out: "cubic-bezier(0.16, 1, 0.3, 1)";
108
+ readonly in: "cubic-bezier(0.4, 0, 1, 1)";
109
+ };
110
+ };
111
+ readonly z: {
112
+ readonly base: "0";
113
+ readonly dropdown: "100";
114
+ readonly sticky: "200";
115
+ readonly overlay: "900";
116
+ readonly modal: "1000";
117
+ readonly toast: "1100";
118
+ };
119
+ };
120
+ type Tokens = typeof tokens;
121
+ /**
122
+ * The runtime theme handed to mini-apps via `sdk.theme`. This is the brand subset only —
123
+ * the assignment below also structurally enforces that `color`/`font` match the locked
124
+ * `ThemeTokens` contract from `@mangtre/core`.
125
+ */
126
+ declare const defaultTheme: ThemeTokens;
127
+
128
+ export { type Tokens, defaultTheme, tokens };
package/dist/tokens.js ADDED
@@ -0,0 +1,8 @@
1
+ import {
2
+ defaultTheme,
3
+ tokens
4
+ } from "./chunk-PPOYMKV3.js";
5
+ export {
6
+ defaultTheme,
7
+ tokens
8
+ };