accomadesc 0.1.17 → 0.1.18

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/index.d.ts CHANGED
@@ -23,6 +23,7 @@ import Section from './Section.svelte';
23
23
  import Text from './Text.svelte';
24
24
  import Weather from './Weather.svelte';
25
25
  import PageComponent from './PageComponent.svelte';
26
- export type { GridPhoto, LeafletMap as LeafletMapI, LeafletMapContent, Calendar as CalendarI, CalendarContent, CalendarAvailable as CalendarAvailableI, CalendarAvailableContent, CalendarGrid as CalendarGridI, CalendarGridContent, CalendarRows as CalendarRowsI, CalendarRowsContent, Text as TextI, TextContent, Weather as WeatherI, WeatherContent, Photo as PhotoI, PhotoContent, PhotoGallery as PhotoGalleryI, PhotoGalleryContent, Pricing as PricingI, PricingContent, PricingShort as PricingShortI, PricingShortContent, PricingEntry, PricingRange, PricingColumn, StaticRangeDate, StaticPricingRange, AmenitiesCore as AmenitiesCoreI, AmenitiesCoreContent, AccoCard as AccoCardI, AccoCardContent, ContactForm as ContactFormI, ContactFormContent, BookingRequest as BookingRequestI, BookingRequestContent, CardContent, AccoDescription as AccoDescriptionI, AccoDescriptionContent, Section as SectionI, I18nFacade, OccuplanTranslation, Block, PageProps, Nav as NavI, } from './types.js';
26
+ export type { OccuplanTranslations } from './occuplan/state.svelte.ts';
27
+ export type { GridPhoto, LeafletMap as LeafletMapI, LeafletMapContent, Calendar as CalendarI, CalendarContent, CalendarAvailable as CalendarAvailableI, CalendarAvailableContent, CalendarGrid as CalendarGridI, CalendarGridContent, CalendarRows as CalendarRowsI, CalendarRowsContent, Text as TextI, TextContent, Weather as WeatherI, WeatherContent, Photo as PhotoI, PhotoContent, PhotoGallery as PhotoGalleryI, PhotoGalleryContent, Pricing as PricingI, PricingContent, PricingShort as PricingShortI, PricingShortContent, PricingEntry, PricingRange, PricingColumn, StaticRangeDate, StaticPricingRange, AmenitiesCore as AmenitiesCoreI, AmenitiesCoreContent, AccoCard as AccoCardI, AccoCardContent, ContactForm as ContactFormI, ContactFormContent, BookingRequest as BookingRequestI, BookingRequestContent, CardContent, AccoDescription as AccoDescriptionI, AccoDescriptionContent, Section as SectionI, I18nFacade, Block, PageProps, Nav as NavI, FormatSpec, FormatTemplateName, SiteConfig, SiteTranslation, FontSpec, } from './types.js';
27
28
  export { PRICING_COLUMNS, isAccoCard, isText, isPhoto, isGallery, isLeafletMap, isWeather, isAmenitiesCore, isCalendarAvailable, isCalendar, isCalendarGrid, isCalendarRows, isPricing, isPricingShort, isAccoDescription, isBookingRequest, isContactForm, } from './types.js';
28
29
  export { randomID, randomName, Avatar, Button, Icon, Spinner, TextInput, AccoCard, AccoDescription, AmenitiesCore, Calendar, CalendarAvailable, LeafletMap, Photo, PhotoGallery, Pricing, PricingShort, Section, Text, Weather, BookingRequest, ContactForm, CalendarRows, CalendarGrid, Notes, PageComponent, };
package/dist/types.d.ts CHANGED
@@ -1,22 +1,13 @@
1
1
  import { type Dinero, type DineroSnapshot } from 'dinero.js';
2
- import type { FirstMonth } from './occuplan/state.svelte.js';
2
+ import type { FirstMonth, OccuplanTranslations } from './occuplan/state.svelte.js';
3
3
  import type { DateTime, MonthNumbers, WeekdayNumbers } from 'luxon';
4
+ import type { CookieType, Translation as CookieTranslation } from 'gdpr-cooco-banner';
4
5
  export type WeekdayLabels = {
5
6
  [key in WeekdayNumbers]: string;
6
7
  };
7
8
  export type MonthLabels = {
8
9
  [key in MonthNumbers]: string;
9
10
  };
10
- export interface OccuplanTranslation {
11
- weekendLabel?: string;
12
- weekdayLabels?: WeekdayLabels;
13
- monthLabels?: MonthLabels;
14
- monthHeaderFormat?: string;
15
- typeNames?: {
16
- defaultOccupationTypeName: string;
17
- [key: string]: string;
18
- };
19
- }
20
11
  export interface GridPhoto {
21
12
  photo: Photo;
22
13
  zoomed: boolean;
@@ -288,6 +279,52 @@ export interface BookingRequestContent {
288
279
  explainer?: string;
289
280
  }
290
281
  export type Block = Text | Photo | PhotoGallery | Calendar | CalendarAvailable | CalendarGrid | CalendarRows | Pricing | PricingShort | AmenitiesCore | Weather | LeafletMap | AccoCard | AccoDescription | ContactForm | BookingRequest | undefined;
282
+ export interface FontSpec {
283
+ shortName: string;
284
+ cssName: string;
285
+ variant: string;
286
+ fallback: string;
287
+ fontsource: boolean;
288
+ }
289
+ export interface SiteTranslation {
290
+ calendar: OccuplanTranslations;
291
+ cookies: CookieTranslation;
292
+ site: Record<string, string>;
293
+ }
294
+ export declare const FORMAT_TEMPLATE_NAMES: string[];
295
+ export type FormatTemplateName = (typeof FORMAT_TEMPLATE_NAMES)[number];
296
+ export interface FormatSpec {
297
+ locale: string;
298
+ [tmpl: TemplateName]: string;
299
+ }
300
+ export interface SiteConfig {
301
+ settings: {
302
+ ACCOMADE_USER_ID: string;
303
+ PUBLIC_SUPABASE_URL: string;
304
+ };
305
+ cookies: {
306
+ types: CookieType[];
307
+ showIcon: boolean;
308
+ };
309
+ fonts: {
310
+ main: FontSpec;
311
+ nav: FontSpec;
312
+ pageTitle: FontSpec;
313
+ landingTitle: FontSpec;
314
+ header: FontSpec;
315
+ };
316
+ nav: Nav;
317
+ pages: {
318
+ '/': PageProps;
319
+ [key: string]: PageProps;
320
+ };
321
+ lang: {
322
+ defaultLang: string;
323
+ supportedLangs: string[];
324
+ translations: Record<string, SiteTranslation>;
325
+ formats: Record<string, FormatSpec>;
326
+ };
327
+ }
291
328
  export interface PageProps {
292
329
  id: string;
293
330
  path: string;
@@ -330,7 +367,7 @@ export interface Section {
330
367
  export interface I18nFacade {
331
368
  currentLang?: string;
332
369
  supportedLangs?: string[];
333
- calendarTranslation?: OccuplanTranslation;
370
+ calendarTranslation?: OccuplanTranslations;
334
371
  translateFunc?: (ref: string) => string;
335
372
  formatFunc?: (formatter: string, props: Record<string, any>) => string;
336
373
  formatMoneyFunc?: (d: Dinero<number> | DineroSnapshot<number>) => string;
package/dist/types.js CHANGED
@@ -13,6 +13,20 @@ export const PRICING_COLUMNS = [
13
13
  'extraPerson',
14
14
  'minNumNights',
15
15
  ];
16
+ export const FORMAT_TEMPLATE_NAMES = [
17
+ 'dateFormat',
18
+ 'monthHeader',
19
+ 'nothingAvailable',
20
+ 'availableFromFor',
21
+ 'minimumPrice',
22
+ 'maximumPrice',
23
+ 'additionalPersonPrice',
24
+ 'minNumberOfNights',
25
+ 'seating',
26
+ 'numberOf',
27
+ 'size',
28
+ 'bed',
29
+ ];
16
30
  export const isAccoCard = (b) => {
17
31
  if (!b)
18
32
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "accomadesc",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run package",
@@ -42,6 +42,7 @@
42
42
  "@sveltejs/package": "^2.3.7",
43
43
  "@sveltejs/vite-plugin-svelte": "^5.0.3",
44
44
  "@types/luxon": "^3.4.2",
45
+ "gdpr-cooco-banner": "^0.0.11",
45
46
  "prettier": "^3.4.2",
46
47
  "prettier-plugin-svelte": "^3.3.3",
47
48
  "publint": "^0.3.2",