glassbrain 0.2.0-alpha.2 → 0.2.0-alpha.3

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/core.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from './model.js';
2
2
  export * from './profile.js';
3
+ export * from './layers.js';
3
4
  export * from './view.js';
4
5
  export * from './elements.js';
5
6
  export * from './style.js';
package/dist/core.js CHANGED
@@ -1,4 +1,10 @@
1
- import "./chunks/chunk-LEYJCT6O.js";
1
+ import {
2
+ MAX_DERIVED_LAYERS,
3
+ childrenMap,
4
+ deriveLayers,
5
+ layerIndexOf,
6
+ orderedChildren
7
+ } from "./chunks/chunk-QJ4B3U76.js";
2
8
  import {
3
9
  CONTENT_SCALE,
4
10
  DARK_THEME,
@@ -70,10 +76,10 @@ import {
70
76
  untheme,
71
77
  validateModel,
72
78
  validateStructure
73
- } from "./chunks/chunk-7R6PO7AE.js";
79
+ } from "./chunks/chunk-WW23WBYG.js";
74
80
  import {
75
81
  EN
76
- } from "./chunks/chunk-F3DN7SLR.js";
82
+ } from "./chunks/chunk-H2WV3DTN.js";
77
83
  import "./chunks/chunk-ZA47FP7C.js";
78
84
  export {
79
85
  CONTENT_SCALE,
@@ -91,6 +97,7 @@ export {
91
97
  KEPT_FLAG,
92
98
  LABEL_MAX_EM,
93
99
  LIGHT_THEME,
100
+ MAX_DERIVED_LAYERS,
94
101
  NODE_BASE,
95
102
  PAST_KINDS,
96
103
  PLANE_HUES,
@@ -106,12 +113,14 @@ export {
106
113
  buildModel,
107
114
  changedSubset,
108
115
  checkEdit,
116
+ childrenMap,
109
117
  chromeStyle,
110
118
  cls,
111
119
  countByKind,
112
120
  defaultNodeColor,
113
121
  defaultProfile,
114
122
  defineProfile,
123
+ deriveLayers,
115
124
  diffModels,
116
125
  diffStyle,
117
126
  edgesOf,
@@ -121,11 +130,13 @@ export {
121
130
  isFiltering,
122
131
  isNarrowing,
123
132
  isNodeEl,
133
+ layerIndexOf,
124
134
  mergeSlices,
125
135
  mixHex,
126
136
  nodeClasses,
127
137
  nodeDiameter,
128
138
  nodeWeight,
139
+ orderedChildren,
129
140
  originView,
130
141
  originsOf,
131
142
  originsOfNode,
package/dist/index.js CHANGED
@@ -1,6 +1,12 @@
1
1
  'use client';
2
2
  import "./chunks/chunk-SA6RSWZP.js";
3
- import "./chunks/chunk-LEYJCT6O.js";
3
+ import {
4
+ MAX_DERIVED_LAYERS,
5
+ childrenMap,
6
+ deriveLayers,
7
+ layerIndexOf,
8
+ orderedChildren
9
+ } from "./chunks/chunk-QJ4B3U76.js";
4
10
  import {
5
11
  ALL_CONTROLS,
6
12
  DEFAULT_PLANES,
@@ -9,7 +15,7 @@ import {
9
15
  clearLayoutCache,
10
16
  computeLayout,
11
17
  projectPlanes
12
- } from "./chunks/chunk-TM27EXYP.js";
18
+ } from "./chunks/chunk-7C3QZVGJ.js";
13
19
  import {
14
20
  CONTENT_SCALE,
15
21
  DARK_THEME,
@@ -81,15 +87,15 @@ import {
81
87
  untheme,
82
88
  validateModel,
83
89
  validateStructure
84
- } from "./chunks/chunk-7R6PO7AE.js";
90
+ } from "./chunks/chunk-WW23WBYG.js";
85
91
  import {
86
92
  DetailPanel,
87
93
  renderInline,
88
94
  renderMarkdown
89
- } from "./chunks/chunk-ZHPUQDOJ.js";
95
+ } from "./chunks/chunk-PBF4KMQB.js";
90
96
  import {
91
97
  EN
92
- } from "./chunks/chunk-F3DN7SLR.js";
98
+ } from "./chunks/chunk-H2WV3DTN.js";
93
99
  import "./chunks/chunk-YGRPNAXE.js";
94
100
  import "./chunks/chunk-ZA47FP7C.js";
95
101
  export {
@@ -112,6 +118,7 @@ export {
112
118
  KEPT_FLAG,
113
119
  LABEL_MAX_EM,
114
120
  LIGHT_THEME,
121
+ MAX_DERIVED_LAYERS,
115
122
  NODE_BASE,
116
123
  PAST_KINDS,
117
124
  PLANE_HUES,
@@ -128,6 +135,7 @@ export {
128
135
  buildModel,
129
136
  changedSubset,
130
137
  checkEdit,
138
+ childrenMap,
131
139
  chromeStyle,
132
140
  clearLayoutCache,
133
141
  cls,
@@ -136,6 +144,7 @@ export {
136
144
  defaultNodeColor,
137
145
  defaultProfile,
138
146
  defineProfile,
147
+ deriveLayers,
139
148
  diffModels,
140
149
  diffStyle,
141
150
  edgesOf,
@@ -145,11 +154,13 @@ export {
145
154
  isFiltering,
146
155
  isNarrowing,
147
156
  isNodeEl,
157
+ layerIndexOf,
148
158
  mergeSlices,
149
159
  mixHex,
150
160
  nodeClasses,
151
161
  nodeDiameter,
152
162
  nodeWeight,
163
+ orderedChildren,
153
164
  originView,
154
165
  originsOf,
155
166
  originsOfNode,
package/dist/internal.js CHANGED
@@ -1,6 +1,12 @@
1
1
  'use client';
2
2
  import "./chunks/chunk-SA6RSWZP.js";
3
- import "./chunks/chunk-LEYJCT6O.js";
3
+ import {
4
+ MAX_DERIVED_LAYERS,
5
+ childrenMap,
6
+ deriveLayers,
7
+ layerIndexOf,
8
+ orderedChildren
9
+ } from "./chunks/chunk-QJ4B3U76.js";
4
10
  import {
5
11
  ALL_CONTROLS,
6
12
  DEFAULT_PLANES,
@@ -42,7 +48,7 @@ import {
42
48
  shapeOf,
43
49
  skeletonLineOf,
44
50
  touchGestures
45
- } from "./chunks/chunk-TM27EXYP.js";
51
+ } from "./chunks/chunk-7C3QZVGJ.js";
46
52
  import {
47
53
  CONTENT_SCALE,
48
54
  DARK_THEME,
@@ -139,15 +145,15 @@ import {
139
145
  untheme,
140
146
  validateModel,
141
147
  validateStructure
142
- } from "./chunks/chunk-7R6PO7AE.js";
148
+ } from "./chunks/chunk-WW23WBYG.js";
143
149
  import {
144
150
  DetailPanel,
145
151
  renderInline,
146
152
  renderMarkdown
147
- } from "./chunks/chunk-ZHPUQDOJ.js";
153
+ } from "./chunks/chunk-PBF4KMQB.js";
148
154
  import {
149
155
  EN
150
- } from "./chunks/chunk-F3DN7SLR.js";
156
+ } from "./chunks/chunk-H2WV3DTN.js";
151
157
  import "./chunks/chunk-YGRPNAXE.js";
152
158
  import "./chunks/chunk-ZA47FP7C.js";
153
159
  export {
@@ -180,6 +186,7 @@ export {
180
186
  KEPT_FLAG,
181
187
  LABEL_MAX_EM,
182
188
  LIGHT_THEME,
189
+ MAX_DERIVED_LAYERS,
183
190
  MIN_DOT,
184
191
  MIN_LINE,
185
192
  NODE_BASE,
@@ -207,6 +214,7 @@ export {
207
214
  buildModel,
208
215
  changedSubset,
209
216
  checkEdit,
217
+ childrenMap,
210
218
  chromeStyle,
211
219
  clearLayoutCache,
212
220
  clippedLength,
@@ -216,6 +224,7 @@ export {
216
224
  defaultNodeColor,
217
225
  defaultProfile,
218
226
  defineProfile,
227
+ deriveLayers,
219
228
  detailed,
220
229
  diffModels,
221
230
  diffPositions,
@@ -242,6 +251,7 @@ export {
242
251
  isNarrowing,
243
252
  isNodeEl,
244
253
  labelBox,
254
+ layerIndexOf,
245
255
  leavingOf,
246
256
  makeScore,
247
257
  mergeSlices,
@@ -249,6 +259,7 @@ export {
249
259
  nodeClasses,
250
260
  nodeDiameter,
251
261
  nodeWeight,
262
+ orderedChildren,
252
263
  originView,
253
264
  originsOf,
254
265
  originsOfNode,
package/dist/layers.d.ts CHANGED
@@ -14,7 +14,7 @@ export interface DerivedLayers {
14
14
  export declare function orderedChildren(children: Gy, id: string): GraphNode[] | null;
15
15
  type Gy = Map<string, GraphNode[]>;
16
16
  export declare function childrenMap(model: GraphModel): Gy;
17
- export declare function deriveLayers(model: GraphModel, colors?: string[]): DerivedLayers;
17
+ export declare function deriveLayers(model: GraphModel, colors?: string[], force?: boolean): DerivedLayers;
18
18
  /** Layers in reading order for a node id, for messages and the outline. */
19
19
  export declare function layerIndexOf(derived: DerivedLayers, id: string): number;
20
20
  export {};
@@ -2,8 +2,8 @@
2
2
  "use client";
3
3
  import {
4
4
  DetailPanel
5
- } from "../chunks/chunk-ZHPUQDOJ.js";
6
- import "../chunks/chunk-F3DN7SLR.js";
5
+ } from "../chunks/chunk-PBF4KMQB.js";
6
+ import "../chunks/chunk-H2WV3DTN.js";
7
7
  import "../chunks/chunk-ZA47FP7C.js";
8
8
  export {
9
9
  DetailPanel as default
@@ -192,6 +192,10 @@ export interface GraphCanvasProps {
192
192
  /** "Restructure" in ⋯: the host re-hangs and renumbers the graph (see cli/restructure.ts) and hands back a new model.
193
193
  * Without it the item is absent. Pure callback: the library never edits. */
194
194
  onRestructure?: () => void;
195
+ /** Why the layer button is grey. The button is always shown; this text goes in its popover. */
196
+ layerIssue?: string;
197
+ /** "Open the floors anyway" in that popover: the host rebuilds its profile with layers forced on. */
198
+ onForceLayers?: () => void;
195
199
  /**
196
200
  * How markdown in details (rendered by default) resolves relative URLs: images, links. Return null = cannot resolve
197
201
  * (link keeps only its text, image is not drawn). E.g. data extracted from a repository's docs resolves to that repository's raw file URLs.
@@ -2,10 +2,10 @@
2
2
  "use client";
3
3
  import {
4
4
  GraphCanvas
5
- } from "../chunks/chunk-TM27EXYP.js";
6
- import "../chunks/chunk-7R6PO7AE.js";
7
- import "../chunks/chunk-ZHPUQDOJ.js";
8
- import "../chunks/chunk-F3DN7SLR.js";
5
+ } from "../chunks/chunk-7C3QZVGJ.js";
6
+ import "../chunks/chunk-WW23WBYG.js";
7
+ import "../chunks/chunk-PBF4KMQB.js";
8
+ import "../chunks/chunk-H2WV3DTN.js";
9
9
  import "../chunks/chunk-YGRPNAXE.js";
10
10
  import "../chunks/chunk-ZA47FP7C.js";
11
11
  export {
@@ -39,6 +39,9 @@ export interface ToolbarProps {
39
39
  onRelayout?: () => void;
40
40
  /** "Restructure" in ⋯: re-hang and renumber to raise the shape score. Without it the item is absent. */
41
41
  onRestructure?: () => void;
42
+ /** Why the layer button is grey (it is always shown). `onForceLayers` adds "open the floors anyway". */
43
+ layerIssue?: string;
44
+ onForceLayers?: () => void;
42
45
  }
43
46
  export default function Toolbar(p: ToolbarProps): import("react").JSX.Element;
44
47
  export declare function ZoomDock(p: {
package/dist/strings.d.ts CHANGED
@@ -24,6 +24,9 @@ export interface GraphStrings {
24
24
  stackLayer: (layer: string, on: boolean) => string;
25
25
  stack: string;
26
26
  stackTip: (on: boolean) => string;
27
+ layersOff: string;
28
+ forceLayers: string;
29
+ ok: string;
27
30
  more: string;
28
31
  origins: string;
29
32
  allOrigins: string;
@@ -37,6 +40,7 @@ export interface GraphStrings {
37
40
  legend: string;
38
41
  /** Names of the two legend entries without a kind name, and their tooltips. */
39
42
  legendPlainName: string;
43
+ noColor: string;
40
44
  legendPlain: string;
41
45
  legendContainsName: string;
42
46
  legendContains: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glassbrain",
3
- "version": "0.2.0-alpha.2",
3
+ "version": "0.2.0-alpha.3",
4
4
  "description": "Know what your agent knows: open, diff and review the knowledge graphs agents write. Plain JSON in, one html file out.",
5
5
  "keywords": [
6
6
  "knowledge-graph",
File without changes