{"_id":"@edv4h/usketch-plugin-dashboard","_rev":"2-635b4f350d61f20dd555a36f0cf4b7fb","name":"@edv4h/usketch-plugin-dashboard","dist-tags":{"latest":"0.2.2"},"versions":{"0.2.0":{"name":"@edv4h/usketch-plugin-dashboard","version":"0.2.0","license":"MIT","_id":"@edv4h/usketch-plugin-dashboard@0.2.0","maintainers":[{"name":"myuske","email":"circlemountain.ym@gmail.com"}],"homepage":"https://github.com/EdV4H/usketch#readme","bugs":{"url":"https://github.com/EdV4H/usketch/issues"},"dist":{"shasum":"13fe837b3afe85977b0bd365f336e015f4f31dcd","tarball":"https://registry.npmjs.org/@edv4h/usketch-plugin-dashboard/-/usketch-plugin-dashboard-0.2.0.tgz","fileCount":63,"integrity":"sha512-DcHlazJY1NBVnm9ZBAq5dpoRolklHxtFvOeKx2EmpnD57nRKSULsCiZe23rUoiTaN8RR6YtisL7my1jEZLOyBw==","signatures":[{"sig":"MEQCIHJNHWYFTW+aW0XqAiSECc8I0aYnkxLuCHuAHo+mswF3AiBwacmPeM85TcQwCmW13As6pqS5EQLRD5chZ0T8itaWxA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":214431},"main":"./dist/index.js","type":"module","_from":"file:edv4h-usketch-plugin-dashboard-0.2.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","source":"./src/index.ts"}},"scripts":{"test":"vitest run --passWithNoTests","build":"tsc -p tsconfig.json","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"myuske","email":"circlemountain.ym@gmail.com"},"_resolved":"/Users/yusukemaruyama/Projects/usketch/plugins/usketch-plugin-dashboard/edv4h-usketch-plugin-dashboard-0.2.0.tgz","_integrity":"sha512-DcHlazJY1NBVnm9ZBAq5dpoRolklHxtFvOeKx2EmpnD57nRKSULsCiZe23rUoiTaN8RR6YtisL7my1jEZLOyBw==","repository":{"url":"git+https://github.com/EdV4H/usketch.git","type":"git","directory":"plugins/usketch-plugin-dashboard"},"_npmVersion":"11.16.0","description":"適用した Canvas 全体を **sortable なフロー・グリッド**にするプラグイン。トップレベルの Shape（付箋・画像・カード等、任意の既存 Shape）がグリッドのアイテムになる。各アイテムは **自身のサイズに応じて整数セル分を占有**（大きいものは複数セルをまたぐ = ダッシュボードの タイル）し、後続は first-fit でその周りに流し込まれる。アイテムはリサイズせず top-left だけ スナップする。1つをドラッグして差し込むと、他のアイテムがライブでリフローする。","directories":{},"_nodeVersion":"26.3.0","dependencies":{"@edv4h/usketch-store":"3.6.0","@edv4h/usketch-shared":"4.13.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"4.1.11","typescript":"7.0.2","@types/react":"19.2.18"},"peerDependencies":{"react":">=19"},"_npmOperationalInternal":{"tmp":"tmp/usketch-plugin-dashboard_0.2.0_1788768336827_0.6076588940565679","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"_id":"@edv4h/usketch-plugin-dashboard@0.2.2","bugs":{"url":"https://github.com/EdV4H/usketch/issues"},"dist":{"shasum":"4eb06c0c35b3c66abeeb0a4d79ee22840a3f5262","tarball":"https://registry.npmjs.org/@edv4h/usketch-plugin-dashboard/-/usketch-plugin-dashboard-0.2.2.tgz","fileCount":63,"integrity":"sha512-Wq10K8Tx1SvJwMavD68ejK9UvzWaQxBf3zoDffsp5yGba8DW3huH+LAC+QK3Keh0UmMF6bJBE34tuereEZnEtA==","signatures":[{"sig":"MEUCIFJDJvyUZ+dL0o80ii92CKst/GSBJQzZLTl83EtbCZs4AiEA41togXVvq9V9Yo2kS+AtjoOyeP05kkj3uJxLY7sRre8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIA5OO4JAOa3HoEyXad7iHbef9p7tGr9Y/noYnYOyBKC0AiEAwM4ZCUQ6FkQHpGN0qP6eOAMmWkLc6WOB1BHiIMbtKk0="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@edv4h%2fusketch-plugin-dashboard@0.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":214431},"main":"./dist/index.js","name":"@edv4h/usketch-plugin-dashboard","type":"module","_from":"file:edv4h-usketch-plugin-dashboard-0.2.2.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","source":"./src/index.ts"}},"license":"MIT","scripts":{"test":"vitest run --passWithNoTests","build":"tsc -p tsconfig.json","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"version":"0.2.2","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:ab1d6b06-15e6-4d01-a3b2-1c45949e1254"}},"homepage":"https://github.com/EdV4H/usketch#readme","_resolved":"/tmp/82a9557e066d896f8ff08ea7a2ab98c9/edv4h-usketch-plugin-dashboard-0.2.2.tgz","_integrity":"sha512-Wq10K8Tx1SvJwMavD68ejK9UvzWaQxBf3zoDffsp5yGba8DW3huH+LAC+QK3Keh0UmMF6bJBE34tuereEZnEtA==","repository":{"url":"git+https://github.com/EdV4H/usketch.git","type":"git","directory":"plugins/usketch-plugin-dashboard"},"_npmVersion":"12.1.0","description":"適用した Canvas 全体を **sortable なフロー・グリッド**にするプラグイン。トップレベルの Shape（付箋・画像・カード等、任意の既存 Shape）がグリッドのアイテムになる。各アイテムは **自身のサイズに応じて整数セル分を占有**（大きいものは複数セルをまたぐ = ダッシュボードの タイル）し、後続は first-fit でその周りに流し込まれる。アイテムはリサイズせず top-left だけ スナップする。1つをドラッグして差し込むと、他のアイテムがライブでリフローする。","directories":{},"maintainers":[{"name":"myuske","email":"circlemountain.ym@gmail.com"}],"_nodeVersion":"24.21.0","dependencies":{"@edv4h/usketch-store":"3.8.0","@edv4h/usketch-shared":"4.14.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"4.1.11","typescript":"7.0.2","@types/react":"19.2.18"},"peerDependencies":{"react":">=19"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/usketch-plugin-dashboard_0.2.2_1790580352003_0.3051533110665172"}}},"time":{"created":"2026-09-07T08:05:36.688Z","modified":"2026-09-28T07:25:52.476Z","0.2.0":"2026-09-07T08:05:36.961Z","0.2.2":"2026-09-28T07:25:52.127Z"},"bugs":{"url":"https://github.com/EdV4H/usketch/issues"},"license":"MIT","homepage":"https://github.com/EdV4H/usketch#readme","repository":{"url":"git+https://github.com/EdV4H/usketch.git","type":"git","directory":"plugins/usketch-plugin-dashboard"},"description":"適用した Canvas 全体を **sortable なフロー・グリッド**にするプラグイン。トップレベルの Shape（付箋・画像・カード等、任意の既存 Shape）がグリッドのアイテムになる。各アイテムは **自身のサイズに応じて整数セル分を占有**（大きいものは複数セルをまたぐ = ダッシュボードの タイル）し、後続は first-fit でその周りに流し込まれる。アイテムはリサイズせず top-left だけ スナップする。1つをドラッグして差し込むと、他のアイテムがライブでリフローする。","maintainers":[{"name":"myuske","email":"circlemountain.ym@gmail.com"}],"readme":"# @edv4h/usketch-plugin-dashboard\n\n適用した Canvas 全体を **sortable なフロー・グリッド**にするプラグイン。トップレベルの\nShape（付箋・画像・カード等、任意の既存 Shape）がグリッドのアイテムになる。各アイテムは\n**自身のサイズに応じて整数セル分を占有**（大きいものは複数セルをまたぐ = ダッシュボードの\nタイル）し、後続は first-fit でその周りに流し込まれる。アイテムはリサイズせず top-left だけ\nスナップする。1つをドラッグして差し込むと、他のアイテムがライブでリフローする。\n\n配置先のセル（グリッド領域）は**オーバーレイ**で可視化され、HUD の「グリッド表示」で\nトグルできる。\n\n専用のウィジェット Shape は追加しない。設定（列数・セルサイズ・間隔・余白・原点）は\n**データのみの `dashboard-config` シングルトン Shape**（描画なし・locked・非 hit-test）に\n保存され、Yjs 同期と Undo に自然に乗る。並び順は **幾何から導出**（row-major の reading\norder）するので、`order[]` を別途持たず、位置が同期されれば順序も同期・リロード安定になる。\n\n## 使い方\n\n```ts\nimport { createDashboardPlugin } from \"@edv4h/usketch-plugin-dashboard\";\n\ncreateApp({\n  plugins: [\n    // container / free-position の後に登録する（during-drag reflow を最後の writer に）\n    createDashboardPlugin({ columns: 4, cellW: 200, cellH: 140, gap: 16, padding: 24 }),\n  ],\n});\n```\n\n`autoCreate: false` を渡すと、config シングルトンの作成（＝ボードのダッシュボード化）を\nホスト側に委ねられる。\n\n## サービス API（`ctx.services` / `app.services`）\n\n```ts\nimport { getDashboardApi } from \"@edv4h/usketch-plugin-dashboard\";\n\nconst api = getDashboardApi(app.services);\napi?.repack();                 // 全アイテムを reading order のセルへ再スナップ（1 command）\napi?.setColumns(6);            // 列数変更（Undo 可・再レイアウト）\napi?.setCellSize(240, 160);\napi?.getGridSpec();            // 現在の GridSpec（非ダッシュボードなら null）\napi?.isDashboardBoard();\n```\n\nHUD の「ダッシュボード」設定グループと「整列」アクションからも同じ操作を呼べる。\n\n## 純関数\n\n`grid.ts`（`cellTopLeft` / `packGrid` / `packGridWithGap` / `indexFromPoint`）と\n`order.ts`（`readingOrder`）は副作用のない純関数として公開しており、runtime とサービスの\n両方が同じ経路を通る。\n","readmeFilename":"README.md"}