@almadar/ui 5.83.0 → 5.84.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.
- package/dist/avl/index.cjs +2 -1
- package/dist/avl/index.js +2 -1
- package/dist/components/game/2d/atoms/ChoiceButton.d.ts +3 -1
- package/dist/components/index.cjs +2 -1
- package/dist/components/index.js +2 -1
- package/dist/providers/index.cjs +2 -1
- package/dist/providers/index.js +2 -1
- package/dist/runtime/index.cjs +2 -1
- package/dist/runtime/index.js +2 -1
- package/package.json +1 -1
package/dist/avl/index.cjs
CHANGED
|
@@ -13319,6 +13319,7 @@ function ChoiceButton({
|
|
|
13319
13319
|
selected = false,
|
|
13320
13320
|
onClick,
|
|
13321
13321
|
action,
|
|
13322
|
+
payload,
|
|
13322
13323
|
className
|
|
13323
13324
|
}) {
|
|
13324
13325
|
const eventBus = useEventBus();
|
|
@@ -13328,7 +13329,7 @@ function ChoiceButton({
|
|
|
13328
13329
|
variant: "ghost",
|
|
13329
13330
|
disabled,
|
|
13330
13331
|
onClick: () => {
|
|
13331
|
-
if (action) eventBus.emit(`UI:${action}`, {});
|
|
13332
|
+
if (action) eventBus.emit(`UI:${action}`, payload ?? {});
|
|
13332
13333
|
onClick?.();
|
|
13333
13334
|
},
|
|
13334
13335
|
className: cn(
|
package/dist/avl/index.js
CHANGED
|
@@ -13273,6 +13273,7 @@ function ChoiceButton({
|
|
|
13273
13273
|
selected = false,
|
|
13274
13274
|
onClick,
|
|
13275
13275
|
action,
|
|
13276
|
+
payload,
|
|
13276
13277
|
className
|
|
13277
13278
|
}) {
|
|
13278
13279
|
const eventBus = useEventBus();
|
|
@@ -13282,7 +13283,7 @@ function ChoiceButton({
|
|
|
13282
13283
|
variant: "ghost",
|
|
13283
13284
|
disabled,
|
|
13284
13285
|
onClick: () => {
|
|
13285
|
-
if (action) eventBus.emit(`UI:${action}`, {});
|
|
13286
|
+
if (action) eventBus.emit(`UI:${action}`, payload ?? {});
|
|
13286
13287
|
onClick?.();
|
|
13287
13288
|
},
|
|
13288
13289
|
className: cn(
|
|
@@ -17,10 +17,12 @@ export interface ChoiceButtonProps {
|
|
|
17
17
|
onClick?: () => void;
|
|
18
18
|
/** Declarative event name — emits UI:{action} via eventBus on click */
|
|
19
19
|
action?: EventKey;
|
|
20
|
+
/** Semantic payload emitted with the action (e.g. `{ nextId, choiceIndex }` for a branching choice). */
|
|
21
|
+
payload?: Record<string, string | number | boolean>;
|
|
20
22
|
/** Additional CSS classes */
|
|
21
23
|
className?: string;
|
|
22
24
|
}
|
|
23
|
-
export declare function ChoiceButton({ text, index, assetUrl, icon, disabled, selected, onClick, action, className, }: ChoiceButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function ChoiceButton({ text, index, assetUrl, icon, disabled, selected, onClick, action, payload, className, }: ChoiceButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
24
26
|
export declare namespace ChoiceButton {
|
|
25
27
|
var displayName: string;
|
|
26
28
|
}
|
|
@@ -20577,6 +20577,7 @@ function ChoiceButton({
|
|
|
20577
20577
|
selected = false,
|
|
20578
20578
|
onClick,
|
|
20579
20579
|
action,
|
|
20580
|
+
payload,
|
|
20580
20581
|
className
|
|
20581
20582
|
}) {
|
|
20582
20583
|
const eventBus = useEventBus();
|
|
@@ -20586,7 +20587,7 @@ function ChoiceButton({
|
|
|
20586
20587
|
variant: "ghost",
|
|
20587
20588
|
disabled,
|
|
20588
20589
|
onClick: () => {
|
|
20589
|
-
if (action) eventBus.emit(`UI:${action}`, {});
|
|
20590
|
+
if (action) eventBus.emit(`UI:${action}`, payload ?? {});
|
|
20590
20591
|
onClick?.();
|
|
20591
20592
|
},
|
|
20592
20593
|
className: cn(
|
package/dist/components/index.js
CHANGED
|
@@ -20531,6 +20531,7 @@ function ChoiceButton({
|
|
|
20531
20531
|
selected = false,
|
|
20532
20532
|
onClick,
|
|
20533
20533
|
action,
|
|
20534
|
+
payload,
|
|
20534
20535
|
className
|
|
20535
20536
|
}) {
|
|
20536
20537
|
const eventBus = useEventBus();
|
|
@@ -20540,7 +20541,7 @@ function ChoiceButton({
|
|
|
20540
20541
|
variant: "ghost",
|
|
20541
20542
|
disabled,
|
|
20542
20543
|
onClick: () => {
|
|
20543
|
-
if (action) eventBus.emit(`UI:${action}`, {});
|
|
20544
|
+
if (action) eventBus.emit(`UI:${action}`, payload ?? {});
|
|
20544
20545
|
onClick?.();
|
|
20545
20546
|
},
|
|
20546
20547
|
className: cn(
|
package/dist/providers/index.cjs
CHANGED
|
@@ -9564,6 +9564,7 @@ function ChoiceButton({
|
|
|
9564
9564
|
selected = false,
|
|
9565
9565
|
onClick,
|
|
9566
9566
|
action,
|
|
9567
|
+
payload,
|
|
9567
9568
|
className
|
|
9568
9569
|
}) {
|
|
9569
9570
|
const eventBus = useEventBus();
|
|
@@ -9573,7 +9574,7 @@ function ChoiceButton({
|
|
|
9573
9574
|
variant: "ghost",
|
|
9574
9575
|
disabled,
|
|
9575
9576
|
onClick: () => {
|
|
9576
|
-
if (action) eventBus.emit(`UI:${action}`, {});
|
|
9577
|
+
if (action) eventBus.emit(`UI:${action}`, payload ?? {});
|
|
9577
9578
|
onClick?.();
|
|
9578
9579
|
},
|
|
9579
9580
|
className: cn(
|
package/dist/providers/index.js
CHANGED
|
@@ -9519,6 +9519,7 @@ function ChoiceButton({
|
|
|
9519
9519
|
selected = false,
|
|
9520
9520
|
onClick,
|
|
9521
9521
|
action,
|
|
9522
|
+
payload,
|
|
9522
9523
|
className
|
|
9523
9524
|
}) {
|
|
9524
9525
|
const eventBus = useEventBus();
|
|
@@ -9528,7 +9529,7 @@ function ChoiceButton({
|
|
|
9528
9529
|
variant: "ghost",
|
|
9529
9530
|
disabled,
|
|
9530
9531
|
onClick: () => {
|
|
9531
|
-
if (action) eventBus.emit(`UI:${action}`, {});
|
|
9532
|
+
if (action) eventBus.emit(`UI:${action}`, payload ?? {});
|
|
9532
9533
|
onClick?.();
|
|
9533
9534
|
},
|
|
9534
9535
|
className: cn(
|
package/dist/runtime/index.cjs
CHANGED
|
@@ -10090,6 +10090,7 @@ function ChoiceButton({
|
|
|
10090
10090
|
selected = false,
|
|
10091
10091
|
onClick,
|
|
10092
10092
|
action,
|
|
10093
|
+
payload,
|
|
10093
10094
|
className
|
|
10094
10095
|
}) {
|
|
10095
10096
|
const eventBus = useEventBus();
|
|
@@ -10099,7 +10100,7 @@ function ChoiceButton({
|
|
|
10099
10100
|
variant: "ghost",
|
|
10100
10101
|
disabled,
|
|
10101
10102
|
onClick: () => {
|
|
10102
|
-
if (action) eventBus.emit(`UI:${action}`, {});
|
|
10103
|
+
if (action) eventBus.emit(`UI:${action}`, payload ?? {});
|
|
10103
10104
|
onClick?.();
|
|
10104
10105
|
},
|
|
10105
10106
|
className: cn(
|
package/dist/runtime/index.js
CHANGED
|
@@ -10045,6 +10045,7 @@ function ChoiceButton({
|
|
|
10045
10045
|
selected = false,
|
|
10046
10046
|
onClick,
|
|
10047
10047
|
action,
|
|
10048
|
+
payload,
|
|
10048
10049
|
className
|
|
10049
10050
|
}) {
|
|
10050
10051
|
const eventBus = useEventBus();
|
|
@@ -10054,7 +10055,7 @@ function ChoiceButton({
|
|
|
10054
10055
|
variant: "ghost",
|
|
10055
10056
|
disabled,
|
|
10056
10057
|
onClick: () => {
|
|
10057
|
-
if (action) eventBus.emit(`UI:${action}`, {});
|
|
10058
|
+
if (action) eventBus.emit(`UI:${action}`, payload ?? {});
|
|
10058
10059
|
onClick?.();
|
|
10059
10060
|
},
|
|
10060
10061
|
className: cn(
|