@opsydyn/foldkit-zloz-mermaid 0.3.0 → 0.6.0
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/CHANGELOG.md +35 -0
- package/README.md +279 -4
- package/dist/foldkit.d.mts +89 -0
- package/dist/foldkit.mjs +246 -0
- package/dist/foldkit.mjs.map +1 -0
- package/dist/group-review-v3-BHP9Srfp.d.mts +461 -0
- package/dist/index.d.mts +2 -126
- package/dist/index.mjs +183 -304
- package/dist/index.mjs.map +1 -1
- package/dist/review-reader-BjZIRpPb.mjs +1076 -0
- package/dist/review-reader-BjZIRpPb.mjs.map +1 -0
- package/package.json +20 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
- Add native v2 review packet creation, strict recomputing decoding and independent read-only side opening, with explicit reopening budgets and unchanged v1 readers.
|
|
6
|
+
|
|
7
|
+
- Add explicit v2 connection-document export with retained mode, ordered identity and source-only loss reporting; legacy graph export stays strict.
|
|
8
|
+
|
|
9
|
+
- Add a pure guarded review-packet reader and composable Foldkit opening/comparison controls.
|
|
10
|
+
|
|
11
|
+
- Add pure, content-bound review-packet export controls and optional composable Foldkit views.
|
|
12
|
+
|
|
13
|
+
## [0.6.0](https://github.com/opsydyn/fold-kit-experiments/compare/foldkit-zloz-mermaid-v0.5.0...foldkit-zloz-mermaid-v0.6.0) (2026-11-16)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
- **zloz:** complete native v3 workflows and release qualification ([#151](https://github.com/opsydyn/fold-kit-experiments/issues/151)) ([629f7a3](https://github.com/opsydyn/fold-kit-experiments/commit/629f7a3824fe0751ca6ea816880ede1f5b4bb2ee))
|
|
18
|
+
|
|
19
|
+
## [0.5.0](https://github.com/opsydyn/fold-kit-experiments/compare/foldkit-zloz-mermaid-v0.4.0...foldkit-zloz-mermaid-v0.5.0) (2026-11-15)
|
|
20
|
+
|
|
21
|
+
### Miscellaneous Chores
|
|
22
|
+
|
|
23
|
+
- **foldkit-zloz-mermaid:** Synchronize foldkit-zloz versions
|
|
24
|
+
|
|
25
|
+
## [0.4.0](https://github.com/opsydyn/fold-kit-experiments/compare/foldkit-zloz-mermaid-v0.3.0...foldkit-zloz-mermaid-v0.4.0) (2026-11-15)
|
|
26
|
+
|
|
27
|
+
### Features
|
|
28
|
+
|
|
29
|
+
- **zloz:** add portable authored edge waypoints ([e5218b8](https://github.com/opsydyn/fold-kit-experiments/commit/e5218b89a834066c40e10a7a2c72d466b3df5713))
|
|
30
|
+
- **zloz:** complete native v2 authoring and review ([3ad374f](https://github.com/opsydyn/fold-kit-experiments/commit/3ad374fbb40eea89c40d1793bf88ec3a2c945327))
|
|
31
|
+
- **zloz:** compose review packet export controls ([f23d27c](https://github.com/opsydyn/fold-kit-experiments/commit/f23d27c5abd831d21eb624d4b3930ad1a88c3c2f))
|
|
32
|
+
- **zloz:** define DDD relationship contracts ([45604f4](https://github.com/opsydyn/fold-kit-experiments/commit/45604f43796e3352d70a9d5cb82f896a1532434b))
|
|
33
|
+
- **zloz:** define EventStorming workshop semantics ([458ab16](https://github.com/opsydyn/fold-kit-experiments/commit/458ab1679cff22a7788eaaf61e711e2584133e3b))
|
|
34
|
+
- **zloz:** open portable packets in guarded read-only reviews ([ae1fcce](https://github.com/opsydyn/fold-kit-experiments/commit/ae1fcce175916f9b5eaa45ac6440fdcd2bd76a48))
|
|
35
|
+
- **zloz:** qualify v2 portable adapter boundaries ([e19efa7](https://github.com/opsydyn/fold-kit-experiments/commit/e19efa782bcd22424d62ea545fafa8770120a49c))
|
|
36
|
+
- **zloz:** strictly decode portable review packets ([58344d9](https://github.com/opsydyn/fold-kit-experiments/commit/58344d902e2825006cf5d306fa3daf80840b20de))
|
|
37
|
+
|
|
3
38
|
## [0.3.0](https://github.com/opsydyn/fold-kit-experiments/compare/foldkit-zloz-mermaid-v0.2.0...foldkit-zloz-mermaid-v0.3.0) (2026-11-10)
|
|
4
39
|
|
|
5
40
|
### Features
|
package/README.md
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
# Foldkit Zloz Mermaid
|
|
2
2
|
|
|
3
3
|
Optional, pure Mermaid flowchart export. No Mermaid parser, renderer, browser,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
After publication:
|
|
4
|
+
Foldkit or Effect dependency is installed by the headless entry. Requires the
|
|
5
|
+
matching Zloz core peer. The published baseline is 0.3.0; the export controls below
|
|
6
|
+
are the next unreleased feature.
|
|
8
7
|
|
|
9
8
|
```sh
|
|
10
9
|
npm install @opsydyn/foldkit-zloz @opsydyn/foldkit-zloz-mermaid
|
|
@@ -147,3 +146,279 @@ The package additionally exports `ZlozReviewPacketOptions`,
|
|
|
147
146
|
Packet JSON round-trip tests reproduce its audit using only the chosen snapshots
|
|
148
147
|
and exported rules. The optional adapter still installs no Effect, Foldkit,
|
|
149
148
|
Mermaid parser, browser or layout engine. See [ADR 0035](../../docs/adr/0035-export-portable-review-packets.md).
|
|
149
|
+
|
|
150
|
+
## Strict review-packet reopening (unreleased)
|
|
151
|
+
|
|
152
|
+
```ts
|
|
153
|
+
import { parseReviewPacket } from '@opsydyn/foldkit-zloz-mermaid';
|
|
154
|
+
|
|
155
|
+
const result = parseReviewPacket(fileText);
|
|
156
|
+
if (result.status === 'parsed') {
|
|
157
|
+
// Owned, deeply frozen read-only data. No editor/model import is performed.
|
|
158
|
+
console.log(result.value.comparison.summary, result.value.diagnostics);
|
|
159
|
+
} else {
|
|
160
|
+
console.log(result.code, result.reason, result.path);
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
`ZlozReviewPacketParseResult` distinguishes `parsed` and `rejected`. Rejection codes
|
|
165
|
+
are `invalid-json`, `limit-exceeded`, `unsupported-format`, `unsupported-version`,
|
|
166
|
+
`invalid-packet` and `inconsistent-packet`; `path` is a JSON Pointer (empty for root).
|
|
167
|
+
Invalid configured limits throw the existing core configuration error.
|
|
168
|
+
|
|
169
|
+
The decoder accepts exact `foldkit-zloz-review` v1 packets in selected-snapshots
|
|
170
|
+
scope. It validates snapshots/identities and data-only conventions, then recomputes
|
|
171
|
+
all audits, deltas, diagnostics, Mermaid sources and identity/fidelity projections
|
|
172
|
+
through the existing creator. The full wire representation must agree, with object
|
|
173
|
+
key order ignored and array order retained. Unknown fields, duplicate JSON keys
|
|
174
|
+
(including escaped aliases), non-finite numbers, conflicting edition identities,
|
|
175
|
+
invalid rules, stale findings and forged projections reject. Returned data is the
|
|
176
|
+
recomputed packet, never trusted cached projections. Current, distinct-edition and
|
|
177
|
+
same-edition comparisons are supported. Builtin v1 conventions must match the
|
|
178
|
+
builtin catalogue; custom catalogues retain their explicit validated rule data.
|
|
179
|
+
|
|
180
|
+
Optional limits are `maxCharacters` (default 2,000,000 UTF-16 code units, cap
|
|
181
|
+
16,000,000), `maxDepth` (64, cap 128), and `maxValues` (100,000, cap 1,000,000).
|
|
182
|
+
All must be positive safe integers. Nesting/duplicate keys are scanned before
|
|
183
|
+
JSON.parse; value traversal and freezing avoid spread-based argument limits.
|
|
184
|
+
These are input-shape budgets, not a wall-clock or peak-memory guarantee. Hosts
|
|
185
|
+
own file-byte limits, decoding and worker isolation when needed.
|
|
186
|
+
|
|
187
|
+
Reopening validates **self-consistency, not authenticity**. A coherently rewritten
|
|
188
|
+
packet can still be valid. Parsing does not execute Mermaid or confer model import,
|
|
189
|
+
editing, graph mutation or trust in an author's identity. The decoder performs
|
|
190
|
+
no IO; the reader below and Effect CLI compose it at their host boundaries. See
|
|
191
|
+
[ADR 0057](../../docs/adr/0057-decode-portable-review-packets-strictly.md) and
|
|
192
|
+
[decoder qualification](evidence/review-packet-parse.md). PNG and Alchemy remain deferred.
|
|
193
|
+
|
|
194
|
+
## Composable review-packet controls (unreleased)
|
|
195
|
+
|
|
196
|
+
The root entry exports `resolveReviewPacketControls` and
|
|
197
|
+
`resolveReviewPacketRequest`. The optional `/foldkit` entry exports
|
|
198
|
+
`zlozReviewPacketControls`, `zlozReviewPacketConsent`, `zlozReviewPacketDownload`
|
|
199
|
+
and their view/parts types. Install matching `foldkit` to use the native controls;
|
|
200
|
+
it remains an optional peer and is not installed for headless consumers.
|
|
201
|
+
|
|
202
|
+
```ts
|
|
203
|
+
import {
|
|
204
|
+
resolveReviewPacketControls,
|
|
205
|
+
resolveReviewPacketRequest,
|
|
206
|
+
} from '@opsydyn/foldkit-zloz-mermaid';
|
|
207
|
+
import { zlozReviewPacketControls } from '@opsydyn/foldkit-zloz-mermaid/foldkit';
|
|
208
|
+
|
|
209
|
+
const selection = { baselineId: 'before', selectedId: null }; // null = current
|
|
210
|
+
const state = { consentKey: null }; // host-owned, ephemeral Foldkit model state
|
|
211
|
+
const context = resolveReviewPacketControls(document, selection, state, {
|
|
212
|
+
blockedReason: null, // supply live host protection; direction and data-only rules are optional
|
|
213
|
+
});
|
|
214
|
+
const controls = zlozReviewPacketControls(
|
|
215
|
+
h,
|
|
216
|
+
context,
|
|
217
|
+
(request) => Message.ObservedReviewPacketInput({ request }),
|
|
218
|
+
{
|
|
219
|
+
showCounts: !minimalMode && diagnosticsEnabled,
|
|
220
|
+
renderStatus: () => (minimalMode || !diagnosticsEnabled ? null : undefined),
|
|
221
|
+
},
|
|
222
|
+
);
|
|
223
|
+
// In update: rebuild with the current document, selection, state and options.
|
|
224
|
+
const decision = resolveReviewPacketRequest(document, selection, state, request);
|
|
225
|
+
// ready: retain decision.state; blocked: show decision.reason;
|
|
226
|
+
// download: pass decision.packet to a host Command, never perform I/O in update.
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Preview materializes report-mode projections in memory. Scope text discloses that
|
|
230
|
+
both full authored snapshots and cameras travel; only Mermaid omissions need
|
|
231
|
+
loss consent. Projection errors always block download. Consent and requests use
|
|
232
|
+
an opaque, exact-content key; a fresh resolution catches changes to chosen sources,
|
|
233
|
+
model identity/name, graph/camera, conventions and projection direction. The key
|
|
234
|
+
contains packet data: keep it ephemeral, do not log it, put it in DOM attributes or
|
|
235
|
+
use it as an authentication credential. Hosts also check session identity/epoch
|
|
236
|
+
and current protection before acting; they own storage/download and any playback
|
|
237
|
+
pause. Unrelated history changes do not alter a selected-snapshot packet.
|
|
238
|
+
|
|
239
|
+
Every part has a nullable/custom renderer, with independent attributes, labels,
|
|
240
|
+
layout and count visibility. Custom diagnostics own list-item semantics. Native
|
|
241
|
+
checkbox/button helpers retain disabled state and accessible protection reasons.
|
|
242
|
+
Hiding a part never bypasses the pure request resolver. Counts can disappear in
|
|
243
|
+
minimal mode while functional scope, losses and reasons remain available. No
|
|
244
|
+
packet import, graph mutation or new Undo entry is implied. Exact serialization
|
|
245
|
+
costs packet-sized memory and projection work while previewing; no performance
|
|
246
|
+
claim is made. See [ADR 0037](../../docs/adr/0037-compose-review-packet-export-controls.md).
|
|
247
|
+
|
|
248
|
+
## Read-only packet reader (unreleased)
|
|
249
|
+
|
|
250
|
+
```ts
|
|
251
|
+
import {
|
|
252
|
+
createReviewReader,
|
|
253
|
+
resolveReviewReader,
|
|
254
|
+
updateReviewReader,
|
|
255
|
+
} from '@opsydyn/foldkit-zloz-mermaid';
|
|
256
|
+
|
|
257
|
+
let reader = createReviewReader('model-id/incarnation-1');
|
|
258
|
+
const started = updateReviewReader(reader, {
|
|
259
|
+
scope: reader.scope,
|
|
260
|
+
type: 'ReadRequested',
|
|
261
|
+
file: { name: file.name, byteLength: file.size },
|
|
262
|
+
});
|
|
263
|
+
reader = started.state;
|
|
264
|
+
const readDescriptor = started.read;
|
|
265
|
+
// Continue only when readDescriptor exists.
|
|
266
|
+
// A host Command reads the File within maxBytes,
|
|
267
|
+
// checking actual bytes and decoding fatal UTF-8. Return its correlated fact:
|
|
268
|
+
if (readDescriptor) {
|
|
269
|
+
reader = updateReviewReader(reader, {
|
|
270
|
+
scope: readDescriptor.scope,
|
|
271
|
+
type: 'ReadSucceeded',
|
|
272
|
+
run: readDescriptor.run,
|
|
273
|
+
text: fileText,
|
|
274
|
+
}).state;
|
|
275
|
+
}
|
|
276
|
+
const snapshot = resolveReviewReader(reader).snapshot;
|
|
277
|
+
// Render snapshot in a detached read-only editor. Do not replace the working model.
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
`updateReviewReader` returns `{ state, read }`. Its requests include correlated
|
|
281
|
+
read success/failure/cancel, `SideSelected` and `ReviewClosed`. `blockedReason` and
|
|
282
|
+
`selectionReason` are live policies; opening is checked again at completion.
|
|
283
|
+
`reviewReaderForScope` resets the reader when the host model incarnation changes.
|
|
284
|
+
Use unique scopes: stale callbacks must never collide with a new model session.
|
|
285
|
+
Default `maxBytes` is 1 MiB (configurable integer 1–16,000,000); the host must enforce
|
|
286
|
+
actual bytes before and after IO. `parseOptions` independently bounds decoding.
|
|
287
|
+
No file IO occurs in the package. Cancellation prevents publication; it need not
|
|
288
|
+
abort underlying IO. Invalid/stale/protected/cancelled reads preserve the last
|
|
289
|
+
good review and chosen side. Closing invalidates pending reads.
|
|
290
|
+
|
|
291
|
+
The optional `@opsydyn/foldkit-zloz-mermaid/foldkit` export `zlozReviewReader`
|
|
292
|
+
accepts the HtmlBuilder, state, request callback, file callback, live policy and
|
|
293
|
+
view options. It renders native opening/cancel/close and baseline/selected controls,
|
|
294
|
+
audit findings and projection losses. `renderSummary`, `renderFinding` and
|
|
295
|
+
`renderLayout` compose custom presentations; undefined falls back, null omits.
|
|
296
|
+
`showCounts: false` and `instructions: false` provide a clean UI while findings
|
|
297
|
+
and actions remain available. Hosts own detached canvas rendering and interaction
|
|
298
|
+
protection. Reading grants no editing/import permission, authenticity guarantee or
|
|
299
|
+
new loss consent. See [ADR 0059](../../docs/adr/0059-open-review-packets-with-detached-reader-controls.md)
|
|
300
|
+
and [local qualification](../../apps/zloz-demo/evidence/review-reader.md).
|
|
301
|
+
|
|
302
|
+
## Explicit v2 connection documents
|
|
303
|
+
|
|
304
|
+
```ts
|
|
305
|
+
import { exportConnectionMermaid } from '@opsydyn/foldkit-zloz-mermaid';
|
|
306
|
+
const result = exportConnectionMermaid(documentV2, { lossPolicy: 'report' });
|
|
307
|
+
// Converted bundles use foldkit-zloz-mermaid/v2 and retain connectionMode.
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
This entry validates the complete v2 connection document and preserves ordered
|
|
311
|
+
source/target identity even for input-to-input or output-to-output links. Mermaid
|
|
312
|
+
source cannot express loose future-connection rules or the camera; those losses
|
|
313
|
+
reject by default. `report` accepts projection omissions, never invalid graphs.
|
|
314
|
+
Keep canonical JSON as authority. No general import or model reconstruction is
|
|
315
|
+
promised. The existing `exportMermaid(graph)` remains strict and its protocol and
|
|
316
|
+
output are unchanged. V1 review packets/readers remain v1; they do not accept v2
|
|
317
|
+
bundles or silently remove checkpoint modes.
|
|
318
|
+
|
|
319
|
+
## Native v2 review packets
|
|
320
|
+
|
|
321
|
+
```ts
|
|
322
|
+
const result = createReviewPacketV2(
|
|
323
|
+
modelV2,
|
|
324
|
+
{ baselineId: 'baseline' },
|
|
325
|
+
{
|
|
326
|
+
lossPolicy: 'report',
|
|
327
|
+
},
|
|
328
|
+
);
|
|
329
|
+
if (result.status === 'created') {
|
|
330
|
+
const text = JSON.stringify(result.value);
|
|
331
|
+
const opened = openReviewPacketV2(text, 'selected', workingEditor);
|
|
332
|
+
// opened.review.editor is independent and read-only when status is 'opened'.
|
|
333
|
+
}
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
Version-2 packets retain baseline/selected connection documents, modes, data-only
|
|
337
|
+
conventions, mode-aware audit comparisons and v2 Mermaid projections. The scope is
|
|
338
|
+
selected snapshots, not a whole-model/ancestry archive. Role interpretation stays
|
|
339
|
+
`zloz-event-storming/v1` because domain rules are independent from port kinds.
|
|
340
|
+
|
|
341
|
+
`parseReviewPacketV2` shares strict bounded scanning and deterministic recomputation
|
|
342
|
+
with the v1 decoder. Conflicting side identities, duplicate fields, altered modes,
|
|
343
|
+
forged projections/audits or unknown fields reject. V1 readers stay fixed at v1.
|
|
344
|
+
Creation checks default reopening budgets (2,000,000 characters, depth 64, 100,000
|
|
345
|
+
JSON values) and reports `packet-limit` before claiming portable success.
|
|
346
|
+
|
|
347
|
+
`openReviewPacketV2` revalidates text before initializing either side in its saved
|
|
348
|
+
mode with zero Undo, leaving the working editor/history untouched. Packets and
|
|
349
|
+
recorded findings never authorize editing, import or Apply. Native workbench file
|
|
350
|
+
controls remain a separate adoption slice.
|
|
351
|
+
|
|
352
|
+
## Native v3 groups and loss review (unreleased)
|
|
353
|
+
|
|
354
|
+
```ts
|
|
355
|
+
import {
|
|
356
|
+
exportGroupMermaidV3,
|
|
357
|
+
createGroupMermaidReviewV3,
|
|
358
|
+
resolveGroupMermaidReviewV3,
|
|
359
|
+
updateGroupMermaidReviewV3,
|
|
360
|
+
} from '@opsydyn/foldkit-zloz-mermaid';
|
|
361
|
+
|
|
362
|
+
const projection = exportGroupMermaidV3(documentV3, { lossPolicy: 'report' });
|
|
363
|
+
const context = { scope: 'working:mermaid', sourceRevision: editor.revision, document: documentV3 };
|
|
364
|
+
const state = createGroupMermaidReviewV3(context.scope);
|
|
365
|
+
const controls = resolveGroupMermaidReviewV3(state, context);
|
|
366
|
+
// Emit native review facts from controls; consume only a returned download payload in host IO.
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
The distinct `foldkit-zloz-mermaid/v3` bundle validates the complete native source
|
|
370
|
+
and retains world convention, connection mode, group-port capability and native
|
|
371
|
+
identity (`nodeId`, `edgeId`, original parent and scoped endpoint IDs/kinds).
|
|
372
|
+
Source uses safe aliases, named edges and nested nonempty subgraphs. A group edge
|
|
373
|
+
links its boundary alias: actual socket artwork, anchor positions and attachment
|
|
374
|
+
are **explicit losses**, not implied fidelity. Layout, camera, future mode/capability
|
|
375
|
+
rules and omitted semantic/data fields retain their findings. No full graph is
|
|
376
|
+
hidden in identity. Canonical JSON remains authoritative; no production import or
|
|
377
|
+
round trip is promised. Existing graph/v2 exports, protocols and readers stay fixed.
|
|
378
|
+
|
|
379
|
+
Losses reject by default. `report` creates a review candidate, never an IO grant.
|
|
380
|
+
Errors (invalid documents/options/labels, empty groups and generated source over
|
|
381
|
+
32768 UTF-16 code units) cannot be accepted. Native scalar options reject accessors
|
|
382
|
+
and unknown fields; returned native bundle/identity records are frozen.
|
|
383
|
+
|
|
384
|
+
`resolveGroupMermaidReviewV3` binds acceptance to the full document, scope/revision,
|
|
385
|
+
direction, file name and exact output/findings. `updateGroupMermaidReviewV3` accepts
|
|
386
|
+
`MermaidDirectionChanged`, `MermaidLossAcceptanceChanged`, `MermaidDownloadRequested`
|
|
387
|
+
and `MermaidDownloadSettled` facts carrying its identity. It reruns `canDownload`
|
|
388
|
+
against the current document and candidate, checks consent and emits a detached
|
|
389
|
+
`ZlozGroupMermaidDownloadV3` only when allowed. Consume its exact `text` in a host
|
|
390
|
+
Command; never render again to download. Pending runs prevent duplicate requests,
|
|
391
|
+
failure permits retry and stale completions do not overwrite current feedback.
|
|
392
|
+
`groupMermaidReviewForScopeV3` resets authority for working/edition scope changes
|
|
393
|
+
while retaining direction preference. Review state is trusted transient Model data,
|
|
394
|
+
not a credential or portable session codec. A download already dispatched cannot
|
|
395
|
+
be retroactively revoked. Graph, revision and Undo remain unchanged by export.
|
|
396
|
+
|
|
397
|
+
Optional `/foldkit` `zlozGroupMermaidReviewV3(h, controls, onRequest, { id })`
|
|
398
|
+
provides a direction selector, safe highlighted source, all findings, consent and
|
|
399
|
+
download. Minimal/global diagnostics hide optional status, preserving functional
|
|
400
|
+
findings and denial reasons. `renderPart`, `renderFinding` and `renderLayout` use
|
|
401
|
+
undefined for native defaults and null to omit; replacements own their semantics
|
|
402
|
+
and explanations. Compose `zlozGroupMermaidConsentV3` /
|
|
403
|
+
`zlozGroupMermaidDownloadV3` independently or use headless APIs for a fully custom
|
|
404
|
+
surface. Scoped `theme` uses core's shared public Foldkit theme mapper.
|
|
405
|
+
|
|
406
|
+
No Mermaid parser/renderer, DOM, Astro, Foldkit or Effect dependency enters the
|
|
407
|
+
headless root. Local browser oracle evidence is version-specific and separate from
|
|
408
|
+
human AT/device, hosted deployment, broad performance and registry acceptance.
|
|
409
|
+
The private CLI's current Mermaid export remains v1/v2; compatibility inspection
|
|
410
|
+
only reports native package availability. Native packets/receipts/patches/audits
|
|
411
|
+
remain separate adoption work.
|
|
412
|
+
|
|
413
|
+
### Native v3 review packets (unreleased)
|
|
414
|
+
|
|
415
|
+
`createReviewPacketV3(model, { baselineId, selectedId? }, options)` combines the
|
|
416
|
+
chosen complete native checkpoints, capability/mode-aware audit comparison and
|
|
417
|
+
native Mermaid projections. `lossPolicy: 'report'` produces visible findings;
|
|
418
|
+
hosts must obtain explicit acceptance before exposing a download. Group-port
|
|
419
|
+
artwork and exact attachment remain reported Mermaid projection losses.
|
|
420
|
+
|
|
421
|
+
`parseReviewPacketV3(text)` strictly bounds text and recomputes audits and both
|
|
422
|
+
projections. `openReviewPacketV3(text, 'baseline' | 'selected', sessionId)` creates
|
|
423
|
+
an independent read-only v3 review with empty Undo history. Imported packets
|
|
424
|
+
never grant edit authority. Existing packet decoders remain version-fixed.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { P as ZlozReviewPacketControlsContext, R as ZlozReviewPacketRequest, U as ZlozReviewPacketDiagnostic, Z as MermaidDiagnostic, a as ZlozGroupMermaidReviewRequestV3, f as ZlozReviewReaderOptions, h as ZlozReviewReaderState, p as ZlozReviewReaderRequest, r as ZlozGroupMermaidReviewControlsV3 } from "./group-review-v3-BHP9Srfp.mjs";
|
|
2
|
+
import { ZlozDiagnosticOptions, ZlozTheme } from "@opsydyn/foldkit-zloz/foldkit";
|
|
3
|
+
import { Html, HtmlBuilder } from "foldkit/html";
|
|
4
|
+
|
|
5
|
+
//#region src/review-reader-view.d.ts
|
|
6
|
+
type Attributes$1<M> = Parameters<HtmlBuilder<M>['div']>[0];
|
|
7
|
+
type ZlozReviewReaderParts = Readonly<{
|
|
8
|
+
open: Html | null;
|
|
9
|
+
status: Html | null;
|
|
10
|
+
summary: Html | null;
|
|
11
|
+
selection: Html | null;
|
|
12
|
+
findings: Html | null;
|
|
13
|
+
cancel: Html | null;
|
|
14
|
+
close: Html | null;
|
|
15
|
+
}>;
|
|
16
|
+
type ZlozReviewReaderViewOptions<M> = Readonly<{
|
|
17
|
+
attributes?: Attributes$1<M>;
|
|
18
|
+
idPrefix?: string;
|
|
19
|
+
instructions?: boolean;
|
|
20
|
+
showCounts?: boolean;
|
|
21
|
+
renderFinding?: (finding: ZlozReviewPacketDiagnostic, h: HtmlBuilder<M>) => Html | null | undefined;
|
|
22
|
+
renderSummary?: (state: ZlozReviewReaderState, h: HtmlBuilder<M>) => Html | null | undefined;
|
|
23
|
+
renderLayout?: (parts: ZlozReviewReaderParts, h: HtmlBuilder<M>) => readonly Html[];
|
|
24
|
+
}>;
|
|
25
|
+
/** Native/composable read-only reader controls; file IO and canvas ownership stay with the host. */
|
|
26
|
+
declare function zlozReviewReader<M>(h: HtmlBuilder<M>, state: ZlozReviewReaderState, onRequest: (request: ZlozReviewReaderRequest) => M, onFiles: (files: readonly File[]) => M, policy?: ZlozReviewReaderOptions, options?: ZlozReviewReaderViewOptions<M>): Html;
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/group-review-v3-view.d.ts
|
|
29
|
+
type OnRequest$1<M> = (request: ZlozGroupMermaidReviewRequestV3) => M;
|
|
30
|
+
type ZlozGroupMermaidReviewPartsV3 = Readonly<{
|
|
31
|
+
direction: Html | null;
|
|
32
|
+
source: Html | null;
|
|
33
|
+
findings: readonly Html[];
|
|
34
|
+
consent: Html | null;
|
|
35
|
+
download: Html | null;
|
|
36
|
+
reason: Html | null;
|
|
37
|
+
status: Html | null;
|
|
38
|
+
}>;
|
|
39
|
+
type ZlozGroupMermaidReviewViewOptionsV3<M> = ZlozDiagnosticOptions & Readonly<{
|
|
40
|
+
id: string;
|
|
41
|
+
label?: string;
|
|
42
|
+
theme?: ZlozTheme;
|
|
43
|
+
attributes?: Parameters<HtmlBuilder<M>['section']>[0]; /** Undefined retains the default; null removes the part. The host owns explanations in replacements. */
|
|
44
|
+
renderPart?: (part: Exclude<keyof ZlozGroupMermaidReviewPartsV3, 'findings'>, controls: ZlozGroupMermaidReviewControlsV3, h: HtmlBuilder<M>, onRequest: OnRequest$1<M>) => Html | null | undefined;
|
|
45
|
+
renderFinding?: (finding: MermaidDiagnostic, h: HtmlBuilder<M>) => Html | null | undefined;
|
|
46
|
+
renderLayout?: (parts: ZlozGroupMermaidReviewPartsV3, controls: ZlozGroupMermaidReviewControlsV3, h: HtmlBuilder<M>) => readonly Html[];
|
|
47
|
+
}>;
|
|
48
|
+
declare function zlozGroupMermaidConsentV3<M>(h: HtmlBuilder<M>, controls: ZlozGroupMermaidReviewControlsV3, onRequest: OnRequest$1<M>, attributes?: Parameters<HtmlBuilder<M>['input']>[0]): Html;
|
|
49
|
+
declare function zlozGroupMermaidDownloadV3<M>(h: HtmlBuilder<M>, controls: ZlozGroupMermaidReviewControlsV3, onRequest: OnRequest$1<M>, attributes?: Parameters<HtmlBuilder<M>['button']>[0], children?: Parameters<HtmlBuilder<M>['button']>[1]): Html;
|
|
50
|
+
/** Optional source review only. No Mermaid renderer, executable markup or DOM IO enters the product. */
|
|
51
|
+
declare function zlozGroupMermaidReviewV3<M>(h: HtmlBuilder<M>, controls: ZlozGroupMermaidReviewControlsV3, onRequest: OnRequest$1<M>, options: ZlozGroupMermaidReviewViewOptionsV3<M>): Html;
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region src/foldkit.d.ts
|
|
54
|
+
type Attributes<M> = Parameters<HtmlBuilder<M>['div']>[0];
|
|
55
|
+
type Children<M> = Parameters<HtmlBuilder<M>['div']>[1];
|
|
56
|
+
type OnRequest<M> = (request: ZlozReviewPacketRequest) => M;
|
|
57
|
+
type ZlozReviewPacketParts = Readonly<{
|
|
58
|
+
scope: Html | null;
|
|
59
|
+
diagnostics: readonly Html[];
|
|
60
|
+
consent: Html | null;
|
|
61
|
+
download: Html | null;
|
|
62
|
+
reason: Html | null;
|
|
63
|
+
status: Html | null;
|
|
64
|
+
}>;
|
|
65
|
+
type ZlozReviewPacketViewOptions<M> = Readonly<{
|
|
66
|
+
attributes?: Attributes<M>;
|
|
67
|
+
label?: string;
|
|
68
|
+
showCounts?: boolean;
|
|
69
|
+
scopeLabel?: string;
|
|
70
|
+
diagnosticsLabel?: string;
|
|
71
|
+
consentLabel?: string;
|
|
72
|
+
downloadLabel?: string;
|
|
73
|
+
reasonLabel?: string;
|
|
74
|
+
statusLabel?: string;
|
|
75
|
+
renderScope?: (context: ZlozReviewPacketControlsContext, h: HtmlBuilder<M>) => Html | null | undefined;
|
|
76
|
+
renderDiagnostic?: (item: ZlozReviewPacketDiagnostic, h: HtmlBuilder<M>) => Html | null | undefined;
|
|
77
|
+
renderConsent?: (context: ZlozReviewPacketControlsContext, h: HtmlBuilder<M>, onRequest: OnRequest<M>) => Html | null | undefined;
|
|
78
|
+
renderDownload?: (context: ZlozReviewPacketControlsContext, h: HtmlBuilder<M>, onRequest: OnRequest<M>) => Html | null | undefined;
|
|
79
|
+
renderReason?: (context: ZlozReviewPacketControlsContext, h: HtmlBuilder<M>) => Html | null | undefined;
|
|
80
|
+
renderStatus?: (context: ZlozReviewPacketControlsContext, h: HtmlBuilder<M>) => Html | null | undefined;
|
|
81
|
+
renderLayout?: (parts: ZlozReviewPacketParts, context: ZlozReviewPacketControlsContext, h: HtmlBuilder<M>) => readonly Html[];
|
|
82
|
+
}>;
|
|
83
|
+
declare function zlozReviewPacketConsent<M>(h: HtmlBuilder<M>, context: ZlozReviewPacketControlsContext, onRequest: OnRequest<M>, attributes?: Parameters<HtmlBuilder<M>['input']>[0], label?: string): Html;
|
|
84
|
+
declare function zlozReviewPacketDownload<M>(h: HtmlBuilder<M>, context: ZlozReviewPacketControlsContext, onRequest: OnRequest<M>, attributes?: Parameters<HtmlBuilder<M>['button']>[0], children?: Children<M>, label?: string): Html;
|
|
85
|
+
/** Nullable slots remove parts; undefined retains accessible native defaults. Custom diagnostics own list-item semantics. */
|
|
86
|
+
declare function zlozReviewPacketControls<M>(h: HtmlBuilder<M>, context: ZlozReviewPacketControlsContext, onRequest: OnRequest<M>, options?: ZlozReviewPacketViewOptions<M>): Html;
|
|
87
|
+
//#endregion
|
|
88
|
+
export { type ZlozGroupMermaidReviewPartsV3, type ZlozGroupMermaidReviewViewOptionsV3, ZlozReviewPacketParts, ZlozReviewPacketViewOptions, type ZlozReviewReaderParts, type ZlozReviewReaderViewOptions, zlozGroupMermaidConsentV3, zlozGroupMermaidDownloadV3, zlozGroupMermaidReviewV3, zlozReviewPacketConsent, zlozReviewPacketControls, zlozReviewPacketDownload, zlozReviewReader };
|
|
89
|
+
//# sourceMappingURL=foldkit.d.mts.map
|