@nice2dev/events 1.1.9 → 1.1.10
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/CHANGELOG.md +69 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +21 -74
- package/dist/index.mjs +1207 -1193
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -409,18 +409,12 @@ export declare interface NiceCollageItem {
|
|
|
409
409
|
durationMs?: number;
|
|
410
410
|
}
|
|
411
411
|
|
|
412
|
-
/**
|
|
413
|
-
* {@link NiceEventMedia} — responsive media gallery (photos / videos) built from
|
|
414
|
-
* Nice* controls: NiceUpload for adding media and NiceCardGroup for the layout.
|
|
415
|
-
* Each card keeps its thumbnail, caption and actions together on one line and
|
|
416
|
-
* wraps responsively; broken images fall back to a themed placeholder.
|
|
417
|
-
*/
|
|
418
412
|
export declare const NiceEventMedia: default_2.ForwardRefExoticComponent<NiceEventMediaProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
419
413
|
|
|
420
414
|
/** Props for {@link NiceEventMedia}. */
|
|
421
415
|
export declare interface NiceEventMediaProps {
|
|
422
|
-
/** Media items. */
|
|
423
|
-
items
|
|
416
|
+
/** Media items. Optional: without them the gallery is empty. */
|
|
417
|
+
items?: EventMediaItem[];
|
|
424
418
|
/** Called when uploading new media. */
|
|
425
419
|
onUpload?: (file: File, caption?: string) => void;
|
|
426
420
|
/** Called when deleting media. */
|
|
@@ -545,32 +539,14 @@ export declare interface NiceExpenseIssue {
|
|
|
545
539
|
reason: 'no-payer' | 'unknown-payer' | 'no-participants';
|
|
546
540
|
}
|
|
547
541
|
|
|
548
|
-
/**
|
|
549
|
-
* {@link NiceExpenseSplit} — who paid, who owes, and the shortest way to square up.
|
|
550
|
-
*
|
|
551
|
-
* Three views over the same data: the expense list, each person's net balance,
|
|
552
|
-
* and a settlement plan that reduces the debt graph to few transfers (at most
|
|
553
|
-
* one less than the number of people who owe or are owed). The plan is not
|
|
554
|
-
* provably minimal — exact minimisation is NP-hard — but it is what every
|
|
555
|
-
* comparable product ships and it is optimal in ordinary cases.
|
|
556
|
-
*
|
|
557
|
-
* Arithmetic runs on integer minor units, so balances sum to exactly zero and
|
|
558
|
-
* no rounding drifts. Expenses in different currencies are grouped and settled
|
|
559
|
-
* separately rather than converted: applying an exchange rate silently at
|
|
560
|
-
* render time would be a correctness bug, and this package has no business
|
|
561
|
-
* owning FX rates.
|
|
562
|
-
*
|
|
563
|
-
* `BillingItem.isPaid` does not affect balances — it records that the vendor
|
|
564
|
-
* was paid, not that the group settled up.
|
|
565
|
-
*/
|
|
566
542
|
export declare const NiceExpenseSplit: default_2.ForwardRefExoticComponent<NiceExpenseSplitProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
567
543
|
|
|
568
544
|
/** Props for {@link NiceExpenseSplit}. */
|
|
569
545
|
export declare interface NiceExpenseSplitProps {
|
|
570
|
-
/** Expenses, using the existing `BillingItem` shape. */
|
|
571
|
-
items
|
|
572
|
-
/** Everyone who can pay or owe. */
|
|
573
|
-
participants
|
|
546
|
+
/** Expenses, using the existing `BillingItem` shape. Optional: without them nothing is owed. */
|
|
547
|
+
items?: BillingItem[];
|
|
548
|
+
/** Everyone who can pay or owe. Optional: without them the split is empty. */
|
|
549
|
+
participants?: Array<{
|
|
574
550
|
id: string;
|
|
575
551
|
name: string;
|
|
576
552
|
avatarUrl?: string;
|
|
@@ -665,8 +641,8 @@ export declare interface NiceGiftRegistryItem {
|
|
|
665
641
|
|
|
666
642
|
/** Props for {@link NiceGiftRegistry}. */
|
|
667
643
|
export declare interface NiceGiftRegistryProps {
|
|
668
|
-
/** Items on the list. */
|
|
669
|
-
items
|
|
644
|
+
/** Items on the list. Optional: without them the list is empty. */
|
|
645
|
+
items?: NiceGiftRegistryItem[];
|
|
670
646
|
/**
|
|
671
647
|
* `registry` tracks quantities and money towards each gift; `wishlist` is
|
|
672
648
|
* the same list without the money — priority and a bought/not-bought flag.
|
|
@@ -728,8 +704,13 @@ export declare const NiceInvitationDesigner: default_2.ForwardRefExoticComponent
|
|
|
728
704
|
|
|
729
705
|
/** Props for {@link NiceInvitationDesigner}. */
|
|
730
706
|
export declare interface NiceInvitationDesignerProps {
|
|
731
|
-
/**
|
|
732
|
-
|
|
707
|
+
/**
|
|
708
|
+
* The template being edited (controlled). Optional: leave it out and the designer keeps
|
|
709
|
+
* its own template, seeded from `defaultTemplate` or starting blank.
|
|
710
|
+
*/
|
|
711
|
+
template?: NiceInvitationTemplate;
|
|
712
|
+
/** Initial template when uncontrolled. */
|
|
713
|
+
defaultTemplate?: NiceInvitationTemplate;
|
|
733
714
|
onTemplateChange?: (template: NiceInvitationTemplate) => void;
|
|
734
715
|
/** Placeholders offered as insert buttons. */
|
|
735
716
|
tokens?: NiceInvitationToken[];
|
|
@@ -804,19 +785,6 @@ export declare interface NiceKaraokePickerProps {
|
|
|
804
785
|
style?: default_2.CSSProperties;
|
|
805
786
|
}
|
|
806
787
|
|
|
807
|
-
/**
|
|
808
|
-
* {@link NiceMediaCollage} — arrange photos and video into an ordered collage
|
|
809
|
-
* and play it back as a slideshow.
|
|
810
|
-
*
|
|
811
|
-
* The companion to `NiceEventMedia`: that one is for browsing what people
|
|
812
|
-
* uploaded, this one is for deciding what the montage looks like. Tiles are
|
|
813
|
-
* reordered by dragging or from the keyboard (focus a tile, Space to pick it
|
|
814
|
-
* up, arrows to move, Space to drop, Escape to cancel) — pointer events
|
|
815
|
-
* throughout, so it works on a phone.
|
|
816
|
-
*
|
|
817
|
-
* Order is controlled by the caller: the component sorts the `items` it is
|
|
818
|
-
* given and reports moves through `onReorder`.
|
|
819
|
-
*/
|
|
820
788
|
export declare const NiceMediaCollage: default_2.ForwardRefExoticComponent<NiceMediaCollageProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
821
789
|
|
|
822
790
|
/** Arrangement used by `NiceMediaCollage`. */
|
|
@@ -824,8 +792,8 @@ export declare type NiceMediaCollageLayout = 'sequence' | 'grid' | 'mosaic';
|
|
|
824
792
|
|
|
825
793
|
/** Props for {@link NiceMediaCollage}. */
|
|
826
794
|
export declare interface NiceMediaCollageProps {
|
|
827
|
-
/** Tiles, in the order they should appear. */
|
|
828
|
-
items
|
|
795
|
+
/** Tiles, in the order they should appear. Optional: without them the collage is empty. */
|
|
796
|
+
items?: NiceCollageItem[];
|
|
829
797
|
/** Arrangement. `sequence` is a single ordered strip; the others are grids. */
|
|
830
798
|
layout?: NiceMediaCollageLayout;
|
|
831
799
|
/**
|
|
@@ -878,8 +846,8 @@ export declare const NiceParticipantList: default_2.ForwardRefExoticComponent<Ni
|
|
|
878
846
|
|
|
879
847
|
/** Props for {@link NiceParticipantList}. */
|
|
880
848
|
export declare interface NiceParticipantListProps {
|
|
881
|
-
/** The roster. */
|
|
882
|
-
participants
|
|
849
|
+
/** The roster. Optional: without it the list is empty. */
|
|
850
|
+
participants?: EventParticipant[];
|
|
883
851
|
/**
|
|
884
852
|
* `organizer` manages everyone; `guest` shows only the viewer's own entry
|
|
885
853
|
* with RSVP actions.
|
|
@@ -1028,33 +996,12 @@ export declare interface NiceRsvpSelection {
|
|
|
1028
996
|
note?: string;
|
|
1029
997
|
}
|
|
1030
998
|
|
|
1031
|
-
/**
|
|
1032
|
-
* {@link NiceSeatingChart} — pick seats from a venue plan, at any venue size.
|
|
1033
|
-
*
|
|
1034
|
-
* Renders SVG with three levels of detail chosen from how many seats are
|
|
1035
|
-
* actually in view: whole sections when zoomed out, row strips in between,
|
|
1036
|
-
* individual seats up close. Because the tier is decided *after* culling, a
|
|
1037
|
-
* 20 000-seat stadium and a 200-seat theatre both draw a bounded number of
|
|
1038
|
-
* nodes — the cap is `maxRenderedSeats`, not the size of the chart.
|
|
1039
|
-
*
|
|
1040
|
-
* Two ways in, both always present. The map supports pan, pinch-zoom and a
|
|
1041
|
-
* roving keyboard cursor (arrows to move, Home/End for the row ends,
|
|
1042
|
-
* PageUp/PageDown between sections, Enter to toggle). Moving the cursor forces
|
|
1043
|
-
* seat-level detail and pans to follow, because a focused element that gets
|
|
1044
|
-
* culled away takes the focus with it. Alongside it, `showList` opens a plain
|
|
1045
|
-
* section → row → seat picker with a "best available" button — the only
|
|
1046
|
-
* workable path with a screen reader, and the one most sighted buyers want too.
|
|
1047
|
-
*
|
|
1048
|
-
* Accessible seats are distinguished by shape, pattern and text as well as
|
|
1049
|
-
* colour, and survive being sold: use `Seat.accessType`, since `SeatStatus`
|
|
1050
|
-
* alone cannot represent a sold wheelchair space.
|
|
1051
|
-
*/
|
|
1052
999
|
export declare const NiceSeatingChart: default_2.ForwardRefExoticComponent<NiceSeatingChartProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
1053
1000
|
|
|
1054
1001
|
/** Props for {@link NiceSeatingChart}. */
|
|
1055
1002
|
export declare interface NiceSeatingChartProps {
|
|
1056
|
-
/** The venue layout, using the existing `SeatingChart` type. */
|
|
1057
|
-
chart
|
|
1003
|
+
/** The venue layout, using the existing `SeatingChart` type. Optional: without it the chart has no sections. */
|
|
1004
|
+
chart?: SeatingChart;
|
|
1058
1005
|
/** `select` lets a buyer pick seats; `view` is read-only; `design` is reserved. */
|
|
1059
1006
|
mode?: 'design' | 'select' | 'view';
|
|
1060
1007
|
/** Selection rules: how many, which categories, whether gaps are allowed. */
|