@jini-ai/vibecoding 0.7.3-next.2 → 0.7.3-next.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/html/edit.d.ts
CHANGED
|
@@ -8,49 +8,7 @@
|
|
|
8
8
|
* const found = locateRegion({ scan, handle: "hero" });
|
|
9
9
|
* if ("region" in found) replaceRegionInner({ html, region: found.region, fragment: "<h1>Hi</h1>" });
|
|
10
10
|
*/
|
|
11
|
-
import type { ParsedRegion } from "
|
|
12
|
-
/** A discovered handle, including unsafe regions so reads never silently lose an address. */
|
|
13
|
-
export interface ScannedRegion extends ParsedRegion {
|
|
14
|
-
readonly tag: string;
|
|
15
|
-
/** Outer offsets; -1 means parse5 could not locate the boundary. Never splice a problem region. */
|
|
16
|
-
readonly start: number;
|
|
17
|
-
readonly end: number;
|
|
18
|
-
/** Why this region cannot safely be replaced or moved. */
|
|
19
|
-
readonly problem?: string;
|
|
20
|
-
}
|
|
21
|
-
/** A direct fragment child, used for host tagging advice; implicit closes are allowed here. */
|
|
22
|
-
export interface HtmlTopLevelElement {
|
|
23
|
-
readonly tag: string;
|
|
24
|
-
readonly handle?: string;
|
|
25
|
-
readonly start: number;
|
|
26
|
-
readonly end: number;
|
|
27
|
-
readonly innerStart: number;
|
|
28
|
-
readonly innerEnd: number;
|
|
29
|
-
}
|
|
30
|
-
/** Reusable analysis of exactly one source string. Parse errors are diagnostics, not read failures. */
|
|
31
|
-
export interface HtmlRegionScan {
|
|
32
|
-
readonly regions: readonly ScannedRegion[];
|
|
33
|
-
readonly topLevel: readonly HtmlTopLevelElement[];
|
|
34
|
-
/** A raw-source handle could not be accounted for in the recovered tree. */
|
|
35
|
-
readonly documentProblem?: string;
|
|
36
|
-
readonly parseErrorReasons?: readonly string[];
|
|
37
|
-
}
|
|
38
|
-
/** Why lookup could not identify a single safe span. Legacy handle values are deliberately retained. */
|
|
39
|
-
export type RegionLookupProblem = {
|
|
40
|
-
readonly kind: "absent";
|
|
41
|
-
readonly available: readonly string[];
|
|
42
|
-
} | {
|
|
43
|
-
readonly kind: "ambiguous";
|
|
44
|
-
readonly count: number;
|
|
45
|
-
} | {
|
|
46
|
-
readonly kind: "not-replaceable";
|
|
47
|
-
readonly tag: string;
|
|
48
|
-
};
|
|
49
|
-
export type RegionLookup = {
|
|
50
|
-
readonly region: ScannedRegion;
|
|
51
|
-
} | {
|
|
52
|
-
readonly problem: RegionLookupProblem;
|
|
53
|
-
};
|
|
11
|
+
import type { ParsedRegion, ScannedRegion, HtmlRegionScan, RegionLookup, RegionMoveProblem, RegionHandleOptions, UntaggedSection } from "@jini-ai/core/contracts/site/html-region-ports";
|
|
54
12
|
/** Resolve one address, refusing duplicates and unsafe boundaries without throwing on reads. */
|
|
55
13
|
export declare function locateRegion({ scan, handle }: {
|
|
56
14
|
readonly scan: HtmlRegionScan;
|
|
@@ -65,7 +23,6 @@ export declare function replaceRegionInner({ html, region, fragment }: {
|
|
|
65
23
|
readonly region: ParsedRegion;
|
|
66
24
|
readonly fragment: string;
|
|
67
25
|
}, _options?: Record<string, never>): string;
|
|
68
|
-
export type RegionMoveProblem = "self" | "into-itself";
|
|
69
26
|
/**
|
|
70
27
|
* Move a WHOLE safely located element, carrying trailing whitespace (or leading whitespace at EOF).
|
|
71
28
|
* Refuse self/descendant destinations. Both regions must have been resolved from this exact source.
|
|
@@ -81,15 +38,6 @@ export declare function moveRegion({ html, moving, target, placement }: {
|
|
|
81
38
|
} | {
|
|
82
39
|
readonly problem: RegionMoveProblem;
|
|
83
40
|
};
|
|
84
|
-
/** Host-owned slug policy keeps suggestions compatible without adding a slugifier dependency. */
|
|
85
|
-
export interface RegionHandleOptions {
|
|
86
|
-
readonly slugify: (text: string) => string;
|
|
87
|
-
}
|
|
88
|
-
/** A top-level element needing a handle, with a suggestion only when its own heading provides one. */
|
|
89
|
-
export interface UntaggedSection {
|
|
90
|
-
readonly tag: string;
|
|
91
|
-
readonly suggestedHandle: string | undefined;
|
|
92
|
-
}
|
|
93
41
|
/**
|
|
94
42
|
* Derive a stable handle from the first heading, stripping inline tags and truncating to 48 chars.
|
|
95
43
|
* Never suggest positional handles: moving sections must not change their addresses. Collisions,
|
package/dist/html/index.d.ts
CHANGED
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
* dependency, so this entry point stays usable from a server, a worker or a browser without
|
|
8
8
|
* dragging a parser into any of them.
|
|
9
9
|
*/
|
|
10
|
-
export type { HtmlDocumentStore, HtmlRegionParser, HtmlRegionTargetDeps, HtmlRegionTargetOptions,
|
|
10
|
+
export type { HtmlDocumentStore, HtmlRegionParser, HtmlRegionTargetDeps, HtmlRegionTargetOptions, } from "./regions.js";
|
|
11
11
|
export { AGENT_ELEMENT_ATTRIBUTE, createHtmlRegionTarget, isValidRegionHandle, } from "./regions.js";
|
|
12
|
-
export type { HtmlRegionScan, HtmlTopLevelElement, RegionHandleOptions, RegionLookup, RegionLookupProblem, RegionMoveProblem, ScannedRegion, UntaggedSection, } from "
|
|
12
|
+
export type { HtmlRegionScan, HtmlTopLevelElement, RegionHandleOptions, RegionLookup, RegionLookupProblem, RegionMoveProblem, ScannedRegion, UntaggedSection, } from "@jini-ai/core/contracts/site/html-region-ports";
|
|
13
13
|
export { handlesMadeAmbiguous, locateRegion, moveRegion, regionHandlesIn, replaceRegionInner, suggestRegionHandle, untaggedTopLevelSections, } from "./edit.js";
|
|
14
|
+
export type { ParsedRegion } from "@jini-ai/core/contracts/site/html-region-ports";
|
|
14
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
* See docs/decisions/DR-001-conservative-region-detection.md.
|
|
8
8
|
*/
|
|
9
9
|
export { createParse5RegionParser, isValidRegionHandle, scanHtmlRegions } from "./parse5-region-parser.js";
|
|
10
|
-
export type { HtmlRegionScan, HtmlTopLevelElement, ScannedRegion } from "
|
|
10
|
+
export type { HtmlRegionScan, HtmlTopLevelElement, ScannedRegion } from "@jini-ai/core/contracts/site/html-region-ports";
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { HtmlRegionScan } from "
|
|
1
|
+
import type { HtmlRegionScan } from "@jini-ai/core/contracts/site/html-region-ports";
|
|
2
2
|
import { isValidRegionHandle, type HtmlRegionParser } from "../regions.js";
|
|
3
3
|
/**
|
|
4
4
|
* Scan once without throwing for malformed markup: unsafe regions carry their own problem, while
|
package/dist/html/regions.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ParsedRegion } from "@jini-ai/core/contracts/site/html-region-ports";
|
|
1
2
|
import type { EditTarget } from "../core/target.js";
|
|
2
3
|
/** The attribute that publishes a region's handle. Mirrors `@jini-ai/agentic`'s convention. */
|
|
3
4
|
export declare const AGENT_ELEMENT_ATTRIBUTE = "data-agent-element";
|
|
@@ -5,19 +6,6 @@ export declare const AGENT_ELEMENT_ATTRIBUTE = "data-agent-element";
|
|
|
5
6
|
export declare function isValidRegionHandle({ handle }: {
|
|
6
7
|
readonly handle: string;
|
|
7
8
|
}): boolean;
|
|
8
|
-
/** One tagged region located in a document, as reported by the injected parser. */
|
|
9
|
-
export interface ParsedRegion {
|
|
10
|
-
/** The `data-agent-element` value. */
|
|
11
|
-
readonly handle: string;
|
|
12
|
-
/** The `data-agent-role` value, if the markup carries one. */
|
|
13
|
-
readonly role?: string;
|
|
14
|
-
/** The `data-agent-label` value, if present. Page-authored and therefore untrusted for display. */
|
|
15
|
-
readonly label?: string;
|
|
16
|
-
/** Index of the first character of the region's INNER content. */
|
|
17
|
-
readonly innerStart: number;
|
|
18
|
-
/** Index one past the last character of the region's inner content. */
|
|
19
|
-
readonly innerEnd: number;
|
|
20
|
-
}
|
|
21
9
|
/**
|
|
22
10
|
* The host-supplied HTML parser.
|
|
23
11
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jini-ai/vibecoding",
|
|
3
|
-
"version": "0.7.3-next.
|
|
3
|
+
"version": "0.7.3-next.3",
|
|
4
4
|
"description": "Conversational artifact authoring: a target-agnostic edit loop — addressable parts, validated replace, operation-level undo/redo, and per-turn snapshot/rewind. Framework-free in `/core`; tagged-region HTML documents behind ./html; filesystem targets behind ./node and the chat/preview surface behind ./react.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -91,11 +91,11 @@
|
|
|
91
91
|
"typescript": "^5.9.2",
|
|
92
92
|
"vitest": "^3.2.6",
|
|
93
93
|
"parse5": "^8.0.1",
|
|
94
|
-
"@jini-ai/
|
|
95
|
-
"@jini-ai/
|
|
94
|
+
"@jini-ai/core": "0.7.3-next.3",
|
|
95
|
+
"@jini-ai/platform": "^0.7.3-next.3"
|
|
96
96
|
},
|
|
97
97
|
"dependencies": {
|
|
98
|
-
"@jini-ai/core": "^0.7.3-next.
|
|
98
|
+
"@jini-ai/core": "^0.7.3-next.3"
|
|
99
99
|
},
|
|
100
100
|
"peerDependencies": {
|
|
101
101
|
"react": "^18.3.0 || ^19.0.0",
|