@crockery/fellowship-components 0.1.0 → 0.3.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/README.md +7 -2
- package/RELEASING.md +9 -45
- package/dist/chunks/data-source-C-Gs7kRl.js +2 -0
- package/dist/chunks/decorate-B_ZTN9li.js.map +1 -1
- package/dist/chunks/dungeon-cast-browser-Cyh519NI.js +705 -0
- package/dist/chunks/dungeon-cast-browser-Cyh519NI.js.map +1 -0
- package/dist/chunks/{dungeon-map-IPN6sEDj.js → dungeon-map-xFaPasVr.js} +113 -138
- package/dist/chunks/dungeon-map-xFaPasVr.js.map +1 -0
- package/dist/chunks/{talent-calculator-Ch1Pbbba.js → talent-calculator-CIPNbqK5.js} +84 -114
- package/dist/chunks/talent-calculator-CIPNbqK5.js.map +1 -0
- package/dist/data/cast-data-source.d.ts +5 -0
- package/dist/data/cast-data-source.d.ts.map +1 -0
- package/dist/data/data-source.d.ts +5 -16
- package/dist/data/data-source.d.ts.map +1 -1
- package/dist/data/package-cast-data-source.d.ts +8 -0
- package/dist/data/package-cast-data-source.d.ts.map +1 -0
- package/dist/data/package-data-source.d.ts +3 -1
- package/dist/data/package-data-source.d.ts.map +1 -1
- package/dist/data/package-talent-data-source.d.ts +2 -0
- package/dist/data/package-talent-data-source.d.ts.map +1 -1
- package/dist/data/talent-data-source.d.ts +4 -10
- package/dist/data/talent-data-source.d.ts.map +1 -1
- package/dist/dungeon-cast-browser/dungeon-cast-browser.d.ts +36 -0
- package/dist/dungeon-cast-browser/dungeon-cast-browser.d.ts.map +1 -0
- package/dist/dungeon-cast-browser/dungeon-cast-browser.styles.d.ts +2 -0
- package/dist/dungeon-cast-browser/dungeon-cast-browser.styles.d.ts.map +1 -0
- package/dist/dungeon-cast-browser/index.d.ts +4 -0
- package/dist/dungeon-cast-browser/index.d.ts.map +1 -0
- package/dist/dungeon-cast-browser/render-model.d.ts +5 -0
- package/dist/dungeon-cast-browser/render-model.d.ts.map +1 -0
- package/dist/dungeon-cast-browser/types.d.ts +60 -0
- package/dist/dungeon-cast-browser/types.d.ts.map +1 -0
- package/dist/dungeon-cast-browser.js +7 -0
- package/dist/dungeon-cast-browser.js.map +1 -0
- package/dist/dungeon-map.js +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -5
- package/dist/react/dungeon-cast-browser.d.ts +12 -0
- package/dist/react/dungeon-cast-browser.d.ts.map +1 -0
- package/dist/react/dungeon-cast-browser.js +19 -0
- package/dist/react/dungeon-cast-browser.js.map +1 -0
- package/dist/react/dungeon-map.js +1 -1
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/talent-calculator.js +1 -1
- package/dist/react.js +4 -3
- package/dist/talent-calculator.js +1 -1
- package/package.json +35 -25
- package/src/dungeon-cast-browser/README.md +22 -0
- package/dist/chunks/data-source-CoIFvV72.js +0 -10
- package/dist/chunks/data-source-CoIFvV72.js.map +0 -1
- package/dist/chunks/dungeon-map-IPN6sEDj.js.map +0 -1
- package/dist/chunks/talent-calculator-Ch1Pbbba.js.map +0 -1
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ npm install @crockery/fellowship-components
|
|
|
11
11
|
pnpm add @crockery/fellowship-components
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
The data package is installed automatically. Components
|
|
14
|
+
The data package is installed automatically. Components use its shared lazy client, while image
|
|
15
15
|
URLs use the installed data package's version-pinned CDN by default. Your application lockfile
|
|
16
16
|
therefore selects both the exact data and its matching assets.
|
|
17
17
|
|
|
@@ -94,7 +94,7 @@ request. See `THIRD_PARTY_LICENSES.md` for the SIL Open Font License notice.
|
|
|
94
94
|
|
|
95
95
|
## Data and asset versions
|
|
96
96
|
|
|
97
|
-
The library accepts `@crockery/fellowship-data@^1.
|
|
97
|
+
The library accepts `@crockery/fellowship-data@^1.3.0`. Commit the consuming application's
|
|
98
98
|
lockfile when reproducible data and image updates matter.
|
|
99
99
|
|
|
100
100
|
Dataset JSON stays out of the component library's initial JavaScript path and published tarball.
|
|
@@ -106,6 +106,11 @@ Each data-driven component supports:
|
|
|
106
106
|
|
|
107
107
|
See the relevant component document for the provider contract.
|
|
108
108
|
|
|
109
|
+
The legacy component-specific data-source types and package factories remain available as
|
|
110
|
+
deprecated structural adapters for the 0.x release line. New integrations should use
|
|
111
|
+
`createPackageFellowshipDataClient` from `@crockery/fellowship-data/client` and pass the relevant
|
|
112
|
+
client methods through `dataSource`.
|
|
113
|
+
|
|
109
114
|
## Development
|
|
110
115
|
|
|
111
116
|
```sh
|
package/RELEASING.md
CHANGED
|
@@ -8,48 +8,11 @@ pnpm changeset
|
|
|
8
8
|
```
|
|
9
9
|
|
|
10
10
|
The Release workflow maintains a `changeset-release/main` pull request. Merging that pull request
|
|
11
|
-
publishes
|
|
11
|
+
publishes the new version to npm automatically through trusted publishing.
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Trusted publishing
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
1. Enable **Allow GitHub Actions to create and approve pull requests** under **Settings → Actions →
|
|
18
|
-
General → Workflow permissions**.
|
|
19
|
-
2. Run the Release workflow so Changesets creates or refreshes its version pull request.
|
|
20
|
-
3. Review the version, changelog, package checks, and tarball contents, then merge the version pull
|
|
21
|
-
request.
|
|
22
|
-
4. From a clean checkout of that exact `main` commit, publish the first release:
|
|
23
|
-
|
|
24
|
-
```sh
|
|
25
|
-
git pull --ff-only
|
|
26
|
-
pnpm install --frozen-lockfile
|
|
27
|
-
pnpm lint
|
|
28
|
-
pnpm format:check
|
|
29
|
-
pnpm typecheck
|
|
30
|
-
pnpm test
|
|
31
|
-
pnpm test:browser:smoke
|
|
32
|
-
pnpm ladle:build
|
|
33
|
-
pnpm pack:check
|
|
34
|
-
npm login
|
|
35
|
-
npm whoami
|
|
36
|
-
npm publish --access public --tag latest
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
5. Verify the published package before tagging it:
|
|
40
|
-
|
|
41
|
-
```sh
|
|
42
|
-
npm view @crockery/fellowship-components@0.2.0
|
|
43
|
-
git tag -a "@crockery/fellowship-components@0.2.0" -m "@crockery/fellowship-components@0.2.0"
|
|
44
|
-
git push origin "@crockery/fellowship-components@0.2.0"
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Create a matching GitHub release from the generated changelog. The manually bootstrapped release
|
|
48
|
-
does not carry CI provenance.
|
|
49
|
-
|
|
50
|
-
## Enable trusted publishing
|
|
51
|
-
|
|
52
|
-
After the package exists on npm, configure its npm trusted publisher with:
|
|
15
|
+
Trusted publishing is enabled on npm with:
|
|
53
16
|
|
|
54
17
|
- Provider: GitHub Actions
|
|
55
18
|
- Organization or user: `Crockery`
|
|
@@ -58,17 +21,18 @@ After the package exists on npm, configure its npm trusted publisher with:
|
|
|
58
21
|
- Environment: none
|
|
59
22
|
- Allowed action: `npm publish`
|
|
60
23
|
|
|
61
|
-
|
|
62
|
-
`NPM_TOKEN
|
|
63
|
-
provenance automatically.
|
|
24
|
+
The GitHub repository variable `NPM_TRUSTED_PUBLISHING_READY` is set to `true`. Keep it enabled and
|
|
25
|
+
do not add an `NPM_TOKEN`: npm authenticates the release job through its GitHub OIDC identity and
|
|
26
|
+
creates provenance automatically. Maintainers do not need to run `npm login`, `npm publish`, or
|
|
27
|
+
create release tags manually.
|
|
64
28
|
|
|
65
29
|
## Routine releases
|
|
66
30
|
|
|
67
31
|
1. Merge consumer-facing changes and their changesets into `main`.
|
|
68
32
|
2. Review the Changesets version pull request, including its generated changelog.
|
|
69
33
|
3. Merge the version pull request after CI succeeds.
|
|
70
|
-
4. Confirm the Release workflow publishes the expected npm version
|
|
71
|
-
provenance statement.
|
|
34
|
+
4. Confirm the Release workflow publishes the expected npm version and creates its tag, GitHub
|
|
35
|
+
release, and npm provenance statement.
|
|
72
36
|
|
|
73
37
|
Never reuse a version number. If a release is defective, publish a corrective patch. Deprecate a
|
|
74
38
|
bad version with `npm deprecate` when consumers need an explicit warning; unpublish only when npm's
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorate-B_ZTN9li.js","names":[],"sources":["../../src/styles/field-manual.styles.ts","../../node_modules/.pnpm/@fontsource+ibm-plex-mono@5.2.7/node_modules/@fontsource/ibm-plex-mono/files/ibm-plex-mono-latin-500-normal.woff2?fellowship-font-url","../../node_modules/.pnpm/@fontsource+ibm-plex-mono@5.2.7/node_modules/@fontsource/ibm-plex-mono/files/ibm-plex-mono-latin-600-normal.woff2?fellowship-font-url","../../node_modules/.pnpm/@fontsource+ibm-plex-sans-condensed@5.2.8/node_modules/@fontsource/ibm-plex-sans-condensed/files/ibm-plex-sans-condensed-latin-400-normal.woff2?fellowship-font-url","../../node_modules/.pnpm/@fontsource+ibm-plex-sans-condensed@5.2.8/node_modules/@fontsource/ibm-plex-sans-condensed/files/ibm-plex-sans-condensed-latin-500-normal.woff2?fellowship-font-url","../../node_modules/.pnpm/@fontsource+ibm-plex-sans-condensed@5.2.8/node_modules/@fontsource/ibm-plex-sans-condensed/files/ibm-plex-sans-condensed-latin-600-normal.woff2?fellowship-font-url","../../node_modules/.pnpm/@fontsource+ibm-plex-sans-condensed@5.2.8/node_modules/@fontsource/ibm-plex-sans-condensed/files/ibm-plex-sans-condensed-latin-700-normal.woff2?fellowship-font-url","../../src/styles/field-manual-fonts.ts"],"sourcesContent":["import { css } from \"lit\";\n\n/** Shared internal aliases for the public Expedition Field Manual theme tokens. */\nexport const fieldManualStyles = css`\n :host {\n --_fellowship-field-canvas: var(--fellowship-field-canvas, #0b0f13);\n --_fellowship-field-surface: var(--fellowship-field-surface, #10161c);\n --_fellowship-field-surface-raised: var(--fellowship-field-surface-raised, #151c23);\n --_fellowship-field-inset: var(--fellowship-field-inset, #080c10);\n --_fellowship-field-ink: var(--fellowship-field-ink, #f1eee5);\n --_fellowship-field-muted: var(--fellowship-field-muted, #b7b4aa);\n --_fellowship-field-tertiary: var(--fellowship-field-tertiary, #858a8e);\n --_fellowship-field-border: var(\n --fellowship-field-border,\n rgb(241 238 229 / 10%)\n );\n --_fellowship-field-border-strong: var(\n --fellowship-field-border-strong,\n rgb(241 238 229 / 18%)\n );\n --_fellowship-field-accent: var(--fellowship-field-accent, #69c4d4);\n --_fellowship-field-focus: var(--fellowship-field-focus, #a8e6ee);\n --_fellowship-field-ember: var(--fellowship-field-ember, #d9784c);\n --_fellowship-field-brass: var(--fellowship-field-brass, #c1a36a);\n --_fellowship-field-font-family: var(\n --fellowship-field-font-family,\n \"Fellowship Field\",\n \"Arial Narrow\",\n sans-serif\n );\n --_fellowship-field-mono-font-family: var(\n --fellowship-field-mono-font-family,\n \"Fellowship Tactical\",\n ui-monospace,\n monospace\n );\n --_fellowship-field-radius: var(--fellowship-field-radius, 6px);\n }\n`;\n","export default import.meta.
|
|
1
|
+
{"version":3,"file":"decorate-B_ZTN9li.js","names":[],"sources":["../../src/styles/field-manual.styles.ts","../../node_modules/.pnpm/@fontsource+ibm-plex-mono@5.2.7/node_modules/@fontsource/ibm-plex-mono/files/ibm-plex-mono-latin-500-normal.woff2?fellowship-font-url","../../node_modules/.pnpm/@fontsource+ibm-plex-mono@5.2.7/node_modules/@fontsource/ibm-plex-mono/files/ibm-plex-mono-latin-600-normal.woff2?fellowship-font-url","../../node_modules/.pnpm/@fontsource+ibm-plex-sans-condensed@5.2.8/node_modules/@fontsource/ibm-plex-sans-condensed/files/ibm-plex-sans-condensed-latin-400-normal.woff2?fellowship-font-url","../../node_modules/.pnpm/@fontsource+ibm-plex-sans-condensed@5.2.8/node_modules/@fontsource/ibm-plex-sans-condensed/files/ibm-plex-sans-condensed-latin-500-normal.woff2?fellowship-font-url","../../node_modules/.pnpm/@fontsource+ibm-plex-sans-condensed@5.2.8/node_modules/@fontsource/ibm-plex-sans-condensed/files/ibm-plex-sans-condensed-latin-600-normal.woff2?fellowship-font-url","../../node_modules/.pnpm/@fontsource+ibm-plex-sans-condensed@5.2.8/node_modules/@fontsource/ibm-plex-sans-condensed/files/ibm-plex-sans-condensed-latin-700-normal.woff2?fellowship-font-url","../../src/styles/field-manual-fonts.ts"],"sourcesContent":["import { css } from \"lit\";\n\n/** Shared internal aliases for the public Expedition Field Manual theme tokens. */\nexport const fieldManualStyles = css`\n :host {\n --_fellowship-field-canvas: var(--fellowship-field-canvas, #0b0f13);\n --_fellowship-field-surface: var(--fellowship-field-surface, #10161c);\n --_fellowship-field-surface-raised: var(--fellowship-field-surface-raised, #151c23);\n --_fellowship-field-inset: var(--fellowship-field-inset, #080c10);\n --_fellowship-field-ink: var(--fellowship-field-ink, #f1eee5);\n --_fellowship-field-muted: var(--fellowship-field-muted, #b7b4aa);\n --_fellowship-field-tertiary: var(--fellowship-field-tertiary, #858a8e);\n --_fellowship-field-border: var(\n --fellowship-field-border,\n rgb(241 238 229 / 10%)\n );\n --_fellowship-field-border-strong: var(\n --fellowship-field-border-strong,\n rgb(241 238 229 / 18%)\n );\n --_fellowship-field-accent: var(--fellowship-field-accent, #69c4d4);\n --_fellowship-field-focus: var(--fellowship-field-focus, #a8e6ee);\n --_fellowship-field-ember: var(--fellowship-field-ember, #d9784c);\n --_fellowship-field-brass: var(--fellowship-field-brass, #c1a36a);\n --_fellowship-field-font-family: var(\n --fellowship-field-font-family,\n \"Fellowship Field\",\n \"Arial Narrow\",\n sans-serif\n );\n --_fellowship-field-mono-font-family: var(\n --fellowship-field-mono-font-family,\n \"Fellowship Tactical\",\n ui-monospace,\n monospace\n );\n --_fellowship-field-radius: var(--fellowship-field-radius, 6px);\n }\n`;\n","export default import.meta.ROLLUP_FILE_URL_FKNdLzKnlftW3t_gzo81yw;","export default import.meta.ROLLUP_FILE_URL_VRAku6fjghkApIISiBWPzg;","export default import.meta.ROLLUP_FILE_URL_8HSUfh7cJHNFxCkInNzNXw;","export default import.meta.ROLLUP_FILE_URL_WPGYjwIlzWVNM1bYhOc83w;","export default import.meta.ROLLUP_FILE_URL_P4DPfwIRieI8P6q8r4JZRw;","export default import.meta.ROLLUP_FILE_URL_cn7IAAGY294pWGc7MpElVg;","import mono500Url from \"@fontsource/ibm-plex-mono/files/ibm-plex-mono-latin-500-normal.woff2?url\";\nimport mono600Url from \"@fontsource/ibm-plex-mono/files/ibm-plex-mono-latin-600-normal.woff2?url\";\nimport field400Url from \"@fontsource/ibm-plex-sans-condensed/files/ibm-plex-sans-condensed-latin-400-normal.woff2?url\";\nimport field500Url from \"@fontsource/ibm-plex-sans-condensed/files/ibm-plex-sans-condensed-latin-500-normal.woff2?url\";\nimport field600Url from \"@fontsource/ibm-plex-sans-condensed/files/ibm-plex-sans-condensed-latin-600-normal.woff2?url\";\nimport field700Url from \"@fontsource/ibm-plex-sans-condensed/files/ibm-plex-sans-condensed-latin-700-normal.woff2?url\";\n\ninterface FieldManualFontAsset {\n readonly family: \"Fellowship Field\" | \"Fellowship Tactical\";\n readonly weight: \"400\" | \"500\" | \"600\" | \"700\";\n readonly url: string;\n}\n\nconst fieldManualFontAssets: readonly FieldManualFontAsset[] = [\n { family: \"Fellowship Field\", weight: \"400\", url: field400Url },\n { family: \"Fellowship Field\", weight: \"500\", url: field500Url },\n { family: \"Fellowship Field\", weight: \"600\", url: field600Url },\n { family: \"Fellowship Field\", weight: \"700\", url: field700Url },\n { family: \"Fellowship Tactical\", weight: \"500\", url: mono500Url },\n { family: \"Fellowship Tactical\", weight: \"600\", url: mono600Url },\n];\n\nconst installedDocuments = new WeakSet<Document>();\n\n/** Makes the bundled field-manual faces available to a component's owner document. */\nexport const installFieldManualFonts = (document: Document): void => {\n if (installedDocuments.has(document)) {\n return;\n }\n\n const FontFaceConstructor = document.defaultView?.FontFace;\n if (!FontFaceConstructor || !document.fonts) {\n return;\n }\n\n const faces = fieldManualFontAssets.map(\n ({ family, weight, url }) =>\n new FontFaceConstructor(family, `url(${JSON.stringify(url)}) format(\"woff2\")`, {\n display: \"swap\",\n style: \"normal\",\n weight,\n }),\n );\n for (const face of faces) {\n document.fonts.add(face);\n }\n installedDocuments.add(document);\n};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