@timardex/cluemart-shared 1.6.130 → 1.7.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/ad-CVkVX_z5.d.ts +296 -0
- package/dist/ad-DA9ECAhK.d.mts +296 -0
- package/dist/affiliate-1RtkLnLP.d.ts +35 -0
- package/dist/affiliate-Cos2Syz5.d.mts +35 -0
- package/dist/chunk-HZMP7GXC.mjs +5330 -0
- package/dist/chunk-HZMP7GXC.mjs.map +1 -0
- package/dist/chunk-KZTOISPA.mjs +272 -0
- package/dist/chunk-KZTOISPA.mjs.map +1 -0
- package/dist/chunk-MVQ3CFQR.mjs +230 -0
- package/dist/chunk-MVQ3CFQR.mjs.map +1 -0
- package/dist/chunk-NPFJ2CN2.mjs +109 -0
- package/dist/chunk-NPFJ2CN2.mjs.map +1 -0
- package/dist/chunk-RKIRWZCH.mjs +368 -0
- package/dist/chunk-RKIRWZCH.mjs.map +1 -0
- package/dist/{chunk-OHHJ3KJJ.mjs → chunk-TAECMXM4.mjs} +267 -304
- package/dist/chunk-TAECMXM4.mjs.map +1 -0
- package/dist/chunk-VA5YN2K3.mjs +48 -0
- package/dist/chunk-VA5YN2K3.mjs.map +1 -0
- package/dist/chunk-ZZJSCYJK.mjs +958 -0
- package/dist/chunk-ZZJSCYJK.mjs.map +1 -0
- package/dist/contactUs-DGrDzJaM.d.mts +11 -0
- package/dist/contactUs-H7799pWe.d.ts +11 -0
- package/dist/enums/index.cjs +223 -2
- package/dist/enums/index.cjs.map +1 -1
- package/dist/enums/index.d.mts +164 -5
- package/dist/enums/index.d.ts +164 -5
- package/dist/enums/index.mjs +41 -1
- package/dist/formFields/index.cjs +168 -403
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.d.mts +3 -6
- package/dist/formFields/index.d.ts +3 -6
- package/dist/formFields/index.mjs +47 -921
- package/dist/formFields/index.mjs.map +1 -1
- package/dist/global-BUUfmCo7.d.mts +698 -0
- package/dist/global-fKbMmluy.d.ts +698 -0
- package/dist/graphql/index.cjs +3329 -3340
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +487 -690
- package/dist/graphql/index.d.ts +487 -690
- package/dist/graphql/index.mjs +153 -2552
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +3478 -773
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +6 -13
- package/dist/hooks/index.d.ts +6 -13
- package/dist/hooks/index.mjs +99 -193
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/images/apple-maps-icon.webp.d.ts +1 -8
- package/dist/images/banner-horizontal.webp.d.ts +1 -8
- package/dist/images/banner-vertical.webp.d.ts +1 -8
- package/dist/images/cluiTui.webp.d.ts +1 -8
- package/dist/images/corporate.webp.d.ts +1 -8
- package/dist/images/facebook.webp.d.ts +1 -8
- package/dist/images/gazebo-top.webp.d.ts +1 -8
- package/dist/images/google-maps-icon.webp.d.ts +1 -8
- package/dist/images/googleMaps-logo-dark.webp.d.ts +1 -8
- package/dist/images/googleMaps-logo-light.webp.d.ts +1 -8
- package/dist/images/index.mjs +21 -86
- package/dist/images/index.mjs.map +1 -1
- package/dist/images/instagram.webp.d.ts +1 -8
- package/dist/images/logo-atr.webp.d.ts +1 -8
- package/dist/images/logo-dark.webp.d.ts +1 -8
- package/dist/images/logo.webp.d.ts +1 -8
- package/dist/images/meet.webp.d.ts +1 -8
- package/dist/images/mini-market1.webp.d.ts +1 -8
- package/dist/images/mini-market2.webp.d.ts +1 -8
- package/dist/images/mini-market3.webp.d.ts +1 -8
- package/dist/images/mini-market4.webp.d.ts +1 -8
- package/dist/images/mini-market5.webp.d.ts +1 -8
- package/dist/images/poll.webp.d.ts +1 -8
- package/dist/images/poster1.webp.d.ts +1 -8
- package/dist/images/poster2.webp.d.ts +1 -8
- package/dist/images/poster3.webp.d.ts +1 -8
- package/dist/images/poster4.webp.d.ts +1 -8
- package/dist/images/private.webp.d.ts +1 -8
- package/dist/images/qr-code.webp.d.ts +1 -8
- package/dist/images/school.webp.d.ts +1 -8
- package/dist/images/sima.webp.d.ts +1 -8
- package/dist/images/store-android.webp.d.ts +1 -8
- package/dist/images/store-ios.webp.d.ts +1 -8
- package/dist/images/tablas.webp.d.ts +1 -8
- package/dist/images/telefonos.webp.d.ts +1 -8
- package/dist/images/tiktok.webp.d.ts +1 -8
- package/dist/images/tip.webp.d.ts +1 -8
- package/dist/images/ugralos.webp.d.ts +1 -8
- package/dist/images/waze-maps-icon.webp.d.ts +1 -8
- package/dist/images/website.webp.d.ts +1 -8
- package/dist/images/youtube.webp.d.ts +1 -8
- package/dist/index.cjs +5883 -7079
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +1692 -2966
- package/dist/index.d.ts +1692 -2966
- package/dist/index.mjs +5020 -6162
- package/dist/index.mjs.map +1 -1
- package/dist/map/index.cjs +9 -14
- package/dist/map/index.cjs.map +1 -1
- package/dist/map/index.d.mts +14 -18
- package/dist/map/index.d.ts +14 -18
- package/dist/map/index.mjs +9 -14
- package/dist/map/index.mjs.map +1 -1
- package/dist/resourceActivities-BL_12IAo.d.ts +125 -0
- package/dist/resourceActivities-zczOntNk.d.mts +125 -0
- package/dist/sharing/index.cjs +1272 -63
- package/dist/sharing/index.cjs.map +1 -1
- package/dist/sharing/index.d.mts +7 -32
- package/dist/sharing/index.d.ts +7 -32
- package/dist/sharing/index.mjs +30 -188
- package/dist/sharing/index.mjs.map +1 -1
- package/dist/theme/index.mjs +5 -41
- package/dist/theme/index.mjs.map +1 -1
- package/dist/types/index.cjs +110 -868
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +24 -230
- package/dist/types/index.d.ts +24 -230
- package/dist/types/index.mjs +27 -61
- package/dist/utils/index.cjs +214 -608
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +53 -107
- package/dist/utils/index.d.ts +53 -107
- package/dist/utils/index.mjs +15 -43
- package/package.json +12 -40
- package/dist/affiliate-Bqqlffw8.d.mts +0 -36
- package/dist/affiliate-Btlp5XUp.d.ts +0 -36
- package/dist/affiliateAdapters-BW3BY7c5.d.mts +0 -118
- package/dist/affiliateAdapters-C51ISmuA.d.ts +0 -118
- package/dist/apollo/index.cjs +0 -1383
- package/dist/apollo/index.cjs.map +0 -1
- package/dist/apollo/index.d.mts +0 -323
- package/dist/apollo/index.d.ts +0 -323
- package/dist/apollo/index.mjs +0 -1295
- package/dist/apollo/index.mjs.map +0 -1
- package/dist/auth/index.cjs +0 -3322
- package/dist/auth/index.cjs.map +0 -1
- package/dist/auth/index.d.mts +0 -164
- package/dist/auth/index.d.ts +0 -164
- package/dist/auth/index.mjs +0 -379
- package/dist/auth/index.mjs.map +0 -1
- package/dist/auth-BOmAO53v.d.ts +0 -169
- package/dist/auth-CsITA95p.d.mts +0 -169
- package/dist/chunk-DATBGC2K.mjs +0 -347
- package/dist/chunk-DATBGC2K.mjs.map +0 -1
- package/dist/chunk-DDHECBJR.mjs +0 -726
- package/dist/chunk-DDHECBJR.mjs.map +0 -1
- package/dist/chunk-INQCDU24.mjs +0 -139
- package/dist/chunk-INQCDU24.mjs.map +0 -1
- package/dist/chunk-NWWKI4PJ.mjs +0 -297
- package/dist/chunk-NWWKI4PJ.mjs.map +0 -1
- package/dist/chunk-OHHJ3KJJ.mjs.map +0 -1
- package/dist/chunk-RAYUJODN.mjs +0 -45
- package/dist/chunk-RAYUJODN.mjs.map +0 -1
- package/dist/chunk-TOEFAEF2.mjs +0 -69
- package/dist/chunk-TOEFAEF2.mjs.map +0 -1
- package/dist/chunk-UKW7NZEQ.mjs +0 -2813
- package/dist/chunk-UKW7NZEQ.mjs.map +0 -1
- package/dist/dailyClue-C6WXY73z.d.mts +0 -105
- package/dist/dailyClue-C6WXY73z.d.ts +0 -105
- package/dist/event-C9K7CSg4.d.ts +0 -53
- package/dist/event-W0NhL5Cd.d.mts +0 -53
- package/dist/global-BbSFfYdd.d.ts +0 -181
- package/dist/global-C6v9tRji.d.mts +0 -181
- package/dist/graphql-CDOfA79A.d.ts +0 -1253
- package/dist/graphql-CcvzTs9k.d.mts +0 -1253
- package/dist/resourceActivities-CS8YRIIL.d.mts +0 -89
- package/dist/resourceActivities-DOdNPkhW.d.ts +0 -89
- package/dist/subscription-Cj_qBA7u.d.mts +0 -20
- package/dist/subscription-OiJ50uJb.d.ts +0 -20
- package/dist/vendor-DmMi2qmx.d.mts +0 -73
- package/dist/vendor-M9hVZlni.d.ts +0 -73
package/dist/sharing/index.d.mts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { E as EventInfoFormData, S as StallType } from '../
|
|
2
|
-
import { H as EventType, d as VendorType } from '../graphql-CcvzTs9k.mjs';
|
|
3
|
-
import { a as VendorInfoFormData } from '../vendor-DmMi2qmx.mjs';
|
|
4
|
-
import '../global-C6v9tRji.mjs';
|
|
1
|
+
import { E as EventType, t as EventInfoFormData, V as VendorType, n as VendorInfoFormData, S as StallType, C as Category } from '../global-BUUfmCo7.mjs';
|
|
5
2
|
import 'react-hook-form';
|
|
6
|
-
import '../
|
|
3
|
+
import '../enums/index.mjs';
|
|
7
4
|
|
|
8
5
|
/** Minimal event fields for public (market) share copy — matches in-app preview. */
|
|
9
6
|
type ShareEventForPublic = {
|
|
@@ -66,13 +63,13 @@ declare const RELATION_SHARE_APPLICATION: "application";
|
|
|
66
63
|
* invalidate after deploy. Facebook caches preview JPEGs by exact URL — changing
|
|
67
64
|
* this value forces crawlers to fetch a fresh image after server deploy.
|
|
68
65
|
*/
|
|
69
|
-
declare const RELATION_OVERLAY_LAYOUT_VERSION =
|
|
66
|
+
declare const RELATION_OVERLAY_LAYOUT_VERSION = 36;
|
|
70
67
|
declare const RELATION_SHARE_RESOURCE_TYPES: readonly ["invitation", "application"];
|
|
71
68
|
type RelationShareResourceType = (typeof RELATION_SHARE_RESOURCE_TYPES)[number];
|
|
72
69
|
declare function isRelationShareResourceType(resourceType: string): resourceType is RelationShareResourceType;
|
|
73
70
|
|
|
74
71
|
/** Path segments for public resource share URLs (markets, posts, etc.). */
|
|
75
|
-
declare const PUBLIC_SHARE_PATH_TYPES: readonly ["market", "stallholder", "partner", "
|
|
72
|
+
declare const PUBLIC_SHARE_PATH_TYPES: readonly ["market", "stallholder", "partner", "market_faces", "clue_bites", "play_and_win"];
|
|
76
73
|
type PublicSharePathType = (typeof PUBLIC_SHARE_PATH_TYPES)[number];
|
|
77
74
|
type RelationSharePathType = typeof RELATION_SHARE_INVITATION | typeof RELATION_SHARE_APPLICATION;
|
|
78
75
|
type ShareType = PublicSharePathType | RelationSharePathType;
|
|
@@ -84,7 +81,6 @@ declare function buildShareUrl(type: ShareType, slug: string, utmMedium?: string
|
|
|
84
81
|
declare const SOCIAL_IMAGE_WIDTH = 1200;
|
|
85
82
|
/** Open Graph recommended preview size (must match admin `SHARE_OG_IMAGE_*`). */
|
|
86
83
|
declare const SOCIAL_IMAGE_HEIGHT = 630;
|
|
87
|
-
/** Keep in sync with `CLUEMART_MAIN_DOMAIN_URL` in utils (avoid utils↔sharing import cycle). */
|
|
88
84
|
declare const SHARE_SITE_URL = "https://cluemart.co.nz";
|
|
89
85
|
/** Calendar marker for invitation market-dates share copy (U+1F4C5 📅). */
|
|
90
86
|
declare const SHARE_CALENDAR_ICON = "\uD83D\uDCC5";
|
|
@@ -119,7 +115,7 @@ declare const SHARE_APPLICATION_DEADLINE_PREFIX = "\u23F0 Application deadline:"
|
|
|
119
115
|
/** First line on share sheet messages, Facebook SDK quote, and `og:description`. */
|
|
120
116
|
declare const SHARE_MORE_INFO_LINE = "Shared from ClueMart";
|
|
121
117
|
declare const DEFAULT_SHARE_OG_IMAGE = "https://cluemart.co.nz/assets/logo.webp";
|
|
122
|
-
declare const RESOURCE_SHARE_TYPES: readonly ["market", "stallholder", "partner"
|
|
118
|
+
declare const RESOURCE_SHARE_TYPES: readonly ["market", "stallholder", "partner"];
|
|
123
119
|
type ResourceShareType = (typeof RESOURCE_SHARE_TYPES)[number];
|
|
124
120
|
declare const POST_SHARE_RESOURCE_TYPES: readonly ["market_faces", "clue_bites", "play_and_win"];
|
|
125
121
|
type PostShareResourceType = (typeof POST_SHARE_RESOURCE_TYPES)[number];
|
|
@@ -127,17 +123,7 @@ type ShareResourceType = ResourceShareType | PostShareResourceType | RelationSha
|
|
|
127
123
|
declare const SHARE_RESOURCE_LABEL: Record<ShareResourceType, string>;
|
|
128
124
|
declare function isPostShareResourceType(resourceType: ShareResourceType): resourceType is PostShareResourceType;
|
|
129
125
|
|
|
130
|
-
|
|
131
|
-
* Formats a category for share / display copy.
|
|
132
|
-
* Accepts both form Category (required subcategories) and GraphQL CategoryType
|
|
133
|
-
* (optional/nullable subcategory trees).
|
|
134
|
-
*/
|
|
135
|
-
declare function formatCategoryLabel(category: {
|
|
136
|
-
name: string;
|
|
137
|
-
subcategories?: ReadonlyArray<{
|
|
138
|
-
name?: string | null;
|
|
139
|
-
} | null> | null;
|
|
140
|
-
}): string;
|
|
126
|
+
declare function formatCategoryLabel(category: Category): string;
|
|
141
127
|
|
|
142
128
|
/** Blank line between share sections — title, address, dates, URL, etc. */
|
|
143
129
|
declare const SHARE_DESCRIPTION_SECTION_BREAK = "\n\n";
|
|
@@ -185,11 +171,6 @@ declare function buildFacebookShareQuote(title: string, description: string, sha
|
|
|
185
171
|
declare function buildShareOgDescriptionFromSections(sections: ReadonlyArray<string | false | null | undefined>): string;
|
|
186
172
|
/** Open Graph / Twitter description — body sections only (`og:title` is separate). */
|
|
187
173
|
declare function buildShareOgDescription(_title: string, description: string): string;
|
|
188
|
-
/**
|
|
189
|
-
* Strips emoji and symbols that do not render reliably in overlay SVG fonts.
|
|
190
|
-
* Keeps letters, numbers, whitespace, and common sentence punctuation.
|
|
191
|
-
*/
|
|
192
|
-
declare function stripOverlaySubtitleSpecialChars(text: string): string;
|
|
193
174
|
|
|
194
175
|
declare function normalizeShareRouteId(id: string): string;
|
|
195
176
|
/** Relative path for a public share landing page (`/market/demo-market`). */
|
|
@@ -200,10 +181,4 @@ type ShareSlugResource = {
|
|
|
200
181
|
};
|
|
201
182
|
declare function shareSlugResourceId(resource: ShareSlugResource | null | undefined): string | null;
|
|
202
183
|
|
|
203
|
-
|
|
204
|
-
* Normalizes resource `updatedAt` to an epoch-ms string for Facebook/CDN cache busting
|
|
205
|
-
* on social-image URLs (`?v=`). The API ignores this query param.
|
|
206
|
-
*/
|
|
207
|
-
declare function toShareSocialImageCacheVersion(updatedAt: Date | string | number | null | undefined): string | null;
|
|
208
|
-
|
|
209
|
-
export { DEFAULT_SHARE_OG_IMAGE, OG_DESCRIPTION_LINE_BREAK, POST_SHARE_RESOURCE_TYPES, PUBLIC_SHARE_PATH_TYPES, type PostShareResourceType, type PublicSharePathType, RELATION_OVERLAY_LAYOUT_VERSION, RELATION_SHARE_APPLICATION, RELATION_SHARE_INVITATION, RELATION_SHARE_RESOURCE_TYPES, RESOURCE_SHARE_TYPES, type RelationSharePathType, type RelationShareResourceType, type ResourceShareType, SHARE_APPLICATION_DEADLINE_PREFIX, SHARE_CALENDAR_ICON, SHARE_CATEGORIES_SECTION_HEADING, SHARE_CATEGORY_ICON, SHARE_CHECKMARK_ICON, SHARE_CLOCK_ICON, SHARE_COMPLIANCE_PREFIX, SHARE_DESCRIPTION_SECTION_BREAK, SHARE_DOLLAR_ICON, SHARE_FOOD_TRUCK_LINE, SHARE_INFO_ICON, SHARE_MARKET_DATES_SECTION_HEADING, SHARE_MORE_INFO_LINE, SHARE_PRICE_RANGE_PREFIX, SHARE_RAIN_OR_SHINE_LINE, SHARE_REQUIREMENTS_SECTION_HEADING, SHARE_RESOURCE_LABEL, SHARE_RULER_ICON, SHARE_SITE_URL, SHARE_STALL_SIZE_PREFIX, SHARE_TAGS_SECTION_HEADING, SHARE_TYPE_PATH_REGEX, SOCIAL_IMAGE_HEIGHT, SOCIAL_IMAGE_WIDTH, type ShareEventForInvitation, type ShareEventForPublic, type ShareEventInfoForInvitation, type ShareMessageFooterPlacement, type ShareResourceType, type ShareSlugResource, type ShareType, type ShareVendorForApplication, type ShareVendorForPublic, type ShareVendorInfoForApplication, appendShareMoreInfoLine, buildApplicationShareDescription, buildFacebookShareQuote, buildInvitationShareDescription, buildPublicEventShareDescription, buildPublicVendorShareDescription, buildShareMessageSections, buildShareOgDescription, buildShareOgDescriptionFromSections, buildSharePagePath, buildShareUrl, formatCategoryLabel, formatShareApplicationCategoriesSection, formatShareApplicationComplianceSection, formatShareApplicationPriceRangeLine, formatShareApplicationStallSizeLine, formatShareInvitationApplicationDeadlineLine, formatShareInvitationMarketDatesSection, formatShareInvitationRequirementsSection, formatShareIsFoodTrueLine, formatShareMarketDate, formatShareRainOrShineLine, formatShareStallLine, formatShareTagsSection, formatStallCapacityLabel, isPostShareResourceType, isRelationShareResourceType, joinShareDescriptionSections, joinShareOgDescriptionSections, normalizeShareOgDescription, normalizeShareRouteId, normalizeShareText, shareMessageFooterPlacementForType, shareSlugResourceId, splitShareDescriptionSections, stripOverlaySubtitleSpecialChars, toShareSocialImageCacheVersion };
|
|
184
|
+
export { DEFAULT_SHARE_OG_IMAGE, OG_DESCRIPTION_LINE_BREAK, POST_SHARE_RESOURCE_TYPES, PUBLIC_SHARE_PATH_TYPES, type PostShareResourceType, type PublicSharePathType, RELATION_OVERLAY_LAYOUT_VERSION, RELATION_SHARE_APPLICATION, RELATION_SHARE_INVITATION, RELATION_SHARE_RESOURCE_TYPES, RESOURCE_SHARE_TYPES, type RelationSharePathType, type RelationShareResourceType, type ResourceShareType, SHARE_APPLICATION_DEADLINE_PREFIX, SHARE_CALENDAR_ICON, SHARE_CATEGORIES_SECTION_HEADING, SHARE_CATEGORY_ICON, SHARE_CHECKMARK_ICON, SHARE_CLOCK_ICON, SHARE_COMPLIANCE_PREFIX, SHARE_DESCRIPTION_SECTION_BREAK, SHARE_DOLLAR_ICON, SHARE_FOOD_TRUCK_LINE, SHARE_INFO_ICON, SHARE_MARKET_DATES_SECTION_HEADING, SHARE_MORE_INFO_LINE, SHARE_PRICE_RANGE_PREFIX, SHARE_RAIN_OR_SHINE_LINE, SHARE_REQUIREMENTS_SECTION_HEADING, SHARE_RESOURCE_LABEL, SHARE_RULER_ICON, SHARE_SITE_URL, SHARE_STALL_SIZE_PREFIX, SHARE_TAGS_SECTION_HEADING, SHARE_TYPE_PATH_REGEX, SOCIAL_IMAGE_HEIGHT, SOCIAL_IMAGE_WIDTH, type ShareEventForInvitation, type ShareEventForPublic, type ShareEventInfoForInvitation, type ShareMessageFooterPlacement, type ShareResourceType, type ShareSlugResource, type ShareType, type ShareVendorForApplication, type ShareVendorForPublic, type ShareVendorInfoForApplication, appendShareMoreInfoLine, buildApplicationShareDescription, buildFacebookShareQuote, buildInvitationShareDescription, buildPublicEventShareDescription, buildPublicVendorShareDescription, buildShareMessageSections, buildShareOgDescription, buildShareOgDescriptionFromSections, buildSharePagePath, buildShareUrl, formatCategoryLabel, formatShareApplicationCategoriesSection, formatShareApplicationComplianceSection, formatShareApplicationPriceRangeLine, formatShareApplicationStallSizeLine, formatShareInvitationApplicationDeadlineLine, formatShareInvitationMarketDatesSection, formatShareInvitationRequirementsSection, formatShareIsFoodTrueLine, formatShareMarketDate, formatShareRainOrShineLine, formatShareStallLine, formatShareTagsSection, formatStallCapacityLabel, isPostShareResourceType, isRelationShareResourceType, joinShareDescriptionSections, joinShareOgDescriptionSections, normalizeShareOgDescription, normalizeShareRouteId, normalizeShareText, shareMessageFooterPlacementForType, shareSlugResourceId, splitShareDescriptionSections };
|
package/dist/sharing/index.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { E as EventInfoFormData, S as StallType } from '../
|
|
2
|
-
import { H as EventType, d as VendorType } from '../graphql-CDOfA79A.js';
|
|
3
|
-
import { a as VendorInfoFormData } from '../vendor-M9hVZlni.js';
|
|
4
|
-
import '../global-BbSFfYdd.js';
|
|
1
|
+
import { E as EventType, t as EventInfoFormData, V as VendorType, n as VendorInfoFormData, S as StallType, C as Category } from '../global-fKbMmluy.js';
|
|
5
2
|
import 'react-hook-form';
|
|
6
|
-
import '../
|
|
3
|
+
import '../enums/index.js';
|
|
7
4
|
|
|
8
5
|
/** Minimal event fields for public (market) share copy — matches in-app preview. */
|
|
9
6
|
type ShareEventForPublic = {
|
|
@@ -66,13 +63,13 @@ declare const RELATION_SHARE_APPLICATION: "application";
|
|
|
66
63
|
* invalidate after deploy. Facebook caches preview JPEGs by exact URL — changing
|
|
67
64
|
* this value forces crawlers to fetch a fresh image after server deploy.
|
|
68
65
|
*/
|
|
69
|
-
declare const RELATION_OVERLAY_LAYOUT_VERSION =
|
|
66
|
+
declare const RELATION_OVERLAY_LAYOUT_VERSION = 36;
|
|
70
67
|
declare const RELATION_SHARE_RESOURCE_TYPES: readonly ["invitation", "application"];
|
|
71
68
|
type RelationShareResourceType = (typeof RELATION_SHARE_RESOURCE_TYPES)[number];
|
|
72
69
|
declare function isRelationShareResourceType(resourceType: string): resourceType is RelationShareResourceType;
|
|
73
70
|
|
|
74
71
|
/** Path segments for public resource share URLs (markets, posts, etc.). */
|
|
75
|
-
declare const PUBLIC_SHARE_PATH_TYPES: readonly ["market", "stallholder", "partner", "
|
|
72
|
+
declare const PUBLIC_SHARE_PATH_TYPES: readonly ["market", "stallholder", "partner", "market_faces", "clue_bites", "play_and_win"];
|
|
76
73
|
type PublicSharePathType = (typeof PUBLIC_SHARE_PATH_TYPES)[number];
|
|
77
74
|
type RelationSharePathType = typeof RELATION_SHARE_INVITATION | typeof RELATION_SHARE_APPLICATION;
|
|
78
75
|
type ShareType = PublicSharePathType | RelationSharePathType;
|
|
@@ -84,7 +81,6 @@ declare function buildShareUrl(type: ShareType, slug: string, utmMedium?: string
|
|
|
84
81
|
declare const SOCIAL_IMAGE_WIDTH = 1200;
|
|
85
82
|
/** Open Graph recommended preview size (must match admin `SHARE_OG_IMAGE_*`). */
|
|
86
83
|
declare const SOCIAL_IMAGE_HEIGHT = 630;
|
|
87
|
-
/** Keep in sync with `CLUEMART_MAIN_DOMAIN_URL` in utils (avoid utils↔sharing import cycle). */
|
|
88
84
|
declare const SHARE_SITE_URL = "https://cluemart.co.nz";
|
|
89
85
|
/** Calendar marker for invitation market-dates share copy (U+1F4C5 📅). */
|
|
90
86
|
declare const SHARE_CALENDAR_ICON = "\uD83D\uDCC5";
|
|
@@ -119,7 +115,7 @@ declare const SHARE_APPLICATION_DEADLINE_PREFIX = "\u23F0 Application deadline:"
|
|
|
119
115
|
/** First line on share sheet messages, Facebook SDK quote, and `og:description`. */
|
|
120
116
|
declare const SHARE_MORE_INFO_LINE = "Shared from ClueMart";
|
|
121
117
|
declare const DEFAULT_SHARE_OG_IMAGE = "https://cluemart.co.nz/assets/logo.webp";
|
|
122
|
-
declare const RESOURCE_SHARE_TYPES: readonly ["market", "stallholder", "partner"
|
|
118
|
+
declare const RESOURCE_SHARE_TYPES: readonly ["market", "stallholder", "partner"];
|
|
123
119
|
type ResourceShareType = (typeof RESOURCE_SHARE_TYPES)[number];
|
|
124
120
|
declare const POST_SHARE_RESOURCE_TYPES: readonly ["market_faces", "clue_bites", "play_and_win"];
|
|
125
121
|
type PostShareResourceType = (typeof POST_SHARE_RESOURCE_TYPES)[number];
|
|
@@ -127,17 +123,7 @@ type ShareResourceType = ResourceShareType | PostShareResourceType | RelationSha
|
|
|
127
123
|
declare const SHARE_RESOURCE_LABEL: Record<ShareResourceType, string>;
|
|
128
124
|
declare function isPostShareResourceType(resourceType: ShareResourceType): resourceType is PostShareResourceType;
|
|
129
125
|
|
|
130
|
-
|
|
131
|
-
* Formats a category for share / display copy.
|
|
132
|
-
* Accepts both form Category (required subcategories) and GraphQL CategoryType
|
|
133
|
-
* (optional/nullable subcategory trees).
|
|
134
|
-
*/
|
|
135
|
-
declare function formatCategoryLabel(category: {
|
|
136
|
-
name: string;
|
|
137
|
-
subcategories?: ReadonlyArray<{
|
|
138
|
-
name?: string | null;
|
|
139
|
-
} | null> | null;
|
|
140
|
-
}): string;
|
|
126
|
+
declare function formatCategoryLabel(category: Category): string;
|
|
141
127
|
|
|
142
128
|
/** Blank line between share sections — title, address, dates, URL, etc. */
|
|
143
129
|
declare const SHARE_DESCRIPTION_SECTION_BREAK = "\n\n";
|
|
@@ -185,11 +171,6 @@ declare function buildFacebookShareQuote(title: string, description: string, sha
|
|
|
185
171
|
declare function buildShareOgDescriptionFromSections(sections: ReadonlyArray<string | false | null | undefined>): string;
|
|
186
172
|
/** Open Graph / Twitter description — body sections only (`og:title` is separate). */
|
|
187
173
|
declare function buildShareOgDescription(_title: string, description: string): string;
|
|
188
|
-
/**
|
|
189
|
-
* Strips emoji and symbols that do not render reliably in overlay SVG fonts.
|
|
190
|
-
* Keeps letters, numbers, whitespace, and common sentence punctuation.
|
|
191
|
-
*/
|
|
192
|
-
declare function stripOverlaySubtitleSpecialChars(text: string): string;
|
|
193
174
|
|
|
194
175
|
declare function normalizeShareRouteId(id: string): string;
|
|
195
176
|
/** Relative path for a public share landing page (`/market/demo-market`). */
|
|
@@ -200,10 +181,4 @@ type ShareSlugResource = {
|
|
|
200
181
|
};
|
|
201
182
|
declare function shareSlugResourceId(resource: ShareSlugResource | null | undefined): string | null;
|
|
202
183
|
|
|
203
|
-
|
|
204
|
-
* Normalizes resource `updatedAt` to an epoch-ms string for Facebook/CDN cache busting
|
|
205
|
-
* on social-image URLs (`?v=`). The API ignores this query param.
|
|
206
|
-
*/
|
|
207
|
-
declare function toShareSocialImageCacheVersion(updatedAt: Date | string | number | null | undefined): string | null;
|
|
208
|
-
|
|
209
|
-
export { DEFAULT_SHARE_OG_IMAGE, OG_DESCRIPTION_LINE_BREAK, POST_SHARE_RESOURCE_TYPES, PUBLIC_SHARE_PATH_TYPES, type PostShareResourceType, type PublicSharePathType, RELATION_OVERLAY_LAYOUT_VERSION, RELATION_SHARE_APPLICATION, RELATION_SHARE_INVITATION, RELATION_SHARE_RESOURCE_TYPES, RESOURCE_SHARE_TYPES, type RelationSharePathType, type RelationShareResourceType, type ResourceShareType, SHARE_APPLICATION_DEADLINE_PREFIX, SHARE_CALENDAR_ICON, SHARE_CATEGORIES_SECTION_HEADING, SHARE_CATEGORY_ICON, SHARE_CHECKMARK_ICON, SHARE_CLOCK_ICON, SHARE_COMPLIANCE_PREFIX, SHARE_DESCRIPTION_SECTION_BREAK, SHARE_DOLLAR_ICON, SHARE_FOOD_TRUCK_LINE, SHARE_INFO_ICON, SHARE_MARKET_DATES_SECTION_HEADING, SHARE_MORE_INFO_LINE, SHARE_PRICE_RANGE_PREFIX, SHARE_RAIN_OR_SHINE_LINE, SHARE_REQUIREMENTS_SECTION_HEADING, SHARE_RESOURCE_LABEL, SHARE_RULER_ICON, SHARE_SITE_URL, SHARE_STALL_SIZE_PREFIX, SHARE_TAGS_SECTION_HEADING, SHARE_TYPE_PATH_REGEX, SOCIAL_IMAGE_HEIGHT, SOCIAL_IMAGE_WIDTH, type ShareEventForInvitation, type ShareEventForPublic, type ShareEventInfoForInvitation, type ShareMessageFooterPlacement, type ShareResourceType, type ShareSlugResource, type ShareType, type ShareVendorForApplication, type ShareVendorForPublic, type ShareVendorInfoForApplication, appendShareMoreInfoLine, buildApplicationShareDescription, buildFacebookShareQuote, buildInvitationShareDescription, buildPublicEventShareDescription, buildPublicVendorShareDescription, buildShareMessageSections, buildShareOgDescription, buildShareOgDescriptionFromSections, buildSharePagePath, buildShareUrl, formatCategoryLabel, formatShareApplicationCategoriesSection, formatShareApplicationComplianceSection, formatShareApplicationPriceRangeLine, formatShareApplicationStallSizeLine, formatShareInvitationApplicationDeadlineLine, formatShareInvitationMarketDatesSection, formatShareInvitationRequirementsSection, formatShareIsFoodTrueLine, formatShareMarketDate, formatShareRainOrShineLine, formatShareStallLine, formatShareTagsSection, formatStallCapacityLabel, isPostShareResourceType, isRelationShareResourceType, joinShareDescriptionSections, joinShareOgDescriptionSections, normalizeShareOgDescription, normalizeShareRouteId, normalizeShareText, shareMessageFooterPlacementForType, shareSlugResourceId, splitShareDescriptionSections, stripOverlaySubtitleSpecialChars, toShareSocialImageCacheVersion };
|
|
184
|
+
export { DEFAULT_SHARE_OG_IMAGE, OG_DESCRIPTION_LINE_BREAK, POST_SHARE_RESOURCE_TYPES, PUBLIC_SHARE_PATH_TYPES, type PostShareResourceType, type PublicSharePathType, RELATION_OVERLAY_LAYOUT_VERSION, RELATION_SHARE_APPLICATION, RELATION_SHARE_INVITATION, RELATION_SHARE_RESOURCE_TYPES, RESOURCE_SHARE_TYPES, type RelationSharePathType, type RelationShareResourceType, type ResourceShareType, SHARE_APPLICATION_DEADLINE_PREFIX, SHARE_CALENDAR_ICON, SHARE_CATEGORIES_SECTION_HEADING, SHARE_CATEGORY_ICON, SHARE_CHECKMARK_ICON, SHARE_CLOCK_ICON, SHARE_COMPLIANCE_PREFIX, SHARE_DESCRIPTION_SECTION_BREAK, SHARE_DOLLAR_ICON, SHARE_FOOD_TRUCK_LINE, SHARE_INFO_ICON, SHARE_MARKET_DATES_SECTION_HEADING, SHARE_MORE_INFO_LINE, SHARE_PRICE_RANGE_PREFIX, SHARE_RAIN_OR_SHINE_LINE, SHARE_REQUIREMENTS_SECTION_HEADING, SHARE_RESOURCE_LABEL, SHARE_RULER_ICON, SHARE_SITE_URL, SHARE_STALL_SIZE_PREFIX, SHARE_TAGS_SECTION_HEADING, SHARE_TYPE_PATH_REGEX, SOCIAL_IMAGE_HEIGHT, SOCIAL_IMAGE_WIDTH, type ShareEventForInvitation, type ShareEventForPublic, type ShareEventInfoForInvitation, type ShareMessageFooterPlacement, type ShareResourceType, type ShareSlugResource, type ShareType, type ShareVendorForApplication, type ShareVendorForPublic, type ShareVendorInfoForApplication, appendShareMoreInfoLine, buildApplicationShareDescription, buildFacebookShareQuote, buildInvitationShareDescription, buildPublicEventShareDescription, buildPublicVendorShareDescription, buildShareMessageSections, buildShareOgDescription, buildShareOgDescriptionFromSections, buildSharePagePath, buildShareUrl, formatCategoryLabel, formatShareApplicationCategoriesSection, formatShareApplicationComplianceSection, formatShareApplicationPriceRangeLine, formatShareApplicationStallSizeLine, formatShareInvitationApplicationDeadlineLine, formatShareInvitationMarketDatesSection, formatShareInvitationRequirementsSection, formatShareIsFoodTrueLine, formatShareMarketDate, formatShareRainOrShineLine, formatShareStallLine, formatShareTagsSection, formatStallCapacityLabel, isPostShareResourceType, isRelationShareResourceType, joinShareDescriptionSections, joinShareOgDescriptionSections, normalizeShareOgDescription, normalizeShareRouteId, normalizeShareText, shareMessageFooterPlacementForType, shareSlugResourceId, splitShareDescriptionSections };
|
package/dist/sharing/index.mjs
CHANGED
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
DEFAULT_SHARE_OG_IMAGE,
|
|
3
3
|
OG_DESCRIPTION_LINE_BREAK,
|
|
4
4
|
POST_SHARE_RESOURCE_TYPES,
|
|
5
|
+
PUBLIC_SHARE_PATH_TYPES,
|
|
5
6
|
RELATION_OVERLAY_LAYOUT_VERSION,
|
|
6
7
|
RELATION_SHARE_APPLICATION,
|
|
7
8
|
RELATION_SHARE_INVITATION,
|
|
@@ -28,205 +29,48 @@ import {
|
|
|
28
29
|
SHARE_SITE_URL,
|
|
29
30
|
SHARE_STALL_SIZE_PREFIX,
|
|
30
31
|
SHARE_TAGS_SECTION_HEADING,
|
|
32
|
+
SHARE_TYPE_PATH_REGEX,
|
|
31
33
|
SOCIAL_IMAGE_HEIGHT,
|
|
32
34
|
SOCIAL_IMAGE_WIDTH,
|
|
33
35
|
appendShareMoreInfoLine,
|
|
36
|
+
buildApplicationShareDescription,
|
|
34
37
|
buildFacebookShareQuote,
|
|
38
|
+
buildInvitationShareDescription,
|
|
39
|
+
buildPublicEventShareDescription,
|
|
40
|
+
buildPublicVendorShareDescription,
|
|
35
41
|
buildShareMessageSections,
|
|
36
42
|
buildShareOgDescription,
|
|
37
43
|
buildShareOgDescriptionFromSections,
|
|
38
|
-
|
|
44
|
+
buildSharePagePath,
|
|
45
|
+
buildShareUrl,
|
|
46
|
+
formatCategoryLabel,
|
|
47
|
+
formatShareApplicationCategoriesSection,
|
|
48
|
+
formatShareApplicationComplianceSection,
|
|
49
|
+
formatShareApplicationPriceRangeLine,
|
|
50
|
+
formatShareApplicationStallSizeLine,
|
|
51
|
+
formatShareInvitationApplicationDeadlineLine,
|
|
52
|
+
formatShareInvitationMarketDatesSection,
|
|
53
|
+
formatShareInvitationRequirementsSection,
|
|
54
|
+
formatShareIsFoodTrueLine,
|
|
55
|
+
formatShareMarketDate,
|
|
56
|
+
formatShareRainOrShineLine,
|
|
57
|
+
formatShareStallLine,
|
|
58
|
+
formatShareTagsSection,
|
|
59
|
+
formatStallCapacityLabel,
|
|
39
60
|
isPostShareResourceType,
|
|
40
61
|
isRelationShareResourceType,
|
|
41
62
|
joinShareDescriptionSections,
|
|
42
63
|
joinShareOgDescriptionSections,
|
|
43
64
|
normalizeShareOgDescription,
|
|
65
|
+
normalizeShareRouteId,
|
|
44
66
|
normalizeShareText,
|
|
45
67
|
shareMessageFooterPlacementForType,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
} from "../chunk-
|
|
49
|
-
import "../chunk-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
function formatCategoryLabel(category) {
|
|
53
|
-
const subcategoryNames = (category.subcategories ?? []).filter(
|
|
54
|
-
(subcategory) => Boolean(subcategory)
|
|
55
|
-
).map((subcategory) => subcategory.name).filter((name) => Boolean(name));
|
|
56
|
-
if (subcategoryNames.length === 0) {
|
|
57
|
-
return category.name;
|
|
58
|
-
}
|
|
59
|
-
return `${category.name} (${subcategoryNames.join(", ")})`;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// src/sharing/buildRelationShareDescription.ts
|
|
63
|
-
function formatShareMarketDate(dateStr) {
|
|
64
|
-
return formatDate(dateStr, "date");
|
|
65
|
-
}
|
|
66
|
-
function formatStallCapacityLabel(stallCapacity) {
|
|
67
|
-
return stallCapacity > 0 ? ` (${stallCapacity} spaces available)` : " - Full";
|
|
68
|
-
}
|
|
69
|
-
function formatShareStallLine(stall) {
|
|
70
|
-
return ` - ${stall.label} \u2014 $${stall.price}${formatStallCapacityLabel(stall.stallCapacity)}`;
|
|
71
|
-
}
|
|
72
|
-
function formatShareInvitationMarketDatesSection(dateTime) {
|
|
73
|
-
const dateBlocks = dateTime.map((date) => {
|
|
74
|
-
const formattedDate = formatShareMarketDate(date.startDate);
|
|
75
|
-
const stallLines = date.stallTypes.map(formatShareStallLine);
|
|
76
|
-
return [`- ${formattedDate}`, ...stallLines].join("\n");
|
|
77
|
-
});
|
|
78
|
-
return `${SHARE_MARKET_DATES_SECTION_HEADING}
|
|
79
|
-
${dateBlocks.join("\n")}`;
|
|
80
|
-
}
|
|
81
|
-
function formatShareRainOrShineLine(rainOrShine) {
|
|
82
|
-
return rainOrShine ? SHARE_RAIN_OR_SHINE_LINE : null;
|
|
83
|
-
}
|
|
84
|
-
function formatShareIsFoodTrueLine(foodTruck) {
|
|
85
|
-
return foodTruck ? SHARE_FOOD_TRUCK_LINE : null;
|
|
86
|
-
}
|
|
87
|
-
function formatShareInvitationRequirementsSection(requirements) {
|
|
88
|
-
const bullets = (requirements ?? []).filter((item) => item.value).map((item) => item.label.trim()).filter((label) => label.length > 0).map((label) => `- ${label}`);
|
|
89
|
-
if (bullets.length === 0) {
|
|
90
|
-
return null;
|
|
91
|
-
}
|
|
92
|
-
return `${SHARE_REQUIREMENTS_SECTION_HEADING}
|
|
93
|
-
${bullets.join("\n")}`;
|
|
94
|
-
}
|
|
95
|
-
function formatShareTagsSection(tags) {
|
|
96
|
-
const bullets = tags.map((tag) => tag.trim()).filter((tag) => tag.length > 0).map((tag) => `- ${tag}`);
|
|
97
|
-
if (bullets.length === 0) {
|
|
98
|
-
return null;
|
|
99
|
-
}
|
|
100
|
-
return `${SHARE_TAGS_SECTION_HEADING}
|
|
101
|
-
${bullets.join("\n")}`;
|
|
102
|
-
}
|
|
103
|
-
function formatShareApplicationCategoriesSection(categories) {
|
|
104
|
-
const bullets = categories.map((category) => formatCategoryLabel(category).trim()).filter((label) => label.length > 0).map((label) => `- ${label}`);
|
|
105
|
-
if (bullets.length === 0) {
|
|
106
|
-
return null;
|
|
107
|
-
}
|
|
108
|
-
return `${SHARE_CATEGORIES_SECTION_HEADING}
|
|
109
|
-
${bullets.join("\n")}`;
|
|
110
|
-
}
|
|
111
|
-
function formatShareApplicationStallSizeLine(size) {
|
|
112
|
-
return `${SHARE_STALL_SIZE_PREFIX} ${size.width}m \xD7 ${size.depth}m`;
|
|
113
|
-
}
|
|
114
|
-
function formatShareApplicationComplianceSection(compliance) {
|
|
115
|
-
const bullets = [
|
|
116
|
-
compliance?.liabilityInsurance && "Liability insurance",
|
|
117
|
-
compliance?.foodBeverageLicense && "Food & beverage licence"
|
|
118
|
-
].filter((label) => Boolean(label)).map((label) => `- ${label}`);
|
|
119
|
-
if (bullets.length === 0) {
|
|
120
|
-
return null;
|
|
121
|
-
}
|
|
122
|
-
return `${SHARE_COMPLIANCE_PREFIX}
|
|
123
|
-
${bullets.join("\n")}`;
|
|
124
|
-
}
|
|
125
|
-
function formatShareApplicationPriceRangeLine(priceRange) {
|
|
126
|
-
return `${SHARE_PRICE_RANGE_PREFIX} $${priceRange.min} \u2013 $${priceRange.max}`;
|
|
127
|
-
}
|
|
128
|
-
function formatShareInvitationApplicationDeadlineLine(applicationDeadlineHours) {
|
|
129
|
-
return `${SHARE_APPLICATION_DEADLINE_PREFIX} vendors must apply at least ${applicationDeadlineHours} hours before each market date.`;
|
|
130
|
-
}
|
|
131
|
-
function buildInvitationShareDescription(event, eventInfo) {
|
|
132
|
-
const stallTypes = eventInfo?.dateTime?.flatMap((date) => date.stallTypes) ?? [];
|
|
133
|
-
if (!eventInfo || stallTypes.length === 0) {
|
|
134
|
-
return event.description?.trim() || "";
|
|
135
|
-
}
|
|
136
|
-
const sections = [
|
|
137
|
-
event.location.fullAddress,
|
|
138
|
-
formatShareRainOrShineLine(event.rainOrShine),
|
|
139
|
-
formatShareTagsSection(
|
|
140
|
-
(event.tags ?? []).filter((tag) => tag != null && tag !== "")
|
|
141
|
-
),
|
|
142
|
-
formatShareInvitationMarketDatesSection(eventInfo.dateTime),
|
|
143
|
-
formatShareInvitationApplicationDeadlineLine(
|
|
144
|
-
eventInfo.applicationDeadlineHours
|
|
145
|
-
),
|
|
146
|
-
formatShareInvitationRequirementsSection(eventInfo.requirements)
|
|
147
|
-
];
|
|
148
|
-
return joinShareDescriptionSections(sections);
|
|
149
|
-
}
|
|
150
|
-
function buildApplicationShareDescription(vendor, vendorInfo) {
|
|
151
|
-
if (!vendorInfo) {
|
|
152
|
-
return vendor.description?.trim() || "";
|
|
153
|
-
}
|
|
154
|
-
const profileDescription = vendor.description?.trim();
|
|
155
|
-
const sections = [
|
|
156
|
-
formatShareIsFoodTrueLine(vendor.foodTruck),
|
|
157
|
-
formatShareApplicationCategoriesSection(vendor.categories),
|
|
158
|
-
formatShareApplicationStallSizeLine(vendorInfo.stallInfo.size),
|
|
159
|
-
formatShareApplicationComplianceSection(vendorInfo.compliance),
|
|
160
|
-
formatShareApplicationPriceRangeLine(vendorInfo.product.priceRange),
|
|
161
|
-
profileDescription
|
|
162
|
-
];
|
|
163
|
-
return joinShareDescriptionSections(sections);
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
// src/sharing/buildPublicShareDescription.ts
|
|
167
|
-
function buildPublicEventShareDescription(event) {
|
|
168
|
-
return joinShareDescriptionSections([
|
|
169
|
-
formatShareRainOrShineLine(event.rainOrShine),
|
|
170
|
-
formatShareTagsSection(event.tags),
|
|
171
|
-
event.description?.trim()
|
|
172
|
-
]);
|
|
173
|
-
}
|
|
174
|
-
function buildPublicVendorShareDescription(vendor) {
|
|
175
|
-
return joinShareDescriptionSections([
|
|
176
|
-
formatShareIsFoodTrueLine(vendor.foodTruck),
|
|
177
|
-
vendor.description?.trim()
|
|
178
|
-
]);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
// src/sharing/buildShareUrl.ts
|
|
182
|
-
var PUBLIC_SHARE_PATH_TYPES = [
|
|
183
|
-
...RESOURCE_SHARE_TYPES,
|
|
184
|
-
...POST_SHARE_RESOURCE_TYPES
|
|
185
|
-
];
|
|
186
|
-
var SHARE_TYPE_PATH_REGEX = [
|
|
187
|
-
...PUBLIC_SHARE_PATH_TYPES,
|
|
188
|
-
RELATION_SHARE_APPLICATION,
|
|
189
|
-
RELATION_SHARE_INVITATION
|
|
190
|
-
].join("|");
|
|
191
|
-
function buildShareUrl(type, slug, utmMedium = "app") {
|
|
192
|
-
return `${SHARE_SITE_URL}/${type}/${encodeURIComponent(slug)}?utm_source=share&utm_medium=${utmMedium}&utm_campaign=${type}`;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
// src/sharing/normalizeShareRouteId.ts
|
|
196
|
-
function normalizeShareRouteId(id) {
|
|
197
|
-
try {
|
|
198
|
-
return decodeURIComponent(id);
|
|
199
|
-
} catch {
|
|
200
|
-
return id;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
function buildSharePagePath(resourceType, slug) {
|
|
204
|
-
return `/${resourceType}/${encodeURIComponent(normalizeShareRouteId(slug))}`;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
// src/sharing/shareSlugResource.ts
|
|
208
|
-
function shareSlugResourceId(resource) {
|
|
209
|
-
return resource?._id ?? null;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
// src/sharing/toShareSocialImageCacheVersion.ts
|
|
213
|
-
function toShareSocialImageCacheVersion(updatedAt) {
|
|
214
|
-
if (updatedAt == null || updatedAt === "") {
|
|
215
|
-
return null;
|
|
216
|
-
}
|
|
217
|
-
let ms;
|
|
218
|
-
if (typeof updatedAt === "number") {
|
|
219
|
-
ms = updatedAt;
|
|
220
|
-
} else if (updatedAt instanceof Date) {
|
|
221
|
-
ms = updatedAt.getTime();
|
|
222
|
-
} else {
|
|
223
|
-
ms = Date.parse(String(updatedAt));
|
|
224
|
-
}
|
|
225
|
-
if (!Number.isFinite(ms)) {
|
|
226
|
-
return null;
|
|
227
|
-
}
|
|
228
|
-
return String(Math.trunc(ms));
|
|
229
|
-
}
|
|
68
|
+
shareSlugResourceId,
|
|
69
|
+
splitShareDescriptionSections
|
|
70
|
+
} from "../chunk-RKIRWZCH.mjs";
|
|
71
|
+
import "../chunk-TAECMXM4.mjs";
|
|
72
|
+
import "../chunk-MVQ3CFQR.mjs";
|
|
73
|
+
import "../chunk-KZTOISPA.mjs";
|
|
230
74
|
export {
|
|
231
75
|
DEFAULT_SHARE_OG_IMAGE,
|
|
232
76
|
OG_DESCRIPTION_LINE_BREAK,
|
|
@@ -295,8 +139,6 @@ export {
|
|
|
295
139
|
normalizeShareText,
|
|
296
140
|
shareMessageFooterPlacementForType,
|
|
297
141
|
shareSlugResourceId,
|
|
298
|
-
splitShareDescriptionSections
|
|
299
|
-
stripOverlaySubtitleSpecialChars,
|
|
300
|
-
toShareSocialImageCacheVersion
|
|
142
|
+
splitShareDescriptionSections
|
|
301
143
|
};
|
|
302
144
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/sharing/formatCategoryLabel.ts","../../src/sharing/buildRelationShareDescription.ts","../../src/sharing/buildPublicShareDescription.ts","../../src/sharing/buildShareUrl.ts","../../src/sharing/normalizeShareRouteId.ts","../../src/sharing/shareSlugResource.ts","../../src/sharing/toShareSocialImageCacheVersion.ts"],"sourcesContent":["/**\n * Formats a category for share / display copy.\n * Accepts both form Category (required subcategories) and GraphQL CategoryType\n * (optional/nullable subcategory trees).\n */\nexport function formatCategoryLabel(category: {\n name: string;\n subcategories?: ReadonlyArray<{ name?: string | null } | null> | null;\n}): string {\n const subcategoryNames = (category.subcategories ?? [])\n .filter((subcategory): subcategory is { name?: string | null } =>\n Boolean(subcategory),\n )\n .map((subcategory) => subcategory.name)\n .filter((name): name is string => Boolean(name));\n\n if (subcategoryNames.length === 0) {\n return category.name;\n }\n\n return `${category.name} (${subcategoryNames.join(\", \")})`;\n}\n","import type { StallType } from \"../types/event\";\nimport { formatDate } from \"../utils/date\";\n\nimport {\n SHARE_APPLICATION_DEADLINE_PREFIX,\n SHARE_CATEGORIES_SECTION_HEADING,\n SHARE_FOOD_TRUCK_LINE,\n SHARE_MARKET_DATES_SECTION_HEADING,\n SHARE_RAIN_OR_SHINE_LINE,\n SHARE_REQUIREMENTS_SECTION_HEADING,\n SHARE_COMPLIANCE_PREFIX,\n SHARE_PRICE_RANGE_PREFIX,\n SHARE_STALL_SIZE_PREFIX,\n SHARE_TAGS_SECTION_HEADING,\n} from \"./constants\";\nimport { formatCategoryLabel } from \"./formatCategoryLabel\";\nimport { joinShareDescriptionSections } from \"./joinShareDescriptionSections\";\nimport type {\n ShareEventForInvitation,\n ShareEventInfoForInvitation,\n ShareVendorForApplication,\n ShareVendorInfoForApplication,\n} from \"./shareRelationTypes\";\n\nexport type {\n ShareEventForInvitation,\n ShareEventInfoForInvitation,\n ShareVendorForApplication,\n ShareVendorInfoForApplication,\n} from \"./shareRelationTypes\";\n\n/** Formats event `startDate` (`DD-MM-YYYY`) for share copy — same as share preview UI. */\nexport function formatShareMarketDate(dateStr: string): string {\n return formatDate(dateStr, \"date\");\n}\n\nexport function formatStallCapacityLabel(stallCapacity: number): string {\n return stallCapacity > 0 ? ` (${stallCapacity} spaces available)` : \" - Full\";\n}\n\nexport function formatShareStallLine(stall: StallType): string {\n return ` - ${stall.label} — $${stall.price}${formatStallCapacityLabel(stall.stallCapacity)}`;\n}\n\n/** Nested market dates + per-date stall lines for invitation share copy. */\nexport function formatShareInvitationMarketDatesSection(\n dateTime: ShareEventInfoForInvitation[\"dateTime\"],\n): string {\n const dateBlocks = dateTime.map((date) => {\n const formattedDate = formatShareMarketDate(date.startDate);\n const stallLines = date.stallTypes.map(formatShareStallLine);\n return [`- ${formattedDate}`, ...stallLines].join(\"\\n\");\n });\n\n return `${SHARE_MARKET_DATES_SECTION_HEADING}\\n${dateBlocks.join(\"\\n\")}`;\n}\n\nexport function formatShareRainOrShineLine(\n rainOrShine: boolean,\n): string | null {\n return rainOrShine ? SHARE_RAIN_OR_SHINE_LINE : null;\n}\n\nexport function formatShareIsFoodTrueLine(foodTruck: boolean): string | null {\n return foodTruck ? SHARE_FOOD_TRUCK_LINE : null;\n}\n\n/** Bulleted requirements list for invitation share copy. */\nexport function formatShareInvitationRequirementsSection(\n requirements: ShareEventInfoForInvitation[\"requirements\"] | null,\n): string | null {\n const bullets = (requirements ?? [])\n .filter((item) => item.value)\n .map((item) => item.label.trim())\n .filter((label) => label.length > 0)\n .map((label) => `- ${label}`);\n if (bullets.length === 0) {\n return null;\n }\n return `${SHARE_REQUIREMENTS_SECTION_HEADING}\\n${bullets.join(\"\\n\")}`;\n}\n\nexport function formatShareTagsSection(tags: string[]): string | null {\n const bullets = tags\n .map((tag) => tag.trim())\n .filter((tag) => tag.length > 0)\n .map((tag) => `- ${tag}`);\n if (bullets.length === 0) {\n return null;\n }\n return `${SHARE_TAGS_SECTION_HEADING}\\n${bullets.join(\"\\n\")}`;\n}\n\n/** Bulleted categories list for application share copy. */\nexport function formatShareApplicationCategoriesSection(\n categories: ShareVendorForApplication[\"categories\"],\n): string | null {\n const bullets = categories\n .map((category) => formatCategoryLabel(category).trim())\n .filter((label) => label.length > 0)\n .map((label) => `- ${label}`);\n if (bullets.length === 0) {\n return null;\n }\n return `${SHARE_CATEGORIES_SECTION_HEADING}\\n${bullets.join(\"\\n\")}`;\n}\n\n/** Stall dimensions line for application share copy. */\nexport function formatShareApplicationStallSizeLine(size: {\n width: string;\n depth: string;\n}): string {\n return `${SHARE_STALL_SIZE_PREFIX} ${size.width}m × ${size.depth}m`;\n}\n\n/** Bulleted compliance list for application share copy. */\nexport function formatShareApplicationComplianceSection(\n compliance: ShareVendorInfoForApplication[\"compliance\"],\n): string | null {\n const bullets = [\n compliance?.liabilityInsurance && \"Liability insurance\",\n compliance?.foodBeverageLicense && \"Food & beverage licence\",\n ]\n .filter((label): label is string => Boolean(label))\n .map((label) => `- ${label}`);\n if (bullets.length === 0) {\n return null;\n }\n return `${SHARE_COMPLIANCE_PREFIX}\\n${bullets.join(\"\\n\")}`;\n}\n\n/** Price range line for application share copy. */\nexport function formatShareApplicationPriceRangeLine(priceRange: {\n min: string;\n max: string;\n}): string {\n return `${SHARE_PRICE_RANGE_PREFIX} $${priceRange.min} – $${priceRange.max}`;\n}\n\n/** Application-deadline sentence for invitation share copy. */\nexport function formatShareInvitationApplicationDeadlineLine(\n applicationDeadlineHours: number,\n): string {\n return `${SHARE_APPLICATION_DEADLINE_PREFIX} vendors must apply at least ${applicationDeadlineHours} hours before each market date.`;\n}\n\nexport function buildInvitationShareDescription(\n event: ShareEventForInvitation,\n eventInfo: ShareEventInfoForInvitation | null | undefined,\n): string {\n const stallTypes =\n eventInfo?.dateTime?.flatMap((date) => date.stallTypes) ?? [];\n\n if (!eventInfo || stallTypes.length === 0) {\n return event.description?.trim() || \"\";\n }\n\n const sections = [\n event.location.fullAddress,\n formatShareRainOrShineLine(event.rainOrShine),\n formatShareTagsSection(\n (event.tags ?? []).filter((tag): tag is string => tag != null && tag !== \"\"),\n ),\n formatShareInvitationMarketDatesSection(eventInfo.dateTime),\n formatShareInvitationApplicationDeadlineLine(\n eventInfo.applicationDeadlineHours,\n ),\n formatShareInvitationRequirementsSection(eventInfo.requirements),\n ];\n\n return joinShareDescriptionSections(sections);\n}\n\nexport function buildApplicationShareDescription(\n vendor: ShareVendorForApplication,\n vendorInfo: ShareVendorInfoForApplication | null | undefined,\n): string {\n if (!vendorInfo) {\n return vendor.description?.trim() || \"\";\n }\n\n const profileDescription = vendor.description?.trim();\n\n const sections = [\n formatShareIsFoodTrueLine(vendor.foodTruck),\n formatShareApplicationCategoriesSection(vendor.categories),\n formatShareApplicationStallSizeLine(vendorInfo.stallInfo.size),\n formatShareApplicationComplianceSection(vendorInfo.compliance),\n formatShareApplicationPriceRangeLine(vendorInfo.product.priceRange),\n profileDescription,\n ];\n\n return joinShareDescriptionSections(sections);\n}\n","import {\n formatShareIsFoodTrueLine,\n formatShareRainOrShineLine,\n formatShareTagsSection,\n} from \"./buildRelationShareDescription\";\nimport { joinShareDescriptionSections } from \"./joinShareDescriptionSections\";\n\n/** Minimal event fields for public (market) share copy — matches in-app preview. */\nexport type ShareEventForPublic = {\n description?: string | null;\n rainOrShine: boolean;\n tags: string[];\n};\n\n/** Minimal vendor fields for public (stallholder) share copy — matches in-app preview. */\nexport type ShareVendorForPublic = {\n description?: string | null;\n foodTruck: boolean;\n};\n\nexport function buildPublicEventShareDescription(\n event: ShareEventForPublic,\n): string {\n return joinShareDescriptionSections([\n formatShareRainOrShineLine(event.rainOrShine),\n formatShareTagsSection(event.tags),\n event.description?.trim(),\n ]);\n}\n\nexport function buildPublicVendorShareDescription(\n vendor: ShareVendorForPublic,\n): string {\n return joinShareDescriptionSections([\n formatShareIsFoodTrueLine(vendor.foodTruck),\n vendor.description?.trim(),\n ]);\n}\n","import {\n POST_SHARE_RESOURCE_TYPES,\n RESOURCE_SHARE_TYPES,\n SHARE_SITE_URL,\n} from \"./constants\";\nimport {\n RELATION_SHARE_APPLICATION,\n RELATION_SHARE_INVITATION,\n} from \"./relationShareTypes\";\n\n/** Path segments for public resource share URLs (markets, posts, etc.). */\nexport const PUBLIC_SHARE_PATH_TYPES = [\n ...RESOURCE_SHARE_TYPES,\n ...POST_SHARE_RESOURCE_TYPES,\n] as const;\n\nexport type PublicSharePathType = (typeof PUBLIC_SHARE_PATH_TYPES)[number];\n\nexport type RelationSharePathType =\n | typeof RELATION_SHARE_INVITATION\n | typeof RELATION_SHARE_APPLICATION;\n\nexport type ShareType = PublicSharePathType | RelationSharePathType;\n\n/** Alternation for deep-link regexes — keep in sync with {@link ShareType}. */\nexport const SHARE_TYPE_PATH_REGEX = [\n ...PUBLIC_SHARE_PATH_TYPES,\n RELATION_SHARE_APPLICATION,\n RELATION_SHARE_INVITATION,\n].join(\"|\");\n\nexport function buildShareUrl(\n type: ShareType,\n slug: string,\n utmMedium: string = \"app\",\n): string {\n return `${SHARE_SITE_URL}/${type}/${encodeURIComponent(slug)}?utm_source=share&utm_medium=${utmMedium}&utm_campaign=${type}`;\n}\n","import type { ShareResourceType } from \"./constants\";\n\nexport function normalizeShareRouteId(id: string): string {\n try {\n return decodeURIComponent(id);\n } catch {\n return id;\n }\n}\n\n/** Relative path for a public share landing page (`/market/demo-market`). */\nexport function buildSharePagePath(\n resourceType: ShareResourceType,\n slug: string,\n): string {\n return `/${resourceType}/${encodeURIComponent(normalizeShareRouteId(slug))}`;\n}\n","export type ShareSlugResource = {\n _id: string;\n};\n\nexport function shareSlugResourceId(\n resource: ShareSlugResource | null | undefined,\n): string | null {\n return resource?._id ?? null;\n}\n","/**\n * Normalizes resource `updatedAt` to an epoch-ms string for Facebook/CDN cache busting\n * on social-image URLs (`?v=`). The API ignores this query param.\n */\nexport function toShareSocialImageCacheVersion(\n updatedAt: Date | string | number | null | undefined,\n): string | null {\n if (updatedAt == null || updatedAt === \"\") {\n return null;\n }\n\n let ms: number;\n if (typeof updatedAt === \"number\") {\n ms = updatedAt;\n } else if (updatedAt instanceof Date) {\n ms = updatedAt.getTime();\n } else {\n ms = Date.parse(String(updatedAt));\n }\n\n if (!Number.isFinite(ms)) {\n return null;\n }\n\n return String(Math.trunc(ms));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKO,SAAS,oBAAoB,UAGzB;AACT,QAAM,oBAAoB,SAAS,iBAAiB,CAAC,GAClD;AAAA,IAAO,CAAC,gBACP,QAAQ,WAAW;AAAA,EACrB,EACC,IAAI,CAAC,gBAAgB,YAAY,IAAI,EACrC,OAAO,CAAC,SAAyB,QAAQ,IAAI,CAAC;AAEjD,MAAI,iBAAiB,WAAW,GAAG;AACjC,WAAO,SAAS;AAAA,EAClB;AAEA,SAAO,GAAG,SAAS,IAAI,KAAK,iBAAiB,KAAK,IAAI,CAAC;AACzD;;;ACWO,SAAS,sBAAsB,SAAyB;AAC7D,SAAO,WAAW,SAAS,MAAM;AACnC;AAEO,SAAS,yBAAyB,eAA+B;AACtE,SAAO,gBAAgB,IAAI,KAAK,aAAa,uBAAuB;AACtE;AAEO,SAAS,qBAAqB,OAA0B;AAC7D,SAAO,QAAQ,MAAM,KAAK,YAAO,MAAM,KAAK,GAAG,yBAAyB,MAAM,aAAa,CAAC;AAC9F;AAGO,SAAS,wCACd,UACQ;AACR,QAAM,aAAa,SAAS,IAAI,CAAC,SAAS;AACxC,UAAM,gBAAgB,sBAAsB,KAAK,SAAS;AAC1D,UAAM,aAAa,KAAK,WAAW,IAAI,oBAAoB;AAC3D,WAAO,CAAC,KAAK,aAAa,IAAI,GAAG,UAAU,EAAE,KAAK,IAAI;AAAA,EACxD,CAAC;AAED,SAAO,GAAG,kCAAkC;AAAA,EAAK,WAAW,KAAK,IAAI,CAAC;AACxE;AAEO,SAAS,2BACd,aACe;AACf,SAAO,cAAc,2BAA2B;AAClD;AAEO,SAAS,0BAA0B,WAAmC;AAC3E,SAAO,YAAY,wBAAwB;AAC7C;AAGO,SAAS,yCACd,cACe;AACf,QAAM,WAAW,gBAAgB,CAAC,GAC/B,OAAO,CAAC,SAAS,KAAK,KAAK,EAC3B,IAAI,CAAC,SAAS,KAAK,MAAM,KAAK,CAAC,EAC/B,OAAO,CAAC,UAAU,MAAM,SAAS,CAAC,EAClC,IAAI,CAAC,UAAU,KAAK,KAAK,EAAE;AAC9B,MAAI,QAAQ,WAAW,GAAG;AACxB,WAAO;AAAA,EACT;AACA,SAAO,GAAG,kCAAkC;AAAA,EAAK,QAAQ,KAAK,IAAI,CAAC;AACrE;AAEO,SAAS,uBAAuB,MAA+B;AACpE,QAAM,UAAU,KACb,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAC,EACvB,OAAO,CAAC,QAAQ,IAAI,SAAS,CAAC,EAC9B,IAAI,CAAC,QAAQ,KAAK,GAAG,EAAE;AAC1B,MAAI,QAAQ,WAAW,GAAG;AACxB,WAAO;AAAA,EACT;AACA,SAAO,GAAG,0BAA0B;AAAA,EAAK,QAAQ,KAAK,IAAI,CAAC;AAC7D;AAGO,SAAS,wCACd,YACe;AACf,QAAM,UAAU,WACb,IAAI,CAAC,aAAa,oBAAoB,QAAQ,EAAE,KAAK,CAAC,EACtD,OAAO,CAAC,UAAU,MAAM,SAAS,CAAC,EAClC,IAAI,CAAC,UAAU,KAAK,KAAK,EAAE;AAC9B,MAAI,QAAQ,WAAW,GAAG;AACxB,WAAO;AAAA,EACT;AACA,SAAO,GAAG,gCAAgC;AAAA,EAAK,QAAQ,KAAK,IAAI,CAAC;AACnE;AAGO,SAAS,oCAAoC,MAGzC;AACT,SAAO,GAAG,uBAAuB,IAAI,KAAK,KAAK,UAAO,KAAK,KAAK;AAClE;AAGO,SAAS,wCACd,YACe;AACf,QAAM,UAAU;AAAA,IACd,YAAY,sBAAsB;AAAA,IAClC,YAAY,uBAAuB;AAAA,EACrC,EACG,OAAO,CAAC,UAA2B,QAAQ,KAAK,CAAC,EACjD,IAAI,CAAC,UAAU,KAAK,KAAK,EAAE;AAC9B,MAAI,QAAQ,WAAW,GAAG;AACxB,WAAO;AAAA,EACT;AACA,SAAO,GAAG,uBAAuB;AAAA,EAAK,QAAQ,KAAK,IAAI,CAAC;AAC1D;AAGO,SAAS,qCAAqC,YAG1C;AACT,SAAO,GAAG,wBAAwB,KAAK,WAAW,GAAG,YAAO,WAAW,GAAG;AAC5E;AAGO,SAAS,6CACd,0BACQ;AACR,SAAO,GAAG,iCAAiC,gCAAgC,wBAAwB;AACrG;AAEO,SAAS,gCACd,OACA,WACQ;AACR,QAAM,aACJ,WAAW,UAAU,QAAQ,CAAC,SAAS,KAAK,UAAU,KAAK,CAAC;AAE9D,MAAI,CAAC,aAAa,WAAW,WAAW,GAAG;AACzC,WAAO,MAAM,aAAa,KAAK,KAAK;AAAA,EACtC;AAEA,QAAM,WAAW;AAAA,IACf,MAAM,SAAS;AAAA,IACf,2BAA2B,MAAM,WAAW;AAAA,IAC5C;AAAA,OACG,MAAM,QAAQ,CAAC,GAAG,OAAO,CAAC,QAAuB,OAAO,QAAQ,QAAQ,EAAE;AAAA,IAC7E;AAAA,IACA,wCAAwC,UAAU,QAAQ;AAAA,IAC1D;AAAA,MACE,UAAU;AAAA,IACZ;AAAA,IACA,yCAAyC,UAAU,YAAY;AAAA,EACjE;AAEA,SAAO,6BAA6B,QAAQ;AAC9C;AAEO,SAAS,iCACd,QACA,YACQ;AACR,MAAI,CAAC,YAAY;AACf,WAAO,OAAO,aAAa,KAAK,KAAK;AAAA,EACvC;AAEA,QAAM,qBAAqB,OAAO,aAAa,KAAK;AAEpD,QAAM,WAAW;AAAA,IACf,0BAA0B,OAAO,SAAS;AAAA,IAC1C,wCAAwC,OAAO,UAAU;AAAA,IACzD,oCAAoC,WAAW,UAAU,IAAI;AAAA,IAC7D,wCAAwC,WAAW,UAAU;AAAA,IAC7D,qCAAqC,WAAW,QAAQ,UAAU;AAAA,IAClE;AAAA,EACF;AAEA,SAAO,6BAA6B,QAAQ;AAC9C;;;AC7KO,SAAS,iCACd,OACQ;AACR,SAAO,6BAA6B;AAAA,IAClC,2BAA2B,MAAM,WAAW;AAAA,IAC5C,uBAAuB,MAAM,IAAI;AAAA,IACjC,MAAM,aAAa,KAAK;AAAA,EAC1B,CAAC;AACH;AAEO,SAAS,kCACd,QACQ;AACR,SAAO,6BAA6B;AAAA,IAClC,0BAA0B,OAAO,SAAS;AAAA,IAC1C,OAAO,aAAa,KAAK;AAAA,EAC3B,CAAC;AACH;;;AC1BO,IAAM,0BAA0B;AAAA,EACrC,GAAG;AAAA,EACH,GAAG;AACL;AAWO,IAAM,wBAAwB;AAAA,EACnC,GAAG;AAAA,EACH;AAAA,EACA;AACF,EAAE,KAAK,GAAG;AAEH,SAAS,cACd,MACA,MACA,YAAoB,OACZ;AACR,SAAO,GAAG,cAAc,IAAI,IAAI,IAAI,mBAAmB,IAAI,CAAC,gCAAgC,SAAS,iBAAiB,IAAI;AAC5H;;;ACnCO,SAAS,sBAAsB,IAAoB;AACxD,MAAI;AACF,WAAO,mBAAmB,EAAE;AAAA,EAC9B,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAGO,SAAS,mBACd,cACA,MACQ;AACR,SAAO,IAAI,YAAY,IAAI,mBAAmB,sBAAsB,IAAI,CAAC,CAAC;AAC5E;;;ACZO,SAAS,oBACd,UACe;AACf,SAAO,UAAU,OAAO;AAC1B;;;ACJO,SAAS,+BACd,WACe;AACf,MAAI,aAAa,QAAQ,cAAc,IAAI;AACzC,WAAO;AAAA,EACT;AAEA,MAAI;AACJ,MAAI,OAAO,cAAc,UAAU;AACjC,SAAK;AAAA,EACP,WAAW,qBAAqB,MAAM;AACpC,SAAK,UAAU,QAAQ;AAAA,EACzB,OAAO;AACL,SAAK,KAAK,MAAM,OAAO,SAAS,CAAC;AAAA,EACnC;AAEA,MAAI,CAAC,OAAO,SAAS,EAAE,GAAG;AACxB,WAAO;AAAA,EACT;AAEA,SAAO,OAAO,KAAK,MAAM,EAAE,CAAC;AAC9B;","names":[]}
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/theme/index.mjs
CHANGED
|
@@ -1,44 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
// burnt orange — same hue, lower brightness
|
|
7
|
-
quaternary: "#3d7a68",
|
|
8
|
-
// barely shifted from light — already sits well on dark
|
|
9
|
-
secondary: "#7a4f78",
|
|
10
|
-
// muted plum — visible but not vivid
|
|
11
|
-
tertiary: "#4e5099",
|
|
12
|
-
// dusty indigo
|
|
13
|
-
textMuted: "#8e8e93"
|
|
14
|
-
};
|
|
15
|
-
var lightColors = {
|
|
16
|
-
background: "#ffffff",
|
|
17
|
-
card: "#f1f2f6",
|
|
18
|
-
primary: "#ff7a00",
|
|
19
|
-
quaternary: "#3b7c67",
|
|
20
|
-
secondary: "#371134",
|
|
21
|
-
tertiary: "#191a75",
|
|
22
|
-
textMuted: "#6c757d"
|
|
23
|
-
};
|
|
24
|
-
var fonts = {
|
|
25
|
-
bold: {
|
|
26
|
-
fontFamily: "Roboto-Bold",
|
|
27
|
-
fontWeight: "700"
|
|
28
|
-
},
|
|
29
|
-
heavy: {
|
|
30
|
-
fontFamily: "Roboto-ExtraBold",
|
|
31
|
-
fontWeight: "900"
|
|
32
|
-
},
|
|
33
|
-
medium: {
|
|
34
|
-
fontFamily: "Roboto-Medium",
|
|
35
|
-
fontWeight: "500"
|
|
36
|
-
},
|
|
37
|
-
regular: {
|
|
38
|
-
fontFamily: "Roboto-Regular",
|
|
39
|
-
fontWeight: "400"
|
|
40
|
-
}
|
|
41
|
-
};
|
|
1
|
+
import {
|
|
2
|
+
darkColors,
|
|
3
|
+
fonts,
|
|
4
|
+
lightColors
|
|
5
|
+
} from "../chunk-VA5YN2K3.mjs";
|
|
42
6
|
export {
|
|
43
7
|
darkColors,
|
|
44
8
|
fonts,
|
package/dist/theme/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|