@lensmap/starlight 0.0.0-stage → 0.2.1
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/README.md +98 -2
- package/dist/ViewerHost.css +726 -0
- package/dist/ViewerHost.d.ts +22 -0
- package/dist/ViewerHost.js +2104 -0
- package/dist/components/LiveInspector.astro +22 -0
- package/dist/components/MapContent.astro +36 -0
- package/dist/components/MobileThoughts.astro +77 -0
- package/dist/components/SidebarShell.astro +5 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +14 -0
- package/dist/layout.d.ts +3 -0
- package/dist/layout.js +215 -0
- package/package.json +64 -3
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
interface Props {
|
|
3
|
+
inspectorId?: string;
|
|
4
|
+
}
|
|
5
|
+
const { inspectorId = "default" } = Astro.props;
|
|
6
|
+
---
|
|
7
|
+
<div data-lensmap-inspector-target={inspectorId}></div>
|
|
8
|
+
<style is:global>
|
|
9
|
+
[data-lensmap-inspector-target] { border-block: 1px solid var(--sl-color-gray-5); padding-block: .75rem; margin-block: .75rem; overflow-wrap: anywhere; }
|
|
10
|
+
[data-lensmap-inspector-target] button { display: block; padding: .35rem; cursor: pointer; border: 1px solid var(--sl-color-gray-5); margin-block: .25rem; }
|
|
11
|
+
[data-lensmap-inspector-target] .viewer-connections { margin-top: 1rem; }
|
|
12
|
+
[data-lensmap-inspector-target] .sidebar-section { border-top: 1px solid var(--sl-color-gray-5); padding-block: .75rem; }
|
|
13
|
+
[data-lensmap-inspector-target] summary { cursor: pointer; color: var(--sl-color-gray-2); font-size: var(--sl-text-xs); font-weight: 600; }
|
|
14
|
+
[data-lensmap-inspector-target] details[open] > summary { margin-bottom: .5rem; }
|
|
15
|
+
[data-lensmap-inspector-target] .viewer-connections button { width: 100%; margin: 0; padding: .5rem 0; border: 0; border-radius: 0; background: transparent; color: var(--sl-color-gray-2); font-size: var(--sl-text-xs); text-align: start; white-space: normal; overflow-wrap: anywhere; }
|
|
16
|
+
[data-lensmap-inspector-target] .viewer-connections button:hover { color: var(--sl-color-text-accent); }
|
|
17
|
+
[data-lensmap-inspector-target] :is(button, summary):focus-visible { outline: 2px solid var(--sl-color-text-accent); outline-offset: 2px; }
|
|
18
|
+
[data-lensmap-inspector-target] .viewer-connections p { color: var(--sl-color-gray-3); font-size: var(--sl-text-xs); }
|
|
19
|
+
@media (min-width: 72rem) {
|
|
20
|
+
.right-sidebar:has([data-lensmap-inspector-target]) { position: static; top: auto; height: auto; overflow-y: visible; padding-top: 0; }
|
|
21
|
+
}
|
|
22
|
+
</style>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { SemanticGraph } from "@lensmap/document";
|
|
3
|
+
import { layoutSemanticGraph } from "../layout.js";
|
|
4
|
+
import ViewerHost from "../ViewerHost.js";
|
|
5
|
+
import "../ViewerHost.css";
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
graph: SemanticGraph;
|
|
9
|
+
entry?: unknown;
|
|
10
|
+
authoredFrontmatter: Record<string, unknown>;
|
|
11
|
+
executable: boolean;
|
|
12
|
+
inspectorId?: string;
|
|
13
|
+
}
|
|
14
|
+
const { graph: semantic, executable, inspectorId = "default" } = Astro.props;
|
|
15
|
+
const entry = Astro.props.entry ?? Astro.locals.starlightRoute?.entry;
|
|
16
|
+
const graph = layoutSemanticGraph(semantic);
|
|
17
|
+
const rendered = Object.fromEntries(
|
|
18
|
+
await Promise.all(
|
|
19
|
+
graph.nodes.map(async (node) => [
|
|
20
|
+
node.key,
|
|
21
|
+
String((await Astro.slots.render(node.key, [entry])) ?? ""),
|
|
22
|
+
]),
|
|
23
|
+
),
|
|
24
|
+
);
|
|
25
|
+
// Only prepared prose + public graph reach the island. Never entry metadata or locals.
|
|
26
|
+
const publicGraph = {
|
|
27
|
+
...graph,
|
|
28
|
+
nodes: graph.nodes.map((node) => ({ ...node, markdown: "" })),
|
|
29
|
+
};
|
|
30
|
+
---
|
|
31
|
+
<div data-lensmap-document data-executable={String(executable)}>
|
|
32
|
+
<div class="not-content"><ViewerHost client:load graph={publicGraph} rendered={rendered} inspectorId={inspectorId} /></div>
|
|
33
|
+
<section data-static-thoughts>
|
|
34
|
+
{graph.nodes.map((node) => <section data-thought={node.key}><h2>{node.title}</h2><div set:html={rendered[node.key]} /></section>)}
|
|
35
|
+
</section>
|
|
36
|
+
</div>
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { Icon } from "@astrojs/starlight/components";
|
|
3
|
+
import LiveInspector from "./LiveInspector.astro";
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
inspectorId?: string;
|
|
7
|
+
}
|
|
8
|
+
const { inspectorId = "default" } = Astro.props;
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<details class="lensmap-mobile-thoughts" data-lensmap-thoughts>
|
|
12
|
+
<summary>
|
|
13
|
+
<span>Thoughts</span>
|
|
14
|
+
<Icon name="right-caret" size="1rem" class="lensmap-thoughts-caret" />
|
|
15
|
+
</summary>
|
|
16
|
+
<div class="lensmap-thoughts-content"><LiveInspector inspectorId={inspectorId} /></div>
|
|
17
|
+
</details>
|
|
18
|
+
|
|
19
|
+
<style>
|
|
20
|
+
.lensmap-mobile-thoughts {
|
|
21
|
+
margin-bottom: 1rem;
|
|
22
|
+
border: 1px solid var(--sl-color-gray-5);
|
|
23
|
+
border-radius: 0.375rem;
|
|
24
|
+
background: var(--sl-color-bg-sidebar);
|
|
25
|
+
color: var(--sl-color-text);
|
|
26
|
+
}
|
|
27
|
+
summary {
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: space-between;
|
|
31
|
+
gap: 0.5rem;
|
|
32
|
+
list-style: none;
|
|
33
|
+
padding: 0.75rem 1rem;
|
|
34
|
+
color: var(--sl-color-white);
|
|
35
|
+
font-size: var(--sl-text-sm);
|
|
36
|
+
font-weight: 500;
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
}
|
|
39
|
+
summary:hover {
|
|
40
|
+
background: var(--sl-color-gray-6);
|
|
41
|
+
}
|
|
42
|
+
summary::marker {
|
|
43
|
+
content: "";
|
|
44
|
+
}
|
|
45
|
+
summary::-webkit-details-marker {
|
|
46
|
+
display: none;
|
|
47
|
+
}
|
|
48
|
+
.lensmap-thoughts-caret {
|
|
49
|
+
flex-shrink: 0;
|
|
50
|
+
transition: transform 0.2s ease;
|
|
51
|
+
}
|
|
52
|
+
:global([dir="rtl"]) .lensmap-thoughts-caret {
|
|
53
|
+
transform: rotate(180deg);
|
|
54
|
+
}
|
|
55
|
+
.lensmap-mobile-thoughts[open] > summary .lensmap-thoughts-caret {
|
|
56
|
+
transform: rotate(90deg);
|
|
57
|
+
}
|
|
58
|
+
summary:focus-visible {
|
|
59
|
+
outline: 2px solid var(--sl-color-text-accent);
|
|
60
|
+
outline-offset: 2px;
|
|
61
|
+
}
|
|
62
|
+
[open] > summary {
|
|
63
|
+
border-bottom: 1px solid var(--sl-color-gray-5);
|
|
64
|
+
}
|
|
65
|
+
.lensmap-thoughts-content {
|
|
66
|
+
padding: 0 1rem 1rem;
|
|
67
|
+
}
|
|
68
|
+
.lensmap-thoughts-content :global([data-lensmap-inspector-target]) {
|
|
69
|
+
border: 0;
|
|
70
|
+
margin: 0;
|
|
71
|
+
}
|
|
72
|
+
.lensmap-thoughts-content :global([data-live-inspector] > h2) {
|
|
73
|
+
font-size: var(--sl-text-lg);
|
|
74
|
+
font-weight: 600;
|
|
75
|
+
line-height: var(--sl-line-height-headings);
|
|
76
|
+
}
|
|
77
|
+
</style>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<div class="lg:sl-hidden"><slot name="mobile-panels" /><slot name="mobile-inspector" /><slot name="mobile-toc" /></div>
|
|
2
|
+
<div class="lensmap-sidebar sl-hidden lg:sl-block"><slot name="context-panels" /><slot name="inspector" /><slot name="toc" /></div>
|
|
3
|
+
<style>
|
|
4
|
+
.lensmap-sidebar { padding: 1rem var(--sl-sidebar-pad-x); overflow-wrap: anywhere; }
|
|
5
|
+
</style>
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type LensmapOptions } from "@lensmap/astro-loader";
|
|
2
|
+
export type { LensmapOptions } from "@lensmap/astro-loader";
|
|
3
|
+
/** Add alongside Starlight and the host React integration. Does not replace host panels. */
|
|
4
|
+
export default function starlightLensmap(options?: Omit<LensmapOptions, "contentComponent">): import("astro").AstroIntegration;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import lensmap from "@lensmap/astro-loader";
|
|
4
|
+
function starlightLensmap(options = {}) {
|
|
5
|
+
return lensmap({
|
|
6
|
+
...options,
|
|
7
|
+
contentComponent: fileURLToPath(
|
|
8
|
+
new URL("./components/MapContent.astro", import.meta.url)
|
|
9
|
+
)
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
starlightLensmap as default
|
|
14
|
+
};
|
package/dist/layout.d.ts
ADDED
package/dist/layout.js
ADDED
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
// ../../apps/web/src/document/layout.ts
|
|
2
|
+
import {
|
|
3
|
+
forceCollide,
|
|
4
|
+
forceSimulation,
|
|
5
|
+
forceX,
|
|
6
|
+
forceY
|
|
7
|
+
} from "d3-force";
|
|
8
|
+
|
|
9
|
+
// ../../apps/web/src/document/subtree.ts
|
|
10
|
+
import { polygonHull } from "d3-polygon";
|
|
11
|
+
function silhouette(contour, distance, padding) {
|
|
12
|
+
let low = Infinity;
|
|
13
|
+
let high = -Infinity;
|
|
14
|
+
for (const [x, y] of contour) {
|
|
15
|
+
const theta = Math.atan2(y, distance + x);
|
|
16
|
+
const half = Math.asin(padding / Math.hypot(distance + x, y));
|
|
17
|
+
low = Math.min(low, theta - half);
|
|
18
|
+
high = Math.max(high, theta + half);
|
|
19
|
+
}
|
|
20
|
+
return { low, high };
|
|
21
|
+
}
|
|
22
|
+
function planSubtree(key, children, fullCircle, step, padding) {
|
|
23
|
+
if (children.length === 0) return { key, contour: [[0, 0]], children: [] };
|
|
24
|
+
const atDistance = (distance2) => children.map((child) => silhouette(child.contour, distance2, padding));
|
|
25
|
+
const width = (bounds2) => bounds2.reduce((sum, bound) => sum + bound.high - bound.low, 0);
|
|
26
|
+
let distance = step;
|
|
27
|
+
let bounds = atDistance(distance);
|
|
28
|
+
const span = fullCircle ? Math.PI * 2 : Math.min(Math.PI, Math.max(Math.PI * 2 / 3, width(bounds)));
|
|
29
|
+
if (width(bounds) > span) {
|
|
30
|
+
let lower = distance;
|
|
31
|
+
while (width(atDistance(distance)) > span) distance *= 2;
|
|
32
|
+
while (distance - lower > 0.5) {
|
|
33
|
+
const middle = (lower + distance) / 2;
|
|
34
|
+
if (width(atDistance(middle)) > span) lower = middle;
|
|
35
|
+
else distance = middle;
|
|
36
|
+
}
|
|
37
|
+
bounds = atDistance(distance);
|
|
38
|
+
}
|
|
39
|
+
const required = width(bounds);
|
|
40
|
+
const gap = fullCircle ? (span - required) / children.length : children.length > 1 ? (span - required) / (children.length - 1) : 0;
|
|
41
|
+
let cursor = fullCircle ? -Math.PI / 2 + bounds[0].low : children.length === 1 ? -required / 2 : -span / 2;
|
|
42
|
+
const contour = [[0, 0]];
|
|
43
|
+
const placements = children.map((subtree, index) => {
|
|
44
|
+
const bound = bounds[index];
|
|
45
|
+
const angle = cursor - bound.low;
|
|
46
|
+
cursor += bound.high - bound.low + gap;
|
|
47
|
+
const cos = Math.cos(angle), sin = Math.sin(angle);
|
|
48
|
+
for (const [x, y] of subtree.contour) {
|
|
49
|
+
contour.push([
|
|
50
|
+
(distance + x) * cos - y * sin,
|
|
51
|
+
(distance + x) * sin + y * cos
|
|
52
|
+
]);
|
|
53
|
+
}
|
|
54
|
+
return { subtree, angle, distance };
|
|
55
|
+
});
|
|
56
|
+
return {
|
|
57
|
+
key,
|
|
58
|
+
contour: polygonHull(contour) ?? contour,
|
|
59
|
+
children: placements
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// ../../apps/web/src/document/layout.ts
|
|
64
|
+
function layoutGraph(nodes, edges) {
|
|
65
|
+
if (nodes.length === 0) return { nodes: [], edges };
|
|
66
|
+
const byKey = new Map(nodes.map((node) => [node.key, node]));
|
|
67
|
+
const children = new Map(nodes.map((node) => [node.key, []]));
|
|
68
|
+
const childKeys = /* @__PURE__ */ new Set();
|
|
69
|
+
for (const edge of edges) {
|
|
70
|
+
if (edge.kind !== "branch") continue;
|
|
71
|
+
const child = byKey.get(edge.to);
|
|
72
|
+
if (child) children.get(edge.from)?.push(child);
|
|
73
|
+
childKeys.add(edge.to);
|
|
74
|
+
}
|
|
75
|
+
const roots = nodes.filter((node) => !childKeys.has(node.key));
|
|
76
|
+
const placed = /* @__PURE__ */ new Map();
|
|
77
|
+
const step = 180;
|
|
78
|
+
const padding = 56;
|
|
79
|
+
function plan(node, isRoot) {
|
|
80
|
+
const descendants = (children.get(node.key) ?? []).map(
|
|
81
|
+
(child) => plan(child, false)
|
|
82
|
+
);
|
|
83
|
+
return planSubtree(node.key, descendants, isRoot, step, padding);
|
|
84
|
+
}
|
|
85
|
+
const plans = roots.map((root) => plan(root, true));
|
|
86
|
+
function seed(node, subtree, point, heading, isRoot) {
|
|
87
|
+
const actual = node.position ?? point;
|
|
88
|
+
const fixed = Boolean(node.position) || isRoot;
|
|
89
|
+
placed.set(node.key, {
|
|
90
|
+
key: node.key,
|
|
91
|
+
x: actual.x,
|
|
92
|
+
y: actual.y,
|
|
93
|
+
targetX: actual.x,
|
|
94
|
+
targetY: actual.y,
|
|
95
|
+
fx: fixed ? actual.x : void 0,
|
|
96
|
+
fy: fixed ? actual.y : void 0
|
|
97
|
+
});
|
|
98
|
+
subtree.children.forEach((placement) => {
|
|
99
|
+
const child = byKey.get(placement.subtree.key);
|
|
100
|
+
if (!child)
|
|
101
|
+
throw new Error(
|
|
102
|
+
`Automatic layout could not find child "${placement.subtree.key}".`
|
|
103
|
+
);
|
|
104
|
+
const angle = heading + placement.angle;
|
|
105
|
+
const target = {
|
|
106
|
+
x: actual.x + Math.cos(angle) * placement.distance,
|
|
107
|
+
y: actual.y + Math.sin(angle) * placement.distance
|
|
108
|
+
};
|
|
109
|
+
const childPoint = child.position ?? target;
|
|
110
|
+
const direction = childPoint.x === actual.x && childPoint.y === actual.y ? angle : Math.atan2(childPoint.y - actual.y, childPoint.x - actual.x);
|
|
111
|
+
seed(child, placement.subtree, target, direction, false);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
const anchor = nodes[0].position ?? { x: 0, y: 0 };
|
|
115
|
+
const rootRadius = roots.length > 1 ? step * 2 / Math.sin(Math.PI / roots.length) : 0;
|
|
116
|
+
roots.forEach((root, index) => {
|
|
117
|
+
const angle = -Math.PI / 2 + Math.PI * 2 * index / roots.length;
|
|
118
|
+
seed(
|
|
119
|
+
root,
|
|
120
|
+
plans[index],
|
|
121
|
+
{
|
|
122
|
+
x: anchor.x + Math.cos(angle) * rootRadius,
|
|
123
|
+
y: anchor.y + rootRadius + Math.sin(angle) * rootRadius
|
|
124
|
+
},
|
|
125
|
+
0,
|
|
126
|
+
true
|
|
127
|
+
);
|
|
128
|
+
});
|
|
129
|
+
const simulation = forceSimulation([...placed.values()]).stop().force("x", forceX((node) => node.targetX).strength(0.2)).force("y", forceY((node) => node.targetY).strength(0.2)).force("collide", forceCollide(padding).iterations(2));
|
|
130
|
+
const ticks = Math.ceil(
|
|
131
|
+
Math.log(simulation.alphaMin()) / Math.log(1 - simulation.alphaDecay())
|
|
132
|
+
);
|
|
133
|
+
simulation.tick(ticks);
|
|
134
|
+
return {
|
|
135
|
+
nodes: nodes.map(({ position: _position, ...node }) => {
|
|
136
|
+
const point = placed.get(node.key);
|
|
137
|
+
if (!point)
|
|
138
|
+
throw new Error(`Automatic layout could not place node "${node.key}".`);
|
|
139
|
+
return {
|
|
140
|
+
...node,
|
|
141
|
+
x: point.x,
|
|
142
|
+
y: point.y
|
|
143
|
+
};
|
|
144
|
+
}),
|
|
145
|
+
edges
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// ../../apps/web/src/semantic-layout.ts
|
|
150
|
+
var branches = ["blue", "amber", "mint", "rose"];
|
|
151
|
+
var layoutKey = (graph) => JSON.stringify({
|
|
152
|
+
nodes: graph.nodes.map((node) => [node.key, node.position]),
|
|
153
|
+
edges: graph.edges.map((edge) => [edge.key, edge.from, edge.to, edge.kind])
|
|
154
|
+
});
|
|
155
|
+
function layoutSemanticGraph(graph, previous) {
|
|
156
|
+
const colours = /* @__PURE__ */ new Map();
|
|
157
|
+
const children = /* @__PURE__ */ new Map();
|
|
158
|
+
const nested = /* @__PURE__ */ new Set();
|
|
159
|
+
for (const edge of graph.edges) {
|
|
160
|
+
if (edge.kind !== "branch") continue;
|
|
161
|
+
const list = children.get(edge.from) ?? [];
|
|
162
|
+
list.push(edge.to);
|
|
163
|
+
children.set(edge.from, list);
|
|
164
|
+
nested.add(edge.to);
|
|
165
|
+
}
|
|
166
|
+
const colour = (key, branch, depth) => {
|
|
167
|
+
colours.set(key, branch);
|
|
168
|
+
(children.get(key) ?? []).forEach((child, i) => {
|
|
169
|
+
colour(
|
|
170
|
+
child,
|
|
171
|
+
depth === 0 ? branches[i % branches.length] : branch,
|
|
172
|
+
depth + 1
|
|
173
|
+
);
|
|
174
|
+
});
|
|
175
|
+
};
|
|
176
|
+
graph.nodes.filter((node) => !nested.has(node.key)).forEach((node, i) => {
|
|
177
|
+
colour(node.key, branches[i % branches.length], 0);
|
|
178
|
+
});
|
|
179
|
+
const drafts = graph.nodes.map(
|
|
180
|
+
({ key, id, title, markdown, unresolved, position, destination }) => ({
|
|
181
|
+
key,
|
|
182
|
+
id,
|
|
183
|
+
title,
|
|
184
|
+
markdown,
|
|
185
|
+
unresolved,
|
|
186
|
+
position,
|
|
187
|
+
...destination ? { destination } : {},
|
|
188
|
+
branch: colours.get(key) ?? "blue"
|
|
189
|
+
})
|
|
190
|
+
);
|
|
191
|
+
const edges = graph.edges.map(({ key, from, to, kind, type }) => ({
|
|
192
|
+
key,
|
|
193
|
+
from,
|
|
194
|
+
to,
|
|
195
|
+
kind,
|
|
196
|
+
...type !== void 0 ? { type } : {}
|
|
197
|
+
}));
|
|
198
|
+
if (previous && layoutKey(previous.semantic) === layoutKey(graph)) {
|
|
199
|
+
const points = new Map(
|
|
200
|
+
previous.layout.nodes.map((node) => [node.key, node])
|
|
201
|
+
);
|
|
202
|
+
return {
|
|
203
|
+
nodes: drafts.map(({ position: _position, ...node }) => ({
|
|
204
|
+
...node,
|
|
205
|
+
x: points.get(node.key)?.x ?? 0,
|
|
206
|
+
y: points.get(node.key)?.y ?? 0
|
|
207
|
+
})),
|
|
208
|
+
edges
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
return layoutGraph(drafts, edges);
|
|
212
|
+
}
|
|
213
|
+
export {
|
|
214
|
+
layoutSemanticGraph
|
|
215
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,67 @@
|
|
|
1
1
|
{
|
|
2
|
+
"version": "0.2.1",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"files": [
|
|
6
|
+
"dist"
|
|
7
|
+
],
|
|
8
|
+
"engines": {
|
|
9
|
+
"node": ">=24.16.0"
|
|
10
|
+
},
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public",
|
|
13
|
+
"tag": "latest",
|
|
14
|
+
"registry": "https://registry.npmjs.org/"
|
|
15
|
+
},
|
|
2
16
|
"name": "@lensmap/starlight",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
|
|
17
|
+
"description": "Experimental portable Lensmap Starlight viewer and inspector composition",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/nicodoggie/lensmap.git",
|
|
21
|
+
"directory": "packages/starlight"
|
|
22
|
+
},
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"default": "./dist/index.js"
|
|
27
|
+
},
|
|
28
|
+
"./components/*": "./dist/components/*",
|
|
29
|
+
"./viewer": {
|
|
30
|
+
"types": "./dist/ViewerHost.d.ts",
|
|
31
|
+
"default": "./dist/ViewerHost.js"
|
|
32
|
+
},
|
|
33
|
+
"./viewer.css": "./dist/ViewerHost.css"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@lensmap/astro-loader": "0.2.1",
|
|
37
|
+
"@lensmap/document": "0.2.1",
|
|
38
|
+
"react-markdown": "10.1.0",
|
|
39
|
+
"d3-force": "3.0.1",
|
|
40
|
+
"d3-polygon": "3.0.2"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"astro": "7.4.0",
|
|
44
|
+
"@astrojs/starlight": "0.42.6",
|
|
45
|
+
"@astrojs/react": "6.0.6",
|
|
46
|
+
"react": "19.3.1",
|
|
47
|
+
"react-dom": "19.3.1"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@lensmap/web": "0.0.0",
|
|
51
|
+
"astro": "7.4.0",
|
|
52
|
+
"@astrojs/starlight": "0.42.6",
|
|
53
|
+
"@astrojs/react": "6.0.6",
|
|
54
|
+
"react": "19.3.1",
|
|
55
|
+
"react-dom": "19.3.1",
|
|
56
|
+
"@types/react": "19.3.0",
|
|
57
|
+
"@types/react-dom": "19.3.0",
|
|
58
|
+
"esbuild": "0.28.2",
|
|
59
|
+
"typescript": "7.0.2",
|
|
60
|
+
"@types/node": "24.19.2"
|
|
61
|
+
},
|
|
62
|
+
"scripts": {
|
|
63
|
+
"build": "node build.mjs",
|
|
64
|
+
"typecheck": "tsc -p tsconfig.check.json",
|
|
65
|
+
"test": "node --test test/*.test.ts"
|
|
66
|
+
}
|
|
6
67
|
}
|