@scalemule/news-publication 0.0.13 → 0.0.14
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-5MHPE77S.js → chunk-5YQYJ2L2.js} +1 -1
- package/dist/chunk-QWK6G2UF.js +117 -0
- package/dist/{chunk-FUUL2PSF.js → chunk-WZ3NQRQO.js} +1 -1
- package/dist/compliance.cjs +19 -0
- package/dist/compliance.d.cts +2 -0
- package/dist/compliance.d.ts +2 -0
- package/dist/compliance.js +2 -0
- package/dist/cookie-consent-banner.cjs +25 -369
- package/dist/cookie-consent-banner.js +2 -2
- package/dist/cookie-settings-view.cjs +21 -193
- package/dist/cookie-settings-view.js +2 -2
- package/dist/index.cjs +128 -448
- package/dist/index.d.cts +14 -113
- package/dist/index.d.ts +14 -113
- package/dist/index.js +3 -3
- package/dist/{marketplace-CpGWPbFk.d.ts → marketplace-29i5w4LS.d.cts} +1 -1
- package/dist/{marketplace-CpGWPbFk.d.cts → marketplace-29i5w4LS.d.ts} +1 -1
- package/dist/marketplace-view.d.cts +1 -1
- package/dist/marketplace-view.d.ts +1 -1
- package/dist/{meet-5Ym5bxfh.d.cts → meet-RWmfj3I3.d.cts} +1 -1
- package/dist/{meet-5Ym5bxfh.d.ts → meet-RWmfj3I3.d.ts} +1 -1
- package/dist/meet-forms.d.cts +1 -1
- package/dist/meet-forms.d.ts +1 -1
- package/dist/meet-view.d.cts +1 -1
- package/dist/meet-view.d.ts +1 -1
- package/dist/snapshot-file.d.cts +1 -1
- package/dist/snapshot-file.d.ts +1 -1
- package/dist/{snapshot-BS4hn1dk.d.ts → snapshot-sHgQHuAF.d.cts} +1 -1
- package/dist/{snapshot-BS4hn1dk.d.cts → snapshot-sHgQHuAF.d.ts} +1 -1
- package/package.json +12 -2
- package/dist/chunk-L5OE6DND.js +0 -506
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as ArticleCitation,
|
|
3
|
-
export { M as MEET_ACTIVITIES,
|
|
4
|
-
export {
|
|
1
|
+
import { b as PublicationTheme, c as PublicationInput, N as NewsPublication, F as FeatureName, H as HomepageSelection, d as NearbyUpdate, e as NewsItem, E as EditorialSection, f as NewsArticle, C as CouponOffer } from './snapshot-sHgQHuAF.cjs';
|
|
2
|
+
export { A as ArticleCitation, g as CategoryRef, h as CouponSettings, i as CoverImageMetadata, j as FEATURE_NAMES, k as FeatureFlags, l as NewsFeed, m as NewsLayoutId, n as PublicationModules, o as PublicationRecord, P as PublicationSnapshot, R as ReferralSettings, S as SnapshotHooks, p as StoryDisplay, q as SyncSource, a as SyncedPublication, T as TagRef, r as acceptRemoteRecord, s as acceptSnapshot, t as parseSnapshot, u as publicationFromSnapshot, v as publicationRecord, w as snapshotFromRecord, x as syncPublication } from './snapshot-sHgQHuAF.cjs';
|
|
3
|
+
export { M as MEET_ACTIVITIES, b as MeetActivity, c as MeetupInput, a as PreparedMeetup, P as PublicPlace, d as activityLabel, e as canHostMeetup, i as isAdult, p as prepareMeetup, s as screenMessage } from './meet-RWmfj3I3.cjs';
|
|
4
|
+
export { b as CLASSIFIED_CATEGORIES, c as ClassifiedCategory, C as ClassifiedListing, E as EmploymentType, J as JOB_EMPLOYMENT_TYPES, d as PreparedClassified, e as PreparedJob, P as PublicDeal, f as PublicDealOffer, a as PublicJob, g as categoryLabel, h as classifiedPath, i as classifiedSearchPath, j as clipChars, k as dealDollars, l as dealGoPath, m as dealsFeedPath, n as employmentLabel, o as isClassifiedCategory, p as isEmploymentType, q as jobEmployerBody, r as jobOpeningBody, s as jobPostingBody, t as prepareClassified, u as prepareJobPost, v as publicJobPath, w as publicJobsPath } from './marketplace-29i5w4LS.cjs';
|
|
5
|
+
import { CookieCategoryDefinition, CookieConsentRecord } from '@scalemule/compliance';
|
|
6
|
+
export { COOKIE_CONSENT_BACKUP_KEY, COOKIE_CONSENT_EVENT, COOKIE_CONSENT_KEY, COOKIE_CONSENT_MAX_AGE_SECONDS, CookieCategory, CookieCategoryDefinition, CookieConsentRecord, CookieDisclosure, CookiePreferences, DEFAULT_CONSENT_HUB_URL, DEFAULT_PREFERENCES_ACCEPTED, DEFAULT_PREFERENCES_REJECTED, EU_EEA_UK_COUNTRIES, NETWORK_CONSENT_STORAGE_KEY, acceptAllCookies, checkUrlConsentBridge, clearCookieConsent, decorateNetworkUrl, getCookieConsent, hasConsented, isCategoryAllowed, isGeoConsentRequired, queryNetworkConsentHub, rejectOptionalCookies, setCookieConsent, setNetworkConsentHub } from '@scalemule/compliance';
|
|
5
7
|
export { CookieConsentBanner, CookieConsentBannerProps } from './cookie-consent-banner.cjs';
|
|
6
8
|
export { CookieSettingsView, CookieSettingsViewProps } from './cookie-settings-view.cjs';
|
|
7
9
|
export { ThemeToggle, ThemeToggleProps } from './theme-toggle.cjs';
|
|
@@ -235,119 +237,18 @@ declare function attribution(url: string, referrer?: string, publication?: Pick<
|
|
|
235
237
|
declare function resolveCoupon(publication: NewsPublication, code: string | null | undefined): CouponOffer | null;
|
|
236
238
|
declare function referralCode(publication: NewsPublication, url: string): string | null;
|
|
237
239
|
|
|
238
|
-
type CookieCategory = "essential" | "performance" | "functional" | "advertising";
|
|
239
|
-
interface CookiePreferences {
|
|
240
|
-
/** Strictly necessary cookies required for core site operation and security. Always true. */
|
|
241
|
-
essential: true;
|
|
242
|
-
/** Analytics and performance measurement to improve community coverage and site speed. */
|
|
243
|
-
performance: boolean;
|
|
244
|
-
/** Personalization features such as narration audio speed, text sizing, and town filters. */
|
|
245
|
-
functional: boolean;
|
|
246
|
-
/** Local sponsorship delivery and partner campaign frequency capping. */
|
|
247
|
-
advertising: boolean;
|
|
248
|
-
}
|
|
249
|
-
interface CookieConsentRecord {
|
|
250
|
-
version: 1;
|
|
251
|
-
preferences: CookiePreferences;
|
|
252
|
-
timestamp: string;
|
|
253
|
-
anonymous_id?: string;
|
|
254
|
-
source: "banner_accept" | "banner_reject" | "settings_save";
|
|
255
|
-
}
|
|
256
|
-
interface CookieDisclosure {
|
|
257
|
-
name: string;
|
|
258
|
-
provider: string;
|
|
259
|
-
purpose: string;
|
|
260
|
-
duration: string;
|
|
261
|
-
type: "HTTP Cookie" | "Local Storage" | "Session Storage";
|
|
262
|
-
}
|
|
263
|
-
interface CookieCategoryDefinition {
|
|
264
|
-
id: CookieCategory;
|
|
265
|
-
title: string;
|
|
266
|
-
shortDescription: string;
|
|
267
|
-
fullDescription: string;
|
|
268
|
-
required: boolean;
|
|
269
|
-
cookies: CookieDisclosure[];
|
|
270
|
-
}
|
|
271
|
-
declare const COOKIE_CONSENT_KEY = "sm_cookie_consent_v1";
|
|
272
|
-
declare const COOKIE_CONSENT_BACKUP_KEY = "napsite_cookie_consent_v1";
|
|
273
|
-
declare const COOKIE_CONSENT_EVENT = "scalemule-cookie-consent-change";
|
|
274
|
-
declare const COOKIE_CONSENT_MAX_AGE_SECONDS: number;
|
|
275
|
-
declare const DEFAULT_CONSENT_HUB_URL = "https://bayareachronicle.com/consent-bridge.html";
|
|
276
|
-
declare const NETWORK_CONSENT_STORAGE_KEY = "sm_network_consent_status";
|
|
277
|
-
declare const DEFAULT_PREFERENCES_REJECTED: CookiePreferences;
|
|
278
|
-
declare const DEFAULT_PREFERENCES_ACCEPTED: CookiePreferences;
|
|
279
|
-
declare const COOKIE_CATEGORIES: CookieCategoryDefinition[];
|
|
280
|
-
/**
|
|
281
|
-
* Retrieve the current cookie consent record.
|
|
282
|
-
* Checks HTTP cookie first, then localStorage fallback, then in-memory state.
|
|
283
|
-
*/
|
|
284
|
-
declare function getCookieConsent(): CookieConsentRecord | null;
|
|
285
|
-
/**
|
|
286
|
-
* ISO 3166-1 alpha-2 country codes for EU/EEA member states and the UK/Switzerland
|
|
287
|
-
* subject to the GDPR and ePrivacy Directive prior-consent requirement.
|
|
288
|
-
*/
|
|
289
|
-
declare const EU_EEA_UK_COUNTRIES: Set<string>;
|
|
290
|
-
/**
|
|
291
|
-
* Determine if cookie consent prior-opt-in banner is required based on visitor geography.
|
|
292
|
-
* For US readers (including California CCPA/CPRA), opt-in banners are not required.
|
|
293
|
-
* Returns true ONLY if the visitor is identified as being within an EU/EEA/UK jurisdiction.
|
|
294
|
-
*/
|
|
295
|
-
declare function isGeoConsentRequired(countryCode?: string | null): boolean;
|
|
296
|
-
/**
|
|
297
|
-
* Checks for a cross-domain network consent signal in the URL query (?sm_consent=accepted|rejected|1|0).
|
|
298
|
-
* If present, silently records the consent choice locally and removes the param from the address bar.
|
|
299
|
-
* Returns true if a consent signal was processed.
|
|
300
|
-
*/
|
|
301
|
-
declare function checkUrlConsentBridge(): boolean;
|
|
302
|
-
/**
|
|
303
|
-
* Appends the current consent decision to an outgoing URL within the newspaper network
|
|
304
|
-
* so sister publications can adopt the user's choice without requiring a new banner prompt.
|
|
305
|
-
*/
|
|
306
|
-
declare function decorateNetworkUrl(targetUrl: string): string;
|
|
307
|
-
/**
|
|
308
|
-
* Queries the central network iframe hub to retrieve the reader's cross-domain consent choice.
|
|
309
|
-
* If running on the hub origin directly, reads from local storage without an iframe.
|
|
310
|
-
*/
|
|
311
|
-
declare function queryNetworkConsentHub(hubUrl?: string, timeoutMs?: number): Promise<"accepted" | "rejected" | null>;
|
|
312
|
-
/**
|
|
313
|
-
* Propagates a consent decision to the central network iframe hub so all sister publications adopt it.
|
|
314
|
-
*/
|
|
315
|
-
declare function setNetworkConsentHub(status: "accepted" | "rejected" | null, hubUrl?: string): void;
|
|
316
|
-
/**
|
|
317
|
-
* Check if the user has already provided an explicit consent decision.
|
|
318
|
-
*/
|
|
319
|
-
declare function hasConsented(): boolean;
|
|
320
|
-
/**
|
|
321
|
-
* Check if a specific cookie category is currently permitted.
|
|
322
|
-
* Essential is always permitted.
|
|
323
|
-
*/
|
|
324
|
-
declare function isCategoryAllowed(category: CookieCategory): boolean;
|
|
325
|
-
/**
|
|
326
|
-
* Record cookie consent choices.
|
|
327
|
-
* Updates both HTTP cookies, localStorage, and fires a window event.
|
|
328
|
-
*/
|
|
329
|
-
declare function setCookieConsent(preferences: Partial<CookiePreferences>, source?: CookieConsentRecord["source"]): CookieConsentRecord;
|
|
330
|
-
/**
|
|
331
|
-
* Accepts all cookies (essential, performance, functional, advertising).
|
|
332
|
-
*/
|
|
333
|
-
declare function acceptAllCookies(): CookieConsentRecord;
|
|
334
|
-
/**
|
|
335
|
-
* Rejects all optional cookies (preserves essential cookies only).
|
|
336
|
-
*/
|
|
337
|
-
declare function rejectOptionalCookies(): CookieConsentRecord;
|
|
338
|
-
/**
|
|
339
|
-
* Clear consent record (used when resetting choices).
|
|
340
|
-
*/
|
|
341
|
-
declare function clearCookieConsent(): void;
|
|
342
|
-
/**
|
|
343
|
-
* Forward the user consent choice to ScaleMule compliance service.
|
|
344
|
-
* Respects customer security boundary: uses relative /api/compliance/consent proxy or client endpoint.
|
|
345
|
-
*/
|
|
346
240
|
declare function recordConsentToCompliance(record: CookieConsentRecord, options?: {
|
|
347
241
|
endpoint?: string;
|
|
242
|
+
applicationId?: string;
|
|
348
243
|
publicationSlug?: string;
|
|
349
244
|
}): Promise<void>;
|
|
350
245
|
|
|
246
|
+
/**
|
|
247
|
+
* News-publication specific cookie category disclosures.
|
|
248
|
+
* Defaults configured for ScaleMule community newsrooms and broadsheet publications.
|
|
249
|
+
*/
|
|
250
|
+
declare const COOKIE_CATEGORIES: CookieCategoryDefinition[];
|
|
251
|
+
|
|
351
252
|
type ThemeMode = "light" | "dark" | "system";
|
|
352
253
|
type EffectiveTheme = "light" | "dark";
|
|
353
254
|
declare const THEME_COOKIE = "news_publication_theme";
|
|
@@ -389,4 +290,4 @@ declare function subscribeTheme(listener: () => void): () => void;
|
|
|
389
290
|
*/
|
|
390
291
|
declare function themeInitScript(): string;
|
|
391
292
|
|
|
392
|
-
export { ANALYTICS_COOKIE, ANALYTICS_VERSION, type Attribution, BROADSHEET_THEME, COOKIE_CATEGORIES,
|
|
293
|
+
export { ANALYTICS_COOKIE, ANALYTICS_VERSION, type Attribution, BROADSHEET_THEME, COOKIE_CATEGORIES, CouponOffer, EVENTS, EditorialSection, type EffectiveTheme, FeatureName, HomepageSelection, LAYOUT_COOKIE, NEWS_CACHE, NearbyUpdate, NewsArticle, NewsError, NewsItem, NewsPublication, PublicationInput, PublicationTheme, SESSION_IDLE_MS, THEME_COOKIE, THEME_EVENT, THEME_MAX_AGE_SECONDS, THEME_STORAGE_KEY, type ThemeMode, UTM_FIELDS, UUID, activeNearby, applyTheme, articleCacheKey, articleCacheOptions, articleMeta, articleUrl, attribution, briefSummary, clearTheme, composeEdition, defaultRevalidateTargets, definePublication, displayHeadline, edgeCacheControl, editorialSections, featureEnabled, feedCacheKey, feedCacheOptions, filterNews, getStoredTheme, getSystemTheme, inventoryCacheOptions, llmsText, matchesStoryTag, nearbyUpdates, newsArticleJsonLd, normalizedText, publicHttps, publicUrl, publicationJsonLd, publicationMeta, recordConsentToCompliance, referralCode, resolveCoupon, resolveEffectiveTheme, resolveLayout, revalidateDecision, secretsMatch, sectionDefinition, sectionId, sectionPath, setTheme, shortDeck, shortText, shouldServeLastKnown, storyDate, storyTowns, subscribeTheme, themeInitScript, townSlug, validCalendarDate, walnutCreekTimes, withLastKnown };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as ArticleCitation,
|
|
3
|
-
export { M as MEET_ACTIVITIES,
|
|
4
|
-
export {
|
|
1
|
+
import { b as PublicationTheme, c as PublicationInput, N as NewsPublication, F as FeatureName, H as HomepageSelection, d as NearbyUpdate, e as NewsItem, E as EditorialSection, f as NewsArticle, C as CouponOffer } from './snapshot-sHgQHuAF.js';
|
|
2
|
+
export { A as ArticleCitation, g as CategoryRef, h as CouponSettings, i as CoverImageMetadata, j as FEATURE_NAMES, k as FeatureFlags, l as NewsFeed, m as NewsLayoutId, n as PublicationModules, o as PublicationRecord, P as PublicationSnapshot, R as ReferralSettings, S as SnapshotHooks, p as StoryDisplay, q as SyncSource, a as SyncedPublication, T as TagRef, r as acceptRemoteRecord, s as acceptSnapshot, t as parseSnapshot, u as publicationFromSnapshot, v as publicationRecord, w as snapshotFromRecord, x as syncPublication } from './snapshot-sHgQHuAF.js';
|
|
3
|
+
export { M as MEET_ACTIVITIES, b as MeetActivity, c as MeetupInput, a as PreparedMeetup, P as PublicPlace, d as activityLabel, e as canHostMeetup, i as isAdult, p as prepareMeetup, s as screenMessage } from './meet-RWmfj3I3.js';
|
|
4
|
+
export { b as CLASSIFIED_CATEGORIES, c as ClassifiedCategory, C as ClassifiedListing, E as EmploymentType, J as JOB_EMPLOYMENT_TYPES, d as PreparedClassified, e as PreparedJob, P as PublicDeal, f as PublicDealOffer, a as PublicJob, g as categoryLabel, h as classifiedPath, i as classifiedSearchPath, j as clipChars, k as dealDollars, l as dealGoPath, m as dealsFeedPath, n as employmentLabel, o as isClassifiedCategory, p as isEmploymentType, q as jobEmployerBody, r as jobOpeningBody, s as jobPostingBody, t as prepareClassified, u as prepareJobPost, v as publicJobPath, w as publicJobsPath } from './marketplace-29i5w4LS.js';
|
|
5
|
+
import { CookieCategoryDefinition, CookieConsentRecord } from '@scalemule/compliance';
|
|
6
|
+
export { COOKIE_CONSENT_BACKUP_KEY, COOKIE_CONSENT_EVENT, COOKIE_CONSENT_KEY, COOKIE_CONSENT_MAX_AGE_SECONDS, CookieCategory, CookieCategoryDefinition, CookieConsentRecord, CookieDisclosure, CookiePreferences, DEFAULT_CONSENT_HUB_URL, DEFAULT_PREFERENCES_ACCEPTED, DEFAULT_PREFERENCES_REJECTED, EU_EEA_UK_COUNTRIES, NETWORK_CONSENT_STORAGE_KEY, acceptAllCookies, checkUrlConsentBridge, clearCookieConsent, decorateNetworkUrl, getCookieConsent, hasConsented, isCategoryAllowed, isGeoConsentRequired, queryNetworkConsentHub, rejectOptionalCookies, setCookieConsent, setNetworkConsentHub } from '@scalemule/compliance';
|
|
5
7
|
export { CookieConsentBanner, CookieConsentBannerProps } from './cookie-consent-banner.js';
|
|
6
8
|
export { CookieSettingsView, CookieSettingsViewProps } from './cookie-settings-view.js';
|
|
7
9
|
export { ThemeToggle, ThemeToggleProps } from './theme-toggle.js';
|
|
@@ -235,119 +237,18 @@ declare function attribution(url: string, referrer?: string, publication?: Pick<
|
|
|
235
237
|
declare function resolveCoupon(publication: NewsPublication, code: string | null | undefined): CouponOffer | null;
|
|
236
238
|
declare function referralCode(publication: NewsPublication, url: string): string | null;
|
|
237
239
|
|
|
238
|
-
type CookieCategory = "essential" | "performance" | "functional" | "advertising";
|
|
239
|
-
interface CookiePreferences {
|
|
240
|
-
/** Strictly necessary cookies required for core site operation and security. Always true. */
|
|
241
|
-
essential: true;
|
|
242
|
-
/** Analytics and performance measurement to improve community coverage and site speed. */
|
|
243
|
-
performance: boolean;
|
|
244
|
-
/** Personalization features such as narration audio speed, text sizing, and town filters. */
|
|
245
|
-
functional: boolean;
|
|
246
|
-
/** Local sponsorship delivery and partner campaign frequency capping. */
|
|
247
|
-
advertising: boolean;
|
|
248
|
-
}
|
|
249
|
-
interface CookieConsentRecord {
|
|
250
|
-
version: 1;
|
|
251
|
-
preferences: CookiePreferences;
|
|
252
|
-
timestamp: string;
|
|
253
|
-
anonymous_id?: string;
|
|
254
|
-
source: "banner_accept" | "banner_reject" | "settings_save";
|
|
255
|
-
}
|
|
256
|
-
interface CookieDisclosure {
|
|
257
|
-
name: string;
|
|
258
|
-
provider: string;
|
|
259
|
-
purpose: string;
|
|
260
|
-
duration: string;
|
|
261
|
-
type: "HTTP Cookie" | "Local Storage" | "Session Storage";
|
|
262
|
-
}
|
|
263
|
-
interface CookieCategoryDefinition {
|
|
264
|
-
id: CookieCategory;
|
|
265
|
-
title: string;
|
|
266
|
-
shortDescription: string;
|
|
267
|
-
fullDescription: string;
|
|
268
|
-
required: boolean;
|
|
269
|
-
cookies: CookieDisclosure[];
|
|
270
|
-
}
|
|
271
|
-
declare const COOKIE_CONSENT_KEY = "sm_cookie_consent_v1";
|
|
272
|
-
declare const COOKIE_CONSENT_BACKUP_KEY = "napsite_cookie_consent_v1";
|
|
273
|
-
declare const COOKIE_CONSENT_EVENT = "scalemule-cookie-consent-change";
|
|
274
|
-
declare const COOKIE_CONSENT_MAX_AGE_SECONDS: number;
|
|
275
|
-
declare const DEFAULT_CONSENT_HUB_URL = "https://bayareachronicle.com/consent-bridge.html";
|
|
276
|
-
declare const NETWORK_CONSENT_STORAGE_KEY = "sm_network_consent_status";
|
|
277
|
-
declare const DEFAULT_PREFERENCES_REJECTED: CookiePreferences;
|
|
278
|
-
declare const DEFAULT_PREFERENCES_ACCEPTED: CookiePreferences;
|
|
279
|
-
declare const COOKIE_CATEGORIES: CookieCategoryDefinition[];
|
|
280
|
-
/**
|
|
281
|
-
* Retrieve the current cookie consent record.
|
|
282
|
-
* Checks HTTP cookie first, then localStorage fallback, then in-memory state.
|
|
283
|
-
*/
|
|
284
|
-
declare function getCookieConsent(): CookieConsentRecord | null;
|
|
285
|
-
/**
|
|
286
|
-
* ISO 3166-1 alpha-2 country codes for EU/EEA member states and the UK/Switzerland
|
|
287
|
-
* subject to the GDPR and ePrivacy Directive prior-consent requirement.
|
|
288
|
-
*/
|
|
289
|
-
declare const EU_EEA_UK_COUNTRIES: Set<string>;
|
|
290
|
-
/**
|
|
291
|
-
* Determine if cookie consent prior-opt-in banner is required based on visitor geography.
|
|
292
|
-
* For US readers (including California CCPA/CPRA), opt-in banners are not required.
|
|
293
|
-
* Returns true ONLY if the visitor is identified as being within an EU/EEA/UK jurisdiction.
|
|
294
|
-
*/
|
|
295
|
-
declare function isGeoConsentRequired(countryCode?: string | null): boolean;
|
|
296
|
-
/**
|
|
297
|
-
* Checks for a cross-domain network consent signal in the URL query (?sm_consent=accepted|rejected|1|0).
|
|
298
|
-
* If present, silently records the consent choice locally and removes the param from the address bar.
|
|
299
|
-
* Returns true if a consent signal was processed.
|
|
300
|
-
*/
|
|
301
|
-
declare function checkUrlConsentBridge(): boolean;
|
|
302
|
-
/**
|
|
303
|
-
* Appends the current consent decision to an outgoing URL within the newspaper network
|
|
304
|
-
* so sister publications can adopt the user's choice without requiring a new banner prompt.
|
|
305
|
-
*/
|
|
306
|
-
declare function decorateNetworkUrl(targetUrl: string): string;
|
|
307
|
-
/**
|
|
308
|
-
* Queries the central network iframe hub to retrieve the reader's cross-domain consent choice.
|
|
309
|
-
* If running on the hub origin directly, reads from local storage without an iframe.
|
|
310
|
-
*/
|
|
311
|
-
declare function queryNetworkConsentHub(hubUrl?: string, timeoutMs?: number): Promise<"accepted" | "rejected" | null>;
|
|
312
|
-
/**
|
|
313
|
-
* Propagates a consent decision to the central network iframe hub so all sister publications adopt it.
|
|
314
|
-
*/
|
|
315
|
-
declare function setNetworkConsentHub(status: "accepted" | "rejected" | null, hubUrl?: string): void;
|
|
316
|
-
/**
|
|
317
|
-
* Check if the user has already provided an explicit consent decision.
|
|
318
|
-
*/
|
|
319
|
-
declare function hasConsented(): boolean;
|
|
320
|
-
/**
|
|
321
|
-
* Check if a specific cookie category is currently permitted.
|
|
322
|
-
* Essential is always permitted.
|
|
323
|
-
*/
|
|
324
|
-
declare function isCategoryAllowed(category: CookieCategory): boolean;
|
|
325
|
-
/**
|
|
326
|
-
* Record cookie consent choices.
|
|
327
|
-
* Updates both HTTP cookies, localStorage, and fires a window event.
|
|
328
|
-
*/
|
|
329
|
-
declare function setCookieConsent(preferences: Partial<CookiePreferences>, source?: CookieConsentRecord["source"]): CookieConsentRecord;
|
|
330
|
-
/**
|
|
331
|
-
* Accepts all cookies (essential, performance, functional, advertising).
|
|
332
|
-
*/
|
|
333
|
-
declare function acceptAllCookies(): CookieConsentRecord;
|
|
334
|
-
/**
|
|
335
|
-
* Rejects all optional cookies (preserves essential cookies only).
|
|
336
|
-
*/
|
|
337
|
-
declare function rejectOptionalCookies(): CookieConsentRecord;
|
|
338
|
-
/**
|
|
339
|
-
* Clear consent record (used when resetting choices).
|
|
340
|
-
*/
|
|
341
|
-
declare function clearCookieConsent(): void;
|
|
342
|
-
/**
|
|
343
|
-
* Forward the user consent choice to ScaleMule compliance service.
|
|
344
|
-
* Respects customer security boundary: uses relative /api/compliance/consent proxy or client endpoint.
|
|
345
|
-
*/
|
|
346
240
|
declare function recordConsentToCompliance(record: CookieConsentRecord, options?: {
|
|
347
241
|
endpoint?: string;
|
|
242
|
+
applicationId?: string;
|
|
348
243
|
publicationSlug?: string;
|
|
349
244
|
}): Promise<void>;
|
|
350
245
|
|
|
246
|
+
/**
|
|
247
|
+
* News-publication specific cookie category disclosures.
|
|
248
|
+
* Defaults configured for ScaleMule community newsrooms and broadsheet publications.
|
|
249
|
+
*/
|
|
250
|
+
declare const COOKIE_CATEGORIES: CookieCategoryDefinition[];
|
|
251
|
+
|
|
351
252
|
type ThemeMode = "light" | "dark" | "system";
|
|
352
253
|
type EffectiveTheme = "light" | "dark";
|
|
353
254
|
declare const THEME_COOKIE = "news_publication_theme";
|
|
@@ -389,4 +290,4 @@ declare function subscribeTheme(listener: () => void): () => void;
|
|
|
389
290
|
*/
|
|
390
291
|
declare function themeInitScript(): string;
|
|
391
292
|
|
|
392
|
-
export { ANALYTICS_COOKIE, ANALYTICS_VERSION, type Attribution, BROADSHEET_THEME, COOKIE_CATEGORIES,
|
|
293
|
+
export { ANALYTICS_COOKIE, ANALYTICS_VERSION, type Attribution, BROADSHEET_THEME, COOKIE_CATEGORIES, CouponOffer, EVENTS, EditorialSection, type EffectiveTheme, FeatureName, HomepageSelection, LAYOUT_COOKIE, NEWS_CACHE, NearbyUpdate, NewsArticle, NewsError, NewsItem, NewsPublication, PublicationInput, PublicationTheme, SESSION_IDLE_MS, THEME_COOKIE, THEME_EVENT, THEME_MAX_AGE_SECONDS, THEME_STORAGE_KEY, type ThemeMode, UTM_FIELDS, UUID, activeNearby, applyTheme, articleCacheKey, articleCacheOptions, articleMeta, articleUrl, attribution, briefSummary, clearTheme, composeEdition, defaultRevalidateTargets, definePublication, displayHeadline, edgeCacheControl, editorialSections, featureEnabled, feedCacheKey, feedCacheOptions, filterNews, getStoredTheme, getSystemTheme, inventoryCacheOptions, llmsText, matchesStoryTag, nearbyUpdates, newsArticleJsonLd, normalizedText, publicHttps, publicUrl, publicationJsonLd, publicationMeta, recordConsentToCompliance, referralCode, resolveCoupon, resolveEffectiveTheme, resolveLayout, revalidateDecision, secretsMatch, sectionDefinition, sectionId, sectionPath, setTheme, shortDeck, shortText, shouldServeLastKnown, storyDate, storyTowns, subscribeTheme, themeInitScript, townSlug, validCalendarDate, walnutCreekTimes, withLastKnown };
|
package/dist/index.js
CHANGED
|
@@ -3,9 +3,9 @@ import { definePublication } from './chunk-C7JTEHTH.js';
|
|
|
3
3
|
export { BROADSHEET_THEME, FEATURE_NAMES, LAYOUT_COOKIE, acceptRemoteRecord, acceptSnapshot, definePublication, featureEnabled, parseSnapshot, publicationFromSnapshot, publicationRecord, resolveLayout, snapshotFromRecord, syncPublication } from './chunk-C7JTEHTH.js';
|
|
4
4
|
export { CLASSIFIED_CATEGORIES, JOB_EMPLOYMENT_TYPES, categoryLabel, classifiedPath, classifiedSearchPath, clipChars, dealDollars, dealGoPath, dealsFeedPath, employmentLabel, isClassifiedCategory, isEmploymentType, jobEmployerBody, jobOpeningBody, jobPostingBody, prepareClassified, prepareJobPost, publicJobPath, publicJobsPath } from './chunk-C7ZPLH2K.js';
|
|
5
5
|
export { MEET_ACTIVITIES, activityLabel, canHostMeetup, isAdult, prepareMeetup, screenMessage } from './chunk-GB36YM56.js';
|
|
6
|
-
export { CookieConsentBanner } from './chunk-
|
|
7
|
-
export { CookieSettingsView } from './chunk-
|
|
8
|
-
export { COOKIE_CATEGORIES, COOKIE_CONSENT_BACKUP_KEY, COOKIE_CONSENT_EVENT, COOKIE_CONSENT_KEY, COOKIE_CONSENT_MAX_AGE_SECONDS, DEFAULT_CONSENT_HUB_URL, DEFAULT_PREFERENCES_ACCEPTED, DEFAULT_PREFERENCES_REJECTED, EU_EEA_UK_COUNTRIES, NETWORK_CONSENT_STORAGE_KEY, acceptAllCookies, checkUrlConsentBridge, clearCookieConsent, decorateNetworkUrl, getCookieConsent, hasConsented, isCategoryAllowed, isGeoConsentRequired, queryNetworkConsentHub, recordConsentToCompliance, rejectOptionalCookies, setCookieConsent, setNetworkConsentHub } from './chunk-
|
|
6
|
+
export { CookieConsentBanner } from './chunk-5YQYJ2L2.js';
|
|
7
|
+
export { CookieSettingsView } from './chunk-WZ3NQRQO.js';
|
|
8
|
+
export { COOKIE_CATEGORIES, COOKIE_CONSENT_BACKUP_KEY, COOKIE_CONSENT_EVENT, COOKIE_CONSENT_KEY, COOKIE_CONSENT_MAX_AGE_SECONDS, DEFAULT_CONSENT_HUB_URL, DEFAULT_PREFERENCES_ACCEPTED, DEFAULT_PREFERENCES_REJECTED, EU_EEA_UK_COUNTRIES, NETWORK_CONSENT_STORAGE_KEY, acceptAllCookies, checkUrlConsentBridge, clearCookieConsent, decorateNetworkUrl, getCookieConsent, hasConsented, isCategoryAllowed, isGeoConsentRequired, queryNetworkConsentHub, recordConsentToCompliance, rejectOptionalCookies, setCookieConsent, setNetworkConsentHub } from './chunk-QWK6G2UF.js';
|
|
9
9
|
|
|
10
10
|
// src/preset.ts
|
|
11
11
|
var walnutCreekTimes = definePublication({
|
|
@@ -139,4 +139,4 @@ declare function prepareClassified(input: {
|
|
|
139
139
|
price?: unknown;
|
|
140
140
|
}, towns: string[], region: string, now?: Date): PreparedClassified;
|
|
141
141
|
|
|
142
|
-
export {
|
|
142
|
+
export { type ClassifiedListing as C, type EmploymentType as E, JOB_EMPLOYMENT_TYPES as J, type PublicDeal as P, type PublicJob as a, CLASSIFIED_CATEGORIES as b, type ClassifiedCategory as c, type PreparedClassified as d, type PreparedJob as e, type PublicDealOffer as f, categoryLabel as g, classifiedPath as h, classifiedSearchPath as i, clipChars as j, dealDollars as k, dealGoPath as l, dealsFeedPath as m, employmentLabel as n, isClassifiedCategory as o, isEmploymentType as p, jobEmployerBody as q, jobOpeningBody as r, jobPostingBody as s, prepareClassified as t, prepareJobPost as u, publicJobPath as v, publicJobsPath as w };
|
|
@@ -139,4 +139,4 @@ declare function prepareClassified(input: {
|
|
|
139
139
|
price?: unknown;
|
|
140
140
|
}, towns: string[], region: string, now?: Date): PreparedClassified;
|
|
141
141
|
|
|
142
|
-
export {
|
|
142
|
+
export { type ClassifiedListing as C, type EmploymentType as E, JOB_EMPLOYMENT_TYPES as J, type PublicDeal as P, type PublicJob as a, CLASSIFIED_CATEGORIES as b, type ClassifiedCategory as c, type PreparedClassified as d, type PreparedJob as e, type PublicDealOffer as f, categoryLabel as g, classifiedPath as h, classifiedSearchPath as i, clipChars as j, dealDollars as k, dealGoPath as l, dealsFeedPath as m, employmentLabel as n, isClassifiedCategory as o, isEmploymentType as p, jobEmployerBody as q, jobOpeningBody as r, jobPostingBody as s, prepareClassified as t, prepareJobPost as u, publicJobPath as v, publicJobsPath as w };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { C as ClassifiedListing, P as PublicDeal, a as PublicJob } from './marketplace-29i5w4LS.cjs';
|
|
3
3
|
|
|
4
4
|
declare function JobsBoard({ region, jobs, query }: {
|
|
5
5
|
region: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { C as ClassifiedListing, P as PublicDeal, a as PublicJob } from './marketplace-29i5w4LS.js';
|
|
3
3
|
|
|
4
4
|
declare function JobsBoard({ region, jobs, query }: {
|
|
5
5
|
region: string;
|
|
@@ -76,4 +76,4 @@ declare function screenMessage(value: string): {
|
|
|
76
76
|
declare function activityLabel(value: string, otherLabel?: string): string;
|
|
77
77
|
declare function prepareMeetup(input: MeetupInput, places: PublicPlace[], now?: Date): PreparedMeetup;
|
|
78
78
|
|
|
79
|
-
export { MEET_ACTIVITIES as M, type
|
|
79
|
+
export { MEET_ACTIVITIES as M, type PublicPlace as P, type PreparedMeetup as a, type MeetActivity as b, type MeetupInput as c, activityLabel as d, canHostMeetup as e, isAdult as i, prepareMeetup as p, screenMessage as s };
|
|
@@ -76,4 +76,4 @@ declare function screenMessage(value: string): {
|
|
|
76
76
|
declare function activityLabel(value: string, otherLabel?: string): string;
|
|
77
77
|
declare function prepareMeetup(input: MeetupInput, places: PublicPlace[], now?: Date): PreparedMeetup;
|
|
78
78
|
|
|
79
|
-
export { MEET_ACTIVITIES as M, type
|
|
79
|
+
export { MEET_ACTIVITIES as M, type PublicPlace as P, type PreparedMeetup as a, type MeetActivity as b, type MeetupInput as c, activityLabel as d, canHostMeetup as e, isAdult as i, prepareMeetup as p, screenMessage as s };
|
package/dist/meet-forms.d.cts
CHANGED
package/dist/meet-forms.d.ts
CHANGED
package/dist/meet-view.d.cts
CHANGED
package/dist/meet-view.d.ts
CHANGED
package/dist/snapshot-file.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { P as PublicationSnapshot, S as SnapshotHooks, a as SyncedPublication } from './snapshot-sHgQHuAF.cjs';
|
|
2
2
|
|
|
3
3
|
declare function readSnapshotFile(file: string): Promise<PublicationSnapshot | null>;
|
|
4
4
|
/**
|
package/dist/snapshot-file.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { P as PublicationSnapshot, S as SnapshotHooks, a as SyncedPublication } from './snapshot-sHgQHuAF.js';
|
|
2
2
|
|
|
3
3
|
declare function readSnapshotFile(file: string): Promise<PublicationSnapshot | null>;
|
|
4
4
|
/**
|
|
@@ -231,4 +231,4 @@ declare function syncPublication(input: {
|
|
|
231
231
|
hooks?: SnapshotHooks;
|
|
232
232
|
}): Promise<SyncedPublication>;
|
|
233
233
|
|
|
234
|
-
export { type ArticleCitation as A, type CouponOffer as C, type EditorialSection as E, type FeatureName as F, type HomepageSelection as H, type NewsPublication as N, type
|
|
234
|
+
export { type ArticleCitation as A, type CouponOffer as C, type EditorialSection as E, type FeatureName as F, type HomepageSelection as H, type NewsPublication as N, type PublicationSnapshot as P, type ReferralSettings as R, type SnapshotHooks as S, type TagRef as T, type SyncedPublication as a, type PublicationTheme as b, type PublicationInput as c, type NearbyUpdate as d, type NewsItem as e, type NewsArticle as f, type CategoryRef as g, type CouponSettings as h, type CoverImageMetadata as i, FEATURE_NAMES as j, type FeatureFlags as k, type NewsFeed as l, type NewsLayoutId as m, type PublicationModules as n, type PublicationRecord as o, type StoryDisplay as p, type SyncSource as q, acceptRemoteRecord as r, acceptSnapshot as s, parseSnapshot as t, publicationFromSnapshot as u, publicationRecord as v, snapshotFromRecord as w, syncPublication as x };
|
|
@@ -231,4 +231,4 @@ declare function syncPublication(input: {
|
|
|
231
231
|
hooks?: SnapshotHooks;
|
|
232
232
|
}): Promise<SyncedPublication>;
|
|
233
233
|
|
|
234
|
-
export { type ArticleCitation as A, type CouponOffer as C, type EditorialSection as E, type FeatureName as F, type HomepageSelection as H, type NewsPublication as N, type
|
|
234
|
+
export { type ArticleCitation as A, type CouponOffer as C, type EditorialSection as E, type FeatureName as F, type HomepageSelection as H, type NewsPublication as N, type PublicationSnapshot as P, type ReferralSettings as R, type SnapshotHooks as S, type TagRef as T, type SyncedPublication as a, type PublicationTheme as b, type PublicationInput as c, type NearbyUpdate as d, type NewsItem as e, type NewsArticle as f, type CategoryRef as g, type CouponSettings as h, type CoverImageMetadata as i, FEATURE_NAMES as j, type FeatureFlags as k, type NewsFeed as l, type NewsLayoutId as m, type PublicationModules as n, type PublicationRecord as o, type StoryDisplay as p, type SyncSource as q, acceptRemoteRecord as r, acceptSnapshot as s, parseSnapshot as t, publicationFromSnapshot as u, publicationRecord as v, snapshotFromRecord as w, syncPublication as x };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scalemule/news-publication",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"description": "Shared server framework for ScaleMule local news publications. Walnut Creek Times is the broadsheet default; each paper supplies its own identity and feature flags.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -54,6 +54,11 @@
|
|
|
54
54
|
"types": "./dist/theme-toggle.d.ts",
|
|
55
55
|
"import": "./dist/theme-toggle.js",
|
|
56
56
|
"require": "./dist/theme-toggle.cjs"
|
|
57
|
+
},
|
|
58
|
+
"./compliance": {
|
|
59
|
+
"types": "./dist/compliance.d.ts",
|
|
60
|
+
"import": "./dist/compliance.js",
|
|
61
|
+
"require": "./dist/compliance.cjs"
|
|
57
62
|
}
|
|
58
63
|
},
|
|
59
64
|
"files": [
|
|
@@ -68,7 +73,9 @@
|
|
|
68
73
|
"react": ">=18.0.0"
|
|
69
74
|
},
|
|
70
75
|
"peerDependenciesMeta": {
|
|
71
|
-
"react": {
|
|
76
|
+
"react": {
|
|
77
|
+
"optional": true
|
|
78
|
+
}
|
|
72
79
|
},
|
|
73
80
|
"scripts": {
|
|
74
81
|
"prepare": "npm run build",
|
|
@@ -104,5 +111,8 @@
|
|
|
104
111
|
"publishConfig": {
|
|
105
112
|
"access": "public",
|
|
106
113
|
"registry": "https://registry.npmjs.org/"
|
|
114
|
+
},
|
|
115
|
+
"dependencies": {
|
|
116
|
+
"@scalemule/compliance": "^0.0.2"
|
|
107
117
|
}
|
|
108
118
|
}
|