jbx 2.12.0 → 2.13.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
CHANGED
|
@@ -73,3 +73,18 @@ npm run dev # rebuild on change
|
|
|
73
73
|
npm run typecheck
|
|
74
74
|
npm test # renders every export, fails on any React warning
|
|
75
75
|
```
|
|
76
|
+
|
|
77
|
+
## Publish
|
|
78
|
+
|
|
79
|
+
New versions are published to npm automatically when they reach `main`. A push whose
|
|
80
|
+
version is already on npm succeeds without publishing again.
|
|
81
|
+
|
|
82
|
+
1. Add the release notes to `CHANGELOG.md`.
|
|
83
|
+
2. Run `npm version minor --no-git-tag-version` to update `package.json`.
|
|
84
|
+
3. Run `npm test`.
|
|
85
|
+
4. Commit the changes and push them to `main`.
|
|
86
|
+
5. Confirm the **Publish package** workflow succeeds, then check the version with
|
|
87
|
+
`npm view jbx version`.
|
|
88
|
+
|
|
89
|
+
Publishing uses npm trusted publishing through GitHub Actions. It does not require an
|
|
90
|
+
npm token in the repository.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MoreExperiments.d.ts","sourceRoot":"","sources":["../../src/components/MoreExperiments.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"MoreExperiments.d.ts","sourceRoot":"","sources":["../../src/components/MoreExperiments.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AA6DxC,KAAK,oBAAoB,GAAG;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,EAAE,oBAAoB,qBAgChE"}
|
|
@@ -35,13 +35,17 @@ const PROJECT_DATA = [
|
|
|
35
35
|
name: 'Cohesive Colors',
|
|
36
36
|
description: 'Tool that can help you to create cohesive color palettes',
|
|
37
37
|
url: 'https://javier.xyz/cohesive-colors'
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'img2css',
|
|
41
|
+
description: 'Tool that can convert any image into a pure CSS image',
|
|
42
|
+
url: 'https://javier.xyz/img2css'
|
|
38
43
|
}
|
|
39
44
|
];
|
|
40
45
|
const maxItems = 5;
|
|
41
|
-
//
|
|
42
|
-
//
|
|
43
|
-
//
|
|
44
|
-
// site always renders the same slice — no hydration mismatch, no build-to-build churn.
|
|
46
|
+
// Fallback offset for a site that isn't in PROJECT_DATA itself. Derived from the site's
|
|
47
|
+
// own name rather than randomized, so it always renders the same slice — no hydration
|
|
48
|
+
// mismatch, no build-to-build churn.
|
|
45
49
|
function seedFor(key) {
|
|
46
50
|
let hash = 0;
|
|
47
51
|
for (let idx = 0; idx < key.length; idx++) {
|
|
@@ -50,10 +54,15 @@ function seedFor(key) {
|
|
|
50
54
|
return Math.abs(hash);
|
|
51
55
|
}
|
|
52
56
|
export function MoreExperiments({ exclude }) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
const
|
|
57
|
+
// A site listed in PROJECT_DATA links to the maxItems entries that follow it. Since
|
|
58
|
+
// every site starts one step further along, each project ends up linked from the same
|
|
59
|
+
// number of sites, instead of the first maxItems entries being the only ones to show up.
|
|
60
|
+
const selfIdx = exclude
|
|
61
|
+
? PROJECT_DATA.findIndex((project) => project.url.includes(exclude))
|
|
62
|
+
: -1;
|
|
63
|
+
const projects = selfIdx === -1 ? PROJECT_DATA : PROJECT_DATA.filter((_0, idx) => idx !== selfIdx);
|
|
64
|
+
// Dropping self shifts the tail left by one, so this index is already the next project.
|
|
65
|
+
const seed = selfIdx === -1 ? (exclude ? seedFor(exclude) : 0) : selfIdx;
|
|
57
66
|
const items = new Array(Math.min(maxItems, projects.length)).fill('').map((_0, idx) => {
|
|
58
67
|
const project = projects[(seed + idx) % projects.length];
|
|
59
68
|
return (React.createElement(Li, { key: project.url },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MoreExperiments.js","sourceRoot":"","sources":["../../src/components/MoreExperiments.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,MAAM,kBAAkB,CAAC;AAE1D,MAAM,YAAY,GAAG;IACnB;QACE,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,6DAA6D;QAC1E,GAAG,EAAE,0BAA0B;KAChC;IACD;QACE,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,2DAA2D;QACxE,GAAG,EAAE,kCAAkC;KACxC;IACD;QACE,IAAI,EAAE,WAAW;QACjB,WAAW,EACT,wFAAwF;QAC1F,GAAG,EAAE,uBAAuB;KAC7B;IACD;QACE,IAAI,EAAE,SAAS;QACf,WAAW,EACT,2FAA2F;QAC7F,GAAG,EAAE,4BAA4B;KAClC;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,gDAAgD;QAC7D,GAAG,EAAE,mCAAmC;KACzC;IACD;QACE,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,6EAA6E;QAC1F,GAAG,EAAE,qBAAqB;KAC3B;IACD;QACE,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,0DAA0D;QACvE,GAAG,EAAE,oCAAoC;KAC1C;CACO,CAAC;AAEX,MAAM,QAAQ,GAAG,CAAC,CAAC;AAEnB,
|
|
1
|
+
{"version":3,"file":"MoreExperiments.js","sourceRoot":"","sources":["../../src/components/MoreExperiments.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,MAAM,kBAAkB,CAAC;AAE1D,MAAM,YAAY,GAAG;IACnB;QACE,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,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AAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -38,15 +38,19 @@ const PROJECT_DATA = [
|
|
|
38
38
|
name: 'Cohesive Colors',
|
|
39
39
|
description: 'Tool that can help you to create cohesive color palettes',
|
|
40
40
|
url: 'https://javier.xyz/cohesive-colors'
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'img2css',
|
|
44
|
+
description: 'Tool that can convert any image into a pure CSS image',
|
|
45
|
+
url: 'https://javier.xyz/img2css'
|
|
41
46
|
}
|
|
42
47
|
] as const;
|
|
43
48
|
|
|
44
49
|
const maxItems = 5;
|
|
45
50
|
|
|
46
|
-
//
|
|
47
|
-
//
|
|
48
|
-
//
|
|
49
|
-
// site always renders the same slice — no hydration mismatch, no build-to-build churn.
|
|
51
|
+
// Fallback offset for a site that isn't in PROJECT_DATA itself. Derived from the site's
|
|
52
|
+
// own name rather than randomized, so it always renders the same slice — no hydration
|
|
53
|
+
// mismatch, no build-to-build churn.
|
|
50
54
|
function seedFor(key: string) {
|
|
51
55
|
let hash = 0;
|
|
52
56
|
for (let idx = 0; idx < key.length; idx++) {
|
|
@@ -60,11 +64,18 @@ type MoreExperimentsProps = {
|
|
|
60
64
|
};
|
|
61
65
|
|
|
62
66
|
export function MoreExperiments({ exclude }: MoreExperimentsProps) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
67
|
+
// A site listed in PROJECT_DATA links to the maxItems entries that follow it. Since
|
|
68
|
+
// every site starts one step further along, each project ends up linked from the same
|
|
69
|
+
// number of sites, instead of the first maxItems entries being the only ones to show up.
|
|
70
|
+
const selfIdx = exclude
|
|
71
|
+
? PROJECT_DATA.findIndex((project) => project.url.includes(exclude))
|
|
72
|
+
: -1;
|
|
73
|
+
|
|
74
|
+
const projects =
|
|
75
|
+
selfIdx === -1 ? PROJECT_DATA : PROJECT_DATA.filter((_0, idx) => idx !== selfIdx);
|
|
66
76
|
|
|
67
|
-
|
|
77
|
+
// Dropping self shifts the tail left by one, so this index is already the next project.
|
|
78
|
+
const seed = selfIdx === -1 ? (exclude ? seedFor(exclude) : 0) : selfIdx;
|
|
68
79
|
|
|
69
80
|
const items = new Array(Math.min(maxItems, projects.length)).fill('').map((_0, idx) => {
|
|
70
81
|
const project = projects[(seed + idx) % projects.length];
|