@almadar/ui 5.61.0 → 5.63.1
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/dist/avl/index.cjs +3599 -1810
- package/dist/avl/index.js +2431 -642
- package/dist/components/core/atoms/Box.d.ts +2 -0
- package/dist/components/core/molecules/CalendarGrid.d.ts +9 -1
- package/dist/components/core/molecules/GraphCanvas.d.ts +4 -0
- package/dist/components/core/molecules/PositionedCanvas.d.ts +14 -1
- package/dist/components/core/molecules/ReplyTree.d.ts +13 -1
- package/dist/components/core/templates/index.d.ts +4 -0
- package/dist/components/game/molecules/CardHand.d.ts +35 -0
- package/dist/components/game/molecules/DialogueBox.d.ts +8 -2
- package/dist/components/game/molecules/index.d.ts +1 -0
- package/dist/components/game/molecules/three/index.cjs +283 -115
- package/dist/components/game/molecules/three/index.js +283 -115
- package/dist/components/game/organisms/CardBattlerBoard.d.ts +46 -0
- package/dist/components/game/organisms/CityBuilderBoard.d.ts +63 -0
- package/dist/components/game/organisms/TopDownShooterBoard.d.ts +64 -0
- package/dist/components/game/organisms/TowerDefenseBoard.d.ts +10 -1
- package/dist/components/game/organisms/TraitSlot.d.ts +1 -3
- package/dist/components/game/organisms/VisualNovelBoard.d.ts +53 -0
- package/dist/components/game/organisms/hooks/useCamera.d.ts +16 -0
- package/dist/components/game/organisms/index.d.ts +4 -0
- package/dist/components/game/templates/CardBattlerTemplate.d.ts +35 -0
- package/dist/components/game/templates/CityBuilderTemplate.d.ts +40 -0
- package/dist/components/game/templates/GameCanvas3DBattleTemplate.d.ts +5 -2
- package/dist/components/game/templates/GameCanvas3DCastleTemplate.d.ts +5 -2
- package/dist/components/game/templates/GameCanvas3DWorldMapTemplate.d.ts +5 -2
- package/dist/components/game/templates/TopDownShooterTemplate.d.ts +42 -0
- package/dist/components/game/templates/VisualNovelTemplate.d.ts +28 -0
- package/dist/components/game/templates/game3dAssetManifest.d.ts +50 -0
- package/dist/components/game/templates/index.d.ts +4 -0
- package/dist/components/index.cjs +3465 -1659
- package/dist/components/index.js +2444 -647
- package/dist/components/marketing/organisms/CaseStudyOrganism.d.ts +10 -1
- package/dist/components/marketing/organisms/FeatureGridOrganism.d.ts +10 -1
- package/dist/components/marketing/organisms/HeroOrganism.d.ts +24 -1
- package/dist/components/marketing/organisms/PricingOrganism.d.ts +14 -1
- package/dist/components/marketing/organisms/ShowcaseOrganism.d.ts +14 -1
- package/dist/components/marketing/organisms/StatsOrganism.d.ts +6 -1
- package/dist/components/marketing/organisms/StepFlowOrganism.d.ts +9 -1
- package/dist/components/marketing/organisms/TeamOrganism.d.ts +10 -1
- package/dist/docs/index.cjs +169 -1
- package/dist/docs/index.d.cts +2 -0
- package/dist/docs/index.js +169 -1
- package/dist/hooks/index.cjs +253 -1
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +252 -2
- package/dist/hooks/useCanvasGestures.d.ts +44 -0
- package/dist/hooks/useTapReveal.d.ts +32 -0
- package/dist/locales/index.cjs +315 -3
- package/dist/locales/index.js +315 -3
- package/dist/marketing/index.cjs +59 -0
- package/dist/marketing/index.d.cts +2 -0
- package/dist/marketing/index.js +59 -0
- package/dist/providers/index.cjs +3408 -1619
- package/dist/providers/index.js +2407 -618
- package/dist/runtime/index.cjs +3464 -1675
- package/dist/runtime/index.js +2411 -622
- package/locales/ar.json +105 -1
- package/locales/en.json +105 -1
- package/locales/sl.json +105 -1
- package/package.json +2 -2
|
@@ -52,6 +52,8 @@ export interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
52
52
|
actionPayload?: EventPayload;
|
|
53
53
|
/** Declarative hover event — emits UI:{hoverEvent} with { hovered: true/false } on mouseEnter/mouseLeave */
|
|
54
54
|
hoverEvent?: EventKey;
|
|
55
|
+
/** When true (default), a touch/pen tap also fires `hoverEvent` (toggling hovered) so hover-only reveals work on touch. */
|
|
56
|
+
tapReveal?: boolean;
|
|
55
57
|
/** Maximum width (CSS value, e.g., "550px", "80rem") */
|
|
56
58
|
maxWidth?: string;
|
|
57
59
|
/** Children elements */
|
|
@@ -13,13 +13,21 @@ import type { EventEmit, EventPayload, EntityRow, EntityWith } from "@almadar/co
|
|
|
13
13
|
* 7 on laptop+ (≥1025).
|
|
14
14
|
*/
|
|
15
15
|
export type CalendarDayWindow = 1 | 3 | 7;
|
|
16
|
+
/** The per-event entity fields this grid reads. `startTime`/`endTime` are ISO
|
|
17
|
+
* strings; `color` is a Tailwind class string applied to the event chip. */
|
|
18
|
+
export interface CalendarEventRow {
|
|
19
|
+
title: string;
|
|
20
|
+
startTime: string;
|
|
21
|
+
endTime?: string;
|
|
22
|
+
color?: string;
|
|
23
|
+
}
|
|
16
24
|
export interface CalendarGridProps {
|
|
17
25
|
/** Start of the week (defaults to current week's Monday) */
|
|
18
26
|
weekStart?: Date;
|
|
19
27
|
/** Time slot labels (defaults to 09:00-17:00) */
|
|
20
28
|
timeSlots?: string[];
|
|
21
29
|
/** Events to display on the grid */
|
|
22
|
-
events?: readonly EntityWith<
|
|
30
|
+
events?: readonly EntityWith<CalendarEventRow>[];
|
|
23
31
|
/** Called when a time slot is clicked */
|
|
24
32
|
onSlotClick?: (day: Date, time: string) => void;
|
|
25
33
|
/** Called when a day header is clicked */
|
|
@@ -67,6 +67,10 @@ export interface GraphCanvasProps {
|
|
|
67
67
|
repulsion?: number;
|
|
68
68
|
/** Force-sim target edge length (larger ⇒ more spread out) */
|
|
69
69
|
linkDistance?: number;
|
|
70
|
+
/** Minimum empty gap (px) enforced between node edges so nodes never overlap. */
|
|
71
|
+
nodeSpacing?: number;
|
|
72
|
+
/** Base opacity for links when nothing is hovered (kept faint so dense graphs stay readable; incident links brighten on hover). */
|
|
73
|
+
linkOpacity?: number;
|
|
70
74
|
/** Layout algorithm */
|
|
71
75
|
layout?: "force" | "circular" | "grid";
|
|
72
76
|
/** Entity name for schema-driven auto-fetch */
|
|
@@ -2,12 +2,25 @@ import React from "react";
|
|
|
2
2
|
import type { EventEmit, EntityWith } from "@almadar/core";
|
|
3
3
|
export type CanvasItemStatus = 'empty' | 'seated' | 'ordered' | 'awaiting-bill' | 'cleaning';
|
|
4
4
|
export type CanvasItemShape = 'round' | 'rectangle' | 'square';
|
|
5
|
+
/** The per-item entity fields this canvas reads. `x`/`y` are pixel coordinates
|
|
6
|
+
* in the canvas plane; `status`/`shape` are string literal unions widened to
|
|
7
|
+
* `string` at the row level. */
|
|
8
|
+
export interface CanvasItemRow {
|
|
9
|
+
label: string;
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
capacity: number;
|
|
13
|
+
partySize?: number;
|
|
14
|
+
serverName?: string;
|
|
15
|
+
status?: CanvasItemStatus;
|
|
16
|
+
shape?: CanvasItemShape;
|
|
17
|
+
}
|
|
5
18
|
export interface PositionedCanvasProps {
|
|
6
19
|
/**
|
|
7
20
|
* Items to render. The molecule narrows non-array values to `[]` and reads
|
|
8
21
|
* each row's `id` / `x` / `y` / `label` fields at render time.
|
|
9
22
|
*/
|
|
10
|
-
items: readonly EntityWith<
|
|
23
|
+
items: readonly EntityWith<CanvasItemRow>[];
|
|
11
24
|
width?: number;
|
|
12
25
|
height?: number;
|
|
13
26
|
selectedId?: string | null;
|
|
@@ -7,8 +7,20 @@
|
|
|
7
7
|
import React from "react";
|
|
8
8
|
import type { EventEmit, EntityWith } from "@almadar/core";
|
|
9
9
|
import { type VoteValue } from "./VoteStack";
|
|
10
|
+
/** The per-node entity fields this tree reads. `replies` is the same row shape
|
|
11
|
+
* nested recursively; `userVote` carries the `VoteValue` literal union. */
|
|
12
|
+
export interface ReplyNodeRow {
|
|
13
|
+
authorName: string;
|
|
14
|
+
content: string;
|
|
15
|
+
authorAvatarUrl?: string;
|
|
16
|
+
postedAt?: string;
|
|
17
|
+
voteCount?: number;
|
|
18
|
+
userVote?: VoteValue;
|
|
19
|
+
collapsed?: boolean;
|
|
20
|
+
replies?: readonly EntityWith<ReplyNodeRow>[];
|
|
21
|
+
}
|
|
10
22
|
export interface ReplyTreeProps {
|
|
11
|
-
nodes: readonly EntityWith<
|
|
23
|
+
nodes: readonly EntityWith<ReplyNodeRow>[];
|
|
12
24
|
maxDepth?: number;
|
|
13
25
|
onVote?: (nodeId: string, vote: VoteValue) => void;
|
|
14
26
|
onReply?: (parentNodeId: string) => void;
|
|
@@ -11,6 +11,10 @@ export { WorldMapTemplate, type WorldMapTemplateProps, type WorldMapSlotContext,
|
|
|
11
11
|
export { PlatformerTemplate, type PlatformerTemplateProps, } from '../../game/templates/PlatformerTemplate';
|
|
12
12
|
export { TowerDefenseTemplate, type TowerDefenseTemplateProps, } from '../../game/templates/TowerDefenseTemplate';
|
|
13
13
|
export { RoguelikeTemplate, type RoguelikeTemplateProps, } from '../../game/templates/RoguelikeTemplate';
|
|
14
|
+
export { TopDownShooterTemplate, type TopDownShooterTemplateProps, } from '../../game/templates/TopDownShooterTemplate';
|
|
15
|
+
export { CityBuilderTemplate, type CityBuilderTemplateProps, } from '../../game/templates/CityBuilderTemplate';
|
|
16
|
+
export { VisualNovelTemplate, type VisualNovelTemplateProps, } from '../../game/templates/VisualNovelTemplate';
|
|
17
|
+
export { CardBattlerTemplate, type CardBattlerTemplateProps, } from '../../game/templates/CardBattlerTemplate';
|
|
14
18
|
export { LandingPageTemplate, type LandingPageTemplateProps, type LandingPageEntity, } from '../../marketing/templates/LandingPageTemplate';
|
|
15
19
|
export { PricingPageTemplate, type PricingPageTemplateProps, type PricingPageEntity, } from '../../marketing/templates/PricingPageTemplate';
|
|
16
20
|
export { FeatureDetailPageTemplate, type FeatureDetailPageTemplateProps, type FeatureDetailPageEntity, type FeatureDetailSection, } from '../../marketing/templates/FeatureDetailPageTemplate';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { AssetUrl, EventEmit } from '@almadar/core';
|
|
3
|
+
/** One playable card (icon + title + a few stat numbers). UI value DTO. */
|
|
4
|
+
export interface CardHandCard {
|
|
5
|
+
id: string;
|
|
6
|
+
iconUrl?: AssetUrl;
|
|
7
|
+
title?: string;
|
|
8
|
+
cost?: number;
|
|
9
|
+
attack?: number;
|
|
10
|
+
defense?: number;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface CardHandProps {
|
|
14
|
+
/** Cards to lay out as a horizontal hand (or grid when wrapped). */
|
|
15
|
+
cards: CardHandCard[];
|
|
16
|
+
/** Currently selected card id. */
|
|
17
|
+
selectedId?: string;
|
|
18
|
+
/** Card-art size variant. */
|
|
19
|
+
size?: 'sm' | 'md' | 'lg';
|
|
20
|
+
/** Direct callback when a (non-disabled) card is clicked. */
|
|
21
|
+
onCardClick?: (id: string) => void;
|
|
22
|
+
/** Event-bus event emitted with `{ cardId }` on click. */
|
|
23
|
+
cardClickEvent?: EventEmit<{
|
|
24
|
+
cardId: string;
|
|
25
|
+
}>;
|
|
26
|
+
/** Empty-state label when there are no cards. */
|
|
27
|
+
emptyLabel?: string;
|
|
28
|
+
className?: string;
|
|
29
|
+
}
|
|
30
|
+
/** Pure card-hand molecule: renders a row/grid of cards from props alone. */
|
|
31
|
+
export declare function CardHand({ cards, selectedId, size, onCardClick, cardClickEvent, emptyLabel, className, }: CardHandProps): React.JSX.Element;
|
|
32
|
+
export declare namespace CardHand {
|
|
33
|
+
var displayName: string;
|
|
34
|
+
}
|
|
35
|
+
export default CardHand;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* concern analogous to Form's `formData`.
|
|
13
13
|
*/
|
|
14
14
|
import React from 'react';
|
|
15
|
-
import type { EventEmit, EventPayload } from '@almadar/core';
|
|
15
|
+
import type { AssetUrl, EventEmit, EventPayload } from '@almadar/core';
|
|
16
16
|
export type DialogueChoice = EventPayload & {
|
|
17
17
|
text: string;
|
|
18
18
|
action?: string;
|
|
@@ -53,8 +53,14 @@ export interface DialogueBoxProps {
|
|
|
53
53
|
}>;
|
|
54
54
|
/** Declarative event: emits UI:{advanceEvent} when dialogue is advanced */
|
|
55
55
|
advanceEvent?: EventEmit<Record<string, never>>;
|
|
56
|
+
/** Optional full-frame scene image rendered behind the dialogue (visual-novel mode). */
|
|
57
|
+
backgroundImage?: AssetUrl;
|
|
58
|
+
/** Optional larger character portrait rendered standing over the scene (visual-novel mode). */
|
|
59
|
+
portraitUrl?: AssetUrl;
|
|
60
|
+
/** Multiplier for the large `portraitUrl` height relative to its default (default 1). */
|
|
61
|
+
portraitScale?: number;
|
|
56
62
|
/** Optional className */
|
|
57
63
|
className?: string;
|
|
58
64
|
}
|
|
59
|
-
export declare function DialogueBox({ dialogue, typewriterSpeed, position, onComplete, onChoice, onAdvance, completeEvent, choiceEvent, advanceEvent, className, }: DialogueBoxProps): React.JSX.Element;
|
|
65
|
+
export declare function DialogueBox({ dialogue, typewriterSpeed, position, onComplete, onChoice, onAdvance, completeEvent, choiceEvent, advanceEvent, backgroundImage, portraitUrl, portraitScale, className, }: DialogueBoxProps): React.JSX.Element;
|
|
60
66
|
export default DialogueBox;
|
|
@@ -9,6 +9,7 @@ export { DPad, type DPadProps, type DPadDirection } from './DPad';
|
|
|
9
9
|
export { ActionButtons, type ActionButtonsProps, type ActionButtonConfig } from './ActionButtons';
|
|
10
10
|
export { StatBadge, type StatBadgeProps } from './StatBadge';
|
|
11
11
|
export { InventoryGrid, type InventoryGridProps, type InventoryGridItem } from './InventoryGrid';
|
|
12
|
+
export { CardHand, type CardHandProps, type CardHandCard } from './CardHand';
|
|
12
13
|
export { QuestTracker, type QuestTrackerProps, type Quest } from './QuestTracker';
|
|
13
14
|
export { CraftingRecipe, type CraftingRecipeProps, type CraftingIngredient } from './CraftingRecipe';
|
|
14
15
|
export { PowerupSlots, type PowerupSlotsProps, type ActivePowerup } from './PowerupSlots';
|