@scalemule/news-publication 0.0.13 → 0.0.15
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-5W4EMBFY.js +106 -0
- package/dist/{chunk-5MHPE77S.js → chunk-5YQYJ2L2.js} +1 -1
- package/dist/chunk-7TBML5Q7.js +57 -0
- 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 +287 -448
- package/dist/index.d.cts +16 -113
- package/dist/index.d.ts +16 -113
- package/dist/index.js +5 -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/network-bar.cjs +145 -0
- package/dist/network-bar.d.cts +15 -0
- package/dist/network-bar.d.ts +15 -0
- package/dist/network-bar.js +3 -0
- package/dist/network.cjs +115 -0
- package/dist/network.d.cts +23 -0
- package/dist/network.d.ts +23 -0
- package/dist/network.js +2 -0
- 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 +22 -2
- package/dist/chunk-L5OE6DND.js +0 -506
package/dist/network.cjs
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var compliance = require('@scalemule/compliance');
|
|
4
|
+
|
|
5
|
+
// src/cookies.ts
|
|
6
|
+
|
|
7
|
+
// src/network.ts
|
|
8
|
+
var localPublications = [
|
|
9
|
+
{
|
|
10
|
+
slug: "bayareachronicle",
|
|
11
|
+
name: "Bay Area Chronicle",
|
|
12
|
+
url: "https://bayareachronicle.com",
|
|
13
|
+
area: "San Francisco Bay Area",
|
|
14
|
+
description: "The parent home for our local community publications."
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
slug: "concordchronicle",
|
|
18
|
+
name: "Concord Chronicle",
|
|
19
|
+
url: "https://concordchronicle.com",
|
|
20
|
+
area: "Concord",
|
|
21
|
+
description: "A new place for Concord\u2019s local stories, independent businesses and community voices."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
slug: "walnutcreektimes",
|
|
25
|
+
name: "Walnut Creek Times",
|
|
26
|
+
url: "https://walnutcreektimes.com",
|
|
27
|
+
area: "Walnut Creek \xB7 Rossmoor \xB7 Saranap \xB7 Pleasant Hill",
|
|
28
|
+
description: "A new place for Walnut Creek\u2019s local stories, independent businesses and community voices."
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
slug: "lamorindapost",
|
|
32
|
+
name: "Lamorinda Post",
|
|
33
|
+
url: "https://lamorindapost.com",
|
|
34
|
+
area: "Orinda \xB7 Lafayette \xB7 Moraga",
|
|
35
|
+
description: "A new home for the neighbors, businesses and community stories of Lamorinda."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
slug: "alamoweekly",
|
|
39
|
+
name: "Alamo Weekly",
|
|
40
|
+
url: "https://alamoweekly.com",
|
|
41
|
+
area: "Alamo",
|
|
42
|
+
description: "A new place for Alamo\u2019s local stories, independent businesses and community voices."
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
slug: "danvilletimes",
|
|
46
|
+
name: "Danville Times",
|
|
47
|
+
url: "https://danvilletimes.com",
|
|
48
|
+
area: "Danville",
|
|
49
|
+
description: "A new place for Danville\u2019s local stories, independent businesses and community voices."
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
slug: "sanramontimes",
|
|
53
|
+
name: "San Ramon Times",
|
|
54
|
+
url: "https://sanramontimes.com",
|
|
55
|
+
area: "San Ramon",
|
|
56
|
+
description: "A new place for San Ramon\u2019s local stories, independent businesses and community voices."
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
slug: "diablovalleynews",
|
|
60
|
+
name: "Diablo Valley News",
|
|
61
|
+
url: "https://diablovalleynews.com",
|
|
62
|
+
area: "Concord \xB7 Walnut Creek \xB7 Pleasant Hill \xB7 Alamo \xB7 Danville \xB7 San Ramon",
|
|
63
|
+
description: "Local stories about the people, businesses and community life of the Diablo Valley."
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
slug: "trivalleyweekly",
|
|
67
|
+
name: "Tri-Valley Weekly",
|
|
68
|
+
url: "https://trivalleyweekly.com",
|
|
69
|
+
area: "Alamo \xB7 Danville \xB7 San Ramon \xB7 Dublin \xB7 Pleasanton \xB7 Livermore",
|
|
70
|
+
description: "Local stories about the businesses, people and community life of the Tri-Valley."
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
slug: "eastbaypost",
|
|
74
|
+
name: "East Bay Post",
|
|
75
|
+
url: "https://eastbaypost.com",
|
|
76
|
+
area: "The East Bay",
|
|
77
|
+
description: "A new publication connecting the people and neighborhoods of the East Bay."
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
slug: "napagate",
|
|
81
|
+
name: "Napa Gate",
|
|
82
|
+
url: "https://napagate.com",
|
|
83
|
+
area: "Napa Valley",
|
|
84
|
+
description: "A new local publication for the people, places and everyday life of Napa Valley.",
|
|
85
|
+
listed: false
|
|
86
|
+
}
|
|
87
|
+
];
|
|
88
|
+
var listedPublications = localPublications.filter(
|
|
89
|
+
(publication) => !("listed" in publication) || publication.listed
|
|
90
|
+
);
|
|
91
|
+
var communityPublications = listedPublications.filter(
|
|
92
|
+
(publication) => publication.slug !== "bayareachronicle"
|
|
93
|
+
);
|
|
94
|
+
function findPublicationBySlug(slug) {
|
|
95
|
+
return localPublications.find((p) => p.slug === slug);
|
|
96
|
+
}
|
|
97
|
+
function findPublicationByHost(host) {
|
|
98
|
+
const cleanHost = host.replace(/^https?:\/\//, "").replace(/\/.*$/, "").toLowerCase();
|
|
99
|
+
return localPublications.find((p) => {
|
|
100
|
+
const pubHost = p.url.replace(/^https?:\/\//, "").replace(/\/.*$/, "").toLowerCase();
|
|
101
|
+
return pubHost === cleanHost || cleanHost.startsWith(`${p.slug}.`);
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
function getNetworkPublicationUrl(slug) {
|
|
105
|
+
const pub = findPublicationBySlug(slug);
|
|
106
|
+
if (!pub) return null;
|
|
107
|
+
return compliance.decorateNetworkUrl(pub.url + "/");
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
exports.communityPublications = communityPublications;
|
|
111
|
+
exports.findPublicationByHost = findPublicationByHost;
|
|
112
|
+
exports.findPublicationBySlug = findPublicationBySlug;
|
|
113
|
+
exports.getNetworkPublicationUrl = getNetworkPublicationUrl;
|
|
114
|
+
exports.listedPublications = listedPublications;
|
|
115
|
+
exports.localPublications = localPublications;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface PublicationNetworkItem {
|
|
2
|
+
slug: string;
|
|
3
|
+
name: string;
|
|
4
|
+
url: string;
|
|
5
|
+
area: string;
|
|
6
|
+
description: string;
|
|
7
|
+
listed?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Public directory of all ScaleMule local news publications in the Bay Area network.
|
|
11
|
+
* Menu order follows the central corridor from north to south.
|
|
12
|
+
*/
|
|
13
|
+
declare const localPublications: readonly PublicationNetworkItem[];
|
|
14
|
+
declare const listedPublications: readonly PublicationNetworkItem[];
|
|
15
|
+
declare const communityPublications: readonly PublicationNetworkItem[];
|
|
16
|
+
/** Find a publication in the network by its slug. */
|
|
17
|
+
declare function findPublicationBySlug(slug: string): PublicationNetworkItem | undefined;
|
|
18
|
+
/** Find a publication in the network by its hostname or full origin URL. */
|
|
19
|
+
declare function findPublicationByHost(host: string): PublicationNetworkItem | undefined;
|
|
20
|
+
/** Get decorated URL for cross-domain navigation within the network with consent transfer. */
|
|
21
|
+
declare function getNetworkPublicationUrl(slug: string): string | null;
|
|
22
|
+
|
|
23
|
+
export { type PublicationNetworkItem, communityPublications, findPublicationByHost, findPublicationBySlug, getNetworkPublicationUrl, listedPublications, localPublications };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface PublicationNetworkItem {
|
|
2
|
+
slug: string;
|
|
3
|
+
name: string;
|
|
4
|
+
url: string;
|
|
5
|
+
area: string;
|
|
6
|
+
description: string;
|
|
7
|
+
listed?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Public directory of all ScaleMule local news publications in the Bay Area network.
|
|
11
|
+
* Menu order follows the central corridor from north to south.
|
|
12
|
+
*/
|
|
13
|
+
declare const localPublications: readonly PublicationNetworkItem[];
|
|
14
|
+
declare const listedPublications: readonly PublicationNetworkItem[];
|
|
15
|
+
declare const communityPublications: readonly PublicationNetworkItem[];
|
|
16
|
+
/** Find a publication in the network by its slug. */
|
|
17
|
+
declare function findPublicationBySlug(slug: string): PublicationNetworkItem | undefined;
|
|
18
|
+
/** Find a publication in the network by its hostname or full origin URL. */
|
|
19
|
+
declare function findPublicationByHost(host: string): PublicationNetworkItem | undefined;
|
|
20
|
+
/** Get decorated URL for cross-domain navigation within the network with consent transfer. */
|
|
21
|
+
declare function getNetworkPublicationUrl(slug: string): string | null;
|
|
22
|
+
|
|
23
|
+
export { type PublicationNetworkItem, communityPublications, findPublicationByHost, findPublicationBySlug, getNetworkPublicationUrl, listedPublications, localPublications };
|
package/dist/network.js
ADDED
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.15",
|
|
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,21 @@
|
|
|
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"
|
|
62
|
+
},
|
|
63
|
+
"./network": {
|
|
64
|
+
"types": "./dist/network.d.ts",
|
|
65
|
+
"import": "./dist/network.js",
|
|
66
|
+
"require": "./dist/network.cjs"
|
|
67
|
+
},
|
|
68
|
+
"./network-bar": {
|
|
69
|
+
"types": "./dist/network-bar.d.ts",
|
|
70
|
+
"import": "./dist/network-bar.js",
|
|
71
|
+
"require": "./dist/network-bar.cjs"
|
|
57
72
|
}
|
|
58
73
|
},
|
|
59
74
|
"files": [
|
|
@@ -68,7 +83,9 @@
|
|
|
68
83
|
"react": ">=18.0.0"
|
|
69
84
|
},
|
|
70
85
|
"peerDependenciesMeta": {
|
|
71
|
-
"react": {
|
|
86
|
+
"react": {
|
|
87
|
+
"optional": true
|
|
88
|
+
}
|
|
72
89
|
},
|
|
73
90
|
"scripts": {
|
|
74
91
|
"prepare": "npm run build",
|
|
@@ -104,5 +121,8 @@
|
|
|
104
121
|
"publishConfig": {
|
|
105
122
|
"access": "public",
|
|
106
123
|
"registry": "https://registry.npmjs.org/"
|
|
124
|
+
},
|
|
125
|
+
"dependencies": {
|
|
126
|
+
"@scalemule/compliance": "^0.0.2"
|
|
107
127
|
}
|
|
108
128
|
}
|