@lensmap/document 0.1.1 → 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/README.md +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/v1/schema.d.ts +1 -0
- package/dist/v1/schema.js +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -5,10 +5,10 @@ semantic graphs, revision-bound source bindings, session identities and bounded
|
|
|
5
5
|
source-preserving content edits. Does not own layout, browser rendering or LSP.
|
|
6
6
|
|
|
7
7
|
Requires Node 24.16 or newer. ESM only. The API and `version: v1` authoring format
|
|
8
|
-
are incomplete and experimental; `0.
|
|
8
|
+
are incomplete and experimental; `0.x` is not a promise of a stable schema.
|
|
9
9
|
|
|
10
10
|
```sh
|
|
11
|
-
npm install @lensmap/document
|
|
11
|
+
npm install @lensmap/document
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
```js
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export type { ConnectionType, LensmapDocument, Reference, RichNode, } from "./v1
|
|
|
4
4
|
export { ConnectionTypeSchema, DocumentSchema } from "./v1/schema.js";
|
|
5
5
|
export declare function generateJSONSchema(): z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
6
6
|
version: z.ZodLiteral<"v1">;
|
|
7
|
+
frontmatter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
7
8
|
nodes: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodType<import("./v1/schema.js").RichNode, unknown, z.core.$ZodTypeInternals<import("./v1/schema.js").RichNode, unknown>>]>>;
|
|
8
9
|
}, z.core.$strict>>;
|
|
9
10
|
/** Read the edge from the inspected endpoint, independently of structural kind. */
|
package/dist/v1/schema.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export declare const ConnectionSchema: z.ZodType<Connection>;
|
|
|
47
47
|
export declare const NodeSchema: z.ZodUnion<readonly [z.ZodString, z.ZodType<RichNode, unknown, z.core.$ZodTypeInternals<RichNode, unknown>>]>;
|
|
48
48
|
export declare const DocumentSchema: z.ZodObject<{
|
|
49
49
|
version: z.ZodLiteral<"v1">;
|
|
50
|
+
frontmatter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
50
51
|
nodes: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodType<RichNode, unknown, z.core.$ZodTypeInternals<RichNode, unknown>>]>>;
|
|
51
52
|
}, z.core.$strict>;
|
|
52
53
|
export type LensmapDocument = z.infer<typeof DocumentSchema>;
|
package/dist/v1/schema.js
CHANGED
|
@@ -62,5 +62,6 @@ export const ConnectionSchema = z.lazy(() => z.union([
|
|
|
62
62
|
export const NodeSchema = z.union([z.string(), RootNodeSchema]);
|
|
63
63
|
export const DocumentSchema = z.strictObject({
|
|
64
64
|
version: z.literal("v1"),
|
|
65
|
+
frontmatter: z.record(z.string(), z.unknown()).optional(),
|
|
65
66
|
nodes: z.array(NodeSchema),
|
|
66
67
|
});
|
package/package.json
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
"name": "@lensmap/document",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"description": "Experimental Lensmap document engine: YAML analysis, semantic graphs and revision-bound source edits",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.2.1",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
8
8
|
],
|
|
9
9
|
"publishConfig": {
|
|
10
10
|
"access": "public",
|
|
11
|
-
"tag": "
|
|
11
|
+
"tag": "latest",
|
|
12
12
|
"registry": "https://registry.npmjs.org/"
|
|
13
13
|
},
|
|
14
14
|
"repository": {
|