@hattoriai/poney-ext-ownership 0.1.1 → 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/dist/diagram.d.ts +5 -2
- package/dist/diagram.js +3 -5
- package/dist/diagram.js.map +1 -1
- package/dist/index.d.ts +9 -9
- package/package.json +4 -9
package/dist/diagram.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { View } from '@hattoriai/poney-core';
|
|
2
|
-
import { DiagramModule } from '@hattoriai/poney-
|
|
2
|
+
import { DiagramModule } from '@hattoriai/poney-diagrams';
|
|
3
3
|
import { TeamMapScene } from './layout.js';
|
|
4
4
|
import '@hattoriai/poney-layout';
|
|
5
5
|
|
|
6
|
+
/** @jsxRuntime automatic */
|
|
7
|
+
/** @jsxImportSource @hattoriai/poney-diagrams */
|
|
8
|
+
|
|
6
9
|
/**
|
|
7
|
-
* The team map, drawn with @hattoriai/poney-
|
|
10
|
+
* The team map, drawn with @hattoriai/poney-diagrams: one column per team, with what it
|
|
8
11
|
* owns. Register it (registerDiagram(teamMap)) and its layout
|
|
9
12
|
* (registerExtensionLayout('ownership/team-map', layoutTeamMap)) to draw
|
|
10
13
|
* "ownership/team-map" views.
|
package/dist/diagram.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { TEAM_KIND, ownershipOf } from './chunk-46RIWAYF.js';
|
|
2
|
-
import { useMemo } from '
|
|
3
|
-
import {
|
|
4
|
-
import { useRenderIndex, useRenderBind, useRenderSubject, toneColor, toneWash, Glyph, Rings, EntityNode } from '@hattoriai/poney-react';
|
|
5
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { LUCIDE, useRenderIndex, useRenderBind, useRenderSubject, useMemo, toneColor, toneWash, Glyph, Rings, EntityNode } from '@hattoriai/poney-diagrams';
|
|
3
|
+
import { jsxs, jsx } from '@hattoriai/poney-diagrams/jsx-runtime';
|
|
6
4
|
|
|
7
5
|
function TeamMap({ scene }) {
|
|
8
6
|
const idx = useRenderIndex();
|
|
@@ -47,7 +45,7 @@ function TeamMap({ scene }) {
|
|
|
47
45
|
var teamMap = {
|
|
48
46
|
key: "ownership/team-map",
|
|
49
47
|
label: "Team map",
|
|
50
|
-
icon:
|
|
48
|
+
icon: LUCIDE.users,
|
|
51
49
|
howToRead: "One column per team, with everything it owns. Select a part anywhere in the studio to see its team and who is on call.",
|
|
52
50
|
Renderer: TeamMap
|
|
53
51
|
};
|
package/dist/diagram.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/diagram.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/diagram.tsx"],"names":[],"mappings":";;;;AAgBA,SAAS,OAAA,CAAQ,EAAE,KAAA,EAAM,EAA+C;AACtE,EAAA,MAAM,MAAM,cAAA,EAAe;AAC3B,EAAA,MAAM,OAAO,aAAA,EAAc;AAC3B,EAAA,MAAM,EAAE,OAAA,EAAS,SAAA,EAAU,GAAI,gBAAA,EAAiB;AAChD,EAAA,MAAM,SAAA,GAAY,QAAQ,MAAM;AAC9B,IAAA,IAAI,OAAA,EAAS,IAAA,KAAS,QAAA,EAAU,OAAO,IAAA;AACvC,IAAA,MAAM,CAAA,GAAI,GAAA,CAAI,QAAA,CAAS,GAAA,CAAI,QAAQ,EAAE,CAAA;AACrC,IAAA,IAAI,CAAA,EAAG,IAAA,KAAS,SAAA,EAAW,OAAO,CAAA,CAAE,EAAA;AACpC,IAAA,OAAO,WAAA,CAAY,CAAC,CAAA,EAAG,IAAA,IAAQ,IAAA;AAAA,EACjC,CAAA,EAAG,CAAC,OAAA,EAAS,GAAG,CAAC,CAAA;AAEjB,EAAA,4BACG,GAAA,EAAA,EACE,QAAA,EAAA;AAAA,IAAA,KAAA,CAAM,KAAA,CAAM,GAAA,CAAI,CAAC,CAAA,KAAM;AACtB,MAAA,MAAM,IAAA,GAAO,GAAA,CAAI,QAAA,CAA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O,KAAA;AAAA,EACb,SAAA,EAAW,wHAAA;AAAA,EACX,QAAA,EAAU;AACZ","file":"diagram.js","sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @hattoriai/poney-diagrams */\nimport type { View } from '@hattoriai/poney-core'\nimport { EntityNode, Glyph, LUCIDE, useMemo, Rings, toneColor, toneWash, useRenderBind, useRenderIndex, useRenderSubject, type DiagramModule } from '@hattoriai/poney-diagrams'\nimport { ownershipOf, TEAM_KIND } from './index'\nimport type { TeamMapScene } from './layout'\n\n/**\n * The team map, drawn with @hattoriai/poney-diagrams: one column per team, with what it\n * owns. Register it (registerDiagram(teamMap)) and its layout\n * (registerExtensionLayout('ownership/team-map', layoutTeamMap)) to draw\n * \"ownership/team-map\" views.\n */\n\ntype TeamMapView = Extract<View, { type: 'extension' }>\n\nfunction TeamMap({ scene }: { scene: TeamMapScene; view: TeamMapView }) {\n const idx = useRenderIndex()\n const bind = useRenderBind()\n const { subject, selection } = useRenderSubject()\n const focusTeam = useMemo(() => {\n if (subject?.kind !== 'entity') return null\n const e = idx.entities.get(subject.id)\n if (e?.kind === TEAM_KIND) return e.id\n return ownershipOf(e)?.team ?? null\n }, [subject, idx])\n\n return (\n <g>\n {scene.teams.map((t) => {\n const team = idx.entities.get(t.entityId)!\n const s = idx.style(team)\n const tone = toneColor(s.tone)\n const dim = focusTeam && focusTeam !== t.entityId\n const selected = selection?.kind === 'entity' && selection.id === t.entityId\n return (\n <g key={t.entityId} className={`poney-fade ${dim ? 'poney-dim' : ''}`}>\n <rect x={t.x} y={t.y} width={t.w} height={t.h} rx={16} fill=\"var(--poney-paper)\" fillOpacity={0.6} stroke=\"var(--poney-rule-strong)\" />\n <g transform={`translate(${t.x} ${t.y})`} {...bind({ kind: 'entity', id: team.id }, `${team.name}. ${team.summary}`)}>\n <path d={`M 0 16 Q 0 0 16 0 H ${t.w - 16} Q ${t.w} 0 ${t.w} 16 V ${t.header} H 0 Z`} fill={toneWash(s.tone, 12)} />\n <Glyph name={s.icon} x={16} y={16} size={16} color={tone} />\n <text x={40} y={29} fontSize={14} fontWeight={650} fill=\"var(--poney-ink)\">\n {team.name}\n </text>\n {t.mission.map((line, i) => (\n <text key={i} x={16} y={52 + i * 15} fontSize={12} fill=\"var(--poney-ink-2)\">\n {line}\n </text>\n ))}\n <text x={16} y={t.header - 12} fontSize={11} fill=\"var(--poney-ink-3)\">\n On call: {t.oncall ?? 'none'}\n </text>\n <Rings w={t.w} h={t.header} rx={16} selected={selected} />\n </g>\n </g>\n )\n })}\n {scene.owned.map((o) => {\n const e = idx.entities.get(o.entityId)!\n const dim = focusTeam && focusTeam !== o.team\n const selected = selection?.kind === 'entity' && selection.id === e.id\n return (\n <g key={o.entityId} transform={`translate(${o.x} ${o.y})`} {...bind({ kind: 'entity', id: e.id }, `${e.name}, owned by ${idx.entities.get(o.team)?.name}`)} className={`poney-el ${dim ? 'poney-dim' : ''}`}>\n <EntityNode entity={e} style={{ ...idx.style(e), shape: 'chip' }} w={o.w} h={o.h} emphasis={selected ? 'selected' : 'normal'} detail={false} />\n </g>\n )\n })}\n </g>\n )\n}\n\nexport const teamMap: DiagramModule<TeamMapView, TeamMapScene> = {\n key: 'ownership/team-map',\n label: 'Team map',\n icon: LUCIDE.users,\n howToRead: 'One column per team, with everything it owns. Select a part anywhere in the studio to see its team and who is on call.',\n Renderer: TeamMap,\n}\n\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -172,7 +172,7 @@ declare const ownership: {
|
|
|
172
172
|
id: string;
|
|
173
173
|
description: string;
|
|
174
174
|
ext: Record<string, unknown>;
|
|
175
|
-
|
|
175
|
+
activity: string;
|
|
176
176
|
title: string;
|
|
177
177
|
category: string;
|
|
178
178
|
positions: Record<string, {
|
|
@@ -211,7 +211,7 @@ declare const ownership: {
|
|
|
211
211
|
id: string;
|
|
212
212
|
description: string;
|
|
213
213
|
ext: Record<string, unknown>;
|
|
214
|
-
|
|
214
|
+
useCases: string[];
|
|
215
215
|
title: string;
|
|
216
216
|
category: string;
|
|
217
217
|
positions: Record<string, {
|
|
@@ -394,7 +394,7 @@ declare const ownership: {
|
|
|
394
394
|
}[];
|
|
395
395
|
} | undefined;
|
|
396
396
|
}[];
|
|
397
|
-
poneyVersion: "0.
|
|
397
|
+
poneyVersion: "0.2.0";
|
|
398
398
|
project: {
|
|
399
399
|
id: string;
|
|
400
400
|
name: string;
|
|
@@ -471,8 +471,8 @@ declare const ownership: {
|
|
|
471
471
|
label: string;
|
|
472
472
|
from: string;
|
|
473
473
|
to: string;
|
|
474
|
-
fromCardinality: "
|
|
475
|
-
toCardinality: "
|
|
474
|
+
fromCardinality: "exactly-one" | "zero-or-one" | "one-or-many" | "zero-or-many";
|
|
475
|
+
toCardinality: "exactly-one" | "zero-or-one" | "one-or-many" | "zero-or-many";
|
|
476
476
|
logical: boolean;
|
|
477
477
|
via?: string | undefined;
|
|
478
478
|
}[];
|
|
@@ -496,11 +496,11 @@ declare const ownership: {
|
|
|
496
496
|
} | {
|
|
497
497
|
id: string;
|
|
498
498
|
name: string;
|
|
499
|
-
kind: "
|
|
499
|
+
kind: "activity";
|
|
500
500
|
summary: string;
|
|
501
501
|
nodes: {
|
|
502
502
|
id: string;
|
|
503
|
-
kind: "join" | "
|
|
503
|
+
kind: "join" | "initial" | "final" | "action" | "decision" | "merge" | "fork";
|
|
504
504
|
label: string;
|
|
505
505
|
description?: string | undefined;
|
|
506
506
|
performedBy?: string | undefined;
|
|
@@ -521,7 +521,7 @@ declare const ownership: {
|
|
|
521
521
|
states: {
|
|
522
522
|
id: string;
|
|
523
523
|
name: string;
|
|
524
|
-
kind: "initial" | "
|
|
524
|
+
kind: "initial" | "final" | "state";
|
|
525
525
|
outcome: "success" | "failure" | "neutral";
|
|
526
526
|
entryActions: string[];
|
|
527
527
|
description?: string | undefined;
|
|
@@ -540,7 +540,7 @@ declare const ownership: {
|
|
|
540
540
|
subject?: string | undefined;
|
|
541
541
|
owner?: string | undefined;
|
|
542
542
|
})[];
|
|
543
|
-
|
|
543
|
+
useCases: {
|
|
544
544
|
includes: string[];
|
|
545
545
|
id: string;
|
|
546
546
|
name: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hattoriai/poney-ext-ownership",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Poney extension: teams, who owns what, on-call, and a team map.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,17 +39,12 @@
|
|
|
39
39
|
"provenance": true
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@hattoriai/poney-core": "0.
|
|
43
|
-
"@hattoriai/poney-
|
|
44
|
-
"@hattoriai/poney-
|
|
45
|
-
"lucide-react": "^1.75.0",
|
|
42
|
+
"@hattoriai/poney-core": "0.3.0",
|
|
43
|
+
"@hattoriai/poney-diagrams": "0.3.0",
|
|
44
|
+
"@hattoriai/poney-layout": "0.3.0",
|
|
46
45
|
"zod": "^3.25.76"
|
|
47
46
|
},
|
|
48
|
-
"peerDependencies": {
|
|
49
|
-
"react": "^18.3.1 || ^19.0.0"
|
|
50
|
-
},
|
|
51
47
|
"devDependencies": {
|
|
52
|
-
"react": "^18.3.1",
|
|
53
48
|
"tsup": "8.5.1"
|
|
54
49
|
}
|
|
55
50
|
}
|