@modoitaliano/giorgia 0.1.100
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/LICENSE +21 -0
- package/README.md +129 -0
- package/dist/assets/default-og.jpg +0 -0
- package/dist/assets/default-og.png +0 -0
- package/dist/assets/giorgia-navigation.js +1123 -0
- package/dist/assets/mi.svg +6 -0
- package/dist/carousels.d.ts +1 -0
- package/dist/carousels.js +65 -0
- package/dist/components/live-program/LiveProgram.d.ts +9 -0
- package/dist/components/live-program/LiveProgram.js +751 -0
- package/dist/components/live-program/assets.d.ts +14 -0
- package/dist/components/live-program/assets.js +14 -0
- package/dist/components/live-program/components/Marquee.d.ts +16 -0
- package/dist/components/live-program/components/Marquee.js +88 -0
- package/dist/components/live-program/components/MarqueeCurtain.d.ts +5 -0
- package/dist/components/live-program/components/MarqueeCurtain.js +30 -0
- package/dist/components/live-program/components/WorldClocks.d.ts +19 -0
- package/dist/components/live-program/components/WorldClocks.js +101 -0
- package/dist/components/live-program/components/slides/ArticleSlide.d.ts +14 -0
- package/dist/components/live-program/components/slides/ArticleSlide.js +32 -0
- package/dist/components/live-program/components/slides/CallsignSlide.d.ts +6 -0
- package/dist/components/live-program/components/slides/CallsignSlide.js +49 -0
- package/dist/components/live-program/components/slides/LiveEventSlide.d.ts +9 -0
- package/dist/components/live-program/components/slides/LiveEventSlide.js +86 -0
- package/dist/components/live-program/components/slides/slideStyles.d.ts +1 -0
- package/dist/components/live-program/components/slides/slideStyles.js +64 -0
- package/dist/components/live-program/events.d.ts +34 -0
- package/dist/components/live-program/events.js +167 -0
- package/dist/components/live-program/hooks/useSSE.d.ts +11 -0
- package/dist/components/live-program/hooks/useSSE.js +107 -0
- package/dist/components/live-program/i18n.d.ts +4 -0
- package/dist/components/live-program/i18n.js +305 -0
- package/dist/components/live-program/segments/ArticlesSegment.d.ts +6 -0
- package/dist/components/live-program/segments/ArticlesSegment.js +160 -0
- package/dist/components/live-program/segments/EarthquakeSegment.d.ts +16 -0
- package/dist/components/live-program/segments/EarthquakeSegment.js +130 -0
- package/dist/components/live-program/segments/LiveEventSegment.d.ts +4 -0
- package/dist/components/live-program/segments/LiveEventSegment.js +27 -0
- package/dist/components/live-program/segments/MarketsSegment.d.ts +12 -0
- package/dist/components/live-program/segments/MarketsSegment.js +76 -0
- package/dist/components/live-program/segments/WeatherSegment.d.ts +15 -0
- package/dist/components/live-program/segments/WeatherSegment.js +119 -0
- package/dist/components/live-program/segments/fetchLiveEvents.d.ts +20 -0
- package/dist/components/live-program/segments/fetchLiveEvents.js +76 -0
- package/dist/components/live-program/segments/index.d.ts +8 -0
- package/dist/components/live-program/segments/index.js +8 -0
- package/dist/components/live-program/segments/types.d.ts +23 -0
- package/dist/components/live-program/segments/types.js +1 -0
- package/dist/components/live-program/segments/usePlaylistEngine.d.ts +9 -0
- package/dist/components/live-program/segments/usePlaylistEngine.js +108 -0
- package/dist/components/live-program/utils/broadcastTime.d.ts +12 -0
- package/dist/components/live-program/utils/broadcastTime.js +33 -0
- package/dist/cronkite-manifest.d.ts +70 -0
- package/dist/cronkite-manifest.js +134 -0
- package/dist/cronkite-manifest.json +149 -0
- package/dist/fonts/barlow-condensed-latin-300-normal.woff2 +0 -0
- package/dist/fonts/barlow-condensed-latin-400-normal.woff2 +0 -0
- package/dist/fonts/barlow-condensed-latin-500-normal.woff2 +0 -0
- package/dist/fonts/barlow-condensed-latin-600-normal.woff2 +0 -0
- package/dist/fonts/barlow-condensed-latin-700-normal.woff2 +0 -0
- package/dist/fonts/barlow-condensed-latin-800-normal.woff2 +0 -0
- package/dist/fonts/barlow-latin-400-normal.woff2 +0 -0
- package/dist/fonts/barlow-latin-500-normal.woff2 +0 -0
- package/dist/fonts/barlow-latin-600-normal.woff2 +0 -0
- package/dist/fonts/barlow-latin-700-normal.woff2 +0 -0
- package/dist/fonts/barlow-latin-800-normal.woff2 +0 -0
- package/dist/fonts/fonts.css +18 -0
- package/dist/fonts/outfit-latin-400-normal.woff2 +0 -0
- package/dist/fonts/outfit-latin-500-normal.woff2 +0 -0
- package/dist/fonts/outfit-latin-600-normal.woff2 +0 -0
- package/dist/fonts/outfit-latin-700-normal.woff2 +0 -0
- package/dist/fonts/outfit-latin-800-normal.woff2 +0 -0
- package/dist/homepage-distributor.d.ts +55 -0
- package/dist/homepage-distributor.js +68 -0
- package/dist/instagram-image-template.d.ts +9 -0
- package/dist/instagram-image-template.js +51 -0
- package/dist/json-schema-formats.d.ts +2 -0
- package/dist/json-schema-formats.js +24 -0
- package/dist/layouts.d.ts +14 -0
- package/dist/layouts.js +13 -0
- package/dist/live-program/main.d.ts +1 -0
- package/dist/live-program/main.js +10 -0
- package/dist/live-program-page/index.html +16 -0
- package/dist/live-program-page/live-program.css +3 -0
- package/dist/live-program-page/live-program.js +76 -0
- package/dist/live-program-page/modoitaliano/audio/pipes.ogg +0 -0
- package/dist/live-program-page/modoitaliano/images/berlin.jpg +0 -0
- package/dist/live-program-page/modoitaliano/images/modoitaliano.png +0 -0
- package/dist/live-program-page/modoitaliano/images/nyc.jpg +0 -0
- package/dist/live-program-page/modoitaliano/images/nyse.jpg +0 -0
- package/dist/live-program-page/modoitaliano/images/santiago.jpg +0 -0
- package/dist/live-program-page/modoitaliano/images/seismograph.jpg +0 -0
- package/dist/live-program-page/modoitaliano/images/tokyo.jpg +0 -0
- package/dist/manifest-validation.d.ts +10 -0
- package/dist/manifest-validation.js +27 -0
- package/dist/outlet-config.d.ts +28 -0
- package/dist/outlet-config.js +28 -0
- package/dist/renderer.browser.d.ts +2 -0
- package/dist/renderer.browser.js +140 -0
- package/dist/renderer.core.d.ts +10 -0
- package/dist/renderer.core.js +403 -0
- package/dist/renderer.d.ts +8 -0
- package/dist/renderer.js +5 -0
- package/dist/renderer.node.d.ts +22 -0
- package/dist/renderer.node.js +184 -0
- package/dist/schemas/canonical-document.schema.json +1071 -0
- package/dist/schemas/cronkite-manifest.schema.json +501 -0
- package/dist/schemas/feed-renderable-input.schema.json +13 -0
- package/dist/schemas/search-index.schema.json +27 -0
- package/dist/schemas/search-manifest.schema.json +34 -0
- package/dist/types/canonical-article.d.ts +7 -0
- package/dist/types/canonical-article.js +21 -0
- package/dist/types/canonical-document-schema.generated.d.ts +1634 -0
- package/dist/types/canonical-document-schema.generated.js +1730 -0
- package/dist/types/canonical-document.generated.d.ts +541 -0
- package/dist/types/canonical-document.generated.js +3 -0
- package/dist/types/cronkite-manifest.generated.d.ts +339 -0
- package/dist/types/cronkite-manifest.generated.js +3 -0
- package/dist/utils/sofascore.d.ts +3 -0
- package/dist/utils/sofascore.js +31 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/dist/video/Root.d.ts +1 -0
- package/dist/video/Root.js +40 -0
- package/dist/video/ShortVideo.d.ts +3 -0
- package/dist/video/ShortVideo.js +92 -0
- package/dist/video/index.d.ts +2 -0
- package/dist/video/index.js +4 -0
- package/dist/video/types.d.ts +37 -0
- package/dist/video/types.js +1 -0
- package/package.json +121 -0
- package/src/partial-deps.json +53 -0
- package/src/styles/compiled.css +2 -0
- package/src/templates/assets/default-og.jpg +0 -0
- package/src/templates/assets/default-og.png +0 -0
- package/src/templates/assets/mi.svg +6 -0
- package/src/templates/layouts/404.hbs +7 -0
- package/src/templates/layouts/article-page.hbs +7 -0
- package/src/templates/layouts/category-page.hbs +7 -0
- package/src/templates/layouts/coming-soon.hbs +7 -0
- package/src/templates/layouts/homepage.hbs +7 -0
- package/src/templates/layouts/link-in-bio.hbs +228 -0
- package/src/templates/layouts/live-story.hbs +7 -0
- package/src/templates/layouts/media-page.hbs +7 -0
- package/src/templates/layouts/search-page.hbs +7 -0
- package/src/templates/layouts/standalone-page.hbs +7 -0
- package/src/templates/partials/blocks/audio.hbs +12 -0
- package/src/templates/partials/blocks/data-table.hbs +23 -0
- package/src/templates/partials/blocks/divider.hbs +1 -0
- package/src/templates/partials/blocks/heading.hbs +9 -0
- package/src/templates/partials/blocks/image.hbs +6 -0
- package/src/templates/partials/blocks/info-box.hbs +8 -0
- package/src/templates/partials/blocks/instagram.hbs +28 -0
- package/src/templates/partials/blocks/key-points.hbs +8 -0
- package/src/templates/partials/blocks/list.hbs +13 -0
- package/src/templates/partials/blocks/live-update.hbs +24 -0
- package/src/templates/partials/blocks/pull-quote.hbs +6 -0
- package/src/templates/partials/blocks/rich-text.hbs +1 -0
- package/src/templates/partials/blocks/spotify.hbs +14 -0
- package/src/templates/partials/blocks/tiktok.hbs +15 -0
- package/src/templates/partials/blocks/x.hbs +74 -0
- package/src/templates/partials/blocks/youtube.hbs +12 -0
- package/src/templates/partials/components/article-main.hbs +159 -0
- package/src/templates/partials/components/breaking-news/live-updates-column.hbs +29 -0
- package/src/templates/partials/components/breaking-news.hbs +56 -0
- package/src/templates/partials/components/category/header.hbs +5 -0
- package/src/templates/partials/components/category/main-grid.hbs +55 -0
- package/src/templates/partials/components/category/main.hbs +7 -0
- package/src/templates/partials/components/category/more-grid.hbs +26 -0
- package/src/templates/partials/components/coming-soon/main.hbs +14 -0
- package/src/templates/partials/components/editorial-hero.hbs +73 -0
- package/src/templates/partials/components/headline.hbs +15 -0
- package/src/templates/partials/components/hero-editorial.hbs +1 -0
- package/src/templates/partials/components/hero.hbs +1 -0
- package/src/templates/partials/components/home/landing.hbs +111 -0
- package/src/templates/partials/components/home/main.hbs +59 -0
- package/src/templates/partials/components/home/more-stories.hbs +23 -0
- package/src/templates/partials/components/home/must-read.hbs +77 -0
- package/src/templates/partials/components/live-story/main.hbs +229 -0
- package/src/templates/partials/components/media/main.hbs +228 -0
- package/src/templates/partials/components/not-found/main.hbs +28 -0
- package/src/templates/partials/components/search/main.hbs +424 -0
- package/src/templates/partials/components/snack.hbs +92 -0
- package/src/templates/partials/components/spotlight-hero.hbs +59 -0
- package/src/templates/partials/components/standalone-main.hbs +28 -0
- package/src/templates/partials/components/stream-player.hbs +40 -0
- package/src/templates/partials/components/trending.hbs +14 -0
- package/src/templates/partials/components/ui/accordion.hbs +30 -0
- package/src/templates/partials/components/ui/breadcrumb.hbs +16 -0
- package/src/templates/partials/components/ui/icon-button.hbs +19 -0
- package/src/templates/partials/components/ui/loading-spinner.hbs +27 -0
- package/src/templates/partials/components/ui/pagination.hbs +56 -0
- package/src/templates/partials/components/ui/scroll-area.hbs +12 -0
- package/src/templates/partials/components/ui/status-badge.hbs +21 -0
- package/src/templates/partials/footers/footer-full.hbs +73 -0
- package/src/templates/partials/headers/header-main.hbs +477 -0
- package/src/templates/partials/nav/nav-categories.hbs +5 -0
- package/src/templates/partials/shell/doc-end.hbs +637 -0
- package/src/templates/partials/shell/doc-start-404.hbs +42 -0
- package/src/templates/partials/shell/doc-start-standard.hbs +96 -0
- package/src/templates/templates/instagram-image.hbs +177 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 fifthbell
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# @modoitaliano/giorgia
|
|
2
|
+
|
|
3
|
+
Server-side renderer and Handlebars template bundle for ModoItaliano pages.
|
|
4
|
+
|
|
5
|
+
## What it does
|
|
6
|
+
|
|
7
|
+
- Renders canonical content documents into HTML
|
|
8
|
+
- Supports the layouts declared by the packaged Cronkite manifest, including
|
|
9
|
+
article, homepage, category, search, 404, coming-soon, live-story,
|
|
10
|
+
link-in-bio, media, and standalone pages
|
|
11
|
+
- Ships reusable Handlebars templates, partial dependency metadata, and compiled CSS
|
|
12
|
+
- Ships provider-neutral social-image and Remotion short-video renderables
|
|
13
|
+
- Preserves the masthead, footer, and radio player across same-language internal navigation
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @modoitaliano/giorgia
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Basic usage
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import { render } from "@modoitaliano/giorgia";
|
|
25
|
+
|
|
26
|
+
const html = render(doc);
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`doc` must match the normative canonical schema in
|
|
30
|
+
[src/schemas/canonical-document.schema.json](src/schemas/canonical-document.schema.json).
|
|
31
|
+
TypeScript declarations are generated from that schema; runtime rendering validates
|
|
32
|
+
against the same artifact.
|
|
33
|
+
|
|
34
|
+
## Exports
|
|
35
|
+
|
|
36
|
+
- `@modoitaliano/giorgia` -> renderer entrypoint
|
|
37
|
+
- `@modoitaliano/giorgia/cronkite-manifest.json` -> data-only CLS capability manifest
|
|
38
|
+
- `@modoitaliano/giorgia/video` -> bundleable Remotion short-video entrypoint
|
|
39
|
+
- `@modoitaliano/giorgia/schemas/canonical-document.schema.json` -> canonical input contract
|
|
40
|
+
- `@modoitaliano/giorgia/schemas/feed-renderable-input.schema.json` -> feed publication envelope
|
|
41
|
+
- `@modoitaliano/giorgia/schemas/search-manifest.schema.json` and
|
|
42
|
+
`@modoitaliano/giorgia/schemas/search-index.schema.json` -> static-search resource contract
|
|
43
|
+
- `@modoitaliano/giorgia/partial-deps.json` -> partial-to-layout dependency map
|
|
44
|
+
|
|
45
|
+
The root module also exports `cronkiteManifest`, `outletConfig`, `version`,
|
|
46
|
+
`render`, `fontFiles`, `assetFiles`, and `buildInstagramImageHtml`. See
|
|
47
|
+
[docs/cronkite-compatibility.md](docs/cronkite-compatibility.md) for ownership,
|
|
48
|
+
validation, search, and asset-rendering details.
|
|
49
|
+
|
|
50
|
+
## Development
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npm install
|
|
54
|
+
npm run typecheck
|
|
55
|
+
npm run test:unit
|
|
56
|
+
npm run build
|
|
57
|
+
npm run verify:packed-remotion
|
|
58
|
+
npm run storybook
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Persistent navigation
|
|
62
|
+
|
|
63
|
+
Standard page layouts replace only `#page-content` during same-origin, same-language navigation. The masthead, footer, and bottom radio player stay mounted, so an active stream continues without interruption. Each persistent shell surface has its own static View Transition identity, preventing the visible player bar from being redrawn with page content. Swup updates the URL, browser history, document metadata, focus announcement, and scroll position; native View Transitions animate the content where supported, with a CSS fallback and reduced-motion handling.
|
|
64
|
+
|
|
65
|
+
Page-local scripts that must run after a content swap use `data-swup-reload-script`. Initializers shared by several layouts expose an idempotent `window.__brokaw*` function and are called after each page view. Search and media pagination tag their query-only history entries so back/forward navigation can distinguish local state changes from page changes. Cross-language links and pages without the standard content boundary use a normal document navigation.
|
|
66
|
+
|
|
67
|
+
## Publish flow
|
|
68
|
+
|
|
69
|
+
- CI validates typecheck, unit tests, and package build on pull requests and `main` pushes.
|
|
70
|
+
- GitHub-hosted runners build, test, and deploy this public repository.
|
|
71
|
+
- A `v*` tag matching the version in `package.json` triggers the package workflow
|
|
72
|
+
on a GitHub-hosted runner. The workflow builds and publishes
|
|
73
|
+
`@modoitaliano/giorgia` to npm with provenance through the `giorgia` GitHub
|
|
74
|
+
environment. The npm trusted publisher must authorize
|
|
75
|
+
`modoitaliano/giorgia`, `publish.yml`, and `giorgia` for direct publishing.
|
|
76
|
+
- Verify the package version and `package-lock.json` match, merge the release
|
|
77
|
+
commit to `main`, then tag that commit and push the tag. Confirm the publish
|
|
78
|
+
workflow succeeds and `npm view @modoitaliano/giorgia version` reports the new
|
|
79
|
+
version. The publish workflow rejects branch dispatches, mismatched tags, and
|
|
80
|
+
versions already present on npm before publishing. It reports success only
|
|
81
|
+
after npm serves the exact built version; a registry read failure or missing
|
|
82
|
+
version fails the job. The `0.1.100` cutover release is the one-time manual
|
|
83
|
+
exception tracked in [giorgia#12](https://github.com/modoitaliano/giorgia/issues/12);
|
|
84
|
+
do not use this workflow for that release.
|
|
85
|
+
- Storybook pull requests build an immutable artifact but receive no AWS token.
|
|
86
|
+
A push or manual run on `main` deploys that exact artifact to
|
|
87
|
+
`https://ui.modoitaliano.fm` through the `giorgia-storybook` GitHub
|
|
88
|
+
environment and short-lived AWS OIDC role
|
|
89
|
+
`giorgia-storybook-github-deploy`. Storybook deployment never runs
|
|
90
|
+
`npm publish` or changes the package version.
|
|
91
|
+
|
|
92
|
+
### Storybook infrastructure and rollback
|
|
93
|
+
|
|
94
|
+
The Modo Italiano `Loredana` CloudFormation stack owns the dedicated Storybook
|
|
95
|
+
bucket and CloudFront distribution. The workflow resolves outputs
|
|
96
|
+
`LoredanaGiorgiaStorybookBucketName` and
|
|
97
|
+
`LoredanaGiorgiaStorybookDistributionId`; it must never target the Fifthbell
|
|
98
|
+
`ui.fifthbell.com` resources used by Brokaw.
|
|
99
|
+
|
|
100
|
+
Each build carries `deployment.json` with its repository, package version, run,
|
|
101
|
+
and full Git SHA. Deployment uploads to `/releases/<sha>` and changes the
|
|
102
|
+
CloudFront origin path only after the complete immutable prefix is present.
|
|
103
|
+
The previous origin path is retained and restored automatically if the public
|
|
104
|
+
identity check fails after promotion. A failed build or upload therefore
|
|
105
|
+
cannot partially overwrite the last known-good documentation.
|
|
106
|
+
|
|
107
|
+
The deployment log records the previous origin path. For an
|
|
108
|
+
operator-authorized manual rollback, fetch the current distribution config and
|
|
109
|
+
ETag, restore only the dedicated S3 origin's `OriginPath` to that recorded
|
|
110
|
+
`/releases/<sha>` value, submit the update with the ETag, wait for CloudFront to
|
|
111
|
+
deploy, and invalidate `/*`. Confirm the public `deployment.json` reports the
|
|
112
|
+
expected prior SHA. Do not delete release prefixes until a separately reviewed
|
|
113
|
+
retention policy exists.
|
|
114
|
+
|
|
115
|
+
The deployment role must trust only audience `sts.amazonaws.com` and the
|
|
116
|
+
repository's current immutable GitHub OIDC subject:
|
|
117
|
+
|
|
118
|
+
```text
|
|
119
|
+
repo:modoitaliano@327696306/giorgia@1304750193:environment:giorgia-storybook
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Its permissions are limited to `cloudformation:DescribeStacks` for Loredana;
|
|
123
|
+
`s3:ListBucket` and `s3:GetBucketLocation` on the dedicated bucket;
|
|
124
|
+
`s3:GetObject` and `s3:PutObject` on that bucket's `releases/*`; and
|
|
125
|
+
`cloudfront:GetDistribution`,
|
|
126
|
+
`cloudfront:GetDistributionConfig`, `cloudfront:UpdateDistribution`,
|
|
127
|
+
`cloudfront:CreateInvalidation`, and `cloudfront:GetInvalidation` on the one
|
|
128
|
+
Storybook distribution. It has no delete permission. No long-lived AWS key
|
|
129
|
+
belongs in GitHub secrets.
|
|
Binary file
|
|
Binary file
|