@artstorefronts/arthelper-nav 0.1.0-alpha.0 → 0.1.0-alpha.1
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 +8 -15
- package/dist/fallback.d.ts +20 -6
- package/dist/fallback.d.ts.map +1 -1
- package/dist/fallback.js +41 -7
- package/dist/fallback.js.map +1 -1
- package/dist/index.css +13 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,21 +31,13 @@ Peer dependencies (from `package.json` — install these yourself, they are not
|
|
|
31
31
|
}
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
> **
|
|
35
|
-
>
|
|
36
|
-
> `
|
|
37
|
-
>
|
|
38
|
-
>
|
|
34
|
+
> **Getting a change released.** There is no tag and no manual release step: bump the
|
|
35
|
+
> version in `packages/nav/package.json` in the PR that changes the package, and merging
|
|
36
|
+
> to `develop` publishes it. CI publishes only when that version is absent from the
|
|
37
|
+
> registry, and a PR that changes the published surface while leaving the version alone
|
|
38
|
+
> fails its own check — so a change cannot quietly land without reaching you.
|
|
39
39
|
>
|
|
40
|
-
>
|
|
41
|
-
> `@artstorefronts/cli`). What is still missing is a **trusted publisher** configured on
|
|
42
|
-
> npm for this package, pointing at this repository and the workflow filename
|
|
43
|
-
> `release-nav.yml`. Authentication is OIDC, so there is no token to create or rotate.
|
|
44
|
-
> Until that is configured, `npm install @artstorefronts/arthelper-nav` has nothing to
|
|
45
|
-
> resolve.
|
|
46
|
-
>
|
|
47
|
-
> To develop against it before the first publish, use a workspace link or a path
|
|
48
|
-
> dependency from the satellite repo:
|
|
40
|
+
> **Testing an unreleased change.** Link the workspace, or use a path dependency:
|
|
49
41
|
>
|
|
50
42
|
> ```bash
|
|
51
43
|
> cd packages/nav && yarn link
|
|
@@ -54,7 +46,8 @@ Peer dependencies (from `package.json` — install these yourself, they are not
|
|
|
54
46
|
>
|
|
55
47
|
> `react` and `react-dom` are peer dependencies, so make sure the satellite's bundler
|
|
56
48
|
> resolves a single copy of React — a linked package pulling in its own is the usual
|
|
57
|
-
> cause of the duplicate-React hooks error.
|
|
49
|
+
> cause of the duplicate-React hooks error. `npm pack` plus installing the tarball avoids
|
|
50
|
+
> that failure mode entirely and resolves more like the real thing.
|
|
58
51
|
|
|
59
52
|
## Minimal mounting example
|
|
60
53
|
|
package/dist/fallback.d.ts
CHANGED
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
import type { NavConfigPayload } from './types.js';
|
|
2
2
|
/**
|
|
3
|
-
* The static config compiled into the package. Used whenever the fetch fails,
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* The static config compiled into the package. Used whenever the fetch fails, times out,
|
|
4
|
+
* or has not resolved yet, so the bar reserves its final 56px from first paint and never
|
|
5
|
+
* renders blank.
|
|
6
6
|
*
|
|
7
|
-
* It carries
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* It carries the WHOLE catalog, not just the enabled entries, and that is load-bearing
|
|
8
|
+
* rather than tidiness. A host's own `activeAppId` entry is always rendered and indicated,
|
|
9
|
+
* resolved from this list when the payload omits it — so a satellite whose id is missing
|
|
10
|
+
* here loses its chip entirely during an endpoint outage, and with it any indication of
|
|
11
|
+
* where the user is and anything for NavTrigger to dock. Every app that can mount the bar
|
|
12
|
+
* needs an entry, whether or not it is currently switched on.
|
|
13
|
+
*
|
|
14
|
+
* `enabled` here still governs what renders: the same enabled-and-has-destination filter
|
|
15
|
+
* runs against this list as against the fetched payload, so a disabled entry contributes
|
|
16
|
+
* its label, icon, order and destination without appearing as a tile.
|
|
17
|
+
*
|
|
18
|
+
* These are the production domains, which is why they can live in compiled code at all.
|
|
19
|
+
* Changing this list requires a package release, so it is deliberately the stable
|
|
20
|
+
* first-party set — anything situational (a stage host, a locally-run satellite) belongs
|
|
21
|
+
* in the config row, where an admin can edit it without a release. `enabled` states drift
|
|
22
|
+
* from the row over time; that is expected and harmless, since the row wins whenever the
|
|
23
|
+
* endpoint is reachable.
|
|
10
24
|
*/
|
|
11
25
|
declare const FALLBACK_CONFIG: NavConfigPayload;
|
|
12
26
|
export { FALLBACK_CONFIG };
|
package/dist/fallback.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fallback.d.ts","sourceRoot":"","sources":["../src/fallback.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD
|
|
1
|
+
{"version":3,"file":"fallback.d.ts","sourceRoot":"","sources":["../src/fallback.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,QAAA,MAAM,eAAe,EAAE,gBAyBtB,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
package/dist/fallback.js
CHANGED
|
@@ -1,17 +1,51 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The static config compiled into the package. Used whenever the fetch fails,
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* The static config compiled into the package. Used whenever the fetch fails, times out,
|
|
3
|
+
* or has not resolved yet, so the bar reserves its final 56px from first paint and never
|
|
4
|
+
* renders blank.
|
|
5
5
|
*
|
|
6
|
-
* It carries
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* It carries the WHOLE catalog, not just the enabled entries, and that is load-bearing
|
|
7
|
+
* rather than tidiness. A host's own `activeAppId` entry is always rendered and indicated,
|
|
8
|
+
* resolved from this list when the payload omits it — so a satellite whose id is missing
|
|
9
|
+
* here loses its chip entirely during an endpoint outage, and with it any indication of
|
|
10
|
+
* where the user is and anything for NavTrigger to dock. Every app that can mount the bar
|
|
11
|
+
* needs an entry, whether or not it is currently switched on.
|
|
12
|
+
*
|
|
13
|
+
* `enabled` here still governs what renders: the same enabled-and-has-destination filter
|
|
14
|
+
* runs against this list as against the fetched payload, so a disabled entry contributes
|
|
15
|
+
* its label, icon, order and destination without appearing as a tile.
|
|
16
|
+
*
|
|
17
|
+
* These are the production domains, which is why they can live in compiled code at all.
|
|
18
|
+
* Changing this list requires a package release, so it is deliberately the stable
|
|
19
|
+
* first-party set — anything situational (a stage host, a locally-run satellite) belongs
|
|
20
|
+
* in the config row, where an admin can edit it without a release. `enabled` states drift
|
|
21
|
+
* from the row over time; that is expected and harmless, since the row wins whenever the
|
|
22
|
+
* endpoint is reachable.
|
|
9
23
|
*/
|
|
10
24
|
const FALLBACK_CONFIG = {
|
|
11
25
|
schema_version: 1,
|
|
12
26
|
theme: { mode: 'dark', accent_color: '#2aa34f', alignment: 'left' },
|
|
13
27
|
logo: { label: 'ArtHelper', href: 'https://www.arthelper.com' },
|
|
14
|
-
apps: [
|
|
28
|
+
apps: [
|
|
29
|
+
{ id: 'home', label: 'Home', icon: 'house', href: 'https://www.arthelper.com/community', enabled: true },
|
|
30
|
+
{ id: 'the-daily', label: 'The Daily', icon: 'sunrise', href: 'https://thedaily.arthelper.com', enabled: false },
|
|
31
|
+
{ id: 'art-review', label: 'Art Review', icon: 'star', href: 'https://artreview.arthelper.com', enabled: true },
|
|
32
|
+
{
|
|
33
|
+
id: 'creative-sparks',
|
|
34
|
+
label: 'Creative Sparks',
|
|
35
|
+
icon: 'sparkles',
|
|
36
|
+
href: 'https://sparks.arthelper.com',
|
|
37
|
+
enabled: false,
|
|
38
|
+
},
|
|
39
|
+
{ id: 'mockups', label: 'Mockups', icon: 'frame', href: 'https://mockups.arthelper.com', enabled: false },
|
|
40
|
+
{ id: 'art-books', label: 'Art Books', icon: 'book-open', href: 'https://artbooks.arthelper.com', enabled: false },
|
|
41
|
+
{
|
|
42
|
+
id: 'social-posting',
|
|
43
|
+
label: 'Social Posting',
|
|
44
|
+
icon: 'megaphone',
|
|
45
|
+
href: 'https://copilot.arthelper.com',
|
|
46
|
+
enabled: false,
|
|
47
|
+
},
|
|
48
|
+
],
|
|
15
49
|
};
|
|
16
50
|
export { FALLBACK_CONFIG };
|
|
17
51
|
//# sourceMappingURL=fallback.js.map
|
package/dist/fallback.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fallback.js","sourceRoot":"","sources":["../src/fallback.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"fallback.js","sourceRoot":"","sources":["../src/fallback.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,eAAe,GAAqB;IACxC,cAAc,EAAE,CAAC;IACjB,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE;IACnE,IAAI,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,2BAA2B,EAAE;IAC/D,IAAI,EAAE;QACJ,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,qCAAqC,EAAE,OAAO,EAAE,IAAI,EAAE;QACxG,EAAE,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,gCAAgC,EAAE,OAAO,EAAE,KAAK,EAAE;QAChH,EAAE,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,iCAAiC,EAAE,OAAO,EAAE,IAAI,EAAE;QAC/G;YACE,EAAE,EAAE,iBAAiB;YACrB,KAAK,EAAE,iBAAiB;YACxB,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,8BAA8B;YACpC,OAAO,EAAE,KAAK;SACf;QACD,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,+BAA+B,EAAE,OAAO,EAAE,KAAK,EAAE;QACzG,EAAE,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,gCAAgC,EAAE,OAAO,EAAE,KAAK,EAAE;QAClH;YACE,EAAE,EAAE,gBAAgB;YACpB,KAAK,EAAE,gBAAgB;YACvB,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,+BAA+B;YACrC,OAAO,EAAE,KAAK;SACf;KACF;CACF,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
package/dist/index.css
CHANGED
|
@@ -200,8 +200,20 @@
|
|
|
200
200
|
gap: 4px;
|
|
201
201
|
align-items: center;
|
|
202
202
|
justify-content: var(--ahsuite-tiles-justify);
|
|
203
|
+
/* Grow into the row's leftover space. Without this the row is sized to its own
|
|
204
|
+
* content, so `justify-content` has nothing to distribute and `alignment: centered`
|
|
205
|
+
* renders identically to `left` — the variable was set correctly all along, the
|
|
206
|
+
* layout simply could not express it. `min-width: 0` lets the row shrink below its
|
|
207
|
+
* content so `overflow: hidden` clips rather than overflowing a narrow bar. */
|
|
208
|
+
flex: 1 1 auto;
|
|
209
|
+
min-width: 0;
|
|
203
210
|
overflow: hidden;
|
|
204
|
-
|
|
211
|
+
/* 100%, not a fixed cap. This is the property the collapse animates (to 0), so it has
|
|
212
|
+
* to stay — but a 1200px cap stopped the row growing on a wide viewport, which left
|
|
213
|
+
* `alignment: centered` visibly left-of-centre (546px out at 2560px wide). The cap was
|
|
214
|
+
* invisible while the row was content-sized and never affected the left-aligned case,
|
|
215
|
+
* since tiles sit left whatever the row's width. */
|
|
216
|
+
max-width: 100%;
|
|
205
217
|
opacity: 1;
|
|
206
218
|
transform: translateY(0);
|
|
207
219
|
transition:
|
package/package.json
CHANGED