venuekit 0.10.3 → 0.11.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/{chunk-TDC5G7L7.js → chunk-IRNVYNYV.js} +79 -14
- package/dist/{chunk-UWCMN6Q7.cjs → chunk-YLV7JK57.cjs} +83 -18
- package/dist/index.cjs +6 -2
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +5 -1
- package/dist/{place-types-Dc0eabAi.d.cts → place-types-DNfiQXGU.d.cts} +23 -2
- package/dist/{place-types-Dc0eabAi.d.ts → place-types-DNfiQXGU.d.ts} +23 -2
- package/dist/react.cjs +493 -238
- package/dist/react.d.cts +59 -5
- package/dist/react.d.ts +59 -5
- package/dist/react.js +298 -43
- package/package.json +1 -1
|
@@ -135,6 +135,7 @@ declare const seatBlockSchema: z.ZodObject<{
|
|
|
135
135
|
curve: z.ZodDefault<z.ZodNumber>;
|
|
136
136
|
scale: z.ZodDefault<z.ZodNumber>;
|
|
137
137
|
removed: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
138
|
+
reserved: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
138
139
|
placeType: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
139
140
|
ref: z.ZodString;
|
|
140
141
|
name: z.ZodString;
|
|
@@ -159,6 +160,8 @@ declare const tableSchema: z.ZodObject<{
|
|
|
159
160
|
perPlace: "perPlace";
|
|
160
161
|
}>;
|
|
161
162
|
scale: z.ZodDefault<z.ZodNumber>;
|
|
163
|
+
reserved: z.ZodOptional<z.ZodBoolean>;
|
|
164
|
+
reservedPlaces: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
162
165
|
placeType: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
163
166
|
ref: z.ZodString;
|
|
164
167
|
name: z.ZodString;
|
|
@@ -255,6 +258,7 @@ declare const elementSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
255
258
|
curve: z.ZodDefault<z.ZodNumber>;
|
|
256
259
|
scale: z.ZodDefault<z.ZodNumber>;
|
|
257
260
|
removed: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
261
|
+
reserved: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
258
262
|
placeType: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
259
263
|
ref: z.ZodString;
|
|
260
264
|
name: z.ZodString;
|
|
@@ -278,6 +282,8 @@ declare const elementSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
278
282
|
perPlace: "perPlace";
|
|
279
283
|
}>;
|
|
280
284
|
scale: z.ZodDefault<z.ZodNumber>;
|
|
285
|
+
reserved: z.ZodOptional<z.ZodBoolean>;
|
|
286
|
+
reservedPlaces: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
281
287
|
placeType: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
282
288
|
ref: z.ZodString;
|
|
283
289
|
name: z.ZodString;
|
|
@@ -413,6 +419,7 @@ declare const layoutSchema: z.ZodObject<{
|
|
|
413
419
|
curve: z.ZodDefault<z.ZodNumber>;
|
|
414
420
|
scale: z.ZodDefault<z.ZodNumber>;
|
|
415
421
|
removed: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
422
|
+
reserved: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
416
423
|
placeType: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
417
424
|
ref: z.ZodString;
|
|
418
425
|
name: z.ZodString;
|
|
@@ -436,6 +443,8 @@ declare const layoutSchema: z.ZodObject<{
|
|
|
436
443
|
perPlace: "perPlace";
|
|
437
444
|
}>;
|
|
438
445
|
scale: z.ZodDefault<z.ZodNumber>;
|
|
446
|
+
reserved: z.ZodOptional<z.ZodBoolean>;
|
|
447
|
+
reservedPlaces: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
439
448
|
placeType: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
440
449
|
ref: z.ZodString;
|
|
441
450
|
name: z.ZodString;
|
|
@@ -518,6 +527,8 @@ type SellableUnit = {
|
|
|
518
527
|
/** Etiqueta de la mesa ("4"), tanto en mesa entera como en sus lugares. */
|
|
519
528
|
table?: string;
|
|
520
529
|
place?: number;
|
|
530
|
+
/** «Sólo con invitación»: se ve en el mapa pero el público no la compra. */
|
|
531
|
+
inviteOnly: boolean;
|
|
521
532
|
};
|
|
522
533
|
declare function expandSeatBlock(block: SeatBlock): SellableUnit[];
|
|
523
534
|
declare const TABLE_RADIUS = 30;
|
|
@@ -544,7 +555,9 @@ type LockViolation = {
|
|
|
544
555
|
/**
|
|
545
556
|
* IDs bloqueados (vendidos) que `after` haría desaparecer, cambiar de etiqueta, pasar
|
|
546
557
|
* a otro tipo de lugar o cambiar de lugar físico adentro de la pieza (renumerar
|
|
547
|
-
* empezando en otra letra o número, saltear, invertir el sentido)
|
|
558
|
+
* empezando en otra letra o número, saltear, invertir el sentido) o pasar a «sólo con
|
|
559
|
+
* invitación» o dejar de serlo (ya se vendió). Una mesa entera vendida tampoco cambia
|
|
560
|
+
* de personas: quien la compró recibió una entrada por persona. Mover, girar,
|
|
548
561
|
* escalar o curvar la pieza entera no cambia nada de eso y no viola nada.
|
|
549
562
|
* Las zonas no cuentan: no tienen unidades vendidas por lugar.
|
|
550
563
|
* Orden estable: el del documento `before`.
|
|
@@ -598,7 +611,15 @@ declare function createPiece(kind: PieceKind, id: string, at: Point, layout: Lay
|
|
|
598
611
|
declare function duplicatePiece(el: Element, id: string, layout: Layout): Element;
|
|
599
612
|
/** Un cuarto de vuelta sobre su centro. El bloque se ancla en su primera butaca: hay que corregirle el ancla. */
|
|
600
613
|
declare function rotatePiece(el: Element): Element;
|
|
614
|
+
/** Una butaca sacada deja de ser «sólo con invitación»: si vuelve, vuelve a la venta. */
|
|
601
615
|
declare function toggleRemovedSeat(block: SeatBlock, unitId: string): SeatBlock;
|
|
616
|
+
/** Marca o desmarca una butaca «sólo con invitación». Una sacada no se marca: no existe. */
|
|
617
|
+
declare function toggleReservedSeat(block: SeatBlock, unitId: string): SeatBlock;
|
|
618
|
+
/**
|
|
619
|
+
* Mesa entera: `place` sin pasar alterna la mesa. Mesa compartida: alterna el lugar `place`
|
|
620
|
+
* (1 en adelante). Lo del otro modo queda guardado para cuando se vuelva a él.
|
|
621
|
+
*/
|
|
622
|
+
declare function toggleReservedTable(table: Table, place?: number): Table;
|
|
602
623
|
/** El tamaño al paso más cercano (0.05 = 5 %), dentro de lo que acepta el esquema. */
|
|
603
624
|
declare function snapScale(scale: number, step?: number): number;
|
|
604
625
|
/**
|
|
@@ -678,4 +699,4 @@ type PlanSummary = {
|
|
|
678
699
|
};
|
|
679
700
|
declare function summarize(layout: Layout): PlanSummary;
|
|
680
701
|
|
|
681
|
-
export { duplicatePiece as $, type PlaceTypeOption as A, type Box as B, type CapacityViolation as C, DEFAULT_BLOCK as D, type Element as E, type PlanSummary as F, type SeatBlock as G, TABLE_RADIUS as H, TABLE_WIDTH as I, type Table as J, type Transform as K, type LabelRule as L, MAX_COLS as M, applyTransform as N, assignPlaceType as O, type Point as P, backgroundSchema as Q, type Rotation as R, type SellableUnit as S, TABLE_HEIGHT as T, bbox as U, blockShape as V, canAssign as W, capacityViolations as X, createPiece as Y, type Zone as Z, distance as _, type Layout as a, elementSchema as a0, expand as a1, expandSeatBlock as a2, expandTable as a3, findLockViolations as a4, idSchema as a5, labelRuleSchema as a6, landmarkSchema as a7, layoutSchema as a8, metaSchema as a9, newElementId as aa, nextBlockUnits as ab, placeTypeCapacity as ac, placeTypeLinkSchema as ad, pointInPolygon as ae, rebindPlaceTypes as af, rotatePiece as ag, rotationSchema as ah, scalePiece as ai, seatBlockSchema as aj, snapScale as ak, spanishParseOptions as al, summarize as am, tableSchema as an, tableSize as ao, toggleRemovedSeat as ap,
|
|
702
|
+
export { duplicatePiece as $, type PlaceTypeOption as A, type Box as B, type CapacityViolation as C, DEFAULT_BLOCK as D, type Element as E, type PlanSummary as F, type SeatBlock as G, TABLE_RADIUS as H, TABLE_WIDTH as I, type Table as J, type Transform as K, type LabelRule as L, MAX_COLS as M, applyTransform as N, assignPlaceType as O, type Point as P, backgroundSchema as Q, type Rotation as R, type SellableUnit as S, TABLE_HEIGHT as T, bbox as U, blockShape as V, canAssign as W, capacityViolations as X, createPiece as Y, type Zone as Z, distance as _, type Layout as a, elementSchema as a0, expand as a1, expandSeatBlock as a2, expandTable as a3, findLockViolations as a4, idSchema as a5, labelRuleSchema as a6, landmarkSchema as a7, layoutSchema as a8, metaSchema as a9, newElementId as aa, nextBlockUnits as ab, placeTypeCapacity as ac, placeTypeLinkSchema as ad, pointInPolygon as ae, rebindPlaceTypes as af, rotatePiece as ag, rotationSchema as ah, scalePiece as ai, seatBlockSchema as aj, snapScale as ak, spanishParseOptions as al, summarize as am, tableSchema as an, tableSize as ao, toggleRemovedSeat as ap, toggleReservedSeat as aq, toggleReservedTable as ar, transformSchema as as, zoneSchema as at, type Background as b, DEFAULT_TABLE_PLACES as c, DEFAULT_ZONE as d, type Landmark as e, type LockViolation as f, MAX_COORD as g, MAX_ELEMENTS as h, MAX_ID_LENGTH as i, MAX_LETTERS_START as j, MAX_NAME_LENGTH as k, MAX_REF_LENGTH as l, MAX_ROWS as m, MAX_SCALE as n, MAX_SIZE as o, MAX_SKIP as p, MAX_SPACING as q, MAX_SRC_LENGTH as r, MAX_TABLE_LABEL_LENGTH as s, MAX_UNITS as t, MIN_SCALE as u, PLACE_OFFSET as v, type PieceKind as w, type PieceOptions as x, type PlaceTypeAccepts as y, type PlaceTypeLink as z };
|