@johnmorrisdotca/fuda-cards 0.10.1 → 0.12.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/LICENSE +21 -0
- package/NOTICE.md +16 -0
- package/README.md +106 -33
- package/dist/binder.d.ts +4 -6
- package/dist/binder.js +32 -23
- package/dist/card-markup.d.ts +2 -0
- package/dist/card-markup.js +59 -0
- package/dist/card-options.d.ts +131 -0
- package/dist/card-options.js +48 -0
- package/dist/card-styles.d.ts +2 -0
- package/dist/card-styles.js +314 -0
- package/dist/choice.d.ts +1 -1
- package/dist/choice.js +27 -23
- package/dist/collection-address.d.ts +8 -0
- package/dist/collection-address.js +52 -0
- package/dist/collection-binder-view.d.ts +9 -0
- package/dist/collection-binder-view.js +123 -0
- package/dist/collection-controls.d.ts +2 -0
- package/dist/collection-controls.js +143 -0
- package/dist/collection-deck.d.ts +11 -0
- package/dist/collection-deck.js +165 -0
- package/dist/collection-dialog.d.ts +2 -0
- package/dist/collection-dialog.js +28 -0
- package/dist/collection-element.d.ts +36 -67
- package/dist/collection-element.js +283 -484
- package/dist/collection-host.d.ts +5 -0
- package/dist/collection-host.js +1 -0
- package/dist/collection-icons.d.ts +3 -0
- package/dist/collection-icons.js +19 -0
- package/dist/collection-motion.d.ts +11 -0
- package/dist/collection-motion.js +72 -0
- package/dist/collection-styles.d.ts +4 -0
- package/dist/collection-styles.js +336 -0
- package/dist/collection-views.d.ts +8 -0
- package/dist/collection-views.js +8 -0
- package/dist/collection.d.ts +154 -11
- package/dist/collection.js +140 -34
- package/dist/element-define.d.ts +2 -0
- package/dist/element-define.js +3 -0
- package/dist/element.d.ts +20 -1
- package/dist/element.js +289 -98
- package/dist/index.d.ts +9 -52
- package/dist/index.js +5 -5
- package/dist/live-3d.d.ts +87 -4
- package/dist/live-3d.js +120 -52
- package/dist/materials.d.ts +117 -6
- package/dist/materials.js +246 -28
- package/dist/motion.d.ts +2 -0
- package/dist/motion.js +4 -0
- package/dist/pile-card.js +138 -91
- package/dist/pile.d.ts +61 -8
- package/dist/pile.js +89 -29
- package/dist/stack.d.ts +42 -6
- package/dist/stack.js +28 -3
- package/dist/version.d.ts +11 -0
- package/dist/version.js +11 -0
- package/dist/wear.d.ts +147 -9
- package/dist/wear.js +273 -89
- package/dist/zoom.d.ts +1 -1
- package/dist/zoom.js +73 -42
- package/docs/API.md +138 -134
- package/docs/collection-displays.md +4 -4
- package/docs/collection-input.md +5 -5
- package/docs/framework-integration.md +1 -1
- package/docs/guides/architecture.md +8 -8
- package/docs/guides/bundlers.md +60 -0
- package/docs/guides/card-element.md +26 -2
- package/docs/guides/collections.md +2 -2
- package/docs/guides/embed-in-an-iframe.md +39 -0
- package/docs/guides/frameworks.md +93 -66
- package/docs/guides/getting-started.md +4 -2
- package/docs/guides/html-and-cdn.md +86 -0
- package/docs/guides/ja/architecture.md +4 -4
- package/docs/guides/ja/bundlers.md +60 -0
- package/docs/guides/ja/card-element.md +26 -2
- package/docs/guides/ja/collections.md +2 -2
- package/docs/guides/ja/embed-in-an-iframe.md +39 -0
- package/docs/guides/ja/frameworks.md +93 -66
- package/docs/guides/ja/getting-started.md +4 -2
- package/docs/guides/ja/html-and-cdn.md +86 -0
- package/docs/guides/ja/live-3d.md +37 -24
- package/docs/guides/ja/materials-and-stacks.md +4 -4
- package/docs/guides/ja/troubleshooting.md +2 -2
- package/docs/guides/ja/typescript-and-node.md +45 -0
- package/docs/guides/ja/upgrading.md +7 -2
- package/docs/guides/ja/wear.md +1 -1
- package/docs/guides/live-3d.md +37 -24
- package/docs/guides/materials-and-stacks.md +4 -4
- package/docs/guides/troubleshooting.md +2 -2
- package/docs/guides/typescript-and-node.md +45 -0
- package/docs/guides/upgrading.md +7 -2
- package/docs/guides/wear.md +1 -1
- package/docs/live-3d.md +1 -18
- package/docs/materials.md +15 -11
- package/docs/wear.md +4 -12
- package/package.json +57 -10
|
@@ -21,7 +21,7 @@ description: カードが空白、画像がちらつく、コレクションが
|
|
|
21
21
|
|
|
22
22
|
## 「HTMLElement is not defined」
|
|
23
23
|
|
|
24
|
-
`element`か`collection-element`をサーバーでインポートしています。これらは評価時に`HTMLElement`を継承します。ブラウザーだけでインポートしてください([
|
|
24
|
+
`element`か`collection-element`をサーバーでインポートしています。これらは評価時に`HTMLElement`を継承します。ブラウザーだけでインポートしてください([HTMLとCDN](html-and-cdn.md)と[バンドラー](bundlers.md)を参照)。メインのエントリーと`@johnmorrisdotca/fuda-cards/collection`は、サーバーでも安全です。
|
|
25
25
|
|
|
26
26
|
## コレクションに何も表示されない
|
|
27
27
|
|
|
@@ -29,7 +29,7 @@ description: カードが空白、画像がちらつく、コレクションが
|
|
|
29
29
|
|
|
30
30
|
## ズームバーがない、またはコンソールに`@johnmorrisdotca/kazoku-ui/view-controls/define`を解決できないと出る
|
|
31
31
|
|
|
32
|
-
バンドラーのないページでは、コレクションにその名前のインポートマップが要ります([
|
|
32
|
+
バンドラーのないページでは、コレクションにその名前のインポートマップが要ります([HTMLとCDN](html-and-cdn.md)を参照)。カード1枚の`<fuda-card>`には要りません。
|
|
33
33
|
|
|
34
34
|
## 角度、傾き、自動回転が出ない
|
|
35
35
|
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: TypeScriptとNode
|
|
3
|
+
section: how-to
|
|
4
|
+
order: 13
|
|
5
|
+
description: すべての設定の型と、DOMのないサーバーでも動く表、計算、配置を説明します。
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
パッケージは自分の型を同梱しています。`CardOptions`はカードのすべての設定の型で、`cardAttributes(options)`がそれを属性にし、素材、山の枚数、傷みの段階の表はただのデータです。名前や値の間違いはビルド時のエラーになります。下の例の最後の行は、わざとそのエラーにしてあります。
|
|
9
|
+
|
|
10
|
+
```ts
|
|
11
|
+
import {
|
|
12
|
+
type CardMaterial,
|
|
13
|
+
type CardOptions,
|
|
14
|
+
cardAttributes,
|
|
15
|
+
cardMaterial,
|
|
16
|
+
stackHeightMm,
|
|
17
|
+
wearPresets,
|
|
18
|
+
} from "@johnmorrisdotca/fuda-cards";
|
|
19
|
+
|
|
20
|
+
const options: CardOptions = { title: "Explorer One", material: "paper-310-black-core", stack: 52, wear: "near-mint" };
|
|
21
|
+
const stock: CardMaterial | undefined = cardMaterial(options.material);
|
|
22
|
+
console.log(stock?.name, stackHeightMm(options.stack ?? 1, stock?.thicknessMm ?? 0.325));
|
|
23
|
+
console.log(Object.keys(cardAttributes(options)).join(" "), wearPresets.length);
|
|
24
|
+
|
|
25
|
+
// @ts-expect-error "neon" is not a look
|
|
26
|
+
cardAttributes({ variant: "neon" });
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## サーバーで
|
|
30
|
+
|
|
31
|
+
メインのエントリー`@johnmorrisdotca/fuda-cards`、コレクションの補助関数(`/collection`)、配置の関数は、ブラウザーなしで動きます。要素は`HTMLElement`を継承するので、クライアント側だけでインポートしてください([フレームワーク](frameworks.md)を見てください)。
|
|
32
|
+
|
|
33
|
+
```js
|
|
34
|
+
import { cardMaterials, stackHeightMm, stackLayout, wearLayout, wearPreset } from "@johnmorrisdotca/fuda-cards";
|
|
35
|
+
|
|
36
|
+
// The tables and the maths run on a server too: nothing here touches a browser.
|
|
37
|
+
const black = cardMaterials.find((material) => material.id === "paper-310-black-core");
|
|
38
|
+
console.log(stackHeightMm(52, black.thicknessMm));
|
|
39
|
+
console.log(stackLayout(52, { seed: 7 }).length);
|
|
40
|
+
console.log(wearLayout(wearPreset("damaged").levels, 3).front.creases.length > 0);
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## 副作用のない部分
|
|
44
|
+
|
|
45
|
+
山の配置と傷みの配置は、数字とシードだけで決まる純粋な関数です。同じシードなら、Nodeでもブラウザーでもいつでも同じ山と同じ傷になるので、カードの見た目は、設定とシードとして書き残せます。
|
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
title: アップグレード
|
|
3
3
|
section: upgrading
|
|
4
4
|
order: 13
|
|
5
|
-
description: 0.1から0.
|
|
5
|
+
description: 0.1から0.11までの変更と、以前のバージョンの設定を引き継ぐ方法を説明します。
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
このパッケージは初期開発中(0.x)で、マイナーリリースごとにインターフェースが増えることがあります。このページには、対応が必要なものだけを書きます。日付つきの完全な記録は[変更履歴](../../../CHANGELOG.md)にあります。
|
|
9
9
|
|
|
10
|
+
## 0.11へ
|
|
11
|
+
|
|
12
|
+
- カードの初期の厚みは0.3 mmから0.325 mmになりました。以前の厚みを使うには`thickness="0.3"`を指定します。初期設定で52枚を重ねた山の高さは16.9 mmです。
|
|
13
|
+
- `@johnmorrisdotca/kazoku-ui`は`^0.12.0`になりました。インポートマップで以前のバージョンを指定している場合は、kazoku-uiのURLを更新してください。[HTMLとCDN](html-and-cdn.md)
|
|
14
|
+
|
|
10
15
|
## 0.10へ
|
|
11
16
|
|
|
12
17
|
- `@johnmorrisdotca/kazoku-ui`は`^0.10.0`です。ズームバーは、本当のズーム値を1つの数字(`1.3×`)で示すようになりました。以前の`2×`は数字のように見えるプリセットでした。数字を押すとFitに戻ります。バーの基本は、角度、自動回転、ズーム、Fitで、**More**で傾き、正面、矢印パッドが加わります。
|
|
@@ -41,7 +46,7 @@ description: 0.1から0.10まで、各バージョンで対応が必要な変更
|
|
|
41
46
|
|
|
42
47
|
## 0.2へ
|
|
43
48
|
|
|
44
|
-
- **`@johnmorrisdotca/kazoku-ui`は実行時の依存になりました。** バンドラーのないページでは、`@johnmorrisdotca/kazoku-ui/view-controls/define`のインポートマップが要ります。[
|
|
49
|
+
- **`@johnmorrisdotca/kazoku-ui`は実行時の依存になりました。** バンドラーのないページでは、`@johnmorrisdotca/kazoku-ui/view-controls/define`のインポートマップが要ります。[HTMLとCDN](html-and-cdn.md)と[バンドラー](bundlers.md)を参照してください。
|
|
45
50
|
- `<fuda-collection>`の`address`属性が、表示の状態をページのURLに保ちます。
|
|
46
51
|
|
|
47
52
|
## アップグレードの確認
|
package/docs/guides/ja/wear.md
CHANGED
|
@@ -60,4 +60,4 @@ console.log(wearLevels({ wear: 'perfect' }));
|
|
|
60
60
|
| 変色としみ | 縁に向かう黄褐色の暗がり。強く使うと柔らかいしみ。 | `lightly-played`以上 |
|
|
61
61
|
| 中心ずれ | 印刷が、幅300 pxで最大横7 px、縦5 pxずれる。 | すべて |
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
プリセットは描画の設定です。[摩耗の資料](../../wear.md)(英語)に、各プリセットの値と、TCGplayerの販売時の状態区分やPSAのグレード基準へのリンクがあります。コレクションの画像や、山の一番上より下のカードには元の画像や枠がそのまま表示されます。
|
package/docs/guides/live-3d.md
CHANGED
|
@@ -11,26 +11,48 @@ A shelf of fifty cards cannot each hold a WebGL context: every card live was mea
|
|
|
11
11
|
|
|
12
12
|
`three` is yours: an optional peer dependency (`>=0.160.0`), loaded by the function you give as `load` at the first focus.
|
|
13
13
|
|
|
14
|
-
```ts no-
|
|
15
|
-
import
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
```ts no-run
|
|
15
|
+
import '@johnmorrisdotca/fuda-cards/element';
|
|
16
|
+
import { type FudaCollection } from '@johnmorrisdotca/fuda-cards/collection-element';
|
|
17
|
+
import '@johnmorrisdotca/fuda-cards/collection-element';
|
|
18
|
+
import { createLiveCards, type LiveItem } from '@johnmorrisdotca/fuda-cards/live-3d';
|
|
18
19
|
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
const live = createLiveCards({ load: () => import('three') });
|
|
21
|
+
const block: LiveItem<typeof import('three')> = {
|
|
22
|
+
key: 'block',
|
|
23
|
+
build({ three, width, height }) {
|
|
22
24
|
const scene = new three.Scene();
|
|
23
|
-
const camera = new three.PerspectiveCamera(30, width / height, 0.01,
|
|
24
|
-
const
|
|
25
|
+
const camera = new three.PerspectiveCamera(30, width / height, 0.01, 100);
|
|
26
|
+
const geometry = new three.BoxGeometry(1, 2, 1);
|
|
27
|
+
const material = new three.MeshNormalMaterial();
|
|
28
|
+
const object = new three.Mesh(geometry, material);
|
|
25
29
|
scene.add(object);
|
|
26
30
|
camera.position.z = 5;
|
|
27
|
-
return {
|
|
31
|
+
return {
|
|
32
|
+
scene, camera, object,
|
|
33
|
+
resize(w, h) {
|
|
34
|
+
camera.aspect = w / h;
|
|
35
|
+
camera.updateProjectionMatrix();
|
|
36
|
+
},
|
|
37
|
+
dispose() {
|
|
38
|
+
geometry.dispose();
|
|
39
|
+
material.dispose();
|
|
40
|
+
},
|
|
41
|
+
};
|
|
28
42
|
},
|
|
29
43
|
};
|
|
30
44
|
|
|
31
|
-
const card = document.querySelector('fuda-card')
|
|
32
|
-
|
|
33
|
-
|
|
45
|
+
const card = document.querySelector<HTMLElement>('fuda-card');
|
|
46
|
+
if (card) {
|
|
47
|
+
card.tabIndex = 0;
|
|
48
|
+
live.add(card, block, { still: card.querySelector('img') ?? undefined });
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const collection = document.querySelector<FudaCollection>('fuda-collection');
|
|
52
|
+
if (collection) {
|
|
53
|
+
collection.cards = [{ id: 'block', name: 'Block', image: '/cards/block.jpg' }];
|
|
54
|
+
collection.live = { cards: live, item: (card) => card.id === 'block' ? block : undefined };
|
|
55
|
+
}
|
|
34
56
|
```
|
|
35
57
|
|
|
36
58
|
`item.build` returns a scene, a camera and `object`, the thing that turns about its upright axis. Take every geometry, material, texture and model through `assets.acquire` when several cards share them, so one copy is kept ([the shared renderer's guide](https://github.com/johnmorrisdotca/kazoku-ui/blob/main/docs/renderer.md) explains it).
|
|
@@ -51,16 +73,7 @@ Options: `turnSeconds` (12 seconds for a turn; 0 does not turn it), `dwellMs` (1
|
|
|
51
73
|
|
|
52
74
|
## In a collection
|
|
53
75
|
|
|
54
|
-
|
|
55
|
-
import '@johnmorrisdotca/fuda-cards/collection-element';
|
|
56
|
-
import { createLiveCards } from '@johnmorrisdotca/fuda-cards/live-3d';
|
|
57
|
-
|
|
58
|
-
const live = createLiveCards({ load: () => import('three') });
|
|
59
|
-
const collection = document.querySelector('fuda-collection') as HTMLElement & { live: unknown };
|
|
60
|
-
collection.live = { cards: live, item: (card: { id: string }) => ({ key: card.id, build: async () => { throw new Error('make your scene here'); } }) };
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
Every display then goes live on the card in focus.
|
|
76
|
+
The example uses one controller for a framed card and a collection. Add a `<fuda-card>` with a slotted still image or a `<fuda-collection>` to your page and replace `/cards/block.jpg` with the path to your poster. The `item` callback returns the scene for the matching id. Other items keep their pictures. Call `live.dispose()` when removing the viewer from the page.
|
|
64
77
|
|
|
65
78
|
## The rules
|
|
66
79
|
|
|
@@ -72,4 +85,4 @@ Every display then goes live on the card in focus.
|
|
|
72
85
|
|
|
73
86
|
## Budgets, held by a test
|
|
74
87
|
|
|
75
|
-
`pnpm test:freeze` (`test/e2e/live-3d.e2e.mjs`) holds these: 1 WebGL context over 30 focus changes, never more than one canvas; 0 draws, 0 frame requests and 0 frame callbacks over 2 seconds at rest; none while out of sight or in a hidden tab; GPU objects that do not grow after the first round; a canvas within 6 megapixels and 4096 a side on a 5120 by 2880 screen at ratio 2; and no `three`, renderer or model fetched before the first focus. `dist/live-3d.js` is
|
|
88
|
+
`pnpm test:freeze` (`test/e2e/live-3d.e2e.mjs`) holds these: 1 WebGL context over 30 focus changes, never more than one canvas; 0 draws, 0 frame requests and 0 frame callbacks over 2 seconds at rest; none while out of sight or in a hidden tab; GPU objects that do not grow after the first round; a canvas within 6 megapixels and 4096 a side on a 5120 by 2880 screen at ratio 2; and no `three`, renderer or model fetched before the first focus. `dist/live-3d.js` is 9.0 KB, 2.7 KB gzipped. The tests draw in software, so they prove the counts and nothing about a real GPU: frame times, driver behaviour and GPU memory are not measured. Try it in the [live 3D demo](https://johnmorrisdotca.github.io/fuda-cards/demo/live-3d.html).
|
|
@@ -11,7 +11,7 @@ A Fuda card has a thickness, and a stack of cards is as high as its count times
|
|
|
11
11
|
|
|
12
12
|
## Thickness
|
|
13
13
|
|
|
14
|
-
`thickness` is in millimetres. The default is `0.
|
|
14
|
+
`thickness` is in millimetres. The default is `0.325` (a playing card's black-core stock, 13 pt, exported as `DEFAULT_CARD_THICKNESS_MM`); `0` is a flat card. A `material` takes the thickness, and the edge colour, of a real stock, and `thickness` still overrides it.
|
|
15
15
|
|
|
16
16
|
```html
|
|
17
17
|
<script type="module">import '@johnmorrisdotca/fuda-cards/element';</script>
|
|
@@ -20,7 +20,7 @@ A Fuda card has a thickness, and a stack of cards is as high as its count times
|
|
|
20
20
|
<fuda-card title="Metal" material="steel-0.5"></fuda-card>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Fuda groups the materials into paper, plastic, thick trading-card stock and metal. The plastic choices include `plastic-pvc-0.31` for playing cards. The metal choices include `brass-0.5`, `copper-0.5` and `titanium-0.8`. The materials table lists each thickness and its source. [Sourced materials](../materials.md)
|
|
24
24
|
|
|
25
25
|
```ts
|
|
26
26
|
import { cardMaterials, mmPerPoint } from '@johnmorrisdotca/fuda-cards';
|
|
@@ -55,10 +55,10 @@ A card put on top of the stack moves none of those under it, because each card's
|
|
|
55
55
|
`stackPresets` are four counts with a source: two decks of playing cards (52 and 54), a Pokémon deck of 60 and a booster pack of 10. Work out the height of any pile in code without a card on the page:
|
|
56
56
|
|
|
57
57
|
```ts
|
|
58
|
-
import { cardMaterial, stackHeightMm, stackLayout, stackPresets } from '@johnmorrisdotca/fuda-cards';
|
|
58
|
+
import { cardMaterial, DEFAULT_CARD_THICKNESS_MM, stackHeightMm, stackLayout, stackPresets } from '@johnmorrisdotca/fuda-cards';
|
|
59
59
|
|
|
60
60
|
const stock = cardMaterial('paper-310-black-core');
|
|
61
|
-
console.log(stackHeightMm(52, stock?.thicknessMm ??
|
|
61
|
+
console.log(stackHeightMm(52, stock?.thicknessMm ?? DEFAULT_CARD_THICKNESS_MM));
|
|
62
62
|
console.log(stackPresets.map((preset) => preset.count).join(' '));
|
|
63
63
|
console.log(stackLayout(5, { messiness: 0, seed: 1 }).length);
|
|
64
64
|
// 16.9
|
|
@@ -21,7 +21,7 @@ The element is not registered. Check that `@johnmorrisdotca/fuda-cards/element`
|
|
|
21
21
|
|
|
22
22
|
## "HTMLElement is not defined"
|
|
23
23
|
|
|
24
|
-
You imported `element` or `collection-element` on a server. They extend `HTMLElement` when evaluated. Import them only in the browser (see [
|
|
24
|
+
You imported `element` or `collection-element` on a server. They extend `HTMLElement` when evaluated. Import them only in the browser (see [TypeScript and Node](typescript-and-node.md#on-a-server)). The main entry and `@johnmorrisdotca/fuda-cards/collection` are safe on a server.
|
|
25
25
|
|
|
26
26
|
## The collection shows nothing
|
|
27
27
|
|
|
@@ -29,7 +29,7 @@ You imported `element` or `collection-element` on a server. They extend `HTMLEle
|
|
|
29
29
|
|
|
30
30
|
## The zoom bar is missing, or the console says it cannot resolve `@johnmorrisdotca/kazoku-ui/view-controls/define`
|
|
31
31
|
|
|
32
|
-
On a page without a bundler the collection needs an import map for that name (see [
|
|
32
|
+
On a page without a bundler the collection needs an import map for that name (see [HTML and CDN](html-and-cdn.md#the-collection-and-live-3d-from-a-cdn)). The single `<fuda-card>` does not.
|
|
33
33
|
|
|
34
34
|
## Angle, Tilt and Auto-turn are not there
|
|
35
35
|
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: TypeScript and Node
|
|
3
|
+
section: how-to
|
|
4
|
+
order: 13
|
|
5
|
+
description: The types of every option, and the tables, the maths and the layouts that run on a server with no DOM.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
The package ships its own types. `CardOptions` types every setting of the card, `cardAttributes(options)` turns it into attributes, and the tables of materials, stack sizes and wear grades are plain data. A mistake in a name or a value is an error at build time; the last line of the example below is meant to be one.
|
|
9
|
+
|
|
10
|
+
```ts
|
|
11
|
+
import {
|
|
12
|
+
type CardMaterial,
|
|
13
|
+
type CardOptions,
|
|
14
|
+
cardAttributes,
|
|
15
|
+
cardMaterial,
|
|
16
|
+
stackHeightMm,
|
|
17
|
+
wearPresets,
|
|
18
|
+
} from "@johnmorrisdotca/fuda-cards";
|
|
19
|
+
|
|
20
|
+
const options: CardOptions = { title: "Explorer One", material: "paper-310-black-core", stack: 52, wear: "near-mint" };
|
|
21
|
+
const stock: CardMaterial | undefined = cardMaterial(options.material);
|
|
22
|
+
console.log(stock?.name, stackHeightMm(options.stack ?? 1, stock?.thicknessMm ?? 0.325));
|
|
23
|
+
console.log(Object.keys(cardAttributes(options)).join(" "), wearPresets.length);
|
|
24
|
+
|
|
25
|
+
// @ts-expect-error "neon" is not a look
|
|
26
|
+
cardAttributes({ variant: "neon" });
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## On a server
|
|
30
|
+
|
|
31
|
+
The main entry, `@johnmorrisdotca/fuda-cards`, the collection helpers (`/collection`) and the layouts need no browser. The elements extend `HTMLElement`, so import them only on the client (see [Frameworks](frameworks.md)).
|
|
32
|
+
|
|
33
|
+
```js
|
|
34
|
+
import { cardMaterials, stackHeightMm, stackLayout, wearLayout, wearPreset } from "@johnmorrisdotca/fuda-cards";
|
|
35
|
+
|
|
36
|
+
// The tables and the maths run on a server too: nothing here touches a browser.
|
|
37
|
+
const black = cardMaterials.find((material) => material.id === "paper-310-black-core");
|
|
38
|
+
console.log(stackHeightMm(52, black.thicknessMm));
|
|
39
|
+
console.log(stackLayout(52, { seed: 7 }).length);
|
|
40
|
+
console.log(wearLayout(wearPreset("damaged").levels, 3).front.creases.length > 0);
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## What is pure
|
|
44
|
+
|
|
45
|
+
The stack's layout and the wear's layout are pure functions of their numbers and a seed: the same seed lays the same stack and the same marks every time, in Node and in a browser, so a card's look can be written down as its settings and its seeds.
|
package/docs/guides/upgrading.md
CHANGED
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
title: Upgrading
|
|
3
3
|
section: upgrading
|
|
4
4
|
order: 13
|
|
5
|
-
description: What changed
|
|
5
|
+
description: What changed from 0.1 to 0.11 and how to keep settings from earlier versions.
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
The package is in early development (0.x), and each minor release can add to the interface. This page lists only what asks something of you. The complete record, dated, is in the [changelog](../../CHANGELOG.md).
|
|
9
9
|
|
|
10
|
+
## To 0.11
|
|
11
|
+
|
|
12
|
+
- The default card thickness is 0.325 mm, previously 0.3 mm. Set `thickness="0.3"` to keep the old thickness. A 52-card stack that uses the default is now 16.9 mm high.
|
|
13
|
+
- `@johnmorrisdotca/kazoku-ui` is now `^0.12.0`. Update the kazoku-ui URL if your import map pins an earlier version. See [HTML and CDN](html-and-cdn.md).
|
|
14
|
+
|
|
10
15
|
## To 0.10
|
|
11
16
|
|
|
12
17
|
- `@johnmorrisdotca/kazoku-ui` is `^0.10.0`. The zoom bar now shows one number, the true zoom (`1.3×`), where the old `2×` preset read like a number; a press on it goes back to Fit. The bar's basic level is angle, Auto-turn, zoom and Fit, and **More** adds tilt, Front and the arrow pad.
|
|
@@ -41,7 +46,7 @@ The package is in early development (0.x), and each minor release can add to the
|
|
|
41
46
|
|
|
42
47
|
## To 0.2
|
|
43
48
|
|
|
44
|
-
- **`@johnmorrisdotca/kazoku-ui` is a runtime dependency.** A page without a bundler needs an import map for `@johnmorrisdotca/kazoku-ui/view-controls/define`. See [
|
|
49
|
+
- **`@johnmorrisdotca/kazoku-ui` is a runtime dependency.** A page without a bundler needs an import map for `@johnmorrisdotca/kazoku-ui/view-controls/define`. See [HTML and CDN](html-and-cdn.md) and [Bundlers](bundlers.md).
|
|
45
50
|
- The `address` attribute on `<fuda-collection>` keeps the view's state in the page address.
|
|
46
51
|
|
|
47
52
|
## Checking an upgrade
|
package/docs/guides/wear.md
CHANGED
|
@@ -60,4 +60,4 @@ console.log(wearLevels({ wear: 'perfect' }));
|
|
|
60
60
|
| Toning and staining | A yellow-brown darkening towards the edges, and from heavy wear a soft stain. | `lightly-played` and up |
|
|
61
61
|
| Centering | The print sits off centre by up to 7 px across and 5 px down, at 300 px wide. | Any |
|
|
62
62
|
|
|
63
|
-
The
|
|
63
|
+
The presets control the drawing. [Wear reference](../wear.md) lists the settings and links to TCGplayer's marketplace conditions and PSA's grade descriptions. The collection viewer and the cards under the top of a stack use their original images or frames.
|
package/docs/live-3d.md
CHANGED
|
@@ -6,24 +6,7 @@ Why it exists: every card live was measured at 41 WebGL contexts (16 alive, the
|
|
|
6
6
|
|
|
7
7
|
## Use
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
import { createLiveCards } from '@johnmorrisdotca/fuda-cards/live-3d';
|
|
11
|
-
|
|
12
|
-
const live = createLiveCards({ load: () => import('three') }); // loads nothing yet
|
|
13
|
-
|
|
14
|
-
const rocket = {
|
|
15
|
-
key: 'rocket:starship', // cards with the same key share their pictures
|
|
16
|
-
async build({ three, assets, width, height }) {
|
|
17
|
-
const gltf = await assets.acquire('glb:starship', () => new GLTFLoader().loadAsync(url), (loading) => loading.then((g) => disposeDeep(g.scene)));
|
|
18
|
-
const object = gltf.scene.clone(true); // shares the geometry and the materials
|
|
19
|
-
const scene = new three.Scene(); scene.add(object /* and lights */);
|
|
20
|
-
const camera = new three.PerspectiveCamera(30, width / height, 0.01, 1000);
|
|
21
|
-
return { scene, camera, object, resize: (w, h) => { camera.aspect = w / h; camera.updateProjectionMatrix(); } };
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const off = live.add(card, rocket, { still: card.querySelector('img') });
|
|
26
|
-
```
|
|
9
|
+
The live 3D guide shows a complete scene, a single card and a collection. The rocket demo shows how to share loaded models. [Live 3D guide](guides/live-3d.md) · [Rocket demo source](../demo/live-3d.js)
|
|
27
10
|
|
|
28
11
|
- `add(card, item, { still })` works on a `<fuda-card>` or any element with a size, and gives back the function that takes it off. `still` is a picture the card already has: with one, the card costs no 3D code until it is in focus. Without one, the renderer makes its picture when the card comes within `lookAheadPx` of the view, one at a time.
|
|
29
12
|
- `item.build` is a kazoku-ui item plus `object`, what turns about its upright axis. Take every geometry, material, texture and model through `assets.acquire`.
|
package/docs/materials.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Card materials and stacks
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The table records nominal thicknesses from makers and published standards. Holder ratings are maximum capacities. The card sizes and material choices were first documented on 2026-11-02. The PVC and metal additions and updated sources were checked on 2026-12-06.
|
|
4
4
|
|
|
5
|
-
**Units.** `pt`
|
|
5
|
+
**Units.** Card stock uses `pt` for one thousandth of an inch, or 0.0254 mm. Convert point sizes by multiplying by 0.0254 mm per point. [NIST, SI Units — Length](https://www.nist.gov/pml/owm/si-units-length)
|
|
6
6
|
|
|
7
|
-
Use
|
|
7
|
+
Use `material="<id>"` to set the thickness and the edge colour. `thickness` in millimetres overrides the material, and `--fuda-edge` overrides the colour. The default without a material or thickness is 0.325 mm, the listed black-core playing-card thickness.
|
|
8
8
|
|
|
9
9
|
| id | Material | Thickness (mm) | Source | What the source says |
|
|
10
10
|
|---|---|---|---|---|
|
|
@@ -12,6 +12,7 @@ Use a material with `material="<id>"`. It sets the card's thickness and the colo
|
|
|
12
12
|
| `paper-310-black-core` | Playing-card stock, black core, 310 gsm (13 pt) | 0.325 | [Qin Printing, Custom Playing Card Printing](https://www.qinprinting.com/poker-card-printing/) | Black Core Paper, 310gsm, 0.325mm, 13pt |
|
|
13
13
|
| `paper-350` | Heavy card stock, 350 gsm (16 pt) | 0.405 | [Qin Printing, Custom Playing Card Printing](https://www.qinprinting.com/poker-card-printing/) | Premium Cardstock, 350gsm, 0.405mm, 16pt |
|
|
14
14
|
| `plastic-id1` | Plastic bank-size card (ID-1, PVC) | 0.76 | [ISO/IEC 7810 ID-1, as summarised on Wikipedia](https://en.wikipedia.org/wiki/ISO/IEC_7810) | "All card sizes have a thickness of 760±80 μm." Payment cards are generally PVC (Wikipedia, Payment card). |
|
|
15
|
+
| `plastic-pvc-0.31` | Matte PVC playing-card stock | 0.31 | [Kuo Kau Paper Products, Custom Plastic Poker Cards](https://www.kkplayingcard.com/en/product-713063/Custom-Plastic-Playing-Cards-with-P107-Poker-Size-Plastic-Box-Chocolate-Brand-Promotional-Tool-CPA027P107-A-CPA031P107-A.html) | White matte PVC, 0.31 mm. |
|
|
15
16
|
| `card-35pt` | Thick trading card, 35 pt | 0.889 | [Ultra PRO, 35PT ONE-TOUCH Magnetic Holder](https://ultrapro.com/products/35pt-uv-one-touch-magnetic-holders-5ct) | holds standard cards (2-1/2" x 3-1/2") up to 35pt in thickness |
|
|
16
17
|
| `card-55pt` | Thick trading card, 55 pt | 1.397 | [Ultra PRO, 55PT ONE-TOUCH Magnetic Holder](https://ultrapro.com/products/55pt-uv-one-touch-magnetic-holder) | holds standard cards (2-1/2" x 3-1/2") up to 55pt in thickness |
|
|
17
18
|
| `card-75pt` | Thick trading card, 75 pt | 1.905 | [Ultra PRO, 75PT ONE-TOUCH Magnetic Holder](https://ultrapro.com/products/75pt-uv-one-touch-magnetic-holder) | holds standard cards (2-1/2" x 3-1/2") up to 75pt in thickness |
|
|
@@ -19,19 +20,22 @@ Use a material with `material="<id>"`. It sets the card's thickness and the colo
|
|
|
19
20
|
| `card-130pt` | Thick trading card, 130 pt | 3.302 | [Ultra PRO, 130PT ONE-TOUCH Magnetic Holder](https://ultrapro.com/products/130pt-uv-one-touch-magnetic-holder) | holds standard cards (2-1/2" x 3-1/2") up to 130pt in thickness |
|
|
20
21
|
| `card-180pt` | Thick trading card, 180 pt | 4.572 | [Ultra PRO, 180PT ONE-TOUCH Magnetic Holder](https://ultrapro.com/products/180pt-uv-one-touch-magnetic-holder) | holds standard cards (2-1/2" x 3-1/2") up to 180pt in thickness |
|
|
21
22
|
| `booklet-175pt` | Booklet card, 175 pt | 4.445 | [Ultra PRO, 175PT Vertical Booklet Card ONE-TOUCH Magnetic Holder](https://ultrapro.com/products/175pt-vertical-booklet-card-uv-one-touch-magnetic-holder) | "Sized to fit Vertical Booklets up to 175pt thickness" |
|
|
22
|
-
| `aluminium-0.8` | Anodised aluminium card, 0.8 mm | 0.8 | [
|
|
23
|
+
| `aluminium-0.8` | Anodised aluminium card, 0.8 mm | 0.8 | [Foison Metal, Blank Metal Business Cards](https://www.foismetal.com/product/blank-metal-business-cards-wholesale/) | The maker lists anodised aluminium among the options for its 85 × 54 × 0.8 mm blanks. |
|
|
23
24
|
| `steel-0.5` | Stainless steel card, 0.5 mm | 0.5 | [My Metal Business Card, Metal Business Card Thickness Guide](https://mymetalbusinesscard.com/blog/metal-business-card-thickness-guide/) | "our standard metal business card thickness is 0.5mm"; "A 0.5mm stainless steel business card" |
|
|
25
|
+
| `brass-0.5` | Brass card | 0.5 | [Pure Metal Cards, Standard Brass Cards](https://www.puremetalcards.com/order-cards/brass-gold-cards/standard-brass-gold-cards/) | The maker lists brass as the metal and offers a 0.5 mm thickness. |
|
|
26
|
+
| `copper-0.5` | Copper card | 0.5 | [Pure Metal Cards, Copper Brushed Cards](https://www.puremetalcards.com/order-cards/copper-cards/copper-brushed-cards/) | The maker offers brushed copper cards in 0.5 mm. |
|
|
27
|
+
| `titanium-0.8` | Titanium card | 0.8 | [Pure Metal Cards, Brushed Titanium Cards](https://www.puremetalcards.com/order-cards/titanium-cards/brushed-titanium-cards/) | The maker specifies 0.8 mm for brushed titanium cards. |
|
|
24
28
|
|
|
25
29
|
How to read the table:
|
|
26
30
|
|
|
27
31
|
- The three paper stocks are a card printer's published calipers for playing-card and card stock. A real deck varies by maker and finish.
|
|
28
32
|
- The thick trading cards by point size (`card-35pt` to `card-180pt`) take the largest thickness Ultra PRO says its holder for that size holds ("up to"). A card sold as a given point size is at most that thick. A holder's limit is the maker's own number for a card of that size; it is not a measurement of one particular card.
|
|
29
|
-
- `plastic-id1` is the bank-card standard, 760 ± 80 µm
|
|
30
|
-
- The
|
|
33
|
+
- `plastic-id1` is the bank-card standard, 760 ± 80 µm. The PVC playing-card option has its own maker specification of 0.31 mm.
|
|
34
|
+
- The metal presets select one maker-listed thickness for each material. To use another thickness with the same edge colour, set `thickness` alongside `material`.
|
|
31
35
|
|
|
32
|
-
|
|
36
|
+
Patch or relic cards and graded-card slabs need a reliable measurement for the item itself before they can be added.
|
|
33
37
|
|
|
34
|
-
A
|
|
38
|
+
A 52-card stack of 250 gsm stock at 0.28 mm is about 14.6 mm high. The same stack in the default 0.325 mm black-core stock is 16.9 mm high.
|
|
35
39
|
|
|
36
40
|
## Stacks
|
|
37
41
|
|
|
@@ -39,10 +43,10 @@ A check on the paper numbers: 52 cards come to 52 x 0.28 = 14.6 mm (250 gsm), 52
|
|
|
39
43
|
|
|
40
44
|
| id | Preset | Cards | Source | What the source says |
|
|
41
45
|
|---|---|---|---|---|
|
|
42
|
-
| `deck-52` | Playing cards, 52 | 52 | [
|
|
43
|
-
| `deck-54` | Playing cards with two jokers, 54 | 54 | [
|
|
46
|
+
| `deck-52` | Playing cards, 52 | 52 | [Bicycle Cards, Basics of Poker](https://bicyclecards.com/how-to-play/basics-of-poker) | Standard poker pack. |
|
|
47
|
+
| `deck-54` | Playing cards with two jokers, 54 | 54 | [Bicycle Cards, Basics of Poker](https://bicyclecards.com/how-to-play/basics-of-poker) | Standard 52-card pack with two additional jokers. |
|
|
44
48
|
| `pokemon-deck` | Pokémon TCG deck, 60 | 60 | [Wikipedia, Pokémon Trading Card Game](https://en.wikipedia.org/wiki/Pok%C3%A9mon_Trading_Card_Game) | players "play with 60-card decks" |
|
|
45
|
-
| `pokemon-booster` | Booster pack, about 10 | 10 | [
|
|
49
|
+
| `pokemon-booster` | Booster pack, about 10 | 10 | [The Pokémon Company, Sun & Moon—Forbidden Light release](https://press.pokemon.com/en/releases/LATEST-EXPANSION-OF-THE-POKEMON-TRADING-CARD-GAME-SUN-MOONFORBIDDEN-LI) | A booster from this expansion has 10 expansion cards plus a Basic Energy card. The preset counts the expansion cards. |
|
|
46
50
|
|
|
47
51
|
How a stack is drawn (one 3D context, no loop):
|
|
48
52
|
|
package/docs/wear.md
CHANGED
|
@@ -20,19 +20,11 @@ In script: `card.wear = 'near-mint'`; the options object has `wear`, `wearSeed`,
|
|
|
20
20
|
|
|
21
21
|
## What real wear looks like, and where the words come from
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
TCGplayer uses five marketplace conditions from Near Mint through Damaged. Its overview describes how surface marks, edge wear and creases become more noticeable as the condition worsens. It also considers whether damage affects the card's structure. [TCGplayer, Card Conditioning Overview](https://help.tcgplayer.com/hc/en-us/articles/221430307-Card-Conditioning-Overview)
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
PSA's numbered grade descriptions use visible features such as corner sharpness, surface scratches, creases, staining and print centering. Its notes describe corners, edges, surface and centering as distinct areas to inspect. [PSA, Grading Standards](https://www.psacard.com/gradingstandards) · [PSA, Grader Notes](https://www.psacard.com/articles/articleview/11063/grader-notes-for-greater-clarity)
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
- **Lightly played**: "very slight corner rounding"; "edge whitening on one or two sides"; scratch lines "you'd only notice if you tilted the card".
|
|
29
|
-
- **Moderately played**: corners "clearly soft or rounded"; whitening "consistent around multiple sides"; "obvious scratch lines"; still no creases or bends.
|
|
30
|
-
- **Heavily played**: "corners that have lost their shape entirely"; "heavy whitening on all four edges", possible chipping; "deep scratches"; minor bends or creases.
|
|
31
|
-
- **Damaged**: "punched corners"; "visible creases, hard bends, tears"; "water staining".
|
|
32
|
-
|
|
33
|
-
For the numbered scale, a third-party summary of PSA's standards (cardgrading.app, which says it is not PSA) lists, for the top grades, "factory-sharp points on every corner" at 10, "one corner is allowed to have very slight wear" at 9, "multiple corners with light wear" at 8, "moderate corner wear" at 7, "rounded corners" at 5, and creases and staining at 4 and below; and, for centering, front tolerances widening from 55/45 at 10 to 85/15 at 5. Older cards are held to a softer standard (Wikipedia, same section).
|
|
34
|
-
|
|
35
|
-
**What was not read.** The grading companies' own pages (PSA, Beckett, SGC) and TCGplayer's condition guide returned HTTP 403 to the tools used, so the numbers above come from the secondary sources named, not from the graders. The preset levels are this package's reading of those words, not a grade: no preset is "a PSA 7". The grading companies' names and grades are not used in any preset.
|
|
27
|
+
Fuda uses these references for the visible signs of wear. Its numeric preset levels control the drawing and have no grading conversion. `perfect` and `mint` are also available as drawing presets. The original prototype compared secondary descriptions. The primary references above were checked on 2026-12-06.
|
|
36
28
|
|
|
37
29
|
## Presets
|
|
38
30
|
|
|
@@ -59,7 +51,7 @@ Each level runs from 0 (none) to 1 (the worst the preset names). Levels never fa
|
|
|
59
51
|
|
|
60
52
|
## Limits
|
|
61
53
|
|
|
62
|
-
- The 3D edge planes (the card's thickness) keep the perfect card's outline; at 0.
|
|
54
|
+
- The 3D edge planes (the card's thickness) keep the perfect card's outline; at the default 0.325 mm it is about 1.5 px on a 300 px card. A chipped or folded corner shows the thickness's normal corner behind it.
|
|
63
55
|
- Warping and bending of the whole card, rubbed foil patterns, dents and tears across the card are not drawn.
|
|
64
56
|
- Cards under the top one of a `stack` are drawn without wear; only the live top card is worn.
|
|
65
57
|
- `<fuda-collection>` draws the caller's pictures, so it does not apply wear; scans that are already worn show their own wear.
|
package/package.json
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@johnmorrisdotca/fuda-cards",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.12.0",
|
|
4
|
+
"description": "Collectible card frames for the web: images and live 3D in a card with a true thickness, foil, stacks, wear and a binder.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "John Morris",
|
|
5
7
|
"type": "module",
|
|
6
8
|
"sideEffects": [
|
|
7
9
|
"./dist/element.js",
|
|
8
|
-
"./dist/collection-element.js"
|
|
10
|
+
"./dist/collection-element.js",
|
|
11
|
+
"./dist/element-define.js"
|
|
9
12
|
],
|
|
10
13
|
"main": "./dist/index.js",
|
|
11
14
|
"types": "./dist/index.d.ts",
|
|
@@ -18,6 +21,10 @@
|
|
|
18
21
|
"types": "./dist/element.d.ts",
|
|
19
22
|
"import": "./dist/element.js"
|
|
20
23
|
},
|
|
24
|
+
"./element/define": {
|
|
25
|
+
"types": "./dist/element-define.d.ts",
|
|
26
|
+
"import": "./dist/element-define.js"
|
|
27
|
+
},
|
|
21
28
|
"./package.json": "./package.json",
|
|
22
29
|
"./live-3d": {
|
|
23
30
|
"types": "./dist/live-3d.d.ts",
|
|
@@ -35,6 +42,7 @@
|
|
|
35
42
|
"files": [
|
|
36
43
|
"dist",
|
|
37
44
|
"README.md",
|
|
45
|
+
"LICENSE",
|
|
38
46
|
"docs/collection-displays.md",
|
|
39
47
|
"docs/collection-input.md",
|
|
40
48
|
"docs/framework-integration.md",
|
|
@@ -43,27 +51,38 @@
|
|
|
43
51
|
"docs/wear.md",
|
|
44
52
|
"assets/README.md",
|
|
45
53
|
"docs/API.md",
|
|
46
|
-
"docs/guides"
|
|
54
|
+
"docs/guides",
|
|
55
|
+
"NOTICE.md"
|
|
47
56
|
],
|
|
48
57
|
"engines": {
|
|
49
58
|
"node": ">=22"
|
|
50
59
|
},
|
|
51
60
|
"scripts": {
|
|
52
|
-
"build": "tsc -p tsconfig.json",
|
|
61
|
+
"build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.json",
|
|
53
62
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
54
63
|
"test": "pnpm build && node --test test/*.test.mjs test/*.test.ts",
|
|
55
|
-
"check": "pnpm typecheck && pnpm build && pnpm test",
|
|
64
|
+
"check": "pnpm lint && pnpm typecheck && pnpm build && pnpm check:size && pnpm test",
|
|
56
65
|
"test:e2e": "pnpm build && node scripts/e2e.mjs",
|
|
57
66
|
"test:freeze": "pnpm site && node scripts/e2e.mjs live-3d",
|
|
58
67
|
"dev": "pnpm build && node scripts/dev.mjs",
|
|
59
68
|
"site": "pnpm build && node scripts/site.mjs",
|
|
60
69
|
"screenshots:readme": "pnpm site && node scripts/readme-pictures.mjs",
|
|
61
70
|
"docs:api": "pnpm build && node scripts/docs.mjs api",
|
|
62
|
-
"docs:check": "pnpm build && node scripts/docs.mjs check",
|
|
63
|
-
"test:readme": "pnpm build && node scripts/check-readme-examples.mjs"
|
|
71
|
+
"docs:check": "pnpm build && node scripts/docs.mjs check && node scripts/docs-site.mjs check",
|
|
72
|
+
"test:readme": "pnpm build && node scripts/check-readme-examples.mjs",
|
|
73
|
+
"lint": "biome check .",
|
|
74
|
+
"format": "biome check --write .",
|
|
75
|
+
"check:size": "node scripts/check-size.mjs",
|
|
76
|
+
"test:package": "pnpm build && node scripts/check-package.mjs",
|
|
77
|
+
"check:standard": "node scripts/check-standard.mjs",
|
|
78
|
+
"family:readme": "node scripts/family-readme.mjs",
|
|
79
|
+
"docs:site": "pnpm build && node scripts/docs-site.mjs build",
|
|
80
|
+
"size": "node scripts/docs-site.mjs size",
|
|
81
|
+
"test:usage": "pnpm site && node scripts/check-usage.ts",
|
|
82
|
+
"test:demo": "pnpm site && node scripts/docs-site.mjs build && playwright test"
|
|
64
83
|
},
|
|
65
84
|
"dependencies": {
|
|
66
|
-
"@johnmorrisdotca/kazoku-ui": "^0.
|
|
85
|
+
"@johnmorrisdotca/kazoku-ui": "^0.12.0"
|
|
67
86
|
},
|
|
68
87
|
"peerDependencies": {
|
|
69
88
|
"three": ">=0.160.0"
|
|
@@ -74,10 +93,33 @@
|
|
|
74
93
|
}
|
|
75
94
|
},
|
|
76
95
|
"devDependencies": {
|
|
96
|
+
"@angular/common": "^22.2.4",
|
|
97
|
+
"@angular/compiler": "^22.2.4",
|
|
98
|
+
"@angular/core": "^22.2.4",
|
|
99
|
+
"@angular/platform-browser": "^22.2.4",
|
|
100
|
+
"@biomejs/biome": "2.6.4",
|
|
77
101
|
"@johnmorrisdotca/uchusen-rockets": "0.2.2",
|
|
102
|
+
"@playwright/test": "1.64.0",
|
|
103
|
+
"@sveltejs/vite-plugin-svelte": "^7.3.1",
|
|
104
|
+
"@types/node": "^24.19.2",
|
|
105
|
+
"@types/react": "^19.3.0",
|
|
106
|
+
"@types/react-dom": "^19.3.0",
|
|
107
|
+
"@types/three": "^0.187.0",
|
|
108
|
+
"@vitejs/plugin-vue": "^6.0.10",
|
|
109
|
+
"esbuild": "^0.25.12",
|
|
110
|
+
"marked": "^18.1.3",
|
|
111
|
+
"pagefind": "^1.6.0",
|
|
78
112
|
"playwright": "1.64.0",
|
|
113
|
+
"react": "^19.3.1",
|
|
114
|
+
"react-dom": "^19.3.1",
|
|
115
|
+
"rxjs": "^7.8.2",
|
|
116
|
+
"svelte": "^5.57.3",
|
|
79
117
|
"three": "0.186.1",
|
|
80
|
-
"typescript": "5.9.3"
|
|
118
|
+
"typescript": "5.9.3",
|
|
119
|
+
"vite": "^8.3.5",
|
|
120
|
+
"vue": "^3.5.44",
|
|
121
|
+
"webpack": "^5.112.2",
|
|
122
|
+
"webpack-cli": "^7.3.1"
|
|
81
123
|
},
|
|
82
124
|
"publishConfig": {
|
|
83
125
|
"access": "public"
|
|
@@ -90,5 +132,10 @@
|
|
|
90
132
|
},
|
|
91
133
|
"bugs": {
|
|
92
134
|
"url": "https://github.com/johnmorrisdotca/fuda-cards/issues"
|
|
135
|
+
},
|
|
136
|
+
"pnpm": {
|
|
137
|
+
"onlyBuiltDependencies": [
|
|
138
|
+
"esbuild"
|
|
139
|
+
]
|
|
93
140
|
}
|
|
94
141
|
}
|