@nexa-stack/framework 1.0.0 → 1.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 (133) hide show
  1. package/README.md +15 -3
  2. package/package.json +22 -5
  3. package/packages/server/src/router.ts +36 -12
  4. package/public/assets/blog-CGOdzgkO.js +1 -0
  5. package/public/assets/blog-ML7LFtff.js +1 -0
  6. package/public/assets/components-B_D1ccvJ.js +50 -0
  7. package/public/assets/components-C67m2tNE.js +1 -0
  8. package/public/assets/components-DCNIrNdJ.js +50 -0
  9. package/public/assets/components-DZ9oc9zI.js +1 -0
  10. package/public/assets/contact-CAfovn36.js +1 -0
  11. package/public/assets/contact-bMUqmce3.js +1 -0
  12. package/public/assets/docs-B92Otuxs.js +20 -0
  13. package/public/assets/docs-BGOHuCe3.js +20 -0
  14. package/public/assets/docs-BUkg7Pd2.css +1 -0
  15. package/public/assets/echarts-mount-DdBiYEc1.js +19 -0
  16. package/public/assets/echarts-mount-kJrXh_za.js +19 -0
  17. package/public/assets/echarts-nexa-BsAEVjT0.js +1 -0
  18. package/public/assets/integration-BNpFB3SL.js +1 -0
  19. package/public/assets/integration-Br6tmvWh.js +1 -0
  20. package/public/assets/integration-D7vdPco_.js +1 -0
  21. package/public/assets/main-BBkehs0N.js +1 -0
  22. package/public/assets/main-Cx_-Fq0O.css +1 -0
  23. package/public/assets/main-ny0uOGg1.js +1 -0
  24. package/public/assets/src-B4_Kaae6.css +1 -0
  25. package/public/assets/src-BfdoaLcc.js +1 -0
  26. package/public/assets/src-D__MdyFu.js +1 -0
  27. package/public/cards/README.md +17 -0
  28. package/public/cards/bloom.jpg +0 -0
  29. package/public/favicon.svg +11 -0
  30. package/public/nexa-hero-sculpture-1280.png +0 -0
  31. package/public/nexa-hero-sculpture-640.png +0 -0
  32. package/public/nexa-hero-sculpture-960.png +0 -0
  33. package/public/nexa-hero-sculpture.png +0 -0
  34. package/public/nexa-hero-sculpture.webp +0 -0
  35. package/public/nexa-mark-24.png +0 -0
  36. package/public/nexa-mark-256.png +0 -0
  37. package/public/nexa-mark-32.png +0 -0
  38. package/public/nexa-mark-40.png +0 -0
  39. package/public/nexa-mark-48.png +0 -0
  40. package/public/nexa-mark-512.png +0 -0
  41. package/public/nexa-mark-64.png +0 -0
  42. package/public/nexa-mark-96.png +0 -0
  43. package/public/nexa-mark-apple.png +0 -0
  44. package/public/nexa-mark-product-256.png +0 -0
  45. package/public/nexa-mark-product.png +0 -0
  46. package/public/nexa-mark-source.png +0 -0
  47. package/public/nexa-mark-trim.png +0 -0
  48. package/public/nexa-mark.png +0 -0
  49. package/public/nexa-mark.webp +0 -0
  50. package/public/nexa-palette-vision.png +0 -0
  51. package/public/nexa-wordmark.png +0 -0
  52. package/public/nexa-wordmark.webp +0 -0
  53. package/public/og.png +0 -0
  54. package/public/site/about.html +101 -0
  55. package/public/site/blog.html +87 -0
  56. package/public/site/components.html +251 -0
  57. package/public/site/contact.html +72 -0
  58. package/public/site/docs/buttons.html +157 -0
  59. package/public/site/docs/cards.html +159 -0
  60. package/public/site/docs/colors.html +216 -0
  61. package/public/site/docs/commands.html +170 -0
  62. package/public/site/docs/data.html +122 -0
  63. package/public/site/docs/feedback.html +111 -0
  64. package/public/site/docs/forms.html +117 -0
  65. package/public/site/docs/icons.html +125 -0
  66. package/public/site/docs/index.html +82 -0
  67. package/public/site/docs/installation.html +83 -0
  68. package/public/site/docs/layout.html +116 -0
  69. package/public/site/docs/media.html +96 -0
  70. package/public/site/docs/navigation.html +122 -0
  71. package/public/site/docs/overlays.html +95 -0
  72. package/public/site/docs/pickers.html +126 -0
  73. package/public/site/docs/sections.html +111 -0
  74. package/public/site/docs/typography.html +97 -0
  75. package/public/site/docs/usage.html +76 -0
  76. package/public/site/features.html +107 -0
  77. package/public/site/index.html +117 -0
  78. package/public/site/integration.html +43 -0
  79. package/public/site/pricing.html +87 -0
  80. package/ui/cards/README.md +17 -0
  81. package/ui/cards/bloom.jpg +0 -0
  82. package/ui/echarts-mount-DWNKcqeo.js +22945 -0
  83. package/ui/echarts-nexa-BY8eW9ug.js +456 -0
  84. package/ui/favicon.svg +11 -0
  85. package/ui/nexa-hero-sculpture-1280.png +0 -0
  86. package/ui/nexa-hero-sculpture-640.png +0 -0
  87. package/ui/nexa-hero-sculpture-960.png +0 -0
  88. package/ui/nexa-hero-sculpture.png +0 -0
  89. package/ui/nexa-hero-sculpture.webp +0 -0
  90. package/ui/nexa-mark-24.png +0 -0
  91. package/ui/nexa-mark-256.png +0 -0
  92. package/ui/nexa-mark-32.png +0 -0
  93. package/ui/nexa-mark-40.png +0 -0
  94. package/ui/nexa-mark-48.png +0 -0
  95. package/ui/nexa-mark-512.png +0 -0
  96. package/ui/nexa-mark-64.png +0 -0
  97. package/ui/nexa-mark-96.png +0 -0
  98. package/ui/nexa-mark-apple.png +0 -0
  99. package/ui/nexa-mark-product-256.png +0 -0
  100. package/ui/nexa-mark-product.png +0 -0
  101. package/ui/nexa-mark-source.png +0 -0
  102. package/ui/nexa-mark-trim.png +0 -0
  103. package/ui/nexa-mark.png +0 -0
  104. package/ui/nexa-mark.webp +0 -0
  105. package/ui/nexa-palette-vision.png +0 -0
  106. package/ui/nexa-wordmark.png +0 -0
  107. package/ui/nexa-wordmark.webp +0 -0
  108. package/ui/nexa.css +2 -0
  109. package/ui/nexa.js +2971 -0
  110. package/ui/nexa.umd.js +80 -0
  111. package/ui/og.png +0 -0
  112. package/ui/types/components/art.d.ts +11 -0
  113. package/ui/types/components/card-layouts.d.ts +11 -0
  114. package/ui/types/components/card.d.ts +11 -0
  115. package/ui/types/components/charts.d.ts +7 -0
  116. package/ui/types/components/extra.d.ts +2 -0
  117. package/ui/types/components/helpers.d.ts +18 -0
  118. package/ui/types/components/icons.d.ts +24 -0
  119. package/ui/types/components/index.d.ts +2 -0
  120. package/ui/types/components/pickers.d.ts +8 -0
  121. package/ui/types/components/structure.d.ts +2 -0
  122. package/ui/types/core/behaviors.d.ts +2 -0
  123. package/ui/types/core/brand-assets.d.ts +44 -0
  124. package/ui/types/core/colormap.d.ts +49 -0
  125. package/ui/types/core/echarts-mount.d.ts +5 -0
  126. package/ui/types/core/echarts-nexa.d.ts +71 -0
  127. package/ui/types/core/parser.d.ts +11 -0
  128. package/ui/types/core/registry.d.ts +13 -0
  129. package/ui/types/core/renderer.d.ts +14 -0
  130. package/ui/types/core/schema.d.ts +8 -0
  131. package/ui/types/core/toast.d.ts +11 -0
  132. package/ui/types/core/validate.d.ts +1 -0
  133. package/ui/types/index.d.ts +50 -0
package/ui/og.png ADDED
Binary file
@@ -0,0 +1,11 @@
1
+ /** SVG fallback only — default header uses /nexa-mark.png */
2
+ export declare function renderBrandMark(): string;
3
+ /**
4
+ * Hero sculpture — asset flush to screen edge
5
+ * DOM: bloom → media → dots (on top)
6
+ */
7
+ export declare function renderHeroSculpture(): string;
8
+ /** Product card — mark thumb فقط (مربّع، بدون hero-art) */
9
+ export declare function renderProductMark(): string;
10
+ /** Card media — cover / promo / video (sculpture + bloom + dots) */
11
+ export declare function renderCardHeroArt(variant?: 'cover' | 'product' | 'inline'): string;
@@ -0,0 +1,11 @@
1
+ export declare const CARD_LAYOUTS: readonly ["cover", "product", "video", "event", "promo", "pricing", "analytics", "quote", "tasks", "profile", "feature", "media", "icon", "metric"];
2
+ export type CardLayout = (typeof CARD_LAYOUTS)[number] | 'default';
3
+ export declare function has(mods: string[], value: string): boolean;
4
+ export declare function resolveCardLayout(modifiers: string[]): CardLayout;
5
+ export declare function renderCardLayout(element: HTMLElement, layout: CardLayout, defaults: {
6
+ badge: string;
7
+ title: string;
8
+ text: string;
9
+ cta?: string;
10
+ tag: string;
11
+ }): string;
@@ -0,0 +1,11 @@
1
+ /** Card — شكل (layout) + أنيمiشن (model) */
2
+ import { resolveCardLayout, CARD_LAYOUTS } from './card-layouts';
3
+ export declare const CARD_MODELS: readonly ["soft", "fade", "slide", "lift", "tilt", "flip", "magnetic", "float", "glow", "shine", "aurora", "bounce", "zoom", "pulse", "reveal"];
4
+ export { CARD_LAYOUTS };
5
+ export type CardModel = (typeof CARD_MODELS)[number];
6
+ export type CardHover = 'none' | 'soft' | 'lift' | 'glow' | 'flip' | 'tilt' | 'magnetic';
7
+ export declare const CARD_STYLES: readonly ["plain", "bordered", "elevated", "glass", "horizontal", "square", "interactive"];
8
+ export declare function resolveCardModel(modifiers: string[]): CardModel;
9
+ export { resolveCardLayout };
10
+ export declare function prepareCardHost(element: HTMLElement, modifiers: string[]): void;
11
+ export declare function renderCardContent(element: HTMLElement, content: string, modifiers?: string[]): string;
@@ -0,0 +1,7 @@
1
+ import type { ComponentRegistry } from '../core/registry';
2
+ export type ChartPoint = {
3
+ label: string;
4
+ value: number;
5
+ };
6
+ export declare function parseChartData(raw: string | null): ChartPoint[];
7
+ export declare function registerChartComponents(registry: ComponentRegistry): void;
@@ -0,0 +1,2 @@
1
+ import type { ComponentRegistry } from '../core/registry';
2
+ export declare function registerExtraComponents(registry: ComponentRegistry): void;
@@ -0,0 +1,18 @@
1
+ export declare const has: (mods: string[], value: string) => boolean;
2
+ export declare function splitList(raw: string | null, sep?: RegExp | string): string[];
3
+ export declare function formatTitle(raw: string): string;
4
+ export declare function parsePairs(raw: string | null, sep?: string): {
5
+ head: string;
6
+ body: string;
7
+ }[];
8
+ export type PlanRow = {
9
+ name: string;
10
+ price: string;
11
+ desc: string;
12
+ features: string[];
13
+ cta: string;
14
+ popular?: boolean;
15
+ };
16
+ export declare function parsePlans(element: HTMLElement): PlanRow[];
17
+ export declare function parseFeatureCards(element: HTMLElement, count: number): string[][];
18
+ export declare function navLinks(element: HTMLElement, fallback: string[]): string;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Nexa Icons — Lucide (MIT)
3
+ * أمر: nexa="ico zap" · icon="zap" على الكروت
4
+ * ستايل: stroke مليان (افتراضي) · fill / solid · thin
5
+ */
6
+ import type { IconNode } from 'lucide';
7
+ export type NexaIconName = string;
8
+ export type NexaIconWeight = 'regular' | 'bold' | 'thin' | 'fill';
9
+ declare const SIZE: {
10
+ readonly sm: 18;
11
+ readonly md: 24;
12
+ readonly lg: 32;
13
+ readonly xl: 40;
14
+ };
15
+ export declare function hasNexaIcon(name: string): boolean;
16
+ export declare function resolveIconNode(name: string): IconNode | null;
17
+ /** كل الأسماء الأساسية (بدون aliases) لصفحة الـ showcase */
18
+ export declare function listNexaIconNames(): string[];
19
+ /** SVG string — يشتغل في render + vitest بدون DOM */
20
+ export declare function renderIcon(name: string, size?: keyof typeof SIZE | number, className?: string, weight?: NexaIconWeight): string;
21
+ /** للكروت: lucide name · emoji · URL */
22
+ export declare function renderCardIcon(raw: string, size?: number, className?: string, weight?: NexaIconWeight): string;
23
+ export declare function registerIconComponent(registry: import('../core/registry').ComponentRegistry): void;
24
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { ComponentRegistry } from '../core/registry';
2
+ export declare function registerPrototypeComponents(registry: ComponentRegistry): void;
@@ -0,0 +1,8 @@
1
+ import type { ComponentRegistry } from '../core/registry';
2
+ declare function pad(n: number): string;
3
+ export declare function registerPickerComponents(registry: ComponentRegistry): void;
4
+ /** يُستخدم من السلوك لإعادة رسم التقويم */
5
+ export declare function renderCalendarGrid(y: number, m: number, selectedIso: string): string;
6
+ export declare function calendarTitle(y: number, m: number): string;
7
+ export declare function formatDateDisplay(iso: string): string;
8
+ export { pad as pad2 };
@@ -0,0 +1,2 @@
1
+ import type { ComponentRegistry } from '../core/registry';
2
+ export declare function registerStructureComponents(registry: ComponentRegistry): void;
@@ -0,0 +1,2 @@
1
+ /** تفاعلات خفيفة للمكوّنات — tabs, accordion, dropdown, modal */
2
+ export declare function wireBehaviors(root?: ParentNode): void;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Nexa brand assets — مسارات ثابتة فقط.
3
+ * أي صورة جديدة من التصميم تُنسخ هنا باسم framework (nexa-*)
4
+ * ولا تُستخدم أسماء الرفع الخام (Untitled-1.png, nexa.png, …) في الكود.
5
+ */
6
+ export declare const NEXA_ASSETS: {
7
+ /** Default mark — 128px, transparent, cropped from source */
8
+ readonly mark: "/nexa-mark.png";
9
+ /** High-res master (1536px) — do not use in HTML directly */
10
+ readonly markSource: "/nexa-mark-source.png";
11
+ readonly mark512: "/nexa-mark-512.png";
12
+ readonly mark256: "/nexa-mark-256.png";
13
+ readonly mark128: "/nexa-mark.png";
14
+ readonly mark96: "/nexa-mark-96.png";
15
+ readonly mark64: "/nexa-mark-64.png";
16
+ readonly mark48: "/nexa-mark-48.png";
17
+ readonly mark40: "/nexa-mark-40.png";
18
+ readonly mark32: "/nexa-mark-32.png";
19
+ readonly mark24: "/nexa-mark-24.png";
20
+ readonly markApple: "/nexa-mark-apple.png";
21
+ /** Product card thumb — 384px square, crisp on retina */
22
+ readonly markProduct: "/nexa-mark-product.png";
23
+ readonly markProduct256: "/nexa-mark-product-256.png";
24
+ readonly wordmark: "/nexa-wordmark.png";
25
+ readonly heroSculpture: "/nexa-hero-sculpture.png";
26
+ readonly heroSculpture640: "/nexa-hero-sculpture-640.png";
27
+ readonly heroSculpture960: "/nexa-hero-sculpture-960.png";
28
+ readonly heroSculpture1280: "/nexa-hero-sculpture-1280.png";
29
+ readonly visionReference: "/nexa-palette-vision.png";
30
+ readonly cardsVision: "/nexa-cards-vision.jpg";
31
+ readonly cardsDir: "/cards/";
32
+ /** على الكروت: image="hero" أو art="hero" */
33
+ readonly cardHeroArt: "hero";
34
+ readonly favicon: "/favicon.svg";
35
+ };
36
+ export declare function resolveBrandAsset(src: string): string;
37
+ export declare function isHeroArtToken(src: string): boolean;
38
+ export type NexaAssetKey = keyof typeof NEXA_ASSETS;
39
+ /** Retina srcset for mark icon */
40
+ export declare function markSrcSet(displayPx?: number): string;
41
+ /** Product card mark — square thumb, fixed column width */
42
+ export declare function productMarkSrcSet(): string;
43
+ /** Card/cover sculpture — pre-sized to avoid browser upscale blur */
44
+ export declare function sculptureCardSrcSet(): string;
@@ -0,0 +1,49 @@
1
+ /** Color Map API — مولّد خريطة ألوان من لون واحد (مثل Sass variables لكن أبسط) */
2
+ export type ColorMapName = 'violet' | 'azure' | 'gold' | 'emerald' | 'coral';
3
+ export type BrandStep = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
4
+ export type BrandScale = Record<BrandStep, string>;
5
+ export declare const colorMapNames: ColorMapName[];
6
+ export declare const brandSteps: BrandStep[];
7
+ /** مرادفات الأوامر → اسم الخريطة */
8
+ export declare const colorAliases: Record<string, ColorMapName>;
9
+ /** أسماء جاهزة → hex — map pink */
10
+ export declare const mapPresets: Record<string, string>;
11
+ export declare const SAVED_MAPS_KEY = "nexa-saved-maps";
12
+ /** يطبّع اسم الخريطة المحفوظة — map:my-brand → my-brand */
13
+ export declare function normalizeMapName(name: string): string;
14
+ /** يقرأ الخرائط المحفوظة من localStorage */
15
+ export declare function getSavedMaps(): Record<string, string>;
16
+ /** يحفظ خريطة باسم — map:my-brand */
17
+ export declare function saveBrandMap(name: string, seed: string): string;
18
+ export declare function deleteSavedMap(name: string): boolean;
19
+ export declare function listSavedMapNames(): string[];
20
+ /** يقرأ map #hex أو map pink أو map:my-brand من modifiers */
21
+ export declare function resolveMapSeed(modifiers: string[]): string | null;
22
+ export declare function normalizeHex(input: string): string | null;
23
+ export declare function hexToRgb(hex: string): {
24
+ r: number;
25
+ g: number;
26
+ b: number;
27
+ } | null;
28
+ export declare function rgbToHex(r: number, g: number, b: number): string;
29
+ export declare function rgbToHsl(r: number, g: number, b: number): {
30
+ h: number;
31
+ s: number;
32
+ l: number;
33
+ };
34
+ export declare function hslToHex(h: number, s: number, l: number): string;
35
+ /**
36
+ * من لون واحد (#hex) → سلم brand كامل 50→900
37
+ * هاد جوهر مولّد الخريطة: بدل ما تكتب 10 متغيرات Sass، بتدخل لون واحد.
38
+ */
39
+ export declare function generateBrandScale(seed: string): BrandScale;
40
+ /** يطبّق سلم brand على عنصر — كل المكوّنات تقرأ من --nexa-brand-* */
41
+ export declare function applyBrandScale(target: HTMLElement, scale: BrandScale): BrandScale;
42
+ /** يولّد من لون واحد ويطبّق مباشرة */
43
+ export declare function applyBrandColor(target: HTMLElement, seed: string): BrandScale;
44
+ /** يصدّر CSS جاهز للنسخ — تحطه مرة واحدة وكل Nexa يتبع */
45
+ export declare function exportBrandScaleCss(scale: BrandScale, selector?: string): string;
46
+ /** يوزّع لوحة جاهزة على العنصر عبر CSS variables */
47
+ export declare function applyColorMap(target: HTMLElement, name: ColorMapName | string): boolean;
48
+ /** بذرة hue — اختصار سريع لما ما عندك hex جاهز */
49
+ export declare function applyColorSeed(target: HTMLElement, hue: number, chroma?: number): boolean;
@@ -0,0 +1,5 @@
1
+ import * as echarts from 'echarts/core';
2
+ import { buildNexaChartOption, NEXA_ECHARTS_THEME } from './echarts-nexa';
3
+ export declare function mountNexaChart(host: HTMLElement): echarts.ECharts | null;
4
+ export declare function wireEcharts(root?: ParentNode): void;
5
+ export { echarts, NEXA_ECHARTS_THEME, buildNexaChartOption };
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Nexa × ECharts — ثيم + بناء options (Apache 2.0)
3
+ * تخصيص كامل عبر NEXA_ECHARTS_THEME و buildNexaChartOption
4
+ */
5
+ import type { EChartsOption } from 'echarts';
6
+ import type { ChartPoint } from '../components/charts';
7
+ export declare const NEXA_ECHARTS_THEME: {
8
+ readonly color: readonly ["#00C6FF", "#2E9EFF", "#2563EB", "#7C5CFC", "#a78bfa", "#38bdf8"];
9
+ readonly backgroundColor: "transparent";
10
+ readonly textStyle: {
11
+ readonly fontFamily: "Inter,Segoe UI,system-ui,sans-serif";
12
+ readonly color: "#5B6478";
13
+ };
14
+ readonly title: {
15
+ readonly textStyle: {
16
+ readonly color: "#0B1220";
17
+ readonly fontWeight: 700;
18
+ };
19
+ };
20
+ readonly legend: {
21
+ readonly textStyle: {
22
+ readonly color: "#5B6478";
23
+ };
24
+ };
25
+ readonly grid: {
26
+ readonly left: 12;
27
+ readonly right: 12;
28
+ readonly top: 48;
29
+ readonly bottom: 28;
30
+ readonly containLabel: true;
31
+ };
32
+ readonly categoryAxis: {
33
+ readonly axisLine: {
34
+ readonly lineStyle: {
35
+ readonly color: "rgba(11,18,32,.08)";
36
+ };
37
+ };
38
+ readonly axisTick: {
39
+ readonly show: false;
40
+ };
41
+ readonly axisLabel: {
42
+ readonly color: "#5B6478";
43
+ readonly fontSize: 11;
44
+ };
45
+ readonly splitLine: {
46
+ readonly lineStyle: {
47
+ readonly color: "rgba(11,18,32,.06)";
48
+ };
49
+ };
50
+ };
51
+ readonly valueAxis: {
52
+ readonly axisLine: {
53
+ readonly show: false;
54
+ };
55
+ readonly axisTick: {
56
+ readonly show: false;
57
+ };
58
+ readonly axisLabel: {
59
+ readonly color: "#5B6478";
60
+ readonly fontSize: 11;
61
+ };
62
+ readonly splitLine: {
63
+ readonly lineStyle: {
64
+ readonly color: "rgba(11,18,32,.06)";
65
+ };
66
+ };
67
+ };
68
+ };
69
+ export type NexaChartKind = 'bar' | 'line' | 'area' | 'donut' | 'pie' | 'spark';
70
+ export declare function buildNexaChartOption(kind: NexaChartKind, points: ChartPoint[], animate?: boolean): EChartsOption;
71
+ export declare function parseChartKind(raw: string | null): NexaChartKind;
@@ -0,0 +1,11 @@
1
+ export type NexaCommand = {
2
+ component: string;
3
+ modifiers: string[];
4
+ attributes: Record<string, string>;
5
+ raw: string;
6
+ label?: string;
7
+ };
8
+ export declare function isHexToken(token: string): boolean;
9
+ export declare function resolveAlias(name: string): string;
10
+ export declare function parseNexa(input: string): NexaCommand;
11
+ export declare function parseNexaPage(input: string): NexaCommand[];
@@ -0,0 +1,13 @@
1
+ import type { NexaCommand } from './parser';
2
+ export type NexaRenderContext = NexaCommand & {
3
+ content: string;
4
+ element: HTMLElement;
5
+ };
6
+ export type NexaComponent = (context: NexaRenderContext) => string;
7
+ export declare class ComponentRegistry {
8
+ private components;
9
+ register(name: string, component: NexaComponent): this;
10
+ resolve(name: string): NexaComponent | undefined;
11
+ list(): string[];
12
+ }
13
+ export declare const registry: ComponentRegistry;
@@ -0,0 +1,14 @@
1
+ import type { ComponentRegistry } from './registry';
2
+ export type RenderResult = {
3
+ ok: true;
4
+ } | {
5
+ ok: false;
6
+ error: string;
7
+ };
8
+ export declare function createNexa({ registry }: {
9
+ registry: ComponentRegistry;
10
+ }): {
11
+ render(element: HTMLElement): RenderResult;
12
+ renderPage(commands: string, target: HTMLElement): RenderResult;
13
+ mount(root?: Element | Document): RenderResult;
14
+ };
@@ -0,0 +1,8 @@
1
+ export type ComponentSchema = {
2
+ variants?: string[];
3
+ sizes?: string[];
4
+ states?: string[];
5
+ layout?: string[];
6
+ };
7
+ export declare const componentSchemas: Record<string, ComponentSchema>;
8
+ export declare function getComponentSchema(name: string): ComponentSchema;
@@ -0,0 +1,11 @@
1
+ export type ToastTone = 'success' | 'warning' | 'danger' | 'info';
2
+ export type ToastOptions = {
3
+ text: string;
4
+ tone?: ToastTone;
5
+ duration?: number;
6
+ };
7
+ /** Shared toast markup — static demo + nexa.toast() API */
8
+ export declare function toastInnerHtml(text: string, tone?: ToastTone): string;
9
+ /** Toast queue — multiple at once via nexa.toast() */
10
+ export declare function pushToast(opts: ToastOptions | string): HTMLDivElement;
11
+ export declare function clearToasts(): void;
@@ -0,0 +1 @@
1
+ export declare function validateModifiers(component: string, modifiers: string[]): string | null;
@@ -0,0 +1,50 @@
1
+ import { createNexa } from './core/renderer';
2
+ import { registry } from './core/registry';
3
+ import { registerPrototypeComponents } from './components';
4
+ import { applyColorMap, applyColorSeed, colorMapNames, generateBrandScale, applyBrandScale, applyBrandColor, exportBrandScaleCss, normalizeHex, mapPresets, resolveMapSeed, saveBrandMap, deleteSavedMap, listSavedMapNames, getSavedMaps, normalizeMapName } from './core/colormap';
5
+ import './styles/tokens.css';
6
+ import './styles/base.css';
7
+ import './styles/components.css';
8
+ import './styles/presets.css';
9
+ import './styles/primitives.css';
10
+ import './styles/card.css';
11
+ import './styles/card-layouts.css';
12
+ import './styles/icons.css';
13
+ import './styles/controls.css';
14
+ import './styles/forms.css';
15
+ import './styles/dropdown.css';
16
+ import './styles/sections.css';
17
+ import './styles/capabilities.css';
18
+ import './styles/widgets.css';
19
+ import './styles/essential.css';
20
+ import './styles/brand.css';
21
+ import './styles/charts.css';
22
+ import './styles/vision.css';
23
+ import { pushToast, clearToasts } from './core/toast';
24
+ import type { ToastOptions, ToastTone } from './core/toast';
25
+ export declare const nexa: {
26
+ render(element: HTMLElement): import("./core/renderer").RenderResult;
27
+ renderPage(commands: string, target: HTMLElement): import("./core/renderer").RenderResult;
28
+ mount(root?: Element | Document): import("./core/renderer").RenderResult;
29
+ } & {
30
+ toast: typeof pushToast;
31
+ clearToasts: typeof clearToasts;
32
+ };
33
+ export { createNexa, registry, registerPrototypeComponents, applyColorMap, applyColorSeed, colorMapNames, generateBrandScale, applyBrandScale, applyBrandColor, exportBrandScaleCss, normalizeHex, mapPresets, resolveMapSeed, saveBrandMap, deleteSavedMap, listSavedMapNames, getSavedMaps, normalizeMapName };
34
+ export { pushToast, clearToasts };
35
+ export type { ToastOptions, ToastTone };
36
+ export { NEXA_ASSETS } from './core/brand-assets';
37
+ export type { NexaAssetKey } from './core/brand-assets';
38
+ export type { NexaCommand } from './core/parser';
39
+ export type { ColorMapName, BrandScale, BrandStep } from './core/colormap';
40
+ export { componentSchemas, getComponentSchema } from './core/schema';
41
+ export { validateModifiers } from './core/validate';
42
+ export { wireBehaviors } from './core/behaviors';
43
+ export { buildNexaChartOption, NEXA_ECHARTS_THEME } from './core/echarts-nexa';
44
+ export declare function wireEcharts(root?: ParentNode): Promise<void>;
45
+ export declare function mountNexaChart(host: HTMLElement): Promise<import("echarts").ECharts | null>;
46
+ export { renderIcon, renderCardIcon, hasNexaIcon, listNexaIconNames } from './components/icons';
47
+ export type { NexaIconWeight } from './components/icons';
48
+ export { CARD_LAYOUTS, CARD_MODELS, CARD_STYLES } from './components/card';
49
+ export type { CardModel } from './components/card';
50
+ export type { CardLayout } from './components/card-layouts';