structured-context-map-views 0.7.0 → 0.7.2
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/artifact.html +2 -2
- package/dist/cli.js +3 -3
- package/dist/cli.js.map +1 -1
- package/dist/page.html +18 -18
- package/package.json +3 -3
package/dist/artifact.html
CHANGED
|
@@ -666,5 +666,5 @@ body { background: var(--viewer-ground); color: var(--mv-color-ink); }
|
|
|
666
666
|
|
|
667
667
|
</style>
|
|
668
668
|
<div id="root"></div>
|
|
669
|
-
<script type="importmap">{"imports":{"structured-context/browser":"https://cdn.jsdelivr.net/npm/structured-context@0.
|
|
670
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/structured-context-map-views@0.7.
|
|
669
|
+
<script type="importmap">{"imports":{"structured-context/browser":"https://cdn.jsdelivr.net/npm/structured-context@0.26.0/dist/browser.js/+esm","react":"https://cdn.jsdelivr.net/npm/react@19.3.0/+esm","react/jsx-runtime":"https://cdn.jsdelivr.net/npm/react@19.3.0/jsx-runtime/+esm","react-dom":"https://cdn.jsdelivr.net/npm/react-dom@19.3.0/+esm","react-dom/client":"https://cdn.jsdelivr.net/npm/react-dom@19.3.0/client/+esm","ajv/dist/2020":"https://cdn.jsdelivr.net/npm/ajv@8.20.0/dist/2020.js/+esm","json5":"https://cdn.jsdelivr.net/npm/json5@2.2.3/+esm","https://cdn.jsdelivr.net/npm/react@%5E19.3.0/+esm":"https://cdn.jsdelivr.net/npm/react@19.3.0/+esm"}}</script>
|
|
670
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/structured-context-map-views@0.7.2/dist/artifact.js"></script>
|
package/dist/cli.js
CHANGED
|
@@ -5,7 +5,7 @@ import { SctxError, assembleSpaceGraph, createSpaceContext, exportSpaceGraph, lo
|
|
|
5
5
|
import { Command } from "commander";
|
|
6
6
|
var package_default = {
|
|
7
7
|
name: "structured-context-map-views",
|
|
8
|
-
version: "0.7.
|
|
8
|
+
version: "0.7.2",
|
|
9
9
|
description: "Declarative map views of structured-context spaces: render a space as a tree, nested containers and other layouts from a short definition.",
|
|
10
10
|
license: "MIT",
|
|
11
11
|
type: "module",
|
|
@@ -62,7 +62,7 @@ var package_default = {
|
|
|
62
62
|
peerDependencies: {
|
|
63
63
|
"react": "^19.3.0",
|
|
64
64
|
"react-dom": "^19.3.0",
|
|
65
|
-
"structured-context": "
|
|
65
|
+
"structured-context": ">=0.25.0 <1.0.0"
|
|
66
66
|
},
|
|
67
67
|
dependencies: {
|
|
68
68
|
"ajv": "^8.20.0",
|
|
@@ -80,7 +80,7 @@ var package_default = {
|
|
|
80
80
|
"@vitejs/plugin-react": "^6.1.1",
|
|
81
81
|
"react": "^19.3.0",
|
|
82
82
|
"react-dom": "^19.3.0",
|
|
83
|
-
"structured-context": "^0.
|
|
83
|
+
"structured-context": "^0.26.0",
|
|
84
84
|
"tailwindcss": "^4.3.3",
|
|
85
85
|
"vite": "^8.3.2"
|
|
86
86
|
}
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","names":["packageJson"],"sources":["../package.json","../src/node/snapshot.ts","../src/node/cli.ts"],"sourcesContent":["{\n \"name\": \"structured-context-map-views\",\n \"version\": \"0.7.
|
|
1
|
+
{"version":3,"file":"cli.js","names":["packageJson"],"sources":["../package.json","../src/node/snapshot.ts","../src/node/cli.ts"],"sourcesContent":["{\n \"name\": \"structured-context-map-views\",\n \"version\": \"0.7.2\",\n \"description\": \"Declarative map views of structured-context spaces: render a space as a tree, nested containers and other layouts from a short definition.\",\n \"license\": \"MIT\",\n \"type\": \"module\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/mindsocket/structured-context-map-views.git\",\n \"directory\": \"packages/map-views\"\n },\n \"homepage\": \"https://github.com/mindsocket/structured-context-map-views#readme\",\n \"bugs\": \"https://github.com/mindsocket/structured-context-map-views/issues\",\n \"keywords\": [\n \"structured-context\",\n \"visualisation\",\n \"map-view\",\n \"react\"\n ],\n \"files\": [\n \"dist/\"\n ],\n \"sideEffects\": false,\n \"bin\": {\n \"structured-context-map-views\": \"dist/cli.js\"\n },\n \"exports\": {\n \".\": {\n \"types\": \"./dist/types/index.d.ts\",\n \"default\": \"./dist/index.js\"\n },\n \"./node\": {\n \"types\": \"./dist/types/node/index.d.ts\",\n \"default\": \"./dist/node.js\"\n },\n \"./html\": {\n \"types\": \"./dist/types/node/html.d.ts\",\n \"default\": \"./dist/html.js\"\n },\n \"./styles.css\": \"./dist/styles.css\",\n \"./page.html\": {\n \"types\": \"./dist/page.html.d.ts\",\n \"default\": \"./dist/page.html\"\n }\n },\n \"scripts\": {\n \"clean\": \"rm -rf dist\",\n \"generate\": \"bun run generate:schemas && bun run generate:definitions\",\n \"generate:schemas\": \"bun scripts/generate-schemas.ts\",\n \"generate:definitions\": \"bun scripts/generate-definitions.ts\",\n \"build:library\": \"bun run clean && bun run generate && bun --bun vite build && tsc -p tsconfig.build.json && tailwindcss -i src/components/styles.css -o dist/styles.css && bun scripts/build-page.ts\",\n \"build\": \"bun run build:library && bun scripts/build-artifact-page.ts\",\n \"typecheck\": \"tsc --noEmit\",\n \"capture-fixtures\": \"bun scripts/capture-fixtures.ts\",\n \"test\": \"bun test\",\n \"test:package\": \"bash scripts/test-package.sh\",\n \"prepublishOnly\": \"bun run build\",\n \"preversion\": \"bun run build:library && bun run --cwd ../.. lint:fix && bun run --cwd ../.. test && bun run --cwd ../.. test:package\",\n \"version\": \"bun run generate:schemas --release && git add -A\"\n },\n \"peerDependencies\": {\n \"react\": \"^19.3.0\",\n \"react-dom\": \"^19.3.0\",\n \"structured-context\": \">=0.25.0 <1.0.0\"\n },\n \"dependencies\": {\n \"ajv\": \"^8.20.0\",\n \"commander\": \"^15.0.0\",\n \"d3-force\": \"^3.0.1\",\n \"json-schema-to-ts\": \"^3.1.1\",\n \"json5\": \"^2.2.3\"\n },\n \"devDependencies\": {\n \"@tailwindcss/cli\": \"^4.3.3\",\n \"@types/d3-force\": \"^3.0.10\",\n \"@types/node\": \"^22.20.5\",\n \"@types/react\": \"^19.3.0\",\n \"@types/react-dom\": \"^19.3.0\",\n \"@vitejs/plugin-react\": \"^6.1.1\",\n \"react\": \"^19.3.0\",\n \"react-dom\": \"^19.3.0\",\n \"structured-context\": \"^0.26.0\",\n \"tailwindcss\": \"^4.3.3\",\n \"vite\": \"^8.3.2\"\n }\n}\n","import {\n assembleSpaceGraph,\n type Config,\n createSpaceContext,\n exportSpaceGraph,\n validateSpace,\n} from 'structured-context/api';\nimport { mapViewsForSchema } from '../core/definition';\nimport type { SpaceSnapshot } from '../core/space-snapshot';\nimport { loadMapViewDefinitions } from './index';\n\n/** The `validateSpace` options `export` passes through unchanged. */\nexport type ExportValidateOptions = Pick<\n NonNullable<Parameters<typeof validateSpace>[1]>,\n 'depth' | 'includeGated' | 'semantic' | 'ruleFilter'\n>;\n\n/**\n * Node-only: snapshot a space for a browser-only host. Validation is structured-context's own\n * `validateSpace`, which also decides whether a judge runs.\n */\nexport async function exportSnapshot(\n spaceName: string,\n config: Config,\n configDir?: string,\n validateOptions: ExportValidateOptions = {},\n): Promise<SpaceSnapshot> {\n const context = createSpaceContext(spaceName, config);\n const graph = await assembleSpaceGraph(context, {});\n const schemaId = context.schema.$id;\n const validation = await validateSpace(context, validateOptions);\n return {\n space: spaceName,\n schemaId,\n graph: exportSpaceGraph(graph.nodes.values(), context.schema.metadata),\n validation: { issues: validation.issues },\n definitions: mapViewsForSchema(loadMapViewDefinitions(config, { configDir }), schemaId),\n };\n}\n","#!/usr/bin/env bun\nimport { Command } from 'commander';\nimport { loadConfig, resolveConfigPath, SctxError, setConfigPath } from 'structured-context/api';\nimport packageJson from '../../package.json' with { type: 'json' };\nimport { type ExportValidateOptions, exportSnapshot } from './snapshot';\n\nconst program = new Command();\n\nprogram\n .name('structured-context-map-views')\n .description('Map view tools for structured-context spaces')\n .version(packageJson.version)\n .option('--config <path>', 'Path to config file (overrides config discovery)');\n\nprogram\n .command('export')\n .description('Print a JSON snapshot of a space: its graph, validation results and map view definitions')\n .argument('<space-name>', 'Space name')\n .option('--depth <n>', 'Validate only hierarchy nodes within N levels from the top', (v) => parseInt(v, 10))\n .option('--include-gated', 'Evaluate rules even on nodes gated by an upstream failure')\n .option(\n '--rule-filter <dimension=values>',\n 'Evaluate only matching rules; dimensions: category, severity, type, id (repeatable, e.g. severity=error)',\n (v: string, prev: string[] = []) => [...prev, v],\n )\n .option('--semantic [provider]', 'Evaluate semantic rules, with the configured model provider or the one named')\n .action(async (spaceName: string, options: ExportValidateOptions) => {\n setConfigPath(program.opts().config);\n try {\n const config = loadConfig();\n const configDir = resolveConfigPath().root;\n const result = await exportSnapshot(spaceName, config, configDir, options);\n process.stdout.write(`${JSON.stringify(result)}\\n`);\n } catch (err) {\n if (!(err instanceof SctxError)) throw err;\n console.error(`${err.code}: ${err.message}`);\n process.exitCode = 1;\n }\n });\n\nawait program.parseAsync();\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACqBA,eAAsB,eACpB,WACA,QACA,WACA,kBAAyC,CAAC,GAClB;CACxB,MAAM,UAAU,mBAAmB,WAAW,MAAM;CACpD,MAAM,QAAQ,MAAM,mBAAmB,SAAS,CAAC,CAAC;CAClD,MAAM,WAAW,QAAQ,OAAO;CAChC,MAAM,aAAa,MAAM,cAAc,SAAS,eAAe;CAC/D,OAAO;EACL,OAAO;EACP;EACA,OAAO,iBAAiB,MAAM,MAAM,OAAO,GAAG,QAAQ,OAAO,QAAQ;EACrE,YAAY,EAAE,QAAQ,WAAW,OAAO;EACxC,aAAa,kBAAkB,uBAAuB,QAAQ,EAAE,UAAU,CAAC,GAAG,QAAQ;CACxF;AACF;;;AChCA,IAAM,UAAU,IAAI,QAAQ;AAE5B,QACG,KAAK,8BAA8B,CAAC,CACpC,YAAY,8CAA8C,CAAC,CAC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