@almadar/ui 5.23.0 → 5.25.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 (33) hide show
  1. package/dist/avl/index.cjs +2034 -1393
  2. package/dist/avl/index.js +968 -327
  3. package/dist/components/core/molecules/AssetPicker.d.ts +21 -0
  4. package/dist/components/core/molecules/CodeViewer.d.ts +3 -2
  5. package/dist/components/core/molecules/DocCodeBlock.d.ts +2 -1
  6. package/dist/components/core/molecules/GridPicker.d.ts +44 -0
  7. package/dist/components/core/molecules/IconPicker.d.ts +18 -0
  8. package/dist/components/core/molecules/PropertyInspector.d.ts +5 -2
  9. package/dist/components/core/molecules/RichBlockEditor.d.ts +7 -0
  10. package/dist/components/core/molecules/index.d.ts +6 -3
  11. package/dist/components/core/molecules/markdown/CodeBlock.d.ts +15 -1
  12. package/dist/components/core/molecules/markdown/index.d.ts +1 -1
  13. package/dist/components/core/organisms/index.d.ts +5 -5
  14. package/dist/components/core/templates/index.d.ts +1 -1
  15. package/dist/components/index.cjs +1588 -1192
  16. package/dist/components/index.js +687 -291
  17. package/dist/components/{core → marketing}/organisms/CaseStudyOrganism.d.ts +1 -1
  18. package/dist/components/{core → marketing}/organisms/FeatureGridOrganism.d.ts +1 -1
  19. package/dist/components/{core → marketing}/organisms/HeroOrganism.d.ts +1 -1
  20. package/dist/components/{core → marketing}/organisms/ShowcaseOrganism.d.ts +1 -1
  21. package/dist/components/{core → marketing}/organisms/StepFlowOrganism.d.ts +1 -1
  22. package/dist/docs/index.d.cts +20 -1
  23. package/dist/marketing/index.cjs +8 -5
  24. package/dist/marketing/index.d.ts +4 -4
  25. package/dist/marketing/index.js +8 -5
  26. package/dist/providers/index.cjs +1857 -1216
  27. package/dist/providers/index.js +942 -301
  28. package/dist/runtime/index.cjs +1897 -1256
  29. package/dist/runtime/index.js +946 -305
  30. package/package.json +2 -2
  31. /package/dist/components/{core → marketing}/molecules/MarketingFooter.d.ts +0 -0
  32. /package/dist/components/{core → marketing}/molecules/PullQuote.d.ts +0 -0
  33. /package/dist/components/{core → marketing}/templates/AuthLayout.d.ts +0 -0
@@ -0,0 +1,21 @@
1
+ /**
2
+ * AssetPicker Molecule Component
3
+ *
4
+ * Catalog-driven asset chooser built on the GridPicker base. Maps an
5
+ * AssetCatalog into picker cells and renders a kind-aware thumbnail: an
6
+ * <img> for visual kinds, an Icon affordance for audio/model/other. Pure
7
+ * presentational — the host supplies the catalog and owns the selected url.
8
+ */
9
+ import React from 'react';
10
+ import type { AssetCatalog } from '@almadar/core';
11
+ export interface AssetPickerProps {
12
+ /** Browsable asset catalog supplied by the host. */
13
+ assets: AssetCatalog;
14
+ /** Currently selected asset url (controlled highlight). */
15
+ value?: string;
16
+ /** Fired with the chosen asset's url. */
17
+ onChange: (url: string) => void;
18
+ /** Additional CSS classes applied to the root. */
19
+ className?: string;
20
+ }
21
+ export declare const AssetPicker: React.FC<AssetPickerProps>;
@@ -13,6 +13,7 @@
13
13
  */
14
14
  import React from "react";
15
15
  import type { UiError } from '../atoms/types';
16
+ import type { CodeLanguage } from "./markdown/CodeBlock";
16
17
  export type CodeViewerMode = "code" | "diff";
17
18
  export interface DiffLine {
18
19
  type: "add" | "remove" | "context";
@@ -28,7 +29,7 @@ export interface CodeViewerAction {
28
29
  export interface CodeViewerFile {
29
30
  label: string;
30
31
  code: string;
31
- language?: string;
32
+ language?: CodeLanguage;
32
33
  }
33
34
  export interface CodeViewerProps {
34
35
  /** Viewer title */
@@ -36,7 +37,7 @@ export interface CodeViewerProps {
36
37
  /** Code content */
37
38
  code?: string;
38
39
  /** Language for display label */
39
- language?: string;
40
+ language?: CodeLanguage;
40
41
  /** Diff lines (for diff mode) */
41
42
  diff?: readonly DiffLine[];
42
43
  /** Old value (for generating diff) */
@@ -1,8 +1,9 @@
1
+ import type { CodeLanguage } from './markdown/CodeBlock';
1
2
  export interface DocCodeBlockProps {
2
3
  /** Code content to display */
3
4
  code: string;
4
5
  /** Programming language label */
5
- language?: string;
6
+ language?: CodeLanguage;
6
7
  /** Optional title/filename shown in the header bar */
7
8
  title?: string;
8
9
  /** Show line numbers in the gutter */
@@ -0,0 +1,44 @@
1
+ /**
2
+ * GridPicker Molecule Component
3
+ *
4
+ * Reusable emoji-picker-style chooser: a search box, a row of category filter
5
+ * chips, and a scrollable CSS-grid of fixed-size cells. Pure presentational —
6
+ * the host owns the item list and the selected value; the molecule just filters,
7
+ * highlights, and reports clicks via `onChange`.
8
+ */
9
+ import React from 'react';
10
+ /**
11
+ * Presentational item shape for a single grid cell. This is a UI-presentation
12
+ * type, intentionally local — it is NOT a domain/asset type from @almadar/core.
13
+ */
14
+ export interface PickerItem {
15
+ /** Stable identity; emitted via `onChange`. */
16
+ id: string;
17
+ /** Human label — search term, cell title, and aria-label. */
18
+ label: string;
19
+ /** Category key used by the filter chips. */
20
+ category: string;
21
+ }
22
+ export type GridPickerCellSize = 16 | 32 | 48;
23
+ export interface GridPickerProps {
24
+ /** Items to render as grid cells. */
25
+ items: PickerItem[];
26
+ /** Currently selected item id (controlled highlight). */
27
+ value?: string;
28
+ /** Fired with the clicked/selected item's id. */
29
+ onChange: (value: string) => void;
30
+ /**
31
+ * Category keys for the filter chip row. When omitted, the categories are
32
+ * derived from the items. An "All" chip is always prepended.
33
+ */
34
+ categories?: string[];
35
+ /** Placeholder for the search input. */
36
+ searchPlaceholder?: string;
37
+ /** Renders the visual content of a cell (e.g. an emoji glyph or an image). */
38
+ renderThumbnail: (item: PickerItem) => React.ReactNode;
39
+ /** Cell edge length in px. */
40
+ cellSize?: GridPickerCellSize;
41
+ /** Additional CSS classes applied to the root. */
42
+ className?: string;
43
+ }
44
+ export declare const GridPicker: React.FC<GridPickerProps>;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * IconPicker Molecule Component
3
+ *
4
+ * Searchable grid of every lucide icon, built on `GridPicker`. The item set is
5
+ * enumerated once at module scope from the lucide-react exports and kebab-cased
6
+ * to match the canonical names `Icon` resolves, so each cell renders its real
7
+ * glyph via the family-aware `Icon` atom.
8
+ */
9
+ import React from 'react';
10
+ export interface IconPickerProps {
11
+ /** Currently selected icon name (kebab-case). */
12
+ value?: string;
13
+ /** Fired with the chosen icon's kebab-case name. */
14
+ onChange: (name: string) => void;
15
+ /** Additional CSS classes applied to the root. */
16
+ className?: string;
17
+ }
18
+ export declare const IconPicker: React.FC<IconPickerProps>;
@@ -1,11 +1,12 @@
1
1
  import React from 'react';
2
- import type { DeclaredTraitConfig, TraitConfig, TraitConfigValue } from '@almadar/core';
2
+ import type { DeclaredTraitConfig, TraitConfig, TraitConfigValue, AssetCatalog } from '@almadar/core';
3
3
  import type { DisplayStateProps } from '../organisms/types';
4
4
  /**
5
5
  * PropertyInspector — Storybook-style controls panel for a trait's `config`.
6
6
  *
7
7
  * Derives one control per declared config field directly from the schema
8
- * (`@almadar/core` `DeclaredTraitConfig`): `boolean Switch`, `string` with
8
+ * (`@almadar/core` `DeclaredTraitConfig`), dispatching on the field's `type`:
9
+ * `icon → IconPicker`, `asset → AssetPicker`, `boolean → Switch`, `string` with
9
10
  * `values → Select`, `number → numeric Input`, `string → Input`. Non-scalar
10
11
  * fields (array/object/node/SExpr) are shown read-only. Fields group + collapse
11
12
  * by `@tier`. The component is controlled — it emits `onChange(field, value)`;
@@ -22,5 +23,7 @@ export interface PropertyInspectorProps extends DisplayStateProps {
22
23
  onReset?: () => void;
23
24
  /** Panel heading (e.g. the trait name). */
24
25
  title?: string;
26
+ /** Browsable asset catalog supplied to `asset`-typed fields' AssetPicker. */
27
+ assets?: AssetCatalog;
25
28
  }
26
29
  export declare const PropertyInspector: React.FC<PropertyInspectorProps>;
@@ -30,6 +30,13 @@ export interface RichBlockEditorProps {
30
30
  }>;
31
31
  readOnly?: boolean;
32
32
  placeholder?: string;
33
+ /**
34
+ * Opt-in to the Notion-style block authoring chrome (insert toolbar, per-row
35
+ * +/menu gutter, turn-into menu). Off by default: the editor renders as a
36
+ * plain rich text surface that edits block content inline without any
37
+ * add-block affordances.
38
+ */
39
+ enableBlocks?: boolean;
33
40
  showToolbar?: boolean;
34
41
  className?: string;
35
42
  }
@@ -33,7 +33,7 @@ export { Drawer, type DrawerProps, type DrawerPosition, type DrawerSize } from '
33
33
  export { WizardProgress, type WizardProgressProps, type WizardProgressStep } from './WizardProgress';
34
34
  export { WizardNavigation, type WizardNavigationProps } from './WizardNavigation';
35
35
  export { MarkdownContent, type MarkdownContentProps } from './markdown/MarkdownContent';
36
- export { CodeBlock, type CodeBlockProps } from './markdown/CodeBlock';
36
+ export { CodeBlock, type CodeBlockProps, type CodeLanguage } from './markdown/CodeBlock';
37
37
  export { QuizBlock, type QuizBlockProps } from './QuizBlock';
38
38
  export { ScaledDiagram, type ScaledDiagramProps } from './ScaledDiagram';
39
39
  export { CalendarGrid, type CalendarGridProps } from './CalendarGrid';
@@ -41,6 +41,9 @@ export { RepeatableFormSection, type RepeatableFormSectionProps, type Repeatable
41
41
  export { ViolationAlert, type ViolationAlertProps, type ViolationRecord } from './ViolationAlert';
42
42
  export { FormSectionHeader, type FormSectionHeaderProps } from './FormSectionHeader';
43
43
  export { FlipCard, type FlipCardProps } from './FlipCard';
44
+ export { GridPicker, type GridPickerProps, type PickerItem, type GridPickerCellSize, } from './GridPicker';
45
+ export { AssetPicker, type AssetPickerProps } from './AssetPicker';
46
+ export { IconPicker, type IconPickerProps } from './IconPicker';
44
47
  export { DateRangePicker, type DateRangePickerProps, type DateRangePickerPreset } from './DateRangePicker';
45
48
  export { DateRangeSelector, type DateRangeSelectorProps, type DateRangeSelectorOption } from './DateRangeSelector';
46
49
  export { ChartLegend, type ChartLegendProps, type ChartLegendItem } from './ChartLegend';
@@ -100,8 +103,8 @@ export { DocSearch, type DocSearchProps, type DocSearchResult } from './DocSearc
100
103
  export { DocSidebar, type DocSidebarProps, type DocSidebarItem } from './DocSidebar';
101
104
  export { DocTOC, type DocTOCProps, type DocTOCItem } from './DocTOC';
102
105
  export { GradientDivider, type GradientDividerProps } from './GradientDivider';
103
- export { MarketingFooter, type MarketingFooterProps, type FooterLinkColumn, type FooterLinkItem } from './MarketingFooter';
104
- export { PullQuote, type PullQuoteProps } from './PullQuote';
106
+ export { MarketingFooter, type MarketingFooterProps, type FooterLinkColumn, type FooterLinkItem } from '../../marketing/molecules/MarketingFooter';
107
+ export { PullQuote, type PullQuoteProps } from '../../marketing/molecules/PullQuote';
105
108
  export { BehaviorView, type BehaviorViewProps } from '../../avl/molecules/BehaviorView';
106
109
  export { ModuleCard, type ModuleCardProps } from '../../avl/molecules/ModuleCard';
107
110
  export { PageHeader, type PageHeaderProps, type PageBreadcrumb, } from "./PageHeader";
@@ -8,11 +8,25 @@
8
8
  * - Emits: UI:COPY_CODE { language, success }
9
9
  */
10
10
  import React from 'react';
11
+ /**
12
+ * The set of languages with a registered PrismLight grammar (above) plus the
13
+ * `.orb`/`.lolo` grammars from `@almadar/syntax`. Authoritative: an unregistered
14
+ * value renders as plain text, so this union mirrors the `registerLanguage`
15
+ * calls exactly.
16
+ */
17
+ export declare const CODE_LANGUAGES: readonly ["text", "json", "javascript", "js", "typescript", "ts", "jsx", "tsx", "css", "markdown", "md", "bash", "shell", "sh", "yaml", "yml", "rust", "python", "py", "sql", "diff", "toml", "go", "graphql", "html", "xml", "orb", "lolo"];
18
+ export type CodeLanguage = (typeof CODE_LANGUAGES)[number];
19
+ /**
20
+ * Narrow an arbitrary string (e.g. a markdown fence info-string) to a
21
+ * `CodeLanguage`, falling back to `'text'` for any value without a registered
22
+ * grammar — matching the highlighter's own plain-text fallback.
23
+ */
24
+ export declare function toCodeLanguage(value: string | undefined): CodeLanguage;
11
25
  export interface CodeBlockProps {
12
26
  /** The code content to display */
13
27
  code: string;
14
28
  /** Programming language for syntax highlighting */
15
- language?: string;
29
+ language?: CodeLanguage;
16
30
  /** Show the copy button */
17
31
  showCopyButton?: boolean;
18
32
  /** Show the language badge */
@@ -1,2 +1,2 @@
1
1
  export { MarkdownContent, type MarkdownContentProps } from './MarkdownContent';
2
- export { CodeBlock, type CodeBlockProps } from './CodeBlock';
2
+ export { CodeBlock, type CodeBlockProps, type CodeLanguage } from './CodeBlock';
@@ -18,12 +18,12 @@ export { NotifyListener } from "./NotifyListener";
18
18
  export { Timeline, type TimelineProps, type TimelineItem, type TimelineItemStatus, } from "./Timeline";
19
19
  export { MediaGallery, type MediaGalleryProps, type MediaItem, } from "./MediaGallery";
20
20
  export { RuntimeDebugger, type RuntimeDebuggerProps, } from "./debug";
21
- export { HeroOrganism, type HeroOrganismProps, } from "./HeroOrganism";
22
- export { FeatureGridOrganism, type FeatureGridOrganismProps, } from "./FeatureGridOrganism";
21
+ export { HeroOrganism, type HeroOrganismProps, } from "../../marketing/organisms/HeroOrganism";
22
+ export { FeatureGridOrganism, type FeatureGridOrganismProps, } from "../../marketing/organisms/FeatureGridOrganism";
23
23
  export { PricingOrganism, type PricingOrganismProps, } from "../../marketing/organisms/PricingOrganism";
24
24
  export { StatsOrganism, type StatsOrganismProps, } from "../../marketing/organisms/StatsOrganism";
25
- export { StepFlowOrganism, type StepFlowOrganismProps, } from "./StepFlowOrganism";
26
- export { ShowcaseOrganism, type ShowcaseOrganismProps, } from "./ShowcaseOrganism";
25
+ export { StepFlowOrganism, type StepFlowOrganismProps, } from "../../marketing/organisms/StepFlowOrganism";
26
+ export { ShowcaseOrganism, type ShowcaseOrganismProps, } from "../../marketing/organisms/ShowcaseOrganism";
27
27
  export { TeamOrganism, type TeamOrganismProps, } from "../../marketing/organisms/TeamOrganism";
28
- export { CaseStudyOrganism, type CaseStudyOrganismProps, } from "./CaseStudyOrganism";
28
+ export { CaseStudyOrganism, type CaseStudyOrganismProps, } from "../../marketing/organisms/CaseStudyOrganism";
29
29
  export { FeatureRenderer, type FeatureRendererProps } from '../../game/organisms/three/renderers/FeatureRenderer';
@@ -1,6 +1,6 @@
1
1
  export type { TemplateProps } from './types';
2
2
  export { DashboardLayout, type DashboardLayoutProps, type NavItem } from './DashboardLayout';
3
- export { AuthLayout, type AuthLayoutProps } from './AuthLayout';
3
+ export { AuthLayout, type AuthLayoutProps } from '../../marketing/templates/AuthLayout';
4
4
  export { CounterTemplate, type CounterTemplateProps, type CounterSize, type CounterVariant } from './CounterTemplate';
5
5
  export { GameTemplate, type GameTemplateProps } from '../../game/templates/GameTemplate';
6
6
  export { GenericAppTemplate, type GenericAppTemplateProps } from './GenericAppTemplate';