diff --git a/dist/core/DataModel.d.ts b/dist/core/DataModel.d.ts index 005287f..7583eb6 100644 --- a/dist/core/DataModel.d.ts +++ b/dist/core/DataModel.d.ts @@ -1,185 +1,9 @@ -import { type EventBusInstance } from './EventBus.js'; import type { INode, ISourceNode, IAllNode, SourceMeta } from './NodeInterfaces.js'; import type { ParseWarning } from '../datamodel/parser/ParseWarning.js'; import type { RowData } from '../datamodel/node/BaseNode.js'; -export type { IAllNode as AllNode, SourceMeta }; -export interface CreateSessionOptions { - bus?: EventBusInstance; -} -/** - * One source's content, ready to be written back over the file it came from. - * - * Discriminated on `kind` rather than left as `ArrayBuffer | string`, because this is - * a machine contract in the same register as SourceDTO: a caller about to write a - * file must not have to `typeof` the answer to find out which of the two it got, and - * a `typeof` check is exactly the kind of test that stops being correct the moment a - * third flavour appears. `bytes` is a Uint8Array rather than an ArrayBuffer because - * that is what a filesystem write actually accepts. - * - * `sourceFormat` is the source node's OWN format string — the same vocabulary - * SourceDTO.sourceFormat publishes ('json' for a textual `.sldd`, 'xml' for a - * compressed-binary one) — so a consumer can correlate the two without a mapping - * table of its own. - */ -export type SerializedSource = { - kind: 'binary'; - sourceFormat: string; - bytes: Uint8Array; -} | { - kind: 'text'; - sourceFormat: string; - text: string; -}; -/** - * What a link target resolved to — see session.resolveLink(). - * - * Discriminated on `status` for the reason SerializedSource is discriminated on `kind`: - * this is a machine contract, and the interesting part of it is the FAILURES. A bare - * `INode | null` would fold three different situations into one answer and leave the - * host unable to tell them apart, which matters because they call for different - * behaviour: - * - * - 'resolved' — a node to go to. - * - 'not-found' — the file IS open and holds nothing by that name. Report it; there - * is nothing to offer the user, and the link is probably stale or the target was - * built from an expression this could not read (see resolveLink). - * - 'source-not-open' — the file is not open in this session. This is the one a host - * can act on: "open mdlparams.sldd to follow this" is a genuinely better answer - * than a dead link, and it is only possible because the status carries `sourceId` - * AND `name`, so the host can re-ask once the file is open. - * - 'empty' — the caller passed nothing at all (no target, or whitespace). Separated - * from the other two because it is a bug in the CALLER's plumbing rather than a - * fact about the session, and answering it with 'source-not-open' for the source - * named '' would send a host off to open a file with no name. - * - * Never throws, for the reason serializeSource returns null rather than throwing: a - * consumer walking every link in a table must not need a try/catch per row. - * - * `nodes` is every candidate in document order and `node` is `nodes[0]`. Both are - * present on purpose: a `.sldd` target names an ENTRY, not a node id, and a dictionary - * can hold that name in two sections at once (a design entry and its derived - * counterpart). A host with nowhere to put a choice follows `node` and is right for - * the ordinary case; a host that can offer a picker has the alternatives without - * having to re-run the search. Being ambiguous is therefore not a separate status — - * it would make every caller handle a fourth case to learn something the list already - * says. - * - * Plain data apart from the nodes themselves. The nodes are LIVE INodes, as - * findNodes() hands back live nodes and for the same reason: an in-process host edits - * what it followed, and toDTO is the projection applied at the out-of-process edge by - * the caller that needs it (see src/core/dto.ts). - */ -export type LinkResolution = { - status: 'resolved'; - sourceId: string; - node: INode; - nodes: INode[]; -} | { - status: 'not-found'; - sourceId: string; - name: string; -} | { - status: 'source-not-open'; - sourceId: string; - name: string | null; -} | { - status: 'empty'; -}; -/** - * One place a definition is referenced — see session.findUsages(). - * - * Plain data, with NO live node on it, which is the opposite of the choice - * LinkResolution makes and deliberate. This is what fills a `UsedBy` cell: it goes - * into a RowData, and a RowData is a plain-data shape that hosts pass through - * structured clone or JSON to a webview or an RPC client (the same reason ParseWarning - * carries a reason string instead of an Error). A live node on this object would make - * the whole result unclonable for the consumer it exists to serve. A caller that wants - * the block node itself passes `linkTarget` straight back to resolveLink(). - * - * `linkTarget` is `blockKey@modelSrcId` — the SAME grammar ModelBlockNode writes for - * the forward direction, so the reverse link needs no second target format and no - * second resolver. It round-trips: resolveLink(usage.linkTarget) is the block node. - * - * No display text is pre-baked here. What a `UsedBy` cell should READ is a - * presentation decision ("Const (Constant)" or "mdlcases.mdl: Const" or a count), and - * this package is consumed by a VS Code extension, a CLI and an RPC server that will - * not agree on it. The four facts a label could want are all here separately. - */ -export interface NodeUsage { - /** - * What the block READS as — 'Const', or `` for one whose label the model does - * not give (blockIdentity.blockLabel). Display text, and not an identity: two blocks of - * one model can share it. `linkTarget` is what tells them apart. - */ - blockName: string; - /** - * WHERE the block is — `Controller/Gain`, and just the label for one in the root - * system (blockIdentity.joinBlockPath). Model-relative, because the model is already - * named by `modelSrcId`. - * - * What makes two usages that read alike tell-apart-able for a PERSON: a dictionary - * entry used by four blocks all named `Gain` renders as one word four times, each link - * correctly reaching a different block, with nothing on screen to say which. Display - * text like `blockName`, not an identity — `linkTarget` remains the identity. - */ - blockPath: string; - /** The block's type — 'Constant'. Empty when the model did not record one. */ - blockType: string; - /** The block parameter that holds the reference — 'Value', 'Denominator'. */ - paramProperty: string; - /** The parameter's value VERBATIM, which is an expression as often as a bare name: '[tau 1]'. */ - paramValue: string; - /** The srcId of the model the block is in, as getDataSourceIds() reports it. */ - modelSrcId: string; - /** - * A target resolveLink() turns back into the block node — `blockKey@modelSrcId`, the key - * being the block's SID where the file records one (blockIdentity.blockKey). - */ - linkTarget: string; -} -/** - * One sub-dictionary a `.sldd` references, and whether this session can reach it — - * see session.resolveDictionaryReferences(). - * - * `name` is what the FILE records (a bare file name, e.g. 'common.sldd'), normalized to - * a string: the node keeps these as `unknown[]` because the two `.sldd` readers put - * different shapes in it, and every consumer would otherwise repeat the same narrowing. - */ -export interface DictionaryReference { - /** The sub-dictionary as the referencing file names it. */ - name: string; - /** The same answer resolveLink() gives for that name — a root node, or why not. */ - resolution: LinkResolution; -} -/** - * What session.findNodes() matches on. - * - * `name` and `value` are searches, so a string is a SUBSTRING test — what a search - * box does. `className` and `kind` are filters over closed vocabularies a host holds - * verbatim (see kindForClass), so a string there is a WHOLE-string test: 'Simulink.Bus' - * must not also answer for Simulink.BusElement. Neither takes a RegExp today; widening - * either to `string | RegExp` later is a backward-compatible change. - * - * `sourceId`, `caseSensitive` and `limit` are modifiers rather than criteria: they - * shape an answer, they do not select one. A query holding only modifiers therefore - * has no criteria at all — see findNodes for what that means. - */ -export interface FindNodesQuery { - /** Substring of the node's own name, or a RegExp tested against it. */ - name?: string | RegExp; - /** The Class column, matched whole — e.g. 'Simulink.Parameter'. */ - className?: string; - /** The Kind column, matched whole — e.g. 'Bus Element'. */ - kind?: string; - /** Substring of the node's rendered value, or a RegExp tested against it. */ - value?: string | RegExp; - /** Restrict the search to one open source. Omitted means every open source. */ - sourceId?: string; - /** Applies to STRING criteria only; a RegExp always keeps its own flags. Default false. */ - caseSensitive?: boolean; - /** Cap on the number of matches. Omitted means uncapped. */ - limit?: number; -} +import type { CreateSessionOptions, DictionaryReference, FindNodesQuery, LinkResolution, NodeUsage, SerializedSource } from './sessionTypes.js'; +export type { AllNode, SourceMeta } from './sessionTypes.js'; +export type { CreateSessionOptions, DictionaryReference, FindNodesQuery, LinkResolution, NodeUsage, SerializedSource }; export declare function createSession(opts?: CreateSessionOptions): { allNode: IAllNode; addDataSource: (srcId: string, content: Record, meta?: Partial, warnings?: ParseWarning[]) => ISourceNode; @@ -237,7 +61,7 @@ export declare function createSession(opts?: CreateSessionOptions): { redo: () => void; canUndo: () => boolean; canRedo: () => boolean; - bus: EventBusInstance; + bus: import("./EventBus.js").EventBusInstance; }; export type Session = ReturnType; declare const DataModel: { @@ -297,7 +121,7 @@ declare const DataModel: { redo: () => void; canUndo: () => boolean; canRedo: () => boolean; - bus: EventBusInstance; + bus: import("./EventBus.js").EventBusInstance; }; export default DataModel; //# sourceMappingURL=DataModel.d.ts.map \ No newline at end of file diff --git a/dist/core/DataModel.d.ts.map b/dist/core/DataModel.d.ts.map index 749c401..a9e981b 100644 --- a/dist/core/DataModel.d.ts.map +++ b/dist/core/DataModel.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"DataModel.d.ts","sourceRoot":"","sources":["../../src/core/DataModel.ts"],"names":[],"mappings":"AAEA,OAAO,EAA8B,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAmBlF,OAAO,KAAK,EAAE,KAAK,EAAkB,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC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ziD7B,CAAC,QAAQ,KAAK,UAAU,MAAM,CAAC,KAAG,CAAC;yBAsC9B,KAAK,KAAG,IAAI;2BAoBV,KAAK,WAAW,MAAM,IAAI,KAAG,IAAI;gBA8gDxC,IAAI;gBAQJ,IAAI;mBAQD,OAAO;mBAKP,OAAO;;CAsKmB,CAAC;AAErD,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/dist/core/DataModel.js b/dist/core/DataModel.js index c6ea792..c3ab830 100644 --- a/dist/core/DataModel.js +++ b/dist/core/DataModel.js @@ -12,110 +12,16 @@ import { serializeBinarySldd } from '../datamodel/parser/BinarySlddSerializer.js // The name reductions and the expression reading, from the leaf modules that hold the // single copy of each. This file used to spell all three itself; the usage index needs // the same three, and a rule stated twice is a rule that drifts (see fileKinds). -import { basenameOf, isMatFile, isSlddFile, modelNameOf, refBasename } from '../datamodel/fileKinds.js'; +import { basenameOf, isMatFile, isSlddFile, modelNameOf, projectNameOf, refBasename } from '../datamodel/fileKinds.js'; import { identifiersIn } from '../datamodel/expressions.js'; import { blockKey, blockLabel, joinBlockPath } from '../datamodel/blockIdentity.js'; import { normalizeRefNames } from '../datamodel/parser/SlddContent.js'; -// Whether a query field was actually asked about. -// -// `undefined` is the field a host left out. `''` is the field it filled in from an -// empty search box, and it is treated as ALSO not asked: a substring test against '' -// passes for every node, so honouring it would answer "the user has typed nothing" -// with every node in every open file — the largest allocation the session can make -// and the one nobody asked for. A caller that really means "renders as empty" says -// so with a pattern, `/^$/`, which this leaves alone. A RegExp is never `''`, so an -// explicit `new RegExp('')` stays a match-all: a pattern object is a choice, an -// empty string is a blank. -function isAsked(field) { - return field !== undefined && field !== ''; -} -// A criterion over one piece of a node's text. -// -// The read is defensive. Name, class, kind and value are all getters over parsed -// content, and a host may hand the session a tree this package did not build -// (addParsedSource exists for exactly that), so one node that throws on read must not -// take a whole search down — the same rule readPropertyValue applies on the edit path. -// -// A failed read is NOT the empty string: a criterion is a claim about a field, and a -// field that cannot be read is a claim that cannot be checked, so it is false. Folding -// it to '' instead would let `{ value: /^$/ }` — a caller asking specifically which -// nodes render no value — answer with a node whose value might render as anything, if -// only it could be read. -function textCriterion(read, test) { - return (node) => { - let text; - try { - text = read(node); - } - catch { - return false; - } - return typeof text === 'string' && test(text); - }; -} -// A caller's string or RegExp as a test over one piece of text. `whole` picks between -// the two kinds of string criterion described on FindNodesQuery. -function compileTextTest(pattern, caseSensitive, whole) { - if (typeof pattern !== 'string') { - // A RegExp is honoured exactly as written: `caseSensitive` never adds an `i` flag - // and never takes one away, because the caller already made that choice and a - // pattern that behaves differently inside this call than it did in the host's own - // test is worse than either default. - // - // The one rewrite is `g`/`y`, and it is not optional. RegExp.prototype.test on a - // global or sticky pattern advances lastIndex and resumes from there next call, - // so reusing one caller-supplied pattern across a whole index would match roughly - // every SECOND node — and because the state lives in the caller's object, a host - // retyping the same search would watch its own results flicker. Cloned rather - // than reset per node so the caller's own object is never mutated, and once per - // query rather than once per node. - if (pattern.global || pattern.sticky) { - const stateless = new RegExp(pattern.source, pattern.flags.replace(/[gy]/g, '')); - return (text) => stateless.test(text); - } - return (text) => pattern.test(text); - } - if (caseSensitive) { - return whole ? (text) => text === pattern : (text) => text.includes(pattern); - } - // Folded once here, per query, rather than per node per criterion. - const folded = pattern.toLowerCase(); - return whole ? (text) => text.toLowerCase() === folded : (text) => text.toLowerCase().includes(folded); -} -// The criteria a query asks for, in the order they should be evaluated: the two -// whole-string compares first, then the name substring, and the VALUE last — -// displayValue formats its content on read (a large matrix or cell renders through -// the display-convention machinery), so it is the one field worth not reading for a -// node another criterion has already rejected. -function compileCriteria(query) { - const caseSensitive = query.caseSensitive === true; - const criteria = []; - if (isAsked(query.className)) { - criteria.push(textCriterion((node) => node.className, compileTextTest(query.className, caseSensitive, true))); - } - if (isAsked(query.kind)) { - criteria.push(textCriterion((node) => node.kind, compileTextTest(query.kind, caseSensitive, true))); - } - if (isAsked(query.name)) { - // The node's own name — the identifier its id is built from, and the same string - // findNodeById resolves against — not its rendered displayName. The two differ - // only for positional elements, whose label embeds the PARENT's name ('Array(1)' - // for the node named '1'), so matching the label as well would make a search for - // `Array` return every element of every array and bury the variable in its own - // contents. A host that wants label matching has displayName one field away. - criteria.push(textCriterion((node) => node.name, compileTextTest(query.name, caseSensitive, false))); - } - if (isAsked(query.value)) { - // Matched against displayValue, which is the string a host actually shows: it is - // what PropValue.readValue returns for the Value column and what BaseNode.toRow - // falls back to, so a user searches over exactly what a user can read. A node - // with no value renders '' and so fails every non-empty pattern, which is what - // keeps a value query from sweeping up the sections and the structure-only - // entries the way a listing would. - criteria.push(textCriterion((node) => node.displayValue, compileTextTest(query.value, caseSensitive, false))); - } - return criteria; -} +// The session's own vocabulary — what a caller passes in and what these functions hand +// back — and the compiler that turns one of those types, FindNodesQuery, into the tests +// findNodes runs. Both used to be written out in this file, above createSession; neither +// is session code, and each now has a module of its own that says why (see the headers of +// `sessionTypes.ts` and `findQuery.ts`). +import { compileCriteria } from './findQuery.js'; // A link target split into the entry name it asks for and the source it asks in. // // Two grammars, and only two: `name@source` names an ENTRY inside a named source, and a @@ -431,8 +337,11 @@ export function createSession(opts = {}) { // filename for its fallback, hence the strip — note ProjectNode.fromParsed labels // itself from the basename and never reads parsed.name, so the stripped form only // shows up if a host calls parseProject itself. - const basename = ((meta && meta.path) || srcId).split(/[\\/]/).pop() || srcId; - const parsed = parseProject(files, basename.replace(/\.prj$/i, '')); + // No `|| srcId` guard on the reduction: `basenameOf` returns the whole string when it + // finds no separator to cut at, so it is falsy only for input that was already empty — + // in which case srcId is the empty string too and the fallback returned it unchanged. + const basename = basenameOf((meta && meta.path) || srcId); + const parsed = parseProject(files, projectNameOf(basename)); const projectNode = ProjectNode.fromParsed(parsed, basename); return registerSource(srcId, projectNode, meta, parsed.warnings); } @@ -603,8 +512,8 @@ export function createSession(opts = {}) { * already precise and cheap through getDataSource(id).flatten(). * * - A RegExp keeps its own flags; `caseSensitive` governs string criteria only. See - * compileTextTest, which also explains the one rewrite (`g`/`y`) and why it is - * forced. + * compileTextTest in findQuery.ts, which also explains the one rewrite (`g`/`y`) and + * why it is forced. * * - Results come back in the order the session indexed them: per source, the * pre-order walk indexSource performs (parent before child, siblings in tree @@ -1140,7 +1049,7 @@ export function createSession(opts = {}) { // package did not build, and a host that supplies block-parameter usages in the // documented shape should be searchable. The reads below are defensive for the same // reason — one hostile source must not take the whole scan down, the rule - // textCriterion applies on the search path. + // findQuery.ts's textCriterion applies on the search path. const declared = source.blockParamUsages; if (!Array.isArray(declared)) { continue; diff --git a/dist/core/DataModel.js.map b/dist/core/DataModel.js.map index 4e28a11..af10fdc 100644 --- a/dist/core/DataModel.js.map +++ b/dist/core/DataModel.js.map @@ -1 +1 @@ -{"version":3,"file":"DataModel.js","sourceRoot":"","sources":["../../src/core/DataModel.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAyB,MAAM,eAAe,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,QAAQ,MAAM,yCAAyC,CAAC;AAC/D,OAAO,SAAS,MAAM,0CAA0C,CAAC;AACjE,OAAO,OAAO,MAAM,wCAAwC,CAAC;AAC7D,OAAO,WAAW,MAAM,4CAA4C,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAClF,sFAAsF;AACtF,uFAAuF;AACvF,iFAAiF;AACjF,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxG,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,UAAU,EAA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ACf,cAAc;QACd,oBAAoB;QACpB,YAAY;QACZ,kBAAkB;QAClB,gBAAgB;QAChB,gBAAgB;QAChB,SAAS;QACT,aAAa;QACb,aAAa;QACb,gBAAgB;QAChB,kBAAkB;QAClB,eAAe;QACf,UAAU;QACV,gBAAgB;QAChB,cAAc;QACd,SAAS;QACT,cAAc;QACd,YAAY;QACZ,aAAa;QACb,aAAa;QACb,iBAAiB;QACjB,mBAAmB;QACnB,cAAc;QACd,cAAc;QACd,gBAAgB;QAChB,YAAY;QACZ,8EAA8E;QAC9E,6EAA6E;QAC7E,SAAS;QACT,QAAQ;QACR,+EAA+E;QAC/E,kFAAkF;QAClF,4EAA4E;QAC5E,2DAA2D;QAC3D,WAAW;QACX,UAAU;QACV,2BAA2B;QAC3B,wFAAwF;QACxF,sFAAsF;QACtF,wFAAwF;QACxF,MAAM;QACN,UAAU;QACV,QAAQ;QACR,YAAY;QACZ,QAAQ;QACR,wEAAwE;QACxE,gFAAgF;QAChF,qEAAqE;QACrE,QAAQ;QACR,UAAU;QACV,UAAU;QACV,cAAc;QACd,eAAe;QACf,kFAAkF;QAClF,kFAAkF;QAClF,oFAAoF;QACpF,+EAA+E;QAC/E,uCAAuC;QACvC,aAAa;QACb,YAAY;QACZ,cAAc;QACd,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,aAAa;QACtB,OAAO,EAAE,aAAa;QACtB,GAAG;KACJ,CAAC;IACF,OAAO,OAAO,CAAC;AACjB,CAAC;AAID,MAAM,SAAS,GAAG,aAAa,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,CAAC;AAErD,eAAe,SAAS,CAAC"} \ No newline at end of file +{"version":3,"file":"DataModel.js","sourceRoot":"","sources":["../../src/core/DataModel.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kB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QACd,SAAS;QACT,cAAc;QACd,YAAY;QACZ,aAAa;QACb,aAAa;QACb,iBAAiB;QACjB,mBAAmB;QACnB,cAAc;QACd,cAAc;QACd,gBAAgB;QAChB,YAAY;QACZ,8EAA8E;QAC9E,6EAA6E;QAC7E,SAAS;QACT,QAAQ;QACR,+EAA+E;QAC/E,kFAAkF;QAClF,4EAA4E;QAC5E,2DAA2D;QAC3D,WAAW;QACX,UAAU;QACV,2BAA2B;QAC3B,wFAAwF;QACxF,sFAAsF;QACtF,wFAAwF;QACxF,MAAM;QACN,UAAU;QACV,QAAQ;QACR,YAAY;QACZ,QAAQ;QACR,wEAAwE;QACxE,gFAAgF;QAChF,qEAAqE;QACrE,QAAQ;QACR,UAAU;QACV,UAAU;QACV,cAAc;QACd,eAAe;QACf,kFAAkF;QAClF,kFAAkF;QAClF,oFAAoF;QACpF,+EAA+E;QAC/E,uCAAuC;QACvC,aAAa;QACb,YAAY;QACZ,cAAc;QACd,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,aAAa;QACtB,OAAO,EAAE,aAAa;QACtB,GAAG;KACJ,CAAC;IACF,OAAO,OAAO,CAAC;AACjB,CAAC;AAID,MAAM,SAAS,GAAG,aAAa,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,CAAC;AAErD,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/dist/core/findQuery.d.ts b/dist/core/findQuery.d.ts new file mode 100644 index 0000000..565d12a --- /dev/null +++ b/dist/core/findQuery.d.ts @@ -0,0 +1,5 @@ +import type { INode } from './NodeInterfaces.js'; +import type { FindNodesQuery } from './sessionTypes.js'; +export type NodeCriterion = (node: INode) => boolean; +export declare function compileCriteria(query: FindNodesQuery): NodeCriterion[]; +//# sourceMappingURL=findQuery.d.ts.map \ No newline at end of file diff --git a/dist/core/findQuery.d.ts.map b/dist/core/findQuery.d.ts.map new file mode 100644 index 0000000..68c7e00 --- /dev/null +++ b/dist/core/findQuery.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"findQuery.d.ts","sourceRoot":"","sources":["../../src/core/findQuery.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAKxD,MAAM,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,KAAK,KAAK,OAAO,CAAC;AAgFrD,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,GAAG,aAAa,EAAE,CA4BtE"} \ No newline at end of file diff --git a/dist/core/findQuery.js b/dist/core/findQuery.js new file mode 100644 index 0000000..1fa5595 --- /dev/null +++ b/dist/core/findQuery.js @@ -0,0 +1,130 @@ +// src/core/findQuery.ts +// Copyright 2026 The MathWorks, Inc. +// +// A FindNodesQuery, compiled into the per-node tests that answer it. +// +// This is the whole of the "decide what matching MEANS" half of session.findNodes(), +// and it is separate from the session because it needs nothing from one: it reads the +// caller's query object and a node's own getters, holds no state between calls, and +// touches neither the node index, the open sources nor the event bus. Compiling a query +// and running it over a session are two different jobs, and only the second one is +// session bookkeeping — so the corners that a query API's behaviour actually lives in +// (an empty search box, a caller's `/g` pattern, a getter that throws) can be read, +// reviewed and reasoned about here without 1900 lines of session around them. +// +// What stayed in `core/DataModel.ts`, so that this file is not mistaken for the whole +// search: session.findNodes() owns everything that needs the session — the walk over +// the flat node index, the `sourceId` scope (compared by walking to the owning root), +// the `limit`, and the ordering guarantee. It also owns the two DECISIONS that read +// like they might be here and are not: +// +// * criteria combine with AND — that is the inner loop in findNodes, which rejects a +// node at the first criterion that says no; +// * a query with no criteria matches NOTHING — compileCriteria simply returns an +// empty array for such a query, and findNodes is what turns an empty array into an +// empty answer rather than into "everything passes an AND over nothing". +// +// Both are documented on findNodes, which is where a host reads them. Changing either +// one is a change to findNodes, not to this file. +// Whether a query field was actually asked about. +// +// `undefined` is the field a host left out. `''` is the field it filled in from an +// empty search box, and it is treated as ALSO not asked: a substring test against '' +// passes for every node, so honouring it would answer "the user has typed nothing" +// with every node in every open file — the largest allocation the session can make +// and the one nobody asked for. A caller that really means "renders as empty" says +// so with a pattern, `/^$/`, which this leaves alone. A RegExp is never `''`, so an +// explicit `new RegExp('')` stays a match-all: a pattern object is a choice, an +// empty string is a blank. +function isAsked(field) { + return field !== undefined && field !== ''; +} +// A criterion over one piece of a node's text. +// +// The read is defensive. Name, class, kind and value are all getters over parsed +// content, and a host may hand the session a tree this package did not build +// (session.addParsedSource() exists for exactly that), so one node that throws on read +// must not take a whole search down — the same rule readPropertyValue applies on the +// edit path over in DataModel.ts. +// +// A failed read is NOT the empty string: a criterion is a claim about a field, and a +// field that cannot be read is a claim that cannot be checked, so it is false. Folding +// it to '' instead would let `{ value: /^$/ }` — a caller asking specifically which +// nodes render no value — answer with a node whose value might render as anything, if +// only it could be read. +function textCriterion(read, test) { + return (node) => { + let text; + try { + text = read(node); + } + catch { + return false; + } + return typeof text === 'string' && test(text); + }; +} +// A caller's string or RegExp as a test over one piece of text. `whole` picks between +// the two kinds of string criterion described on FindNodesQuery. +function compileTextTest(pattern, caseSensitive, whole) { + if (typeof pattern !== 'string') { + // A RegExp is honoured exactly as written: `caseSensitive` never adds an `i` flag + // and never takes one away, because the caller already made that choice and a + // pattern that behaves differently inside this call than it did in the host's own + // test is worse than either default. + // + // The one rewrite is `g`/`y`, and it is not optional. RegExp.prototype.test on a + // global or sticky pattern advances lastIndex and resumes from there next call, + // so reusing one caller-supplied pattern across a whole index would match roughly + // every SECOND node — and because the state lives in the caller's object, a host + // retyping the same search would watch its own results flicker. Cloned rather + // than reset per node so the caller's own object is never mutated, and once per + // query rather than once per node. + if (pattern.global || pattern.sticky) { + const stateless = new RegExp(pattern.source, pattern.flags.replace(/[gy]/g, '')); + return (text) => stateless.test(text); + } + return (text) => pattern.test(text); + } + if (caseSensitive) { + return whole ? (text) => text === pattern : (text) => text.includes(pattern); + } + // Folded once here, per query, rather than per node per criterion. + const folded = pattern.toLowerCase(); + return whole ? (text) => text.toLowerCase() === folded : (text) => text.toLowerCase().includes(folded); +} +// The criteria a query asks for, in the order they should be evaluated: the two +// whole-string compares first, then the name substring, and the VALUE last — +// displayValue formats its content on read (a large matrix or cell renders through +// the display-convention machinery), so it is the one field worth not reading for a +// node another criterion has already rejected. +export function compileCriteria(query) { + const caseSensitive = query.caseSensitive === true; + const criteria = []; + if (isAsked(query.className)) { + criteria.push(textCriterion((node) => node.className, compileTextTest(query.className, caseSensitive, true))); + } + if (isAsked(query.kind)) { + criteria.push(textCriterion((node) => node.kind, compileTextTest(query.kind, caseSensitive, true))); + } + if (isAsked(query.name)) { + // The node's own name — the identifier its id is built from, and the same string + // findNodeById resolves against — not its rendered displayName. The two differ + // only for positional elements, whose label embeds the PARENT's name ('Array(1)' + // for the node named '1'), so matching the label as well would make a search for + // `Array` return every element of every array and bury the variable in its own + // contents. A host that wants label matching has displayName one field away. + criteria.push(textCriterion((node) => node.name, compileTextTest(query.name, caseSensitive, false))); + } + if (isAsked(query.value)) { + // Matched against displayValue, which is the string a host actually shows: it is + // what PropValue.readValue returns for the Value column and what BaseNode.toRow + // falls back to, so a user searches over exactly what a user can read. A node + // with no value renders '' and so fails every non-empty pattern, which is what + // keeps a value query from sweeping up the sections and the structure-only + // entries the way a listing would. + criteria.push(textCriterion((node) => node.displayValue, compileTextTest(query.value, caseSensitive, false))); + } + return criteria; +} +//# sourceMappingURL=findQuery.js.map \ No newline at end of file diff --git a/dist/core/findQuery.js.map b/dist/core/findQuery.js.map new file mode 100644 index 0000000..1ff2376 --- /dev/null +++ b/dist/core/findQuery.js.map @@ -0,0 +1 @@ +{"version":3,"file":"findQuery.js","sourceRoot":"","sources":["../../src/core/findQuery.ts"],"names":[],"mappings":"AAAA,wBAAwB;AACxB,qCAAqC;AACrC,EAAE;AACF,qEAAqE;AACrE,EAAE;AACF,qFAAqF;AACrF,sFAAsF;AACtF,oFAAoF;AACpF,wFAAwF;AACxF,mFAAmF;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d.ts new file mode 100644 index 0000000..b9c2de8 --- /dev/null +++ b/dist/core/sessionTypes.d.ts @@ -0,0 +1,182 @@ +import type { EventBusInstance } from './EventBus.js'; +import type { INode, IAllNode, SourceMeta } from './NodeInterfaces.js'; +export type { IAllNode as AllNode, SourceMeta }; +export interface CreateSessionOptions { + bus?: EventBusInstance; +} +/** + * One source's content, ready to be written back over the file it came from. + * + * Discriminated on `kind` rather than left as `ArrayBuffer | string`, because this is + * a machine contract in the same register as SourceDTO: a caller about to write a + * file must not have to `typeof` the answer to find out which of the two it got, and + * a `typeof` check is exactly the kind of test that stops being correct the moment a + * third flavour appears. `bytes` is a Uint8Array rather than an ArrayBuffer because + * that is what a filesystem write actually accepts. + * + * `sourceFormat` is the source node's OWN format string — the same vocabulary + * SourceDTO.sourceFormat publishes ('json' for a textual `.sldd`, 'xml' for a + * compressed-binary one) — so a consumer can correlate the two without a mapping + * table of its own. + */ +export type SerializedSource = { + kind: 'binary'; + sourceFormat: string; + bytes: Uint8Array; +} | { + kind: 'text'; + sourceFormat: string; + text: string; +}; +/** + * What a link target resolved to — see session.resolveLink(). + * + * Discriminated on `status` for the reason SerializedSource is discriminated on `kind`: + * this is a machine contract, and the interesting part of it is the FAILURES. A bare + * `INode | null` would fold three different situations into one answer and leave the + * host unable to tell them apart, which matters because they call for different + * behaviour: + * + * - 'resolved' — a node to go to. + * - 'not-found' — the file IS open and holds nothing by that name. Report it; there + * is nothing to offer the user, and the link is probably stale or the target was + * built from an expression this could not read (see session.resolveLink()). + * - 'source-not-open' — the file is not open in this session. This is the one a host + * can act on: "open mdlparams.sldd to follow this" is a genuinely better answer + * than a dead link, and it is only possible because the status carries `sourceId` + * AND `name`, so the host can re-ask once the file is open. + * - 'empty' — the caller passed nothing at all (no target, or whitespace). Separated + * from the other two because it is a bug in the CALLER's plumbing rather than a + * fact about the session, and answering it with 'source-not-open' for the source + * named '' would send a host off to open a file with no name. + * + * Never throws, for the reason session.serializeSource() returns null rather than + * throwing: a consumer walking every link in a table must not need a try/catch per row. + * + * `nodes` is every candidate in document order and `node` is `nodes[0]`. Both are + * present on purpose: a `.sldd` target names an ENTRY, not a node id, and a dictionary + * can hold that name in two sections at once (a design entry and its derived + * counterpart). A host with nowhere to put a choice follows `node` and is right for + * the ordinary case; a host that can offer a picker has the alternatives without + * having to re-run the search. Being ambiguous is therefore not a separate status — + * it would make every caller handle a fourth case to learn something the list already + * says. + * + * Plain data apart from the nodes themselves. The nodes are LIVE INodes, as + * session.findNodes() hands back live nodes and for the same reason: an in-process host + * edits what it followed, and toDTO is the projection applied at the out-of-process edge + * by the caller that needs it (see src/core/dto.ts). + */ +export type LinkResolution = { + status: 'resolved'; + sourceId: string; + node: INode; + nodes: INode[]; +} | { + status: 'not-found'; + sourceId: string; + name: string; +} | { + status: 'source-not-open'; + sourceId: string; + name: string | null; +} | { + status: 'empty'; +}; +/** + * One place a definition is referenced — see session.findUsages(). + * + * Plain data, with NO live node on it, which is the opposite of the choice + * LinkResolution makes and deliberate. This is what fills a `UsedBy` cell: it goes + * into a RowData, and a RowData is a plain-data shape that hosts pass through + * structured clone or JSON to a webview or an RPC client (the same reason ParseWarning + * carries a reason string instead of an Error). A live node on this object would make + * the whole result unclonable for the consumer it exists to serve. A caller that wants + * the block node itself passes `linkTarget` straight back to session.resolveLink(). + * + * `linkTarget` is `blockKey@modelSrcId` — the SAME grammar ModelBlockNode writes for + * the forward direction, so the reverse link needs no second target format and no + * second resolver. It round-trips: resolveLink(usage.linkTarget) is the block node. + * + * No display text is pre-baked here. What a `UsedBy` cell should READ is a + * presentation decision ("Const (Constant)" or "mdlcases.mdl: Const" or a count), and + * this package is consumed by a VS Code extension, a CLI and an RPC server that will + * not agree on it. The four facts a label could want are all here separately. + */ +export interface NodeUsage { + /** + * What the block READS as — 'Const', or `` for one whose label the model does + * not give (blockIdentity.blockLabel). Display text, and not an identity: two blocks of + * one model can share it. `linkTarget` is what tells them apart. + */ + blockName: string; + /** + * WHERE the block is — `Controller/Gain`, and just the label for one in the root + * system (blockIdentity.joinBlockPath). Model-relative, because the model is already + * named by `modelSrcId`. + * + * What makes two usages that read alike tell-apart-able for a PERSON: a dictionary + * entry used by four blocks all named `Gain` renders as one word four times, each link + * correctly reaching a different block, with nothing on screen to say which. Display + * text like `blockName`, not an identity — `linkTarget` remains the identity. + */ + blockPath: string; + /** The block's type — 'Constant'. Empty when the model did not record one. */ + blockType: string; + /** The block parameter that holds the reference — 'Value', 'Denominator'. */ + paramProperty: string; + /** The parameter's value VERBATIM, which is an expression as often as a bare name: '[tau 1]'. */ + paramValue: string; + /** The srcId of the model the block is in, as getDataSourceIds() reports it. */ + modelSrcId: string; + /** + * A target resolveLink() turns back into the block node — `blockKey@modelSrcId`, the key + * being the block's SID where the file records one (blockIdentity.blockKey). + */ + linkTarget: string; +} +/** + * One sub-dictionary a `.sldd` references, and whether this session can reach it — + * see session.resolveDictionaryReferences(). + * + * `name` is what the FILE records (a bare file name, e.g. 'common.sldd'), normalized to + * a string: the node keeps these as `unknown[]` because the two `.sldd` readers put + * different shapes in it, and every consumer would otherwise repeat the same narrowing. + */ +export interface DictionaryReference { + /** The sub-dictionary as the referencing file names it. */ + name: string; + /** The same answer resolveLink() gives for that name — a root node, or why not. */ + resolution: LinkResolution; +} +/** + * What session.findNodes() matches on. + * + * `name` and `value` are searches, so a string is a SUBSTRING test — what a search + * box does. `className` and `kind` are filters over closed vocabularies a host holds + * verbatim (see kindForClass), so a string there is a WHOLE-string test: 'Simulink.Bus' + * must not also answer for Simulink.BusElement. Neither takes a RegExp today; widening + * either to `string | RegExp` later is a backward-compatible change. + * + * `sourceId`, `caseSensitive` and `limit` are modifiers rather than criteria: they + * shape an answer, they do not select one. A query holding only modifiers therefore + * has no criteria at all — see session.findNodes() for what that means, and + * `core/findQuery.ts` for how each field above becomes a test. + */ +export interface FindNodesQuery { + /** Substring of the node's own name, or a RegExp tested against it. */ + name?: string | RegExp; + /** The Class column, matched whole — e.g. 'Simulink.Parameter'. */ + className?: string; + /** The Kind column, matched whole — e.g. 'Bus Element'. */ + kind?: string; + /** Substring of the node's rendered value, or a RegExp tested against it. */ + value?: string | RegExp; + /** Restrict the search to one open source. Omitted means every open source. */ + sourceId?: string; + /** Applies to STRING criteria only; a RegExp always keeps its own flags. Default false. */ + caseSensitive?: boolean; + /** Cap on the number of matches. Omitted means uncapped. */ + limit?: number; +} +//# sourceMappingURL=sessionTypes.d.ts.map \ No newline at end of file diff --git a/dist/core/sessionTypes.d.ts.map b/dist/core/sessionTypes.d.ts.map new file mode 100644 index 0000000..2d5cf06 --- /dev/null +++ b/dist/core/sessionTypes.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"sessionTypes.d.ts","sourceRoot":"","sources":["../../src/core/sessionTypes.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEvE,YAAY,EAAE,QAAQ,IAAI,OAAO,EAAE,UAAU,EAAE,CAAC;AAEhD,MAAM,WAAW,oBAAoB;IACnC,GAAG,CAAC,EAAE,gBAAgB,CAAC;CACxB;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,gBAAgB,GACxB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,UAAU,CAAA;CAAE,GAC3D;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAM,MAAM,cAAc,GACtB;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,KAAK,EAAE,CAAA;CAA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} \ No newline at end of file diff --git a/dist/core/sessionTypes.js b/dist/core/sessionTypes.js new file mode 100644 index 0000000..97ea2fa --- /dev/null +++ b/dist/core/sessionTypes.js @@ -0,0 +1,34 @@ +// src/core/sessionTypes.ts +// Copyright 2026 The MathWorks, Inc. +// +// The vocabulary a session speaks: what a caller hands `createSession` and its methods, +// and what those methods hand back. +// +// Every declaration here was written inside `core/DataModel.ts`, above the 1900-line +// `createSession` that implements them. Nothing about them is session code — they are +// the CONTRACT, the part a consumer names in its own signatures, and the part it reads +// to find out what an answer means. Keeping them in the implementing file made the one +// question a host actually asks ("what does resolveLink give me back, and what are the +// failure arms for?") a question you had to open the session to answer. This file is +// that answer on its own, and it is the file to read first. +// +// Two things a maintainer would otherwise rediscover: +// +// * `core/DataModel.ts` still re-exports every name here, from the same path it +// always did, so NO importer changed — not `src/index.ts`, which publishes them onto +// the package barrel, not `src/node/index.ts`, and above all not +// `datamodel/usage/UsageIndex.ts`, which reaches UP for `NodeUsage` and is the one +// upward edge `test/moduleBoundaries.test.ts` allows by name. Import from here in NEW +// core code if you like; do not go rewriting the existing importers, because that +// test asserts the shape of that one edge and the barrel is a published surface. +// +// * This file holds types and nothing else, deliberately. Every import of it is +// therefore erased by tsc, which is what keeps it free of the layering questions +// `test/moduleBoundaries.test.ts` asks: an erased edge pulls no bytes into a +// consumer's bundle and creates no load order to get wrong. Putting a `const`, a +// default or a helper function in here would quietly end that. +// +// `Session` did not come with them: it is `ReturnType`, so it is +// derived from the implementation and cannot live apart from it. +export {}; +//# sourceMappingURL=sessionTypes.js.map \ No newline at end of file diff --git a/dist/core/sessionTypes.js.map b/dist/core/sessionTypes.js.map new file mode 100644 index 0000000..034f501 --- /dev/null +++ b/dist/core/sessionTypes.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sessionTypes.js","sourceRoot":"","sources":["../../src/core/sessionTypes.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,qCAAqC;AACrC,EAAE;AACF,wFAAwF;AACxF,oCAAoC;AACpC,EAAE;AACF,qFAAqF;AACrF,sFAAsF;AACtF,uFAAuF;AACvF,uFAAuF;AACvF,uFAAuF;AACvF,qFAAqF;AACrF,4DAA4D;AAC5D,EAAE;AACF,sDAAsD;AACtD,EAAE;AACF,kFAAkF;AAClF,yFAAyF;AACzF,qEAAqE;AACrE,uFAAuF;AACvF,0FAA0F;AAC1F,sFAAsF;AACtF,qFAAqF;AACrF,EAAE;AACF,kFAAkF;AAClF,qFAAqF;AACrF,iFAAiF;AACjF,qFAAqF;AACrF,mEAAmE;AACnE,EAAE;AACF,uFAAuF;AACvF,iEAAiE"} \ No newline at end of file diff --git a/dist/datamodel/fileKinds.d.ts b/dist/datamodel/fileKinds.d.ts index b96538c..c82c3d6 100644 --- a/dist/datamodel/fileKinds.d.ts +++ b/dist/datamodel/fileKinds.d.ts @@ -30,10 +30,48 @@ export declare function refBasename(text: string): string; export declare function modelNameOf(name: string): string | null; /** True if `filename` names a Simulink model, in either container. */ export declare function isModelFile(filename: string): boolean; +/** + * The extension to complete a bare model-reference name with, given the name of the + * model that RECORDS the reference. + * + * A model file names its references without an extension, so the bare name has to be + * completed before it can be used as a link target or matched against a file on disk. + * It takes the PARENT's own extension: a reference is far likelier to be the same + * generation of file as the model referencing it — a legacy `.mdl` hierarchy is legacy + * throughout — and a `.mdl` model whose children were all labelled `.slx` would link to + * nothing. + * + * This is published for the same reason `isModelFile` is. The guess is made TWICE for + * every model opened, on two paths that must not disagree: this package completes it for + * the node tree (`ModelNode.fromParsed` → `addReferenceEntry`), and a host completes it + * again for whatever index it builds over `parseModel`'s raw `modelReferences` — a usage + * graph resolves edges by filename, so it cannot use the bare name either. When the two + * copies drift, the tree row and the graph edge name two different files for one + * reference, and the row you can see stops agreeing with the link that resolves. + */ +export declare function refModelExt(parentFilename: string): string; /** True if `filename` names a data dictionary. */ export declare function isSlddFile(filename: string): boolean; /** True if `filename` names a MAT-file. */ export declare function isMatFile(filename: string): boolean; /** True if `filename` names a MATLAB project. */ export declare function isProjectFile(filename: string): boolean; +/** + * A project file name with its `.prj` removed — the project's NAME, as distinct from the + * file it is stored in. + * + * `parseProject` takes this rather than a filename, because it is what a project calls + * itself: the name appears in a `.prj`'s own metadata and is the fallback when that + * metadata is missing or unreadable. So every caller of `parseProject` has to make this + * reduction first, and — like `refModelExt` — it is made on two paths that must not + * disagree: this package makes it when adding a project source to a session, and a host + * makes it again for whatever index it builds directly over `parseProject`. The name is + * user-visible on both (a tree row and a graph group label), so a drift between the two + * shows up as one project appearing under two names. + * + * Total rather than nullable, unlike `modelNameOf`: that one returns null to mean "not a + * model, do not compare stems", whereas the answer wanted here is always a label. A name + * with no `.prj` to strip is returned unchanged. + */ +export declare function projectNameOf(filename: string): string; //# sourceMappingURL=fileKinds.d.ts.map \ No newline at end of file diff --git a/dist/datamodel/fileKinds.d.ts.map b/dist/datamodel/fileKinds.d.ts.map index 470e862..23662a3 100644 --- a/dist/datamodel/fileKinds.d.ts.map +++ b/dist/datamodel/fileKinds.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"fileKinds.d.ts","sourceRoot":"","sources":["../../src/datamodel/fileKinds.ts"],"names":[],"mappings":"AAmBA,2EAA2E;AAC3E,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAG9C;AAED,0FAA0F;AAC1F,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGvD;AAED,sEAAsE;AACtE,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAGrD;AAED,kDAAkD;AAClD,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED,2CAA2C;AAC3C,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEnD;AAED,iDAAiD;AACjD,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEvD"} \ No newline at end of file +{"version":3,"file":"fileKinds.d.ts","sourceRoot":"","sources":["../../src/datamodel/fileKinds.ts"],"names":[],"mappings":"AAmBA,2EAA2E;AAC3E,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAG9C;AAED,0FAA0F;AAC1F,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGvD;AAED,sEAAsE;AACtE,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAGrD;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,kDAAkD;AAClD,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED,2CAA2C;AAC3C,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEnD;AAED,iDAAiD;AACjD,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEtD"} \ No newline at end of file diff --git a/dist/datamodel/fileKinds.js b/dist/datamodel/fileKinds.js index 743b81c..cb3f626 100644 --- a/dist/datamodel/fileKinds.js +++ b/dist/datamodel/fileKinds.js @@ -61,6 +61,28 @@ export function isModelFile(filename) { const ext = extOf(filename); return ext === '.slx' || ext === '.mdl'; } +/** + * The extension to complete a bare model-reference name with, given the name of the + * model that RECORDS the reference. + * + * A model file names its references without an extension, so the bare name has to be + * completed before it can be used as a link target or matched against a file on disk. + * It takes the PARENT's own extension: a reference is far likelier to be the same + * generation of file as the model referencing it — a legacy `.mdl` hierarchy is legacy + * throughout — and a `.mdl` model whose children were all labelled `.slx` would link to + * nothing. + * + * This is published for the same reason `isModelFile` is. The guess is made TWICE for + * every model opened, on two paths that must not disagree: this package completes it for + * the node tree (`ModelNode.fromParsed` → `addReferenceEntry`), and a host completes it + * again for whatever index it builds over `parseModel`'s raw `modelReferences` — a usage + * graph resolves edges by filename, so it cannot use the bare name either. When the two + * copies drift, the tree row and the graph edge name two different files for one + * reference, and the row you can see stops agreeing with the link that resolves. + */ +export function refModelExt(parentFilename) { + return extOf(parentFilename) === '.mdl' ? '.mdl' : '.slx'; +} /** True if `filename` names a data dictionary. */ export function isSlddFile(filename) { return extOf(filename) === '.sldd'; @@ -73,4 +95,24 @@ export function isMatFile(filename) { export function isProjectFile(filename) { return extOf(filename) === '.prj'; } +/** + * A project file name with its `.prj` removed — the project's NAME, as distinct from the + * file it is stored in. + * + * `parseProject` takes this rather than a filename, because it is what a project calls + * itself: the name appears in a `.prj`'s own metadata and is the fallback when that + * metadata is missing or unreadable. So every caller of `parseProject` has to make this + * reduction first, and — like `refModelExt` — it is made on two paths that must not + * disagree: this package makes it when adding a project source to a session, and a host + * makes it again for whatever index it builds directly over `parseProject`. The name is + * user-visible on both (a tree row and a graph group label), so a drift between the two + * shows up as one project appearing under two names. + * + * Total rather than nullable, unlike `modelNameOf`: that one returns null to mean "not a + * model, do not compare stems", whereas the answer wanted here is always a label. A name + * with no `.prj` to strip is returned unchanged. + */ +export function projectNameOf(filename) { + return filename.replace(/\.prj$/i, ''); +} //# sourceMappingURL=fileKinds.js.map \ No newline at end of file diff --git a/dist/datamodel/fileKinds.js.map b/dist/datamodel/fileKinds.js.map index 83188ad..5a1cece 100644 --- a/dist/datamodel/fileKinds.js.map +++ b/dist/datamodel/fileKinds.js.map @@ -1 +1 @@ -{"version":3,"file":"fileKinds.js","sourceRoot":"","sources":["../../src/datamodel/fileKinds.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,qCAAqC;AACrC,EAAE;AACF,oFAAoF;AACpF,EAAE;AACF,uFAAuF;AACvF,sFAAsF;AACtF,qFAAqF;AACrF,sFAAsF;AACtF,wFAAwF;AACxF,mFAAmF;AACnF,wFAAwF;AACxF,gCAAgC;AAChC,EAAE;AACF,mFAAmF;AACnF,sFAAsF;AACtF,sFAAsF;AACtF,kDAAkD;AAElD,2EAA2E;AAC3E,MAAM,UAAU,KAAK,CAAC,QAAgB;IACpC,MAAM,GAAG,GAAG,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;AAC1D,CAAC;AAED,0FAA0F;AAC1F,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC;AAC3C,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;AACxC,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,MAAM,KAAK,GAAG,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC9C,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACjC,CAAC;AAED,sEAAsE;AACtE,MAAM,UAAU,WAAW,CAAC,QAAgB;IAC1C,MAAM,GAAG,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC5B,OAAO,GAAG,KAAK,MAAM,IAAI,GAAG,KAAK,MAAM,CAAC;AAC1C,CAAC;AAED,kDAAkD;AAClD,MAAM,UAAU,UAAU,CAAC,QAAgB;IACzC,OAAO,KAAK,CAAC,QAAQ,CAAC,KAAK,OAAO,CAAC;AACrC,CAAC;AAED,2CAA2C;AAC3C,MAAM,UAAU,SAAS,CAAC,QAAgB;IACxC,OAAO,KAAK,CAAC,QAAQ,CAAC,KAAK,MAAM,CAAC;AACpC,CAAC;AAED,iDAAiD;AACjD,MAAM,UAAU,aAAa,CAAC,QAAgB;IAC5C,OAAO,KAAK,CAAC,QAAQ,CAAC,KAAK,MAAM,CAAC;AACpC,CAAC"} \ No newline at end of file +{"version":3,"file":"fileKinds.js","sourceRoot":"","sources":["../../src/datamodel/fileKinds.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,qCAAqC;AACrC,EAAE;AACF,oFAAoF;AACpF,EAAE;AACF,uFAAuF;AACvF,sFAAsF;AACtF,qFAAqF;AACrF,sFAAsF;AACtF,wFAAwF;AACxF,mFAAmF;AACnF,wFAAwF;AACxF,gCAAgC;AAChC,EAAE;AACF,mFAAmF;AACnF,sFAAsF;AACtF,sFAAsF;AACtF,kDAAkD;AAElD,2EAA2E;AAC3E,MAAM,UAAU,KAAK,CAAC,QAAgB;IACpC,MAAM,GAAG,GAAG,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;AAC1D,CAAC;AAED,0FAA0F;AAC1F,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC;AAC3C,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C"} \ No newline at end of file diff --git a/dist/datamodel/node/NodeClassMap.d.ts.map b/dist/datamodel/node/NodeClassMap.d.ts.map deleted file mode 100644 index d638a56..0000000 --- a/dist/datamodel/node/NodeClassMap.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NodeClassMap.d.ts","sourceRoot":"","sources":["../../../src/datamodel/node/NodeClassMap.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAc,MAAM,mBAAmB,CAAC;AACnE,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAsG1C,wBAAgB,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAEhE;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,QAAQ,CA+B3F;AAED,wBAAgB,oBAAoB,IAAI,MAAM,EAAE,CAE/C;AAQD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAK5D;AAKD,QAAA,MAAM,GAAG;;;;;CAAsE,CAAC;AAGhF,eAAe,GAAG,CAAC"} \ No newline at end of file diff --git a/dist/datamodel/node/NodeClassMap.js.map b/dist/datamodel/node/NodeClassMap.js.map deleted file mode 100644 index 4e82e78..0000000 --- a/dist/datamodel/node/NodeClassMap.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NodeClassMap.js","sourceRoot":"","sources":["../../../src/datamodel/node/NodeClassMap.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAIlD,OAAO,kBAAkB,MAAM,8BAA8B,CAAC;AAC9D,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,UAAU,MAAM,sBA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,EAAE,MAAM,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,oBAAoB;IAChC,OAAO,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED,iFAAiF;AACjF,kFAAkF;AAClF,mFAAmF;AACnF,iFAAiF;AACjF,mFAAmF;AACnF,4DAA4D;AAC5D,MAAM,UAAU,mBAAmB,CAAC,IAAc;IAC9C,IAAI,IAAI,CAAC,WAAW,KAAK,kBAAkB,IAAI,CAAE,IAA2B,CAAC,SAAS,EAAE,CAAC;QACrF,OAAO,YAAY,CAAC,YAAY,CAAC,IAA0B,CAAC,CAAC;IACjE,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,8EAA8E;AAC9E,iFAAiF;AACjF,6EAA6E;AAC7E,MAAM,GAAG,GAAG,EAAE,QAAQ,EAAE,UAAU,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,CAAC;AAChF,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEvB,eAAe,GAAG,CAAC"} \ No newline at end of file diff --git a/dist/datamodel/node/SimulinkObjectNode.d.ts b/dist/datamodel/node/SimulinkObjectNode.d.ts new file mode 100644 index 0000000..7fb701d --- /dev/null +++ b/dist/datamodel/node/SimulinkObjectNode.d.ts @@ -0,0 +1,74 @@ +import DataNode from './DataNode.js'; +/** + * A dictionary entry that saves as a Simulink object: its live values are written back over + * the property bag the FILE held. + * + * There are two save paths — `_getSerializedProperties`, iterated into `

` tags for a + * compressed-binary `.sldd`, and `serializeValue`, whose override bag becomes the JSON of an + * uncompressed-text one — and every class here used to state its written properties TWICE, + * once per path. This class exists so that list is stated ONCE, in `_serializedOverrides`, + * and both paths read it. The failure that shape rules out is a class whose two copies stop + * agreeing: teach it a second property, or tighten one gate, and the same edit has to be + * made in both methods with nothing objecting if only one moves. What comes out then is one + * dictionary that saves differently in its two flavours — a key written into the binary file + * and missing from the text one, from the same model in the same session — which is the + * hardest kind of difference to notice, because either file on its own looks right. + * + * The two paths still MERGE that one list differently, and that was left exactly as it was. + * `_getSerializedProperties` assigns the overrides straight over the stored bag; + * `serializeValue` reaches `DataNode._mergeProps`, which knows about MATLAB's saveobj + * envelope — it drops an EMPTY override rather than writing back a default MATLAB never + * wrote, and writes a non-empty one INTO the envelope as well as beside it, because the + * envelope is what MATLAB's loadobj actually reads (defects 40 and 46; `_mergeProps` carries + * the full account). Making both paths merge the same way would change what one of them + * writes for every class here, so it is a separate question from where the list of written + * properties lives. `VariantVariableNode` is the one class whose BINARY path is + * envelope-aware, and it says so by overriding `_getSerializedProperties` to put its own + * `_serializedOverrides` through `_mergeProps`. + * + * `SignalNode` and `ParameterNode` are Simulink objects too and deliberately do not extend + * this class: a Signal's two paths write different VALUES for a cleared bound (`[]` in + * binary, `undefined` in text so `JSON.stringify` drops the key), which one shared list + * cannot express, and a Parameter already funnels `serializeValue` through + * `_getSerializedProperties`. + */ +export default class SimulinkObjectNode extends DataNode { + /** + * The live values this node writes over the file's own property bag — the single place a + * subclass names what it saves. + * + * Insertion order matters and is preserved by both paths: the binary writer emits one + * `

` per key in iteration order and the text path is serialized by `JSON.stringify`, so + * a key the stored bag already carries keeps its position on disk and a NEW key lands in + * the order named here. Build the object in the order the file should read. + * + * Empty by default, which is the right answer for a node that adds nothing to what the + * file already held. + */ + _serializedOverrides(): Record; + _getSerializedProperties(): Record; + serializeValue(): unknown; + /** + * The write-back gate for properties whose absence from the file is meaningful: keep a + * candidate when the FILE already carried its key, or when the node now holds a value for + * it. Everything else is dropped, so a save invents no key the file did not have. + * + * Both halves fail in opposite directions — lose `key in stored` and a key the file + * carried whose value happens to be empty vanishes from the saved bag, so opening a + * dictionary and saving it with no edits produces a diff in source control; lose the value + * half and an edit just made in the Property Inspector is silently discarded on save, + * surviving only until the file is reopened. The rule is about the FILE's key set, not + * about what the writer upstream of us meant by leaving a key out — + * `test/absentPropertyWriteBack.test.ts` states it that way and records which format + * really omits a key for an empty value and which does not. + * + * The truthiness test is what scopes this helper: it fits a property whose "nothing to + * say" state really is falsy, which for this cluster means the empty-string Descriptions. + * A property whose absent state is a non-empty DEFAULT must state its own predicate + * instead — a `Simulink.ValueType` with no `DataType` key IS a double, and 'double' is + * truthy, so routing it through here would write that default into every dictionary saved + * without edits. + */ + _gatedProps(candidates: Record): Record; +} +//# sourceMappingURL=SimulinkObjectNode.d.ts.map \ No newline at end of file diff --git a/dist/datamodel/node/SimulinkObjectNode.d.ts.map b/dist/datamodel/node/SimulinkObjectNode.d.ts.map new file mode 100644 index 0000000..b4dfed9 --- /dev/null +++ b/dist/datamodel/node/SimulinkObjectNode.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"SimulinkObjectNode.d.ts","sourceRoot":"","sources":["../../../src/datamodel/node/SimulinkObjectNode.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,eAAe,CAAC;AAErC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,QAAQ;IACtD;;;;;;;;;;;OAWG;IACH,oBAAoB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAI/C,wBAAwB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAInD,cAAc,IAAI,OAAO;IAIzB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,WAAW,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAU1E"} \ No newline at end of file diff --git a/dist/datamodel/node/SimulinkObjectNode.js b/dist/datamodel/node/SimulinkObjectNode.js new file mode 100644 index 0000000..a42fda4 --- /dev/null +++ b/dist/datamodel/node/SimulinkObjectNode.js @@ -0,0 +1,90 @@ +// Copyright 2026 The MathWorks, Inc. +import DataNode from './DataNode.js'; +/** + * A dictionary entry that saves as a Simulink object: its live values are written back over + * the property bag the FILE held. + * + * There are two save paths — `_getSerializedProperties`, iterated into `

` tags for a + * compressed-binary `.sldd`, and `serializeValue`, whose override bag becomes the JSON of an + * uncompressed-text one — and every class here used to state its written properties TWICE, + * once per path. This class exists so that list is stated ONCE, in `_serializedOverrides`, + * and both paths read it. The failure that shape rules out is a class whose two copies stop + * agreeing: teach it a second property, or tighten one gate, and the same edit has to be + * made in both methods with nothing objecting if only one moves. What comes out then is one + * dictionary that saves differently in its two flavours — a key written into the binary file + * and missing from the text one, from the same model in the same session — which is the + * hardest kind of difference to notice, because either file on its own looks right. + * + * The two paths still MERGE that one list differently, and that was left exactly as it was. + * `_getSerializedProperties` assigns the overrides straight over the stored bag; + * `serializeValue` reaches `DataNode._mergeProps`, which knows about MATLAB's saveobj + * envelope — it drops an EMPTY override rather than writing back a default MATLAB never + * wrote, and writes a non-empty one INTO the envelope as well as beside it, because the + * envelope is what MATLAB's loadobj actually reads (defects 40 and 46; `_mergeProps` carries + * the full account). Making both paths merge the same way would change what one of them + * writes for every class here, so it is a separate question from where the list of written + * properties lives. `VariantVariableNode` is the one class whose BINARY path is + * envelope-aware, and it says so by overriding `_getSerializedProperties` to put its own + * `_serializedOverrides` through `_mergeProps`. + * + * `SignalNode` and `ParameterNode` are Simulink objects too and deliberately do not extend + * this class: a Signal's two paths write different VALUES for a cleared bound (`[]` in + * binary, `undefined` in text so `JSON.stringify` drops the key), which one shared list + * cannot express, and a Parameter already funnels `serializeValue` through + * `_getSerializedProperties`. + */ +export default class SimulinkObjectNode extends DataNode { + /** + * The live values this node writes over the file's own property bag — the single place a + * subclass names what it saves. + * + * Insertion order matters and is preserved by both paths: the binary writer emits one + * `

` per key in iteration order and the text path is serialized by `JSON.stringify`, so + * a key the stored bag already carries keeps its position on disk and a NEW key lands in + * the order named here. Build the object in the order the file should read. + * + * Empty by default, which is the right answer for a node that adds nothing to what the + * file already held. + */ + _serializedOverrides() { + return {}; + } + _getSerializedProperties() { + return Object.assign({}, this.serial._properties, this._serializedOverrides()); + } + serializeValue() { + return this._serializeSimulinkObject(this._serializedOverrides()); + } + /** + * The write-back gate for properties whose absence from the file is meaningful: keep a + * candidate when the FILE already carried its key, or when the node now holds a value for + * it. Everything else is dropped, so a save invents no key the file did not have. + * + * Both halves fail in opposite directions — lose `key in stored` and a key the file + * carried whose value happens to be empty vanishes from the saved bag, so opening a + * dictionary and saving it with no edits produces a diff in source control; lose the value + * half and an edit just made in the Property Inspector is silently discarded on save, + * surviving only until the file is reopened. The rule is about the FILE's key set, not + * about what the writer upstream of us meant by leaving a key out — + * `test/absentPropertyWriteBack.test.ts` states it that way and records which format + * really omits a key for an empty value and which does not. + * + * The truthiness test is what scopes this helper: it fits a property whose "nothing to + * say" state really is falsy, which for this cluster means the empty-string Descriptions. + * A property whose absent state is a non-empty DEFAULT must state its own predicate + * instead — a `Simulink.ValueType` with no `DataType` key IS a double, and 'double' is + * truthy, so routing it through here would write that default into every dictionary saved + * without edits. + */ + _gatedProps(candidates) { + const stored = this.serial._properties; + const gated = {}; + for (const [key, val] of Object.entries(candidates)) { + if (key in stored || val) { + gated[key] = val; + } + } + return gated; + } +} +//# sourceMappingURL=SimulinkObjectNode.js.map \ No newline at end of file diff --git a/dist/datamodel/node/SimulinkObjectNode.js.map b/dist/datamodel/node/SimulinkObjectNode.js.map new file mode 100644 index 0000000..70620f4 --- /dev/null +++ b/dist/datamodel/node/SimulinkObjectNode.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SimulinkObjectNode.js","sourceRoot":"","sources":["../../../src/datamodel/node/SimulinkObjectNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,OAAO,QAAQ,MAAM,eAAe,CAAC;AAErC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,QAAQ;IACtD;;;;;;;;;;;OAWG;IACH,oBAAoB;QAClB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,wBAAwB;QACtB,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,WAAsC,EAAE,IAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC;IAC5G,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,WAAW,CAAC,UAAmC;QAC7C,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,WAAsC,CAAC;QAClE,MAAM,KAAK,GAA4B,EAAE,CAAC;QAC1C,KAAK,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;YACpD,IAAI,GAAG,IAAI,MAAM,IAAI,GAAG,EAAE,CAAC;gBACzB,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;YACnB,CAAC;QACH,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF"} \ No newline at end of file diff --git a/dist/datamodel/node/container/ModelNode.d.ts.map b/dist/datamodel/node/container/ModelNode.d.ts.map index 32f0d30..cbd4663 100644 --- a/dist/datamodel/node/container/ModelNode.d.ts.map +++ b/dist/datamodel/node/container/ModelNode.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ModelNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/container/ModelNode.ts"],"names":[],"mappings":"AAEA,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AAErD,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAClF,OAAO,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AiB,IAAI,iBAAiB,CAEzC;IAED,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,QAAQ,IAAI,OAAO,CAEtB;IA8BD,IAAI,YAAY,IAAI,MAAM,CAKzB;IAED,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,OAAO,IAAI,MAAM,CAEpB;IAED,IAAI,eAAe,IAAI,MAAM,CAM5B;IAED,aAAa,IAAI,SAAS,EAAE;IAI5B,WAAW,IAAI,UAAU,EAAE;IAI3B,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI;IAIhD,SAAS,IAAI,OAAO;IAmCpB,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS;CA8GlE"} \ No newline at end of file +{"version":3,"file":"ModelNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/container/ModelNode.ts"],"names":[],"mappings":"AAEA,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AAErD,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAClF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAmBjE,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,eAAe,EAAE;QAAE,SAAS,EAAE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U,EAAE;IAI3B,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI;IAIhD,SAAS,IAAI,OAAO;IAmCpB,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS;CA8GlE"} \ No newline at end of file diff --git a/dist/datamodel/node/container/ModelNode.js b/dist/datamodel/node/container/ModelNode.js index 929a960..ea900a4 100644 --- a/dist/datamodel/node/container/ModelNode.js +++ b/dist/datamodel/node/container/ModelNode.js @@ -5,6 +5,7 @@ import { decodeMcosObjects, modelOpaqueMcosVariable } from '../data/mcosTypedNod import PropName from '../../prop/PropName.js'; import PropRelease from '../../prop/PropRelease.js'; import { blockKey } from '../../blockIdentity.js'; +import { extOf, refModelExt } from '../../fileKinds.js'; const SECTION_DEFS = [ { key: 'blocks', label: 'Model Elements', icon: 'blocks' }, { key: 'workspace', label: 'Model Workspace', icon: 'databaseFolderWorkspace' }, @@ -70,7 +71,7 @@ export default class ModelNode extends ContainerNode { if (!this._zipEntries) { return 'mdl'; } - return /\.mdl$/i.test(this.name) ? 'mdl-package' : 'slx'; + return extOf(this.name) === '.mdl' ? 'mdl-package' : 'slx'; } get icon() { return 'simulink'; @@ -198,7 +199,7 @@ export default class ModelNode extends ContainerNode { } // Populate model references section const refSection = node.getSection('references'); - const refExt = /\.mdl$/i.test(filename) ? '.mdl' : '.slx'; + const refExt = refModelExt(filename); for (const ref of parsed.modelReferences) { refSection.addReferenceEntry(ref, refExt); } diff --git a/dist/datamodel/node/container/ModelNode.js.map b/dist/datamodel/node/container/ModelNode.js.map index de7702d..d47c36e 100644 --- a/dist/datamodel/node/container/ModelNode.js.map +++ b/dist/datamodel/node/container/ModelNode.js.map @@ -1 +1 @@ -{"version":3,"file":"ModelNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/container/ModelNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,OAAO,aAAa,MAAM,qBAAqB,CAAC;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AAI,IAAI,MAAM,CAAC,mBAAmB,EAAE,CAAC;YAC9C,SAAS,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF"} \ No newline at end of file diff --git a/dist/datamodel/node/container/ModelSectionNode.d.ts b/dist/datamodel/node/container/ModelSectionNode.d.ts index 2a14923..0ac5ace 100644 --- a/dist/datamodel/node/container/ModelSectionNode.d.ts +++ b/dist/datamodel/node/container/ModelSectionNode.d.ts @@ -15,7 +15,7 @@ export default class ModelSectionNode extends ContainerNode { addReferenceEntry(ref: { blockPath: string; modelName: string; - }, defaultExt?: string): BaseNode; + }, defaultExt: string): BaseNode; addBlockEntry(blockName: string, blockType: string, paramUsages: Array<{ property: string; value: string; diff --git a/dist/datamodel/node/container/ModelSectionNode.d.ts.map b/dist/datamodel/node/container/ModelSectionNode.d.ts.map index 3b08d6f..b83a6f2 100644 --- a/dist/datamodel/node/container/ModelSectionNode.d.ts.map +++ b/dist/datamodel/node/container/ModelSectionNode.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ModelSectionNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/container/ModelSectionNode.ts"],"names":[],"mappings":"AAEA,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAMjE,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,aAAa;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;gBAEH,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAMhF,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,iBAAiB,IAAI,iBAAiB,CAWzC;IAED,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,QAAQ;IAM/C,iBAAiB,CAAC,GAAG,EAAE,eAAe,GAAG,QAAQ;IA0CjD,iBAAiB,CAAC,GAAG,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,EAAE,UAAU,SAAS,GAAG,QAAQ;IAU/F,aAAa,CACX,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,EACvD,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,GAAG,IAAI,EAC5B,GAAG,SAAK,EACR,UAAU,SAAK,GACd,QAAQ;IAeX,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ;CAM3C"} \ No newline at end of file +{"version":3,"file":"ModelSectionNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/container/ModelSectionNode.ts"],"names":[],"mappings":"AAEA,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAMjE,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAGjE,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,aAAa;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;gBAEH,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAMhF,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,iBAAiB,IAAI,iBAAiB,CAWzC;IAED,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,QAAQ;IAM/C,iBAAiB,CAAC,GAAG,EAAE,eAAe,GAAG,QAAQ;IAqDjD,iBAAiB,CAAC,GAAG,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,EAAE,UAAU,EAAE,MAAM,GAAG,QAAQ;IAU9F,aAAa,CACX,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,EACvD,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,GAAG,IAAI,EAC5B,GAAG,SAAK,EACR,UAAU,SAAK,GACd,QAAQ;IAeX,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ;CAU3C"} \ No newline at end of file diff --git a/dist/datamodel/node/container/ModelSectionNode.js b/dist/datamodel/node/container/ModelSectionNode.js index bd61806..b1e4a73 100644 --- a/dist/datamodel/node/container/ModelSectionNode.js +++ b/dist/datamodel/node/container/ModelSectionNode.js @@ -6,6 +6,7 @@ import ConfigSetNode from '../data/ConfigSetNode.js'; import ConfigSetRefNode from '../data/ConfigSetRefNode.js'; import ModelReferenceNode from '../data/ModelReferenceNode.js'; import DataSourceNode from '../data/DataSourceNode.js'; +import { basenameOf, isModelFile } from '../../fileKinds.js'; export default class ModelSectionNode extends ContainerNode { constructor(name, parent, label, iconId) { super(name, parent); @@ -74,8 +75,19 @@ export default class ModelSectionNode extends ContainerNode { // far likelier to be the same generation of file as the model referencing it — a // legacy `.mdl` hierarchy is legacy throughout — and a `.mdl` model whose children // were all labelled `.slx` would link to nothing. - addReferenceEntry(ref, defaultExt = '.slx') { - const named = /\.(slx|mdl)$/i.test(ref.modelName); + // + // `isModelFile` decides whether the name is already complete, rather than a regex + // spelled here: that is the same question this package publishes an answer to, and a + // second copy of it is a second opinion about whether `plant.MDL` needs completing — + // which would produce `plant.MDL.slx`, a link to nothing. + // + // Required, with no `.slx` default: a default would be a THIRD answer to "which + // extension" — one a caller that forgot the parent's would take silently. The guess + // belongs to `fileKinds.refModelExt`, and the point of it living there is that every + // caller makes it the same way. No caller ever took the default; omitting the argument + // is now a compile error rather than a `.mdl` hierarchy labelled `.slx`. + addReferenceEntry(ref, defaultExt) { + const named = isModelFile(ref.modelName); const node = new ModelReferenceNode(named ? ref.modelName : ref.modelName + defaultExt, this, ref.blockPath); this.addChild(node); return node; @@ -89,8 +101,12 @@ export default class ModelSectionNode extends ContainerNode { return node; } addDataSourceEntry(path) { - const filename = path.split('/').pop(); - const node = new DataSourceNode(filename, this, path); + // `path` is whatever MATLAB wrote into the model, so a model saved on Windows records + // `..\shared\signals.mat`. Splitting on `/` alone left that entire string as the + // node's name — a path in the Name column and a path as the link target — while the + // link still resolved, because `refBasename` does split on both. `basenameOf` is the + // one place that rule lives. + const node = new DataSourceNode(basenameOf(path), this, path); this.addChild(node); return node; } diff --git a/dist/datamodel/node/container/ModelSectionNode.js.map b/dist/datamodel/node/container/ModelSectionNode.js.map index 0ae9b06..1ad2cc6 100644 --- a/dist/datamodel/node/container/ModelSectionNode.js.map +++ b/dist/datamodel/node/container/ModelSectionNode.js.map @@ -1 +1 @@ -{"version":3,"file":"ModelSectionNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/container/ModelSectionNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAEhD,OAAO,kBAAkB,MAAM,+BAA+B,CAAC;AAE/D,OAAO,cAAc,MAAM,2BAA2B,CAAC;AACvD,OAAO,aAAa,MAAM,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AAkF;IAClF,mFAAmF;IACnF,iFAAiF;IACjF,mFAAmF;IACnF,kDAAkD;IAClD,iBAAiB,CAAC,GAA6C,EAAE,UAAU,GAAG,MAAM;QAClF,MAAM,KAAK,GAAG,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAClD,MAAM,IAAI,GAAG,IAAI,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,GAAG,UAAU,EAAE,IAAI,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC;QAC7G,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACpB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,oFAAoF;IACpF,sFAAsF;IACtF,6CAA6C;IAC7C,aAAa,CACX,SAAiB,EACjB,SAAiB,EACjB,WAAuD,EACvD,UAAkB,EAClB,aAA4B,EAC5B,GAAG,GAAG,EAAE,EACR,UAAU,GAAG,EAAE;QAEf,MAAM,IAAI,GAAG,IAAI,cAAc,CAC7B,SAAS,EACT,IAAI,EACJ,SAAS,EACT,WAAW,EACX,UAAU,EACV,aAAa,EACb,GAAG,EACH,UAAU,CACX,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACpB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,kBAAkB,CAAC,IAAY;QAC7B,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAG,CAAC;QACxC,MAAM,IAAI,GAAG,IAAI,cAAc,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QACtD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACpB,OAAO,IAAI,CAAC;IACd,CAAC;CACF"} \ No newline at end of file +{"version":3,"file":"ModelSectionNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/container/ModelSectionNode.ts"],"names":[],"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Y;QAC7B,sFAAsF;QACtF,iFAAiF;QACjF,oFAAoF;QACpF,qFAAqF;QACrF,6BAA6B;QAC7B,MAAM,IAAI,GAAG,IAAI,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAC9D,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACpB,OAAO,IAAI,CAAC;IACd,CAAC;CACF"} \ No newline at end of file diff --git a/dist/datamodel/node/container/SlddNode.d.ts.map b/dist/datamodel/node/container/SlddNode.d.ts.map index 130f73d..68ee3d6 100644 --- a/dist/datamodel/node/container/SlddNode.d.ts.map +++ b/dist/datamodel/node/container/SlddNode.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"SlddNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/container/SlddNode.ts"],"names":[],"mappings":"AAEA,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAE3C,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAM5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAevE,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,aAAa;IAC/C,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC/C,oBAAoB,EAAE,OAAO,EAAE,CAAC;IAChC,cAAc,EAAE,OAAO,CAAC;IACxB,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC7C,gBAAgB,EA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AE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,YAAY,EAAE,GAAG,QAAQ;IA0FlG,MAAM,CAAC,oBAAoB,CACvB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,EACrC,QAAQ,CAAC,EAAE,YAAY,EAAE,GAC1B,qBAAqB,GAAG,IAAI;IAqE/B,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;IAK5D,SAAS,IAAI,OAAO;IAKpB,aAAa,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAqB3C"} \ No newline at end of file diff --git a/dist/datamodel/node/container/SlddNode.js b/dist/datamodel/node/container/SlddNode.js index e95e11a..3e811fd 100644 --- a/dist/datamodel/node/container/SlddNode.js +++ b/dist/datamodel/node/container/SlddNode.js @@ -8,6 +8,7 @@ import PropFileFormat from '../../prop/PropFileFormat.js'; import PropNumberOfEntries from '../../prop/PropNumberOfEntries.js'; import { slddChunkContent } from '../../parser/SlddContent.js'; import { SC_PART, scPartUnreadableMessage } from '../../parser/ScCatalog.js'; +import { DATA_PART_KEY, TEXT_CONTENT, TEXT_PARTS } from '../../parser/SlddParts.js'; const SECTION_DEFS = [ { key: 'design', label: 'Design Data', icon: 'databaseFolderDesign' }, { key: 'arch', label: 'Architectural Data', icon: 'databaseFolderArchitecture' }, @@ -91,7 +92,15 @@ export default class SlddNode extends ContainerNode { node._zipMetadata = json.__zipMetadata || null; node._dataSourceAttrs = json.__dataSourceAttrs || null; } - const parts = json.__MW_TEXT_PARTS__; + // `TEXT_PARTS`, not the literal: `serializeJson` below WRITES this bag through the + // constant, and a reader in the same file spelling it by hand is the two-copies-of- + // one-name shape SlddParts exists to close. A drift here would not empty the + // dictionary — the entries arrive through `slddChunkContent` — it would drop only + // the System Composer catalog, and drop it QUIETLY: a bag that is not there looks + // exactly like a dictionary with no catalog part, which _parseSystemComposer is + // deliberately silent about. That is the degrade its own comment below calls the + // nastiest partial in this reader. + const parts = json[TEXT_PARTS]; // The shared unwrap (SlddContent), not a local one: the same three-level path is what // the usage index reads a dictionary's entries through, and a second copy here is a // second chance for one of them to look in the wrong place and report an empty file. @@ -136,7 +145,7 @@ export default class SlddNode extends ContainerNode { + 'It may not be a data dictionary, or it may not have been written completely.', }); } - if (content) { + else { // VERBATIM, and `unknown[]` on purpose: a reference is a bare string in a // compressed dictionary and can be a `{ file: ... }` object in a textual one, and // serializeJson writes this array straight back out on save. Normalising here @@ -160,7 +169,7 @@ export default class SlddNode extends ContainerNode { // systemcomposer interface dictionary part, if present. static _parseSystemComposer(parts, warnings) { const part = parts && parts[`__MW_TEXT_PART__/${SC_PART}`]; - const content = part && part.__MW_TEXT_content; + const content = part && part[TEXT_CONTENT]; const entries = content && content.entries; if (!entries) { // The two reasons for a null catalog are opposites, and only one of them is a @@ -237,9 +246,9 @@ export default class SlddNode extends ContainerNode { }); return { __MW_TEXT_COREPROPERTIES__: this.coreProperties, - __MW_TEXT_PARTS__: { - '__MW_TEXT_PART__/data/chunk0': { - __MW_TEXT_content: { + [TEXT_PARTS]: { + [DATA_PART_KEY]: { + [TEXT_CONTENT]: { entries, 'Dictionary References': this.dictionaryReferences, AllowAccessBWS: this.allowAccessBWS diff --git a/dist/datamodel/node/container/SlddNode.js.map b/dist/datamodel/node/container/SlddNode.js.map index f9f308a..90cf864 100644 --- a/dist/datamodel/node/container/SlddNode.js.map +++ b/dist/datamodel/node/container/SlddNode.js.map @@ -1 +1 @@ -{"version":3,"file":"SlddNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/container/SlddNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,aAAa,IAAI,cAAc,EAAE,MAAM,2BAA2B,C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9B,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC9B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;gBACnC,OAAO,CAAC,IAAI,CAAE,SAAsB,CAAC,SAAS,EAAE,CAAC,CAAC;YACtD,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QAEH,OAAO;YACH,0BAA0B,EAAE,IAAI,CAAC,cAAc;YAC/C,iBAAiB,EAAE;gBACf,8BAA8B,EAAE;oBAC5B,iBAAiB,EAAE;wBACf,OAAO;wBACP,uBAAuB,EAAE,IAAI,CAAC,oBAAoB;wBAClD,cAAc,EAAE,IAAI,CAAC,cAAc;qBACtC;iBACJ;aACJ;SACJ,CAAC;IACN,CAAC;CACJ"} \ No newline at end of file +{"version":3,"file":"SlddNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/container/SlddNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,aAAa,IAAI,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG5E,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAC1D,OAAO,mBAAmB,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAG/D,OAAO,EAAE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEpF,MAAM,YAAY,GAAG;IACjB,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,sBAAsB,EAAE;IACrE,EAAE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YAC/C,CAAC,UAAU,CAAC,EAAE;gBACV,CAAC,aAAa,CAAC,EAAE;oBACb,CAAC,YAAY,CAAC,EAAE;wBACZ,OAAO;wBACP,uBAAuB,EAAE,IAAI,CAAC,oBAAoB;wBAClD,cAAc,EAAE,IAAI,CAAC,cAAc;qBACtC;iBACJ;aACJ;SACJ,CAAC;IACN,CAAC;CACJ"} \ No newline at end of file diff --git a/dist/datamodel/node/data/AliasTypeNode.d.ts b/dist/datamodel/node/data/AliasTypeNode.d.ts index 106cbaa..6fd6aa6 100644 --- a/dist/datamodel/node/data/AliasTypeNode.d.ts +++ b/dist/datamodel/node/data/AliasTypeNode.d.ts @@ -1,7 +1,7 @@ -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import type { PropClass } from '../BaseNode.js'; import type BaseNode from '../BaseNode.js'; -export default class AliasTypeNode extends DataNode { +export default class AliasTypeNode extends SimulinkObjectNode { BaseType: string; Description: string; constructor(name: string, parent: BaseNode | null, props: Record, serial: Record); @@ -10,8 +10,7 @@ export default class AliasTypeNode extends DataNode { get displayValue(): string; get valueEditable(): boolean; getProperties(): PropClass[]; - _getSerializedProperties(): Record; - serializeValue(): unknown; + _serializedOverrides(): Record; static get defaultName(): string; static createDefault(name: string, parent: BaseNode | null): AliasTypeNode; static parse(rawVal: Record, name: string, parent: BaseNode | null): AliasTypeNode; diff --git a/dist/datamodel/node/data/AliasTypeNode.d.ts.map b/dist/datamodel/node/data/AliasTypeNode.d.ts.map index a7cec19..0b435bb 100644 --- a/dist/datamodel/node/data/AliasTypeNode.d.ts.map +++ b/dist/datamodel/node/data/AliasTypeNode.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"AliasTypeNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/data/AliasTypeNode.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD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,EAAE,MAAM,CAAC;gBAC1B,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAClH,IAAI,IAAI,IAAI,MAAM,CAAqD;IACvE,IAAI,SAAS,IAAI,MAAM,CAAuB;IAI9C,IAAI,YAAY,IAAI,MAAM,CAAe;IACzC,IAAI,aAAa,IAAI,OAAO,CAAkB;IAG9C,aAAa,IAAI,SAAS,EAAE;IAK5B,oBAAoB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC/C,MAAM,KAAK,WAAW,IAAI,MAAM,CAAwB;IACxD,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,aAAa;IAC1E,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,aAAa;CACtG"} \ No newline at end of file diff --git a/dist/datamodel/node/data/AliasTypeNode.js b/dist/datamodel/node/data/AliasTypeNode.js index bedb542..0dedbf4 100644 --- a/dist/datamodel/node/data/AliasTypeNode.js +++ b/dist/datamodel/node/data/AliasTypeNode.js @@ -1,10 +1,10 @@ // Copyright 2026 The MathWorks, Inc. -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import PropName from '../../prop/PropName.js'; import PropBaseType from '../../prop/PropBaseType.js'; import PropDescription from '../../prop/PropDescription.js'; const CLASS_NAME = 'Simulink.AliasType'; -export default class AliasTypeNode extends DataNode { +export default class AliasTypeNode extends SimulinkObjectNode { constructor(name, parent, props, serial) { super(name, parent, serial); this.BaseType = props.BaseType || ''; this.Description = props.Description || ''; } get icon() { return this.isDerived ? 'typeAlias' : 'wsAlias'; } get className() { return CLASS_NAME; } @@ -17,12 +17,10 @@ export default class AliasTypeNode extends DataNode { // would show the class name 'Simulink.AliasType') is omitted here. getProperties() { return [PropName, PropBaseType, PropDescription]; } // PI layout is schema-driven (schema/classes/aliasType.json). - _getSerializedProperties() { const props = Object.assign({}, this.serial._properties); props.BaseType = this.BaseType; if ('Description' in this.serial._properties || this.Description) { - props.Description = this.Description; - } return props; } - serializeValue() { const overrides = { BaseType: this.BaseType }; if ('Description' in this.serial._properties || this.Description) { - overrides.Description = this.Description; - } return this._serializeSimulinkObject(overrides); } + // BaseType is UNGATED: an alias with no base type is not a type at all, so MATLAB gets + // the key even as the empty string a half-built entry carries. It is named first because + // that is the order a bag that lacks both keys reads on disk. + _serializedOverrides() { return Object.assign({ BaseType: this.BaseType }, this._gatedProps({ Description: this.Description })); } static get defaultName() { return 'AliasType'; } static createDefault(name, parent) { const rawVal = { _array_class: CLASS_NAME, _array_type: 'MATLABArray', _dimensions: [1, 1], _mw_element_type: 'MATLABArray', _elements: [{ _properties: { BaseType: 'double', DataScope: 'Auto', Description: '', HeaderFile: '' } }] }; const props = rawVal._elements[0]._properties; const serial = { _rawVal: rawVal, _properties: props }; return new AliasTypeNode(name, parent, props, serial); } static parse(rawVal, name, parent) { const elem = rawVal._elements && rawVal._elements[0]; const props = ((elem && elem._properties) || {}); const serial = { _rawVal: rawVal, _properties: props }; return new AliasTypeNode(name, parent, props, serial); } diff --git a/dist/datamodel/node/data/AliasTypeNode.js.map b/dist/datamodel/node/data/AliasTypeNode.js.map index 117663a..4a42e2e 100644 --- a/dist/datamodel/node/data/AliasTypeNode.js.map +++ b/dist/datamodel/node/data/AliasTypeNode.js.map @@ -1 +1 @@ -{"version":3,"file":"AliasTypeNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/data/AliasTypeNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAGtC,OAAO,QAAQ,M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AAC,CAAC,IAAI,IAAK,IAAgC,CAAC,WAAW,CAAC,IAAI,EAAE,CAA4B,CAAC,CAAC,MAAM,MAAM,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,IAAI,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAiC,CAAC,CAAC,CAAC,CAAC;CACna"} \ No newline at end of file diff --git a/dist/datamodel/node/data/BreakpointNode.d.ts b/dist/datamodel/node/data/BreakpointNode.d.ts index edf107b..fc40b27 100644 --- a/dist/datamodel/node/data/BreakpointNode.d.ts +++ b/dist/datamodel/node/data/BreakpointNode.d.ts @@ -1,7 +1,7 @@ -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import type { PropClass } from '../BaseNode.js'; import type BaseNode from '../BaseNode.js'; -export default class BreakpointNode extends DataNode { +export default class BreakpointNode extends SimulinkObjectNode { Description: string; constructor(name: string, parent: BaseNode | null, props: Record, serial: Record); get icon(): string; @@ -9,8 +9,7 @@ export default class BreakpointNode extends DataNode { get displayValue(): string; get valueEditable(): boolean; getProperties(): PropClass[]; - _getSerializedProperties(): Record; - serializeValue(): unknown; + _serializedOverrides(): Record; static get defaultName(): string; static createDefault(name: string, parent: BaseNode | null): BreakpointNode; static parse(rawVal: Record, name: string, parent: BaseNode | null): BreakpointNode; diff --git a/dist/datamodel/node/data/BreakpointNode.d.ts.map b/dist/datamodel/node/data/BreakpointNode.d.ts.map index b9343fa..9b78fbe 100644 --- a/dist/datamodel/node/data/BreakpointNode.d.ts.map +++ b/dist/datamodel/node/data/BreakpointNode.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"BreakpointNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/data/BreakpointNode.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC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QAAQ,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAClH,IAAI,IAAI,IAAI,MAAM,CAAmC;IACrD,IAAI,SAAS,IAAI,MAAM,CAAuB;IAE9C,IAAI,YAAY,IAAI,MAAM,CAAe;IACzC,IAAI,aAAa,IAAI,OAAO,CAAkB;IAC9C,aAAa,IAAI,SAAS,EAAE;IAE5B,oBAAoB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC/C,MAAM,KAAK,WAAW,IAAI,MAAM,CAAyB;IACzD,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,cAAc;IAC3E,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,cAAc;CACvG"} \ No newline at end of file diff --git a/dist/datamodel/node/data/BreakpointNode.js b/dist/datamodel/node/data/BreakpointNode.js index 82d9120..02090f1 100644 --- a/dist/datamodel/node/data/BreakpointNode.js +++ b/dist/datamodel/node/data/BreakpointNode.js @@ -1,10 +1,10 @@ // Copyright 2026 The MathWorks, Inc. -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import PropName from '../../prop/PropName.js'; import PropDataType from '../../prop/PropDataType.js'; import PropDescription from '../../prop/PropDescription.js'; const CLASS_NAME = 'Simulink.Breakpoint'; -export default class BreakpointNode extends DataNode { +export default class BreakpointNode extends SimulinkObjectNode { constructor(name, parent, props, serial) { super(name, parent, serial); this.Description = props.Description || ''; } get icon() { return 'wsSimulinkBreakpoint'; } get className() { return CLASS_NAME; } @@ -13,12 +13,7 @@ export default class BreakpointNode extends DataNode { get valueEditable() { return false; } getProperties() { return [PropName, PropDataType, PropDescription]; } // PI layout: schema-driven "General" group (classes/breakpoint.json). - _getSerializedProperties() { const props = Object.assign({}, this.serial._properties); if ('Description' in this.serial._properties || this.Description) { - props.Description = this.Description; - } return props; } - serializeValue() { const overrides = {}; if ('Description' in this.serial._properties || this.Description) { - overrides.Description = this.Description; - } return this._serializeSimulinkObject(overrides); } + _serializedOverrides() { return this._gatedProps({ Description: this.Description }); } static get defaultName() { return 'Breakpoint'; } static createDefault(name, parent) { const rawVal = { _array_class: CLASS_NAME, _array_type: 'MATLABArray', _dimensions: [1, 1], _mw_element_type: 'MATLABArray', _elements: [{ _properties: {} }] }; const props = rawVal._elements[0]._properties; const serial = { _rawVal: rawVal, _properties: props }; return new BreakpointNode(name, parent, props, serial); } static parse(rawVal, name, parent) { const elem = rawVal._elements && rawVal._elements[0]; const props = ((elem && elem._properties) || {}); const serial = { _rawVal: rawVal, _properties: props }; return new BreakpointNode(name, parent, props, serial); } diff --git a/dist/datamodel/node/data/BreakpointNode.js.map b/dist/datamodel/node/data/BreakpointNode.js.map index 7e0a21c..0d2d358 100644 --- a/dist/datamodel/node/data/BreakpointNode.js.map +++ b/dist/datamodel/node/data/BreakpointNode.js.map @@ -1 +1 @@ -{"version":3,"file":"BreakpointNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/data/BreakpointNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAGtC,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,eAAe,MAAM,+BAA+B,CAAC;AAC5D,MAAM,UAAU,GAAG,qBAAqB,CAAC;AACzC,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,QAAQ;IAEhD,YAAY,IAAY,EAAE,MAAuB,EAAE,KAA8B,EAAE,MAA+B,IAAI,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,IA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AE,MAAuB,IAAoB,MAAM,IAAI,GAAG,MAAM,CAAC,SAAS,IAAK,MAAM,CAAC,SAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,IAAI,IAAK,IAAgC,CAAC,WAAW,CAAC,IAAI,EAAE,CAA4B,CAAC,CAAC,MAAM,MAAM,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,IAAI,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAiC,CAAC,CAAC,CAAC,CAAC;CACra"} \ No newline at end of file diff --git a/dist/datamodel/node/data/BusNode.d.ts b/dist/datamodel/node/data/BusNode.d.ts index 4d9f5e8..15ebceb 100644 --- a/dist/datamodel/node/data/BusNode.d.ts +++ b/dist/datamodel/node/data/BusNode.d.ts @@ -4,8 +4,6 @@ import type BaseNode from '../BaseNode.js'; import type { SetPropertyResult } from '../DataNode.js'; import PropUnit from '../../prop/PropUnit.js'; export declare class BusElementNode extends BaseBusElementNode { - _rawMin: unknown; - _rawMax: unknown; Min: number | undefined; Max: number | undefined; Unit: string; diff --git a/dist/datamodel/node/data/BusNode.d.ts.map b/dist/datamodel/node/data/BusNode.d.ts.map index aab8838..8478d4f 100644 --- a/dist/datamodel/node/data/BusNode.d.ts.map +++ b/dist/datamodel/node/data/BusNode.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"BusNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/data/BusNode.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAA0B,eAAe,EAAE,QAAQ,EAAiC,MAAM,kBAAkB,CAAC;AACrJ,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGxD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datamodel/node/data/BusNode.js b/dist/datamodel/node/data/BusNode.js index 5c692c6..4e23f93 100644 --- a/dist/datamodel/node/data/BusNode.js +++ b/dist/datamodel/node/data/BusNode.js @@ -10,10 +10,14 @@ const CLASS_NAME = 'Simulink.Bus'; export class BusElementNode extends BaseBusElementNode { constructor(name, parent, props, serial) { super(name, parent, props, serial); - this._rawMin = props.Min_internal !== undefined ? props.Min_internal : props.Min; - this._rawMax = props.Max_internal !== undefined ? props.Max_internal : props.Max; - this.Min = BusElementNode._normalizeMinMax(this._rawMin); - this.Max = BusElementNode._normalizeMinMax(this._rawMax); + // A bus element's bounds may arrive under either spelling; only the normalized + // value is kept. The raw one was held in a field until the write-back stopped + // falling back to it — nothing else ever read it, and while it existed a cleared + // bound was silently restored from it on save. + const rawMin = props.Min_internal !== undefined ? props.Min_internal : props.Min; + const rawMax = props.Max_internal !== undefined ? props.Max_internal : props.Max; + this.Min = BusElementNode._normalizeMinMax(rawMin); + this.Max = BusElementNode._normalizeMinMax(rawMax); this.Unit = props.DocUnits || props.Unit || ''; // The element's data type is stored in DataType_internal (falling back to // DataType); an unset type means the Simulink default of 'double'. @@ -135,11 +139,18 @@ export class BusElementNode extends BaseBusElementNode { const maxKey = 'Max_internal' in sp ? 'Max_internal' : 'Max'; const unitKey = 'DocUnits' in sp ? 'DocUnits' : 'Unit'; const dtKey = 'DataType_internal' in sp ? 'DataType_internal' : 'DataType'; + // A cleared bound goes out as `[]` — MATLAB's own empty — under the key the file + // used, and not as the value the file held there: falling back to that (what this + // did) meant emptying the Minimum box blanked the row and saved the old number, + // so the bound came back on reopen. `undefined` is not the alternative here + // either; this bag reaches the XML writer, which spells `undefined` as + // `Class="char"`. See ParameterNode._getSerializedProperties for the full note, + // including the residual `"Min": []`-vs-omitted-key difference on the text path. if (minKey in sp || this.Min !== undefined) { - props[minKey] = this.Min !== undefined ? this.Min : this._rawMin; + props[minKey] = this.Min !== undefined ? this.Min : []; } if (maxKey in sp || this.Max !== undefined) { - props[maxKey] = this.Max !== undefined ? this.Max : this._rawMax; + props[maxKey] = this.Max !== undefined ? this.Max : []; } if (unitKey in sp || this.Unit) { props[unitKey] = this.Unit; diff --git a/dist/datamodel/node/data/BusNode.js.map b/dist/datamodel/node/data/BusNode.js.map index 1a5e08e..209ea38 100644 --- a/dist/datamodel/node/data/BusNode.js.map +++ b/dist/datamodel/node/data/BusNode.js.map @@ -1 +1 @@ -{"version":3,"file":"BusNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/data/BusNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,QAAQ,EAAE,YAAY,EAAE,eAAe,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIrJ,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAC1D,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAC1D,OAAO,kBAAkB,MAAM,kCAAkC,CAAC;AAElE,MAAM,UAAU,GAAG,cAAc,CAAC;AAElC,MAAM,OAAO,cAAe,SAAQ,kBAAkB;IAmBlD,YAAY,IAAY,EAAE,MAAuB,EAAE,KAA8B,EAAE,MAA+B;QAC9G,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC;QACjF,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC;QACjF,IAAI,CA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IAAI,CAAC,YAAY,EAAE,CAAC;YAAC,OAAO,YAAY,CAAC;QAAC,CAAC;QAC/C,OAAO,KAAK,CAAC,IAAI,CAAC;IACtB,CAAC;IACD,IAAI,SAAS,KAAa,OAAO,UAAU,CAAC,CAAC,CAAC;IAC9C,kBAAkB,CAAC,IAAY,EAAE,KAA8B,EAAE,MAA+B,IAAoB,OAAO,IAAI,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;aACpK,uBAAkB,GAAG,qBAAqB,AAAxB,CAAyB;IAClD,MAAM,KAAK,WAAW,KAAa,OAAO,KAAK,CAAC,CAAC,CAAC;IAClD,MAAM,CAAC,aAAa,CAAC,IAAY,EAAE,MAAuB,IAAa,OAAO,WAAW,CAAC,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,CAAY,CAAC,CAAC,CAAC;IAC5J,MAAM,CAAC,KAAK,CAAC,MAA+B,EAAE,IAAY,EAAE,MAAuB,IAAa,OAAO,WAAW,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,CAAY,CAAC,CAAC,CAAC;;AAGlM,eAAe,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC"} \ No newline at end of file diff --git a/dist/datamodel/node/data/ConfigSetNode.d.ts b/dist/datamodel/node/data/ConfigSetNode.d.ts index cdc9b50..0fd3f8a 100644 --- a/dist/datamodel/node/data/ConfigSetNode.d.ts +++ b/dist/datamodel/node/data/ConfigSetNode.d.ts @@ -1,7 +1,7 @@ -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import type { PropClass } from '../BaseNode.js'; import type BaseNode from '../BaseNode.js'; -export default class ConfigSetNode extends DataNode { +export default class ConfigSetNode extends SimulinkObjectNode { get ConfigName(): string; active?: boolean; constructor(name: string, parent: BaseNode | null, props: Record, serial: Record); @@ -10,8 +10,7 @@ export default class ConfigSetNode extends DataNode { get displayValue(): string; get valueEditable(): boolean; getProperties(): PropClass[]; - _getSerializedProperties(): Record; - serializeValue(): unknown; + _serializedOverrides(): Record; static get defaultName(): string; static createDefault(name: string, parent: BaseNode | null): ConfigSetNode; static parse(rawVal: Record, name: string, parent: BaseNode | null): ConfigSetNode; diff --git a/dist/datamodel/node/data/ConfigSetNode.d.ts.map b/dist/datamodel/node/data/ConfigSetNode.d.ts.map index 57c685f..51d5793 100644 --- a/dist/datamodel/node/data/ConfigSetNode.d.ts.map +++ b/dist/datamodel/node/data/ConfigSetNode.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ConfigSetNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/data/ConfigSetNode.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAI3C,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,QAAQ;IAQ/C,IAAI,UAAU,IAAI,MAAM,CAAsB;IAI9C,MAAM,CAAC,EAAE,OAAO,CAAC;gBACL,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAClH,IAAI,IAAI,IAAI,MAAM,CAAwD;IAC1E,IAAI,SAAS,IAAI,MAAM,CAAuB;IAE9C,IAAI,YAAY,IAAI,MAAM,CAAe;IACzC,IAAI,aAAa,IAAI,OAAO,CAAkB;IAC9C,aAAa,IAAI,SAAS,EAAE;IAE5B,wBAAwB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACnD,cAAc,IAAI,OAAO;IACzB,MAAM,KAAK,WAAW,IAAI,MAAM,CAA4B;IAC5D,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C,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,aAAa;CACtG"} \ No newline at end of file diff --git a/dist/datamodel/node/data/ConfigSetNode.js b/dist/datamodel/node/data/ConfigSetNode.js index 516a8ac..63f7c4f 100644 --- a/dist/datamodel/node/data/ConfigSetNode.js +++ b/dist/datamodel/node/data/ConfigSetNode.js @@ -1,9 +1,9 @@ // Copyright 2026 The MathWorks, Inc. -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import PropName from '../../prop/PropName.js'; import PropDataType from '../../prop/PropDataType.js'; const CLASS_NAME = 'Simulink.ConfigSet'; -export default class ConfigSetNode extends DataNode { +export default class ConfigSetNode extends SimulinkObjectNode { // The config set's own Name property. In a .sldd the entry name and this // property are the same string — both parse paths build the node with // _properties.Name equal to the entry name — so this is a view of `name` @@ -20,8 +20,10 @@ export default class ConfigSetNode extends DataNode { get valueEditable() { return false; } getProperties() { return [PropName, PropDataType]; } // PI layout: schema-driven "General" group (classes/configSet.json). - _getSerializedProperties() { const props = Object.assign({}, this.serial._properties); props.Name = this.ConfigName; return props; } - serializeValue() { return this._serializeSimulinkObject({ Name: this.ConfigName }); } + // UNGATED: a config set MATLAB can load has to be able to say what it is called, so the + // key is written whatever the file carried — and because it is a view of `name`, a + // renamed entry saves under the new name on both paths. + _serializedOverrides() { return { Name: this.ConfigName }; } static get defaultName() { return 'Configuration'; } static createDefault(name, parent) { const rawVal = { _array_class: CLASS_NAME, _array_type: 'MATLABArray', _dimensions: [1, 1], _mw_element_type: 'MATLABArray', _elements: [{ _properties: { Name: name || 'Configuration' } }] }; const props = rawVal._elements[0]._properties; const serial = { _rawVal: rawVal, _properties: props }; return new ConfigSetNode(name, parent, props, serial); } static parse(rawVal, name, parent) { const elem = rawVal._elements && rawVal._elements[0]; const props = ((elem && elem._properties) || {}); const serial = { _rawVal: rawVal, _properties: props }; return new ConfigSetNode(name, parent, props, serial); } diff --git a/dist/datamodel/node/data/ConfigSetNode.js.map b/dist/datamodel/node/data/ConfigSetNode.js.map index 0bc8bc9..70b2ec5 100644 --- a/dist/datamodel/node/data/ConfigSetNode.js.map +++ b/dist/datamodel/node/data/ConfigSetNode.js.map @@ -1 +1 @@ -{"version":3,"file":"ConfigSetNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/data/ConfigSetNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAGtC,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,MAAM,UAAU,GAAG,oBAAoB,CAAC;AACxC,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,QAAQ;IAC/C,yEAAyE;IACzE,sEAAsE;IACtE,yEAAyE;IACzE,0EAA0E;IAC1E,oEAAoE;IACpE,0EAA0E;IAC1E,2DAA2D;IAC3D,IAAI,UAAU,KAAa,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAK9C,YAAY,IAAY,EAAE,MAAuB,EAAE,KAA8B,EAAE,MAA+B,IAAI,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IACpJ,IAAI,IAAI,KAAa,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;IAC1E,IAAI,SAAS,KAAa,OAAO,UAAU,CAAC,CAAC,CAAC;IAC9C,kFAAkF;IAClF,IAAI,YAAY,KAAa,OAAO,EAAE,CAAC,CAAC,CAAC;IACzC,IAAI,aAAa,KAAc,OAAO,KAAK,CAAC,CAAC,CAAC;IAC9C,aAAa,KAAkB,OAAO,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IACjE,qEAAqE;IACrE,wBAAwB,KAA8B,MAAM,KAAK,GAAG,M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E,KAAK,EAAE,CAAC,CAAC,OAAO,IAAI,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAiC,CAAC,CAAC,CAAC,CAAC;CACna"} \ No newline at end of file +{"version":3,"file":"ConfigSetNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/data/ConfigSetNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAG1D,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,MAAM,UAAU,GAAG,oBAAoB,CAAC;AACxC,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,kBAAkB;IACzD,yEAAyE;IACzE,sEAAsE;IACtE,yEAAyE;IACzE,0EAA0E;IAC1E,oEAAoE;IACpE,0EAA0E;IAC1E,2DAA2D;IAC3D,IAAI,UAAU,KAAa,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAK9C,YAAY,IAAY,EAAE,MAAuB,EAAE,KAA8B,EAAE,MAA+B,IAAI,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IACpJ,IAAI,IAAI,KAAa,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;IAC1E,IAAI,SAAS,KAAa,OAAO,UAAU,CAAC,CAAC,CAAC;IAC9C,kFAAkF;IAClF,IAAI,YAAY,KAAa,OAAO,EAAE,CAAC,CAAC,CAAC;IACzC,IAAI,aAAa,KAAc,OAAO,KAAK,CAAC,CAAC,CAAC;IAC9C,aAAa,KAAkB,OAAO,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IACjE,qEAAqE;IACrE,wFAAwF;IACxF,mFAAmF;IACnF,wDAAwD;IACxD,oBAAoB,KAA8B,OAAO,EAAE,IAAI,EAAE,IAA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/ConfigSetRefNode.d.ts +++ b/dist/datamodel/node/data/ConfigSetRefNode.d.ts @@ -1,7 +1,7 @@ -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import type { PropClass } from '../BaseNode.js'; import type BaseNode from '../BaseNode.js'; -export default class ConfigSetRefNode extends DataNode { +export default class ConfigSetRefNode extends SimulinkObjectNode { SourceName: string; active?: boolean; constructor(name: string, parent: BaseNode | null, props: Record, serial: Record); @@ -10,8 +10,7 @@ export default class ConfigSetRefNode extends DataNode { get displayValue(): string; get valueEditable(): boolean; getProperties(): PropClass[]; - _getSerializedProperties(): Record; - serializeValue(): unknown; + _serializedOverrides(): Record; static get defaultName(): string; static createDefault(name: string, parent: BaseNode | null): ConfigSetRefNode; static parse(rawVal: Record, name: string, parent: BaseNode | null): ConfigSetRefNode; diff --git a/dist/datamodel/node/data/ConfigSetRefNode.d.ts.map b/dist/datamodel/node/data/ConfigSetRefNode.d.ts.map index 77f32d2..2075f81 100644 --- a/dist/datamodel/node/data/ConfigSetRefNode.d.ts.map +++ b/dist/datamodel/node/data/ConfigSetRefNode.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ConfigSetRefNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/data/ConfigSetRefNode.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAI3C,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,QAAQ;IAClD,UAAU,EAAE,MAAM,CAAC;IAEnB,MAAM,CAAC,EAAE,OAAO,CAAC;gBACL,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,O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AAe;IACzC,IAAI,aAAa,IAAI,OAAO,CAAkB;IAC9C,aAAa,IAAI,SAAS,EAAE;IAK5B,oBAAoB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC/C,MAAM,KAAK,WAAW,IAAI,MAAM,CAA2B;IAC3D,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,gBAAgB;IAC7E,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,gBAAgB;CACzG"} \ No newline at end of file diff --git a/dist/datamodel/node/data/ConfigSetRefNode.js b/dist/datamodel/node/data/ConfigSetRefNode.js index 7d6207a..04bd392 100644 --- a/dist/datamodel/node/data/ConfigSetRefNode.js +++ b/dist/datamodel/node/data/ConfigSetRefNode.js @@ -1,9 +1,9 @@ // Copyright 2026 The MathWorks, Inc. -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import PropName from '../../prop/PropName.js'; import PropDataType from '../../prop/PropDataType.js'; const CLASS_NAME = 'Simulink.ConfigSetRef'; -export default class ConfigSetRefNode extends DataNode { +export default class ConfigSetRefNode extends SimulinkObjectNode { constructor(name, parent, props, serial) { super(name, parent, serial); this.SourceName = props.SourceName || ''; } get icon() { return this.active ? 'check_configurationReference' : 'configurationReference'; } get className() { return CLASS_NAME; } @@ -12,8 +12,10 @@ export default class ConfigSetRefNode extends DataNode { get valueEditable() { return false; } getProperties() { return [PropName, PropDataType]; } // PI layout: schema-driven "General" group (classes/configSetRef.json). - _getSerializedProperties() { const props = Object.assign({}, this.serial._properties); props.SourceName = this.SourceName; return props; } - serializeValue() { return this._serializeSimulinkObject({ SourceName: this.SourceName }); } + // UNGATED, on the same terms as a ConfigSet's Name: a reference that cannot say what it + // points at is not a reference, so the key is written even as the empty string a + // half-built entry carries. + _serializedOverrides() { return { SourceName: this.SourceName }; } static get defaultName() { return 'ConfigSetRef'; } static createDefault(name, parent) { const rawVal = { _array_class: CLASS_NAME, _array_type: 'MATLABArray', _dimensions: [1, 1], _mw_element_type: 'MATLABArray', _elements: [{ _properties: { SourceName: '' } }] }; const props = rawVal._elements[0]._properties; const serial = { _rawVal: rawVal, _properties: props }; return new ConfigSetRefNode(name, parent, props, serial); } static parse(rawVal, name, parent) { const elem = rawVal._elements && rawVal._elements[0]; const props = ((elem && elem._properties) || {}); const serial = { _rawVal: rawVal, _properties: props }; return new ConfigSetRefNode(name, parent, props, serial); } diff --git a/dist/datamodel/node/data/ConfigSetRefNode.js.map b/dist/datamodel/node/data/ConfigSetRefNode.js.map index ee65d7d..28f1f59 100644 --- a/dist/datamodel/node/data/ConfigSetRefNode.js.map +++ b/dist/datamodel/node/data/ConfigSetRefNode.js.map @@ -1 +1 @@ -{"version":3,"file":"ConfigSetRefNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/data/ConfigSetRefNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAGtC,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,MAAM,UAAU,GAAG,uBAAuB,CAAC;AAC3C,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,QAAQ;IAIlD,YAAY,IAAY,EAAE,MAAuB,EAAE,KAA8B,EAAE,MAA+B,IAAI,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,GAAI,KAAK,CAAC,UAAqB,IAAI,EAAE,CAAC,CAAC,CAAC;IAC1M,IAAI,IAAI,KAAa,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC;IACtG,IAAI,SA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EAAE,MAAM,EAAE,KAAK,EAAE,MAAiC,CAAC,CAAC,CAAC,CAAC;CACza"} \ No newline at end of file diff --git a/dist/datamodel/node/data/CustomObjectNode.d.ts b/dist/datamodel/node/data/CustomObjectNode.d.ts index 7c8497d..57bffd5 100644 --- a/dist/datamodel/node/data/CustomObjectNode.d.ts +++ b/dist/datamodel/node/data/CustomObjectNode.d.ts @@ -1,15 +1,14 @@ -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import type { PropClass } from '../BaseNode.js'; import type BaseNode from '../BaseNode.js'; -export default class CustomObjectNode extends DataNode { +export default class CustomObjectNode extends SimulinkObjectNode { Description: string; constructor(name: string, parent: BaseNode | null, props: Record, serial: Record); get icon(): string; get className(): string; get displayValue(): string; getProperties(): PropClass[]; - _getSerializedProperties(): Record; - serializeValue(): unknown; + _serializedOverrides(): Record; static get defaultName(): string; static createDefault(name: string, parent: BaseNode | null): CustomObjectNode; static parse(rawVal: Record, name: string, parent: BaseNode | null): CustomObjectNode; diff --git a/dist/datamodel/node/data/CustomObjectNode.d.ts.map b/dist/datamodel/node/data/CustomObjectNode.d.ts.map index de9ee18..6b5b5f5 100644 --- a/dist/datamodel/node/data/CustomObjectNode.d.ts.map +++ b/dist/datamodel/node/data/CustomObjectNode.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"CustomObjectNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/data/CustomObjectNode.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAO3C,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,QAAQ;IAClD,WAAW,EAAE,MAAM,CAAC;gBACR,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,CAA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ACjE,aAAa,IAAI,SAAS,EAAE;IAE5B,oBAAoB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC/C,MAAM,KAAK,WAAW,IAAI,MAAM,CAA2B;IAC3D,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,gBAAgB;IAC7E,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,gBAAgB;CACzG"} \ No newline at end of file diff --git a/dist/datamodel/node/data/CustomObjectNode.js b/dist/datamodel/node/data/CustomObjectNode.js index 792664d..dca1b03 100644 --- a/dist/datamodel/node/data/CustomObjectNode.js +++ b/dist/datamodel/node/data/CustomObjectNode.js @@ -1,24 +1,19 @@ // Copyright 2026 The MathWorks, Inc. -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import PropName from '../../prop/PropName.js'; import PropValue from '../../prop/PropValue.js'; import PropDataType from '../../prop/PropDataType.js'; import PropDescription from '../../prop/PropDescription.js'; import { OBJECT_ICON } from '../icons.js'; const CLASS_NAME = 'CustomObject'; -export default class CustomObjectNode extends DataNode { +export default class CustomObjectNode extends SimulinkObjectNode { constructor(name, parent, props, serial) { super(name, parent, serial); this.Description = props.Description || ''; } get icon() { return OBJECT_ICON; } get className() { return CLASS_NAME; } get displayValue() { return '<1x1 ' + CLASS_NAME + '>'; } getProperties() { return [PropName, PropValue, PropDataType, PropDescription]; } // PI layout: schema-driven "General" group (classes/customObject.json). - _getSerializedProperties() { const props = Object.assign({}, this.serial._properties); if ('Description' in this.serial._properties || this.Description) { - props.Description = this.Description; - } return props; } - serializeValue() { const overrides = {}; if ('Description' in this.serial._properties || this.Description) { - overrides.Description = this.Description; - } return this._serializeSimulinkObject(overrides); } + _serializedOverrides() { return this._gatedProps({ Description: this.Description }); } static get defaultName() { return 'CustomObject'; } static createDefault(name, parent) { const rawVal = { _array_class: CLASS_NAME, _array_type: 'MATLABArray', _dimensions: [1, 1], _mw_element_type: 'MATLABArray', _elements: [{ _properties: {} }] }; const props = rawVal._elements[0]._properties; const serial = { _rawVal: rawVal, _properties: props }; return new CustomObjectNode(name, parent, props, serial); } static parse(rawVal, name, parent) { const elem = rawVal._elements && rawVal._elements[0]; const props = ((elem && elem._properties) || {}); const serial = { _rawVal: rawVal, _properties: props }; return new CustomObjectNode(name, parent, props, serial); } diff --git a/dist/datamodel/node/data/CustomObjectNode.js.map b/dist/datamodel/node/data/CustomObjectNode.js.map index 2de59df..66ac826 100644 --- a/dist/datamodel/node/data/CustomObjectNode.js.map +++ b/dist/datamodel/node/data/CustomObjectNode.js.map @@ -1 +1 @@ -{"version":3,"file":"CustomObjectNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/data/CustomObjectNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAGtC,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,eAAe,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,MAAM,UAAU,GAAG,cAAc,CAAC;AAClC,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,QAAQ;IAElD,YAAY,IAAY,EAAE,MAAuB,EAAE,KAA8B,EAAE,MAA+B,IAAI,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,GAAI,KAAK,CAAC,WAAsB,IAAI,EAAE,CAAC,CAAC,CAAC;IAC5M,IAAI,IAAI,KAAa,OAAO,WAAW,CAAC,CAAC,CAAC;IAC1C,IAAI,SAAS,KAAa,OA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GAAG,CAAC,CAAC,IAAI,IAAK,IAAgC,CAAC,WAAW,CAAC,IAAI,EAAE,CAA4B,CAAC,CAAC,MAAM,MAAM,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,IAAI,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAiC,CAAC,CAAC,CAAC,CAAC;CACza"} \ No newline at end of file diff --git a/dist/datamodel/node/data/DataSourceNode.d.ts b/dist/datamodel/node/data/DataSourceNode.d.ts index c6420a0..1069fb7 100644 --- a/dist/datamodel/node/data/DataSourceNode.d.ts +++ b/dist/datamodel/node/data/DataSourceNode.d.ts @@ -5,6 +5,18 @@ export default class DataSourceNode extends BaseNode { resolved: boolean; constructor(name: string, parent: BaseNode | null, fullPath: string); get isEntry(): boolean; + /** + * The one classification behind BOTH the icon and the class name. + * + * These were two independent chains of `endsWith`, which is two answers to one + * question: a kind added to one and not the other shows a dictionary icon on a row + * labelled 'MAT File'. They were also both case-SENSITIVE, while `refBasename` — + * which is what actually RESOLVES this source against the workspace — is not. So a + * model naming `Params.SLDD`, exactly as its author typed it, got a working link and a + * MAT-file presentation, and no part of that looks like a bug from either side. + * Deriving from `fileKinds` puts the case rule where the rest of this package keeps it. + */ + private get presentation(); get icon(): string; get displayName(): string; get displayValue(): string; diff --git a/dist/datamodel/node/data/DataSourceNode.d.ts.map b/dist/datamodel/node/data/DataSourceNode.d.ts.map index 9765435..054ce6e 100644 --- a/dist/datamodel/node/data/DataSourceNode.d.ts.map +++ b/dist/datamodel/node/data/DataSourceNode.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"DataSourceNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/data/DataSourceNode.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAKrE,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,QAAQ;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;gBAEN,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM;IAMnE,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,IAAI,IAAI,IAAI,MAAM,CAMjB;IAED,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,YAAY,IAAI,MAAM,CAEzB;IAED,IAAI,SAAS,IAAI,MAAM,CAItB;IAED,IAAI,YAAY,IAAI,OAAO,CAE1B;IAED,IAAI,aAAa,IAAI,OAAO,CAE3B;IAED,KAAK,IAAI,OAAO,GAAG,IAAI;IAQvB,aAAa,IAAI,SAAS,EAAE;IAI5B,WAAW,IAAI,UAAU,EAAE;CAK9B"} \ No newline at end of file +{"version":3,"file":"DataSourceNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/data/DataSourceNode.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAMrE,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,QAAQ;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;gBAEN,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM;IAMnE,IAAI,OAAO,IAAI,OAAO,CAErB;IAED;;;;;;;;;;OAUG;IACH,OAAO,KAAK,YAAY,GASvB;IAED,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,YAAY,IAAI,MAAM,CAEzB;IAED,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,IAAI,YAAY,IAAI,OAAO,CAE1B;IAED,IAAI,aAAa,IAAI,OAAO,CAE3B;IAED,KAAK,IAAI,OAAO,GAAG,IAAI;IAQvB,aAAa,IAAI,SAAS,EAAE;IAI5B,WAAW,IAAI,UAAU,EAAE;CAK9B"} \ No newline at end of file diff --git a/dist/datamodel/node/data/DataSourceNode.js b/dist/datamodel/node/data/DataSourceNode.js index af2fd0d..a4a8b20 100644 --- a/dist/datamodel/node/data/DataSourceNode.js +++ b/dist/datamodel/node/data/DataSourceNode.js @@ -3,6 +3,7 @@ import BaseNode from '../BaseNode.js'; import PropName from '../../prop/PropName.js'; import PropPath from '../../prop/PropPath.js'; import PropStatus from '../../prop/PropStatus.js'; +import { isModelFile, isSlddFile } from '../../fileKinds.js'; export default class DataSourceNode extends BaseNode { constructor(name, parent, fullPath) { super(name, parent); @@ -12,16 +13,33 @@ export default class DataSourceNode extends BaseNode { get isEntry() { return true; } - get icon() { - if (this.name.endsWith('.sldd')) { - return 'simulinkDataDictionary_FT'; + /** + * The one classification behind BOTH the icon and the class name. + * + * These were two independent chains of `endsWith`, which is two answers to one + * question: a kind added to one and not the other shows a dictionary icon on a row + * labelled 'MAT File'. They were also both case-SENSITIVE, while `refBasename` — + * which is what actually RESOLVES this source against the workspace — is not. So a + * model naming `Params.SLDD`, exactly as its author typed it, got a working link and a + * MAT-file presentation, and no part of that looks like a bug from either side. + * Deriving from `fileKinds` puts the case rule where the rest of this package keeps it. + */ + get presentation() { + if (isSlddFile(this.name)) { + return { icon: 'simulinkDataDictionary_FT', className: 'Data Dictionary' }; } // A `.mdl` is a Simulink model too — the same thing in an older container — // so it gets the model icon rather than falling through to the MAT default. - if (this.name.endsWith('.slx') || this.name.endsWith('.mdl')) { - return 'simulinkModel_FT'; + if (isModelFile(this.name)) { + return { icon: 'simulinkModel_FT', className: 'Simulink Model' }; } - return 'matlabWorkspaceFile'; + // A model's external data sources are dictionaries, models and MAT-files, so an + // extension none of those tests recognise is presented as the last of them rather + // than as nothing at all. + return { icon: 'matlabWorkspaceFile', className: 'MAT File' }; + } + get icon() { + return this.presentation.icon; } get displayName() { return this.name; @@ -30,13 +48,7 @@ export default class DataSourceNode extends BaseNode { return this.fullPath; } get className() { - if (this.name.endsWith('.sldd')) { - return 'Data Dictionary'; - } - if (this.name.endsWith('.slx') || this.name.endsWith('.mdl')) { - return 'Simulink Model'; - } - return 'MAT File'; + return this.presentation.className; } get nameEditable() { return false; diff --git a/dist/datamodel/node/data/DataSourceNode.js.map b/dist/datamodel/node/data/DataSourceNode.js.map index 9fa6d40..a98c3d9 100644 --- a/dist/datamodel/node/data/DataSourceNode.js.map +++ b/dist/datamodel/node/data/DataSourceNode.js.map @@ -1 +1 @@ -{"version":3,"file":"DataSourceNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/data/DataSourceNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAElD,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,QAAQ;IAIhD,YAAY,IAAY,EAAE,MAAuB,EAAE,QAAgB;QAC/D,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACpB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IAC1B,CAAC;IAED,IAAI,OAAO;QACP,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,IAAI,IAAI;QACJ,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YAAC,OAAO,2BAA2B,CAAC;QAAC,CAAC;QACxE,4EAA4E;QAC5E,4EAA4E;QAC5E,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,I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IAAI,YAAY;QACZ,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC;IACvC,CAAC;IAED,IAAI,YAAY;QACZ,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,IAAI,aAAa;QACb,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,KAAK;QACD,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC;QAC1B,IAAI,GAAG,EAAE,CAAC;YACN,GAAG,CAAC,KAAK,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,KAAe,EAAE,UAAU,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;QACrE,CAAC;QACD,OAAO,GAAG,CAAC;IACf,CAAC;IAED,aAAa;QACT,OAAO,CAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;IAC5C,CAAC;IAED,WAAW;QACP,OAAO;YACH,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,CAAC,EAAE;SAChE,CAAC;IACN,CAAC;CACJ"} \ No newline at end of file diff --git a/dist/datamodel/node/data/LookupTableNode.d.ts b/dist/datamodel/node/data/LookupTableNode.d.ts index 7203d48..2f26aee 100644 --- a/dist/datamodel/node/data/LookupTableNode.d.ts +++ b/dist/datamodel/node/data/LookupTableNode.d.ts @@ -1,7 +1,7 @@ -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import type { PropClass } from '../BaseNode.js'; import type BaseNode from '../BaseNode.js'; -export default class LookupTableNode extends DataNode { +export default class LookupTableNode extends SimulinkObjectNode { Description: string; constructor(name: string, parent: BaseNode | null, props: Record, serial: Record); get icon(): string; @@ -9,8 +9,7 @@ export default class LookupTableNode extends DataNode { get displayValue(): string; get valueEditable(): boolean; getProperties(): PropClass[]; - _getSerializedProperties(): Record; - serializeValue(): unknown; + _serializedOverrides(): Record; static get defaultName(): string; static createDefault(name: string, parent: BaseNode | null): LookupTableNode; static parse(rawVal: Record, name: string, parent: BaseNode | null): LookupTableNode; diff --git a/dist/datamodel/node/data/LookupTableNode.d.ts.map b/dist/datamodel/node/data/LookupTableNode.d.ts.map index a9679cd..8d98788 100644 --- a/dist/datamodel/node/data/LookupTableNode.d.ts.map +++ b/dist/datamodel/node/data/LookupTableNode.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"LookupTableNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/data/LookupTableNode.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAK3C,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,QAAQ;IACjD,WAAW,EAAE,MAAM,CAAC;gBACR,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAClH,IAAI,IAAI,IAAI,MAAM,CAAuB;IACzC,IAAI,SAAS,IAAI,MAAM,CAAuB;IAE9C,IAAI,YAAY,IAAI,MAAM,CAAe;IACzC,IAAI,aAAa,IAAI,OAAO,CAAkB;IAC9C,aAAa,IAAI,SAAS,EAAE;IAE5B,wBAAwB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACnD,cAAc,IAAI,OAAO;IACzB,MAAM,KAAK,WAAW,IAAI,MAAM,CAA0B;IAC1D,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,eAAe;IAC5E,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,eAAe;CACxG"} \ No newline at end of file +{"version":3,"file":"LookupTableNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/data/LookupTableNode.ts"],"names":[],"mappings":"AACA,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAK3C,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,kBAAkB;IAC3D,WAAW,EAAE,MAAM,CAAC;gBACR,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAClH,IAAI,IAAI,IAAI,MAAM,CAAuB;IACzC,IAAI,SAAS,IAAI,MAAM,CAAuB;IAE9C,IAAI,YAAY,IAAI,MAAM,CAAe;IACzC,IAAI,aAAa,IAAI,OAAO,CAAkB;IAC9C,aAAa,IAAI,SAAS,EAAE;IAE5B,oBAAoB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC/C,MAAM,KAAK,WAAW,IAAI,MAAM,CAA0B;IAC1D,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,eAAe;IAC5E,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,eAAe;CACxG"} \ No newline at end of file diff --git a/dist/datamodel/node/data/LookupTableNode.js b/dist/datamodel/node/data/LookupTableNode.js index 3b6d697..7481980 100644 --- a/dist/datamodel/node/data/LookupTableNode.js +++ b/dist/datamodel/node/data/LookupTableNode.js @@ -1,10 +1,10 @@ // Copyright 2026 The MathWorks, Inc. -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import PropName from '../../prop/PropName.js'; import PropDataType from '../../prop/PropDataType.js'; import PropDescription from '../../prop/PropDescription.js'; const CLASS_NAME = 'Simulink.LookupTable'; -export default class LookupTableNode extends DataNode { +export default class LookupTableNode extends SimulinkObjectNode { constructor(name, parent, props, serial) { super(name, parent, serial); this.Description = props.Description || ''; } get icon() { return 'wsLookup'; } get className() { return CLASS_NAME; } @@ -13,12 +13,7 @@ export default class LookupTableNode extends DataNode { get valueEditable() { return false; } getProperties() { return [PropName, PropDataType, PropDescription]; } // PI layout: schema-driven "General" group (classes/lookupTable.json). - _getSerializedProperties() { const props = Object.assign({}, this.serial._properties); if ('Description' in this.serial._properties || this.Description) { - props.Description = this.Description; - } return props; } - serializeValue() { const overrides = {}; if ('Description' in this.serial._properties || this.Description) { - overrides.Description = this.Description; - } return this._serializeSimulinkObject(overrides); } + _serializedOverrides() { return this._gatedProps({ Description: this.Description }); } static get defaultName() { return 'LookupTable'; } static createDefault(name, parent) { const rawVal = { _array_class: CLASS_NAME, _array_type: 'MATLABArray', _dimensions: [1, 1], _mw_element_type: 'MATLABArray', _elements: [{ _properties: {} }] }; const props = rawVal._elements[0]._properties; const serial = { _rawVal: rawVal, _properties: props }; return new LookupTableNode(name, parent, props, serial); } static parse(rawVal, name, parent) { const elem = rawVal._elements && rawVal._elements[0]; const props = ((elem && elem._properties) || {}); const serial = { _rawVal: rawVal, _properties: props }; return new LookupTableNode(name, parent, props, serial); } diff --git a/dist/datamodel/node/data/LookupTableNode.js.map b/dist/datamodel/node/data/LookupTableNode.js.map index 9a64624..1163185 100644 --- a/dist/datamodel/node/data/LookupTableNode.js.map +++ b/dist/datamodel/node/data/LookupTableNode.js.map @@ -1 +1 @@ -{"version":3,"file":"LookupTableNode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C,CAAC,CAAC,CAAC;CACva"} \ No newline at end of file +{"version":3,"file":"LookupTableNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/data/LookupTableNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAG1D,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,eAAe,MAAM,+BAA+B,CAAC;AAC5D,MAAM,UAAU,GAAG,sBAAsB,CAAC;AAC1C,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,kBAAkB;IAE3D,YAAY,IAAY,EAAE,MAAuB,EAAE,KAA8B,EAAE,MAA+B,IAAI,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,GAAI,KAAK,CAAC,WAAsB,IAAI,EAAE,CAAC,CAAC,CAAC;IAC5M,IAAI,IAAI,KAAa,OAAO,UAAU,CAAC,CAAC,CAAC;IACzC,IAAI,SAAS,KAAa,OAAO,UAAU,CAAC,CAAC,CAAC;IAC9C,oFAAoF;IACpF,IAAI,YAAY,KAAa,OAAO,EAAE,CAAC,CAAC,CAAC;IACzC,IAAI,aAAa,KAAc,OAAO,KAAK,CAAC,CAAC,CAAC;IAC9C,aAAa,KAAkB,OAAO,CAAC,QAAQ,EAAE,YAAY,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAClF,uEAAuE;IACvE,oBAAoB,KAA8B,OAAO,IAAI,CAAC,WAAW,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/G,MAAM,KAAK,WAAW,KAAa,OAAO,aAAa,CAAC,CAAC,CAAC;IAC1D,MAAM,CAAC,aAAa,CAAC,IAAY,EAAE,MAAuB,IAAqB,MAAM,MAAM,GAAG,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,gBAAgB,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,MAAM,MAAM,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,IAAI,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,KAA2C,EAAE,MAA4C,CAAC,CAAC,CAAC,CAAC;IAC7d,MAAM,CAAC,KAAK,CAAC,MAA+B,EAAE,IAAY,EAAE,MAAuB,IAAqB,MAAM,IAAI,GAAG,MAAM,CAAC,SAAS,IAAK,MAAM,CAAC,SAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,IAAI,IAAK,IAAgC,CAAC,WAAW,CAAC,IAAI,EAAE,CAA4B,CAAC,CAAC,MAAM,MAAM,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,IAAI,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAiC,CAAC,CAAC,CAAC,CAAC;CACva"} \ No newline at end of file diff --git a/dist/datamodel/node/data/MatlabVariableNode.d.ts.map b/dist/datamodel/node/data/MatlabVariableNode.d.ts.map index a02e8d2..1b8b48f 100644 --- a/dist/datamodel/node/data/MatlabVariableNode.d.ts.map +++ b/dist/datamodel/node/data/MatlabVariableNode.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"MatlabVariableNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/data/MatlabVariableNode.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gB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MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,kBAAkB;IAgCnH;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,kBAAkB;IAsB9G,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,kBAAkB;IAwBnG,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,kBAAkB;IA2BlH,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,kBAAkB;IAiB5G,MAAM,CAAC,qBAAqB,CAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,QAAQ,GAAG,IAAI,GACtB,kBAAkB;IA4BrB,MAAM,CAAC,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,kBAAkB;CAuB1G"} \ No newline at end of file diff --git a/dist/datamodel/node/data/MatlabVariableNode.js b/dist/datamodel/node/data/MatlabVariableNode.js index f03d616..b3efd69 100644 --- a/dist/datamodel/node/data/MatlabVariableNode.js +++ b/dist/datamodel/node/data/MatlabVariableNode.js @@ -15,13 +15,16 @@ import { NOT_AVAILABLE } from '../../parser/McosParser.js'; import { parseMatrix } from '../../parser/MatParser.js'; import { uudecode } from '../../parser/CdataCodec.js'; import { encodeCdata } from '../../parser/MatWriter.js'; -import { EMPTY_CELL, EMPTY_NUMERIC, MISSING_STRING, effectiveDims, elementCount, needsSummary, overCharBudget, summaryForm, } from '../../display/DisplayConvention.js'; +import { EMPTY_CELL, EMPTY_NUMERIC, effectiveDims, elementCount, needsSummary, overCharBudget, summaryForm, } from '../../display/DisplayConvention.js'; import { charNeedsShape, charTextFromCodes, escapeXml, formatDoubleXml, formatNumericXml, formatComplexXml, formatMatlabNum, formatMxCharSerial, formatNumLiteral, formatMatrixSerial, parseMatlabNum, parseExactNum, needsExactInt, exactForClass, transposeToColumnMajorND, transposeFromColumnMajorND, pad as xmlPad, } from '../../parser/XmlUtils.js'; -// ---- Pure value helpers ---- -// None of these read node state, which is why they are module-local functions and -// not methods: staying off the class is what lets the display getters and the -// static parse entry points at the bottom of the file share them without either -// side owning the other. +import { TYPED_NUMERIC_CLASS, classAfterEdit, elementClass, emptyDouble, formatCharMatrix, formatMatrix, formatStringElement, needsTypedLiteral, parseMatrixValue, } from './matlabValueRules.js'; +// ---- Node-local tables ---- +// The pure rules about a MATLAB VALUE — what class an edit leaves behind, when a +// number needs a typed spelling, how a matrix prints and parses back — live in +// matlabValueRules.ts, which reads no node state and so could stop being part of +// this file. What stays here is the two module-level facts that are about THIS +// NODE's own jobs rather than about the value it holds: the icon a tree row shows +// for an opaque object, and the one MAT-file tag the cdata reader below looks for. const MCOS_ICON_MAP = { 'Simulink.Parameter': 'wsParameters', 'Simulink.Signal': 'wsSignal', @@ -43,33 +46,6 @@ const MCOS_ICON_MAP = { // out of a dictionary showed the default one out of a .mat. string: 'wsString', }; -// An empty 0x0 double, MATLAB's own `[]`. Stands in for a cell slot the parser -// could not read (see _createFromMatCell) and for a struct-array element that no -// longer has one of the array's fields (see _buildVarObject): in both places a -// hole must stay a hole, or every later element slides one slot early. -// A fresh object per call, since the node built from it keeps a reference. -function emptyDouble() { - return { - name: '', - className: 'double', - dimensions: [0, 0], - isComplex: false, - isLogical: false, - value: [], - fields: null, - }; -} -// One element of a string array as MATLAB displays it: quoted, or the unquoted -// `` for a `missing`. `null` is the marker for a `missing` because the display -// text cannot be — a real string whose characters are `` still has to print -// quoted, and the two would be indistinguishable if the marker were the text. -// `undefined` is a hole rather than a missing (a shorter `_elements` than `_dims` -// claims), and prints as the empty string it always did. -function formatStringElement(el) { - if (el === null) - return MISSING_STRING; - return formatMatlabString(el !== undefined ? String(el) : ''); -} // A text .sldd stores a value its JSON schema cannot spell as uuencoded bytes, // and what those bytes CONTAIN is an 8-byte preamble followed by one MAT-file // miMATRIX element — so decoding stops at the transport (parser/CdataCodec) and @@ -83,142 +59,6 @@ function formatStringElement(el) { // value, and a complex value at any rank, has to go out this way. // MAT-file element type miMATRIX: the one thing a cdata payload ever holds. const MI_MATRIX = 14; -// The MATLAB numeric classes a bare JSON number cannot carry. JSON has ONE number -// type, so an int32 or a single written as a plain number reads back as a double — -// a silent class change, not a rounding nit. `double` needs no tag. -const TYPED_NUMERIC_CLASS = /^(?:u?int(?:8|16|32|64)|single)$/; -// The class a value keeps across an edit. A Value edit sets the VALUE, not the -// class — MATLAB's own `v(:) = 7` on an int32 stays int32, and the Data Type -// column is read-only here — but MatlabValueParser cannot know the class: a bare -// `7` always parses as 'double'. So the node's existing class beats the parser's -// default. Only the integer/single classes qualify: every number is representable -// in them, whereas keeping 'logical' would render `7` as `true`, which MATLAB -// rejects outright. -function classAfterEdit(current, parsedType) { - return parsedType === 'double' && TYPED_NUMERIC_CLASS.test(current) ? current : parsedType; -} -// The class one ELEMENT of a numeric array carries. One MATLAB array is one class, -// so an element of an int32 array is an int32 and an element of a logical array is a -// logical. The element rows' hardcoded 'double' put 'int32' in the array's Data Type -// column and 'double' in the column of every row beneath it — one value described two -// ways, one of them wrong — and showed a logical array as [true false] over rows -// reading 1 and 0, leaking the 1/0 storage form into the UI. -// -// classAfterEdit's set plus 'logical'. For the integer/single classes this moves the -// Data Type column and nothing else, since they format through formatMatlabNum -// exactly as a double does. 'logical' additionally changes the element's icon and -// text (see icon and _formatScalar), which is the point: the row should look like the -// logical scalar it is, checkbox included. It is also why _setConstrainedValue has a -// logical arm — a row that reads 'true' has to accept 'true'. -// -// Cell and struct children never come through here: they are independent values, and -// their container has no one class to hand down. -function elementClass(arrayClass) { - return TYPED_NUMERIC_CLASS.test(arrayClass) || arrayClass === 'logical' ? arrayClass : 'double'; -} -// True when a scalar has to be written as the format's typed {_type,_value} -// literal rather than a bare JSON value. Both reasons are silent data loss: -// an int32/single written bare reads back as double (see TYPED_NUMERIC_CLASS), -// and JSON has no literal for Inf/NaN — JSON.stringify writes `null`, which reads -// back as 0. A `logical` normally travels as a JS boolean and needs no tag, except -// when it came from an array, whose elements the parser stores as 1/0. -function needsTypedLiteral(type, value) { - if (TYPED_NUMERIC_CLASS.test(type)) { - return true; - } - if (type === 'logical') { - return typeof value !== 'boolean'; - } - return typeof value === 'number' && !isFinite(value); -} -// A MATLAB matrix literal: `[1 2 3; 4 5 6]`. Only ever called for rank <= 2 — the -// caller summarizes anything higher, because mat2str itself refuses rank >= 3 and -// there is no MATLAB one-line spelling to match. -// -// The row loop used to run the full rows x cols grid and print '?' for anything it -// could not find, so an element list shorter than the declared shape filled the -// display with question marks. It now formats the elements that exist. -function formatMatrix(rows, cols, elements) { - if (elements.length === 0) { - return EMPTY_NUMERIC; - } - const rowStrs = []; - for (let r = 0; r < rows; r++) { - const vals = []; - for (let c = 0; c < cols; c++) { - const i = r * cols + c; - if (i >= elements.length) { - break; - } - vals.push(formatMatlabNum(elements[i])); - } - if (vals.length > 0) { - rowStrs.push(vals.join(' ')); - } - } - return '[' + rowStrs.join('; ') + ']'; -} -// A char MATRIX as MATLAB prints one: `['ab'; 'cd']`, one quoted string per ROW. -// -// The stored text is column-major (see XmlUtils' char section), so row r is every -// rows-th character starting at r — MATLAB's own 2x2 'acbd' is rows 'ab' and 'cd'. -// Each row is quoted through formatMatlabChar, so an apostrophe inside one doubles -// exactly as it does in the scalar spelling. -// -// Rank 2 only: the caller summarizes anything higher, for the same reason formatMatrix -// does — MATLAB has no one-line print of a rank-3 array of any class. -function formatCharMatrix(text, dims) { - const rows = dims[0]; - const cols = dims[1]; - const rowStrs = []; - for (let r = 0; r < rows; r++) { - let row = ''; - for (let c = 0; c < cols; c++) { - row += text.charAt(c * rows + r); - } - rowStrs.push(formatMatlabChar(row)); - } - return '[' + rowStrs.join('; ') + ']'; -} -function parseMatrixValue(raw) { - const lines = raw._value.split('\n'); - const header = lines[0]; - // Rank 3 and up appear as Matrix(2,3,2) — MATLAB's binary dictionary writes a - // 2x3x2 as Dimension="2*3*2", and BinarySlddParser now carries every extent - // through. Only the two-group form was matched, so an N-D entry fell through - // to the [0,0] empty node with all twelve of its elements gone. - const dimsMatch = header.match(/^Matrix\((\d+(?:,\d+)*)\)$/); - if (!dimsMatch) { - return null; - } - const dims = dimsMatch[1].split(',').map(function (s) { - return parseInt(s, 10); - }); - const body = lines.slice(1).join(''); - const numbers = []; - // Inf/-Inf/NaN are elements too, and a digits-only pattern would skip them — - // shifting every later element one slot left and corrupting the whole matrix. - const numMatches = body.match(/-?(?:[\d.]+(?:[eE][+-]?\d+)?|Inf|NaN)/g); - if (numMatches) { - // An int64/uint64 element is kept as exact decimal TEXT: MATLAB's 64-bit range is - // wider than a double's exact one BY CONSTRUCTION, so parseMatlabNum turned - // maxU64 into 18446744073709552000 one step after the reader had it right - // (defect 29). The suffix never reaches here — the pattern above matches digits, - // so '18446744073709551615U' arrives already bare. - const exact = needsExactInt(raw._type); - numMatches.forEach(function (s) { - numbers.push(exact ? parseExactNum(s) : parseMatlabNum(s)); - }); - } - // A one-group header (Matrix(5)) has no MATLAB spelling but is cheap to accept - // as the row vector it must mean, rather than handing back a rank-1 dims array - // every downstream reader would have to special-case. - return { - dims: dims.length >= 2 ? dims : [1, dims[0] || 0], - elements: numbers, - type: raw._type, - }; -} export default class MatlabVariableNode extends DataNode { constructor(name, parent, serial) { super(name, parent, serial); diff --git a/dist/datamodel/node/data/MatlabVariableNode.js.map b/dist/datamodel/node/data/MatlabVariableNode.js.map index 705bcb5..8b91d60 100644 --- a/dist/datamodel/node/data/MatlabVariableNode.js.map +++ b/dist/datamodel/node/data/MatlabVariableNode.js.map @@ -1 +1 @@ -{"version":3,"file":"MatlabVariableNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/data/MatlabVariableNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAGtD,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAExE,OAAO,KAAK,YAAY,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,eAAe,MAAM,+BAA+B,CAAC;AAC5D,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,aAAa,MAAM,yBAAyB,CAAC;AACpD,OAAO,iBAAiB,EAAE,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAC5G,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAoB,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EACL,UAAU,EACV,aAAa,EACb,cAAc,EACd,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,WAAW,GACZ,MAAM,oCAAoC,CAAC;AAC5C,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AAC,EAAE,CAAC;QACnD,MAAM,IAAI,GAAG,IAAI,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAiC,CAAC,CAAC;QACrF,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC;QACxB,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC;QACtB,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC;QACxB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC;QAE5B,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtB,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;gBAC5B,MAAM,KAAK,GAAG,IAAI,kBAAkB,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;gBACnF,KAAK,CAAC,KAAK,GAAG,QAAQ,CAAC;gBACvB,KAAK,CAAC,SAAS,GAAG,CAAC,EAAE,CAAC,CAAC;gBACvB,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBACrB,KAAK,CAAC,YAAY,GAAG,EAAE,CAAC;gBACxB,KAAK,CAAC,WAAW,GAAG,QAAQ,CAAC;gBAC7B,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YACvB,CAAC,CAAC,CAAC;QACL,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF"} \ No newline at end of file +{"version":3,"file":"MatlabVariableNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/data/MatlabVariableNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAGtD,OA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AM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtB,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;gBAC5B,MAAM,KAAK,GAAG,IAAI,kBAAkB,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;gBACnF,KAAK,CAAC,KAAK,GAAG,QAAQ,CAAC;gBACvB,KAAK,CAAC,SAAS,GAAG,CAAC,EAAE,CAAC,CAAC;gBACvB,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBACrB,KAAK,CAAC,YAAY,GAAG,EAAE,CAAC;gBACxB,KAAK,CAAC,WAAW,GAAG,QAAQ,CAAC;gBAC7B,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YACvB,CAAC,CAAC,CAAC;QACL,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF"} \ No newline at end of file diff --git a/dist/datamodel/node/NodeClassMap.d.ts b/dist/datamodel/node/data/NodeClassMap.d.ts similarity index 79% rename from dist/datamodel/node/NodeClassMap.d.ts rename to dist/datamodel/node/data/NodeClassMap.d.ts index 47c78aa..963f403 100644 --- a/dist/datamodel/node/NodeClassMap.d.ts +++ b/dist/datamodel/node/data/NodeClassMap.d.ts @@ -1,6 +1,6 @@ -import type { NodeClassType } from './NodeRegistry.js'; -import type BaseNode from './BaseNode.js'; -import type DataNode from './DataNode.js'; +import type { NodeClassType } from '../NodeRegistry.js'; +import type BaseNode from '../BaseNode.js'; +import type DataNode from '../DataNode.js'; export declare function getClass(className: string): NodeClassType | null; export declare function parseValue(rawVal: unknown, name: string, parent: BaseNode | null): DataNode; export declare function getRegisteredClasses(): string[]; diff --git a/dist/datamodel/node/data/NodeClassMap.d.ts.map b/dist/datamodel/node/data/NodeClassMap.d.ts.map new file mode 100644 index 0000000..b7c19ac --- /dev/null +++ b/dist/datamodel/node/data/NodeClassMap.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"NodeClassMap.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/data/NodeClassMap.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAc,MAAM,oBAAoB,CAAC;AACpE,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAsG3C,wBAAgB,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAEhE;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,QAAQ,CA+B3F;AAED,wBAAgB,oBAAoB,IAAI,MAAM,EAAE,CAE/C;AAQD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAK5D;AAKD,QAAA,MAAM,GAAG;;;;;CAAsE,CAAC;AAGhF,eAAe,GAAG,CAAC"} \ No newline at end of file diff --git a/dist/datamodel/node/NodeClassMap.js b/dist/datamodel/node/data/NodeClassMap.js similarity index 83% rename from dist/datamodel/node/NodeClassMap.js rename to dist/datamodel/node/data/NodeClassMap.js index ccf33aa..144fef9 100644 --- a/dist/datamodel/node/NodeClassMap.js +++ b/dist/datamodel/node/data/NodeClassMap.js @@ -1,29 +1,29 @@ // Copyright 2026 The MathWorks, Inc. -import * as NodeRegistry from './NodeRegistry.js'; -import MatlabVariableNode from './data/MatlabVariableNode.js'; -import ConstantNode from './data/ConstantNode.js'; -import StructNode from './data/StructNode.js'; -import ObjectNode from './data/ObjectNode.js'; -import ParameterNode from './data/ParameterNode.js'; -import SignalNode from './data/SignalNode.js'; -import { BusNode } from './data/BusNode.js'; -import { ConnectionBusNode } from './data/ConnectionBusNode.js'; -import { ServiceBusNode } from './data/ServiceBusNode.js'; -import { EnumTypeNode } from './data/EnumTypeNode.js'; -import AliasTypeNode from './data/AliasTypeNode.js'; -import ConfigSetNode from './data/ConfigSetNode.js'; -import VariantExpressionNode from './data/VariantExpressionNode.js'; -import VariantVariableNode from './data/VariantVariableNode.js'; -import LookupTableNode from './data/LookupTableNode.js'; -import BreakpointNode from './data/BreakpointNode.js'; -import NumericTypeNode from './data/NumericTypeNode.js'; -import ValueTypeNode from './data/ValueTypeNode.js'; -import VariantControlNode from './data/VariantControlNode.js'; -import VariantBankNode from './data/VariantBankNode.js'; -import VariantBankCoderInfoNode from './data/VariantBankCoderInfoNode.js'; -import CustomObjectNode from './data/CustomObjectNode.js'; -import ConfigSetRefNode from './data/ConfigSetRefNode.js'; -import VariantConfigurationDataNode from './data/VariantConfigurationDataNode.js'; +import * as NodeRegistry from '../NodeRegistry.js'; +import MatlabVariableNode from './MatlabVariableNode.js'; +import ConstantNode from './ConstantNode.js'; +import StructNode from './StructNode.js'; +import ObjectNode from './ObjectNode.js'; +import ParameterNode from './ParameterNode.js'; +import SignalNode from './SignalNode.js'; +import { BusNode } from './BusNode.js'; +import { ConnectionBusNode } from './ConnectionBusNode.js'; +import { ServiceBusNode } from './ServiceBusNode.js'; +import { EnumTypeNode } from './EnumTypeNode.js'; +import AliasTypeNode from './AliasTypeNode.js'; +import ConfigSetNode from './ConfigSetNode.js'; +import VariantExpressionNode from './VariantExpressionNode.js'; +import VariantVariableNode from './VariantVariableNode.js'; +import LookupTableNode from './LookupTableNode.js'; +import BreakpointNode from './BreakpointNode.js'; +import NumericTypeNode from './NumericTypeNode.js'; +import ValueTypeNode from './ValueTypeNode.js'; +import VariantControlNode from './VariantControlNode.js'; +import VariantBankNode from './VariantBankNode.js'; +import VariantBankCoderInfoNode from './VariantBankCoderInfoNode.js'; +import CustomObjectNode from './CustomObjectNode.js'; +import ConfigSetRefNode from './ConfigSetRefNode.js'; +import VariantConfigurationDataNode from './VariantConfigurationDataNode.js'; const CLASS_MAP = { 'MatlabVariable': MatlabVariableNode, // A Constant is a derived MATLAB variable; registering it lets Architectural diff --git a/dist/datamodel/node/data/NodeClassMap.js.map b/dist/datamodel/node/data/NodeClassMap.js.map new file mode 100644 index 0000000..cf8c743 --- /dev/null +++ b/dist/datamodel/node/data/NodeClassMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"NodeClassMap.js","sourceRoot":"","sources":["../../../../src/datamodel/node/data/NodeClassMap.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,OAAO,KAAK,YAAY,MAAM,oBAAoB,CAAC;AAInD,OAAO,kBAAkB,MAAM,yBAAyB,CAAC;AACzD,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,qBAAqB,MAAM,4BAA4B,CAAC;AAC/D,OAAO,mBAAmB,MAAM,0BAA0B,CAAC;AAC3D,OAAO,eAAe,MAAM,sBAAsB,CAAC;AACnD,OAAO,cAAc,MAAM,qBAAqB,CAAC;AACjD,OAAO,eAAe,MAAM,sBAAsB,CAAC;AACnD,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,kBAAkB,MAAM,yBAAyB,CAAC;AACzD,OAAO,eAAe,MAAM,sBAAsB,CAAC;AACnD,OAAO,wBAAwB,MAAM,+BAA+B,CAAC;AACrE,OAAO,gBAAgB,MA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AI,SAAS,EAAE,CAAC;YACZ,OAAO,SAAS,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QACjD,CAAC;QACD,wEAAwE;QACxE,oEAAoE;IACxE,CAAC;IAED,KAAK,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,kBAAkB,EAAE,CAAC;QACtD,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YAClB,OAAO,SAAS,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QACjD,CAAC;IACL,CAAC;IAED,+EAA+E;IAC/E,2EAA2E;IAC3E,6EAA6E;IAC7E,OAAO,kBAAkB,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,oBAAoB;IAChC,OAAO,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED,iFAAiF;AACjF,kFAAkF;AAClF,mFAAmF;AACnF,iFAAiF;AACjF,mFAAmF;AACnF,4DAA4D;AAC5D,MAAM,UAAU,mBAAmB,CAAC,IAAc;IAC9C,IAAI,IAAI,CAAC,WAAW,KAAK,kBAAkB,IAAI,CAAE,IAA2B,CAAC,SAAS,EAAE,CAAC;QACrF,OAAO,YAAY,CAAC,YAAY,CAAC,IAA0B,CAAC,CAAC;IACjE,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,8EAA8E;AAC9E,iFAAiF;AACjF,6EAA6E;AAC7E,MAAM,GAAG,GAAG,EAAE,QAAQ,EAAE,UAAU,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,CAAC;AAChF,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEvB,eAAe,GAAG,CAAC"} \ No newline at end of file diff --git a/dist/datamodel/node/data/NumericTypeNode.d.ts b/dist/datamodel/node/data/NumericTypeNode.d.ts index 0e52545..3684f6b 100644 --- a/dist/datamodel/node/data/NumericTypeNode.d.ts +++ b/dist/datamodel/node/data/NumericTypeNode.d.ts @@ -1,7 +1,7 @@ -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import type { PropClass } from '../BaseNode.js'; import type BaseNode from '../BaseNode.js'; -export default class NumericTypeNode extends DataNode { +export default class NumericTypeNode extends SimulinkObjectNode { Description: string; constructor(name: string, parent: BaseNode | null, props: Record, serial: Record); get icon(): string; @@ -9,8 +9,7 @@ export default class NumericTypeNode extends DataNode { get displayValue(): string; get valueEditable(): boolean; getProperties(): PropClass[]; - _getSerializedProperties(): Record; - serializeValue(): unknown; + _serializedOverrides(): Record; static get defaultName(): string; static createDefault(name: string, parent: BaseNode | null): NumericTypeNode; static parse(rawVal: Record, name: string, parent: BaseNode | null): NumericTypeNode; diff --git a/dist/datamodel/node/data/NumericTypeNode.d.ts.map b/dist/datamodel/node/data/NumericTypeNode.d.ts.map index 6a12cfc..7789618 100644 --- a/dist/datamodel/node/data/NumericTypeNode.d.ts.map +++ b/dist/datamodel/node/data/NumericTypeNode.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"NumericTypeNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/data/NumericTypeNode.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAK3C,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,QAAQ;IACjD,WAAW,EAAE,MAAM,CAAC;gBACR,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAClH,IAAI,IAAI,IAAI,MAAM,CAAyD;IAC3E,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CAAC,MAAM,EAAE,OAAO,CAAC;IAC/C,MAAM,KAAK,WAAW,IAAI,MAAM,CAA0B;IAC1D,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,eAAe;IAC5E,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,eAAe;CACxG"} \ No newline at end of file diff --git a/dist/datamodel/node/data/NumericTypeNode.js b/dist/datamodel/node/data/NumericTypeNode.js index b241b49..1bbaab7 100644 --- a/dist/datamodel/node/data/NumericTypeNode.js +++ b/dist/datamodel/node/data/NumericTypeNode.js @@ -1,10 +1,10 @@ // Copyright 2026 The MathWorks, Inc. -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import PropName from '../../prop/PropName.js'; import PropDataType from '../../prop/PropDataType.js'; import PropDescription from '../../prop/PropDescription.js'; const CLASS_NAME = 'Simulink.NumericType'; -export default class NumericTypeNode extends DataNode { +export default class NumericTypeNode extends SimulinkObjectNode { constructor(name, parent, props, serial) { super(name, parent, serial); this.Description = props.Description || ''; } get icon() { return this.isDerived ? 'typeNumeric' : 'wsNumeric'; } get className() { return CLASS_NAME; } @@ -14,12 +14,7 @@ export default class NumericTypeNode extends DataNode { get valueEditable() { return false; } getProperties() { return [PropName, PropDataType, PropDescription]; } // PI layout is schema-driven (schema/classes/numericType.json). - _getSerializedProperties() { const props = Object.assign({}, this.serial._properties); if ('Description' in this.serial._properties || this.Description) { - props.Description = this.Description; - } return props; } - serializeValue() { const overrides = {}; if ('Description' in this.serial._properties || this.Description) { - overrides.Description = this.Description; - } return this._serializeSimulinkObject(overrides); } + _serializedOverrides() { return this._gatedProps({ Description: this.Description }); } static get defaultName() { return 'NumericType'; } static createDefault(name, parent) { const rawVal = { _array_class: CLASS_NAME, _array_type: 'MATLABArray', _dimensions: [1, 1], _mw_element_type: 'MATLABArray', _elements: [{ _properties: {} }] }; const props = rawVal._elements[0]._properties; const serial = { _rawVal: rawVal, _properties: props }; return new NumericTypeNode(name, parent, props, serial); } static parse(rawVal, name, parent) { const elem = rawVal._elements && rawVal._elements[0]; const props = ((elem && elem._properties) || {}); const serial = { _rawVal: rawVal, _properties: props }; return new NumericTypeNode(name, parent, props, serial); } diff --git a/dist/datamodel/node/data/NumericTypeNode.js.map b/dist/datamodel/node/data/NumericTypeNode.js.map index 517606f..afbe7c0 100644 --- a/dist/datamodel/node/data/NumericTypeNode.js.map +++ b/dist/datamodel/node/data/NumericTypeNode.js.map @@ -1 +1 @@ -{"version":3,"file":"NumericTypeNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/data/NumericTypeNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAGtC,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,eAAe,MAAM,+BAA+B,CAAC;AAC5D,MAAM,UAAU,GAAG,sBAAsB,CAAC;AAC1C,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,QAAQ;IAEjD,YAAY,IAAY,EAAE,MAAuB,EAAE,KAA8B,EAAE,MAA+B,IAAI,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,GAAI,KAAK,CAAC,WAAsB,IAAI,EAAE,CAAC,CAAC,CAAC;IAC5M,IAAI,IAAI,KAAa,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;IAC3E,IAAI,SAAS,KAAa,OAAO,UAAU,CAAC,CAAC,CAAC;IAC9C,0EAA0E;IAC1E,iEAAiE;IACjE,IAAI,YAAY,KAAa,OAAO,EAAE,C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AgC,CAAC,WAAW,CAAC,IAAI,EAAE,CAA4B,CAAC,CAAC,MAAM,MAAM,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,IAAI,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAiC,CAAC,CAAC,CAAC,CAAC;CACva"} \ No newline at end of file diff --git a/dist/datamodel/node/data/ParameterNode.d.ts b/dist/datamodel/node/data/ParameterNode.d.ts index 3e44f30..1bf158d 100644 --- a/dist/datamodel/node/data/ParameterNode.d.ts +++ b/dist/datamodel/node/data/ParameterNode.d.ts @@ -6,8 +6,6 @@ export default class ParameterNode extends DataNode { Value: unknown; _valueNode: DataNode | null; DataType: string; - _rawMin: unknown; - _rawMax: unknown; Min: number | undefined; Max: number | undefined; Unit: string; diff --git a/dist/datamodel/node/data/ParameterNode.d.ts.map b/dist/datamodel/node/data/ParameterNode.d.ts.map index 3e7b50b..7f0f4d8 100644 --- a/dist/datamodel/node/data/ParameterNode.d.ts.map +++ b/dist/datamodel/node/data/ParameterNode.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ParameterNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/data/ParameterNode.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAe3C,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,QAAQ;IAC/C,KAAK,EAAE,OAAO,CAAC;IAKf,UAAU,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,MAA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AAE;IAO5B,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,iBAAiB;IAsH5E,wBAAwB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAsCnD,cAAc,IAAI,OAAO;IAOzB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAIhG,MAAM,KAAK,WAAW,IAAI,MAAM,CAAoB;IAEpD,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,aAAa;IAa1E,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS;IAKzD,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,aAAa;CAUtG"} \ No newline at end of file diff --git a/dist/datamodel/node/data/ParameterNode.js b/dist/datamodel/node/data/ParameterNode.js index 3cf2fa9..ece3dd1 100644 --- a/dist/datamodel/node/data/ParameterNode.js +++ b/dist/datamodel/node/data/ParameterNode.js @@ -24,8 +24,6 @@ export default class ParameterNode extends DataNode { // Display-only — _getSerializedProperties copies the on-disk properties, so // nothing writes this default back into a file that did not have it. this.DataType = props.DataType || 'auto'; - this._rawMin = props.Min; - this._rawMax = props.Max; this.Min = ParameterNode._normalizeMinMax(props.Min); this.Max = ParameterNode._normalizeMinMax(props.Max); this.Unit = props.DocUnits || props.Unit || ''; @@ -269,20 +267,38 @@ export default class ParameterNode extends DataNode { else { innerValue = this.Value; } - const props = Object.assign({}, this.serial._properties); + // `sp` is the bag as the FILE holds it, `props` the copy that goes out — the same + // two names SignalNode and BusElementNode use in their versions of this method. + // Every guard below asks `sp`, never the copy, because the question each one asks + // is what the FILE had. The two answer alike today (nothing written into the copy + // shares a key with a later guard), so this is about the next guard added: one + // asking the copy about a key an earlier line already put there — `Value` is + // written before all four — would read this save's own output as evidence about + // the file and write a property the file never carried. + const sp = this.serial._properties; + const props = Object.assign({}, sp); if (innerValue !== undefined) { props.Value = innerValue; } - if ('Min' in this.serial._properties || this.Min !== undefined) { - props.Min = this.Min !== undefined ? this.Min : this._rawMin; + // A cleared bound is written as `[]`, the empty value MATLAB itself stores — + // NOT as whatever the file held, which is what this used to fall back to: the + // node's row went blank, the save put the old number back, and the bound + // reappeared on reopen with no error anywhere (the same rule SignalNode already + // wrote correctly). `undefined` is not the alternative: this one bag feeds BOTH + // save paths, and serializePropertyXml spells `undefined` as `Class="char"` — an + // empty char where a double belongs. The residual difference from MATLAB is that + // the TEXT dictionary gets `"Min": []` where MATLAB omits the key entirely; both + // read back as no bound, so this is a correct value spelled our way, not parity. + if ('Min' in sp || this.Min !== undefined) { + props.Min = this.Min !== undefined ? this.Min : []; } - if ('Max' in this.serial._properties || this.Max !== undefined) { - props.Max = this.Max !== undefined ? this.Max : this._rawMax; + if ('Max' in sp || this.Max !== undefined) { + props.Max = this.Max !== undefined ? this.Max : []; } - if ('DocUnits' in this.serial._properties || this.Unit) { + if ('DocUnits' in sp || this.Unit) { props.DocUnits = this.Unit; } - if ('Description' in this.serial._properties || this.Description) { + if ('Description' in sp || this.Description) { props.Description = this.Description; } return props; diff --git a/dist/datamodel/node/data/ParameterNode.js.map b/dist/datamodel/node/data/ParameterNode.js.map index 36a7f32..c52ee59 100644 --- a/dist/datamodel/node/data/ParameterNode.js.map +++ b/dist/datamodel/node/data/ParameterNode.js.map @@ -1 +1 @@ -{"version":3,"file":"ParameterNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/data/ParameterNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAItC,OAAO,KAAK,Y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CAAC,GAAY;QAChC,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAAC,OAAO,SAAS,CAAC;QAAC,CAAC;QACjE,OAAO,GAAyB,CAAC;IACrC,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,MAA+B,EAAE,IAAY,EAAE,MAAuB;QAC/E,MAAM,IAAI,GAAG,MAAM,CAAC,SAAS,IAAK,MAAM,CAAC,SAAuB,CAAC,CAAC,CAAC,CAAC;QACpE,MAAM,KAAK,GAAG,CAAC,CAAC,IAAI,IAAK,IAAgC,CAAC,WAAW,CAAC,IAAI,EAAE,CAA4B,CAAC;QACzG,MAAM,MAAM,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;QACvD,MAAM,IAAI,GAAG,IAAI,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAiC,CAAC,CAAC;QACvF,IAAI,KAAK,CAAC,KAAK,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,IAAI,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,IAAK,KAAK,CAAC,KAAmB,CAAC,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC;YAC7H,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACtC,CAAC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ"} \ No newline at end of file +{"version":3,"file":"ParameterNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/data/ParameterNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAItC,OAAO,KAAK,YAAY,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC/E,OAAO,QAAQ,MAAM,wBAAwB,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AAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAAC,OAAO,SAAS,CAAC;QAAC,CAAC;QACjE,OAAO,GAAyB,CAAC;IACrC,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,MAA+B,EAAE,IAAY,EAAE,MAAuB;QAC/E,MAAM,IAAI,GAAG,MAAM,CAAC,SAAS,IAAK,MAAM,CAAC,SAAuB,CAAC,CAAC,CAAC,CAAC;QACpE,MAAM,KAAK,GAAG,CAAC,CAAC,IAAI,IAAK,IAAgC,CAAC,WAAW,CAAC,IAAI,EAAE,CAA4B,CAAC;QACzG,MAAM,MAAM,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;QACvD,MAAM,IAAI,GAAG,IAAI,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAiC,CAAC,CAAC;QACvF,IAAI,KAAK,CAAC,KAAK,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,IAAI,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,IAAK,KAAK,CAAC,KAAmB,CAAC,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC;YAC7H,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACtC,CAAC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ"} \ No newline at end of file diff --git a/dist/datamodel/node/data/ProjectItemNode.d.ts.map b/dist/datamodel/node/data/ProjectItemNode.d.ts.map index 6138054..e789bf0 100644 --- a/dist/datamodel/node/data/ProjectItemNode.d.ts.map +++ b/dist/datamodel/node/data/ProjectItemNode.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ProjectItemNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/data/ProjectItemNode.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAM5D,MAAM,WAAW,eAAe;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,QAAQ;IACjD,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;gBAEL,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,IAAI,EAAE,eAAe;IAOxE,IAAI,OAAO,IAAI,OAAO,CAErB;IAKD,IAAI,IAAI,IAAI,MAAM,CA0BjB;IAED,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,YAAY,IAAI,MAAM,CAEzB;IAED,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,IAAI,YAAY,IAAI,OAAO,CAE1B;IAED,IAAI,aAAa,IAAI,OAAO,CAE3B;IAED,aAAa,IAAI,SAAS,EAAE;IAI5B,WAAW,IAAI,UAAU,EAAE;CAK9B"} \ No newline at end of file +{"version":3,"file":"ProjectItemNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/data/ProjectItemNode.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAO5D,MAAM,WAAW,eAAe;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,QAAQ;IACjD,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;gBAEL,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,IAAI,EAAE,eAAe;IAOxE,IAAI,OAAO,IAAI,OAAO,CAErB;IAKD,IAAI,IAAI,IAAI,MAAM,CA4BjB;IAED,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,YAAY,IAAI,MAAM,CAEzB;IAED,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,IAAI,YAAY,IAAI,OAAO,CAE1B;IAED,IAAI,aAAa,IAAI,OAAO,CAE3B;IAED,aAAa,IAAI,SAAS,EAAE;IAI5B,WAAW,IAAI,UAAU,EAAE;CAK9B"} \ No newline at end of file diff --git a/dist/datamodel/node/data/ProjectItemNode.js b/dist/datamodel/node/data/ProjectItemNode.js index 62309d3..6bc2f83 100644 --- a/dist/datamodel/node/data/ProjectItemNode.js +++ b/dist/datamodel/node/data/ProjectItemNode.js @@ -4,6 +4,7 @@ import PropName from '../../prop/PropName.js'; import PropType from '../../prop/PropType.js'; import PropLocation from '../../prop/PropLocation.js'; import PropLabels from '../../prop/PropLabels.js'; +import { isMatFile, isModelFile, isSlddFile } from '../../fileKinds.js'; export default class ProjectItemNode extends BaseNode { constructor(name, parent, opts) { super(name, parent); @@ -31,15 +32,17 @@ export default class ProjectItemNode extends BaseNode { if (type === 'Reference') { return 'modelReference'; } - // File: pick by extension. - const lower = this.name.toLowerCase(); - if (lower.endsWith('.slx') || lower.endsWith('.mdl')) { + // File: pick by extension, through the module that owns the case rule. The + // fallback differs from DataSourceNode's on purpose — a project's members are + // arbitrary files (`.m`, `.txt`, an image), so an unrecognised one is generic here, + // where a model's external data sources can only be the three kinds above. + if (isModelFile(this.name)) { return 'simulinkModel_FT'; } - if (lower.endsWith('.sldd')) { + if (isSlddFile(this.name)) { return 'simulinkDataDictionary_FT'; } - if (lower.endsWith('.mat')) { + if (isMatFile(this.name)) { return 'matlabWorkspaceFile'; } return 'wsDefault'; diff --git a/dist/datamodel/node/data/ProjectItemNode.js.map b/dist/datamodel/node/data/ProjectItemNode.js.map index 3b25df3..1a58f1c 100644 --- a/dist/datamodel/node/data/ProjectItemNode.js.map +++ b/dist/datamodel/node/data/ProjectItemNode.js.map @@ -1 +1 @@ -{"version":3,"file":"ProjectItemNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/data/ProjectItemNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAQlD,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,QAAQ;IAKjD,YAAY,IAAY,EAAE,MAAuB,EAAE,IAAqB;QACpE,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACpB,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,QAAQ,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC;IACpC,CAAC;IAED,IAAI,OAAO;QACP,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,+EAA+E;IAC/E,8EAA8E;IAC9E,2EAA2E;IAC3E,IAAI,IAAI;QACJ,MAAM,IAAI,GAAG,IAAI,CAAC,eAAe,CAAC;QAClC,IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC;YACpB,OAAO,gBAAgB,CAAC;QAC5B,CAAC;QACD,IAAI,IAAI,KAAK,aAAa,EAAE,CAAC;YACzB,OAAO,eAAe,CAAC;QAC3B,CAAC;QACD,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;YACnB,OAAO,WAAW,CAAC;QACvB,CAAC;QACD,IAAI,IAAI,KAAK,WAAW,EAAE,CAAC;YACvB,OAAO,gBAAgB,CAAC;QAC5B,CAAC;QACD,2BAA2B;QAC3B,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;QACtC,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YACnD,OAAO,kBAAkB,CAAC;QAC9B,CAAC;QACD,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YAC1B,OAAO,2BAA2B,CAAC;QACvC,CAAC;QACD,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YACzB,OAAO,qBAAqB,CAAC;QACjC,CAAC;QACD,OAAO,WAAW,CAAC;IACvB,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IAED,IAAI,YAAY;QACZ,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAED,IAAI,YAAY;QACZ,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,IAAI,aAAa;QACb,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,aAAa;QACT,OAAO,CAAC,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;IAC1D,CAAC;IAED,WAAW;QACP,OAAO;YACH,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,CAAC,EAAE;SAC9E,CAAC;IACN,CAAC;CACJ"} \ No newline at end of file +{"version":3,"file":"ProjectItemNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/data/ProjectItemNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC,OAAO,QAAQ,MAAM,wBAAwB,C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CAAC;YACxB,OAAO,2BAA2B,CAAC;QACvC,CAAC;QACD,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACvB,OAAO,qBAAqB,CAAC;QACjC,CAAC;QACD,OAAO,WAAW,CAAC;IACvB,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IAED,IAAI,YAAY;QACZ,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAED,IAAI,YAAY;QACZ,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,IAAI,aAAa;QACb,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,aAAa;QACT,OAAO,CAAC,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;IAC1D,CAAC;IAED,WAAW;QACP,OAAO;YACH,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,CAAC,EAAE;SAC9E,CAAC;IACN,CAAC;CACJ"} \ No newline at end of file diff --git a/dist/datamodel/node/data/ValueTypeNode.d.ts b/dist/datamodel/node/data/ValueTypeNode.d.ts index d70b98f..f079819 100644 --- a/dist/datamodel/node/data/ValueTypeNode.d.ts +++ b/dist/datamodel/node/data/ValueTypeNode.d.ts @@ -1,7 +1,7 @@ -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import type { PropClass } from '../BaseNode.js'; import type BaseNode from '../BaseNode.js'; -export default class ValueTypeNode extends DataNode { +export default class ValueTypeNode extends SimulinkObjectNode { Description: string; DataType: string; constructor(name: string, parent: BaseNode | null, props: Record, serial: Record); @@ -11,8 +11,7 @@ export default class ValueTypeNode extends DataNode { get displayValue(): string; get valueEditable(): boolean; getProperties(): PropClass[]; - _getSerializedProperties(): Record; - serializeValue(): unknown; + _serializedOverrides(): Record; static get defaultName(): string; static createDefault(name: string, parent: BaseNode | null): ValueTypeNode; static parse(rawVal: Record, name: string, parent: BaseNode | null): ValueTypeNode; diff --git a/dist/datamodel/node/data/ValueTypeNode.d.ts.map b/dist/datamodel/node/data/ValueTypeNode.d.ts.map index b679bed..7cb5917 100644 --- a/dist/datamodel/node/data/ValueTypeNode.d.ts.map +++ b/dist/datamodel/node/data/ValueTypeNode.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ValueTypeNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/data/ValueTypeNode.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAK3C,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,QAAQ;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;gBACL,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAClH,IAAI,IAAI,IAAI,MAAM,CAAwD;IAC1E,IAAI,SAAS,IAAI,MAAM,CAAuB;IAG9C,IAAI,QAAQ,IAAI,MAAM,CAA0B;IAGhD,IAAI,YAAY,IAAI,MAAM,CAAe;IACzC,IAAI,aAAa,IAAI,OAAO,CAAkB;IAC9C,aAAa,IAAI,SAAS,EAAE;IAE5B,wBAAwB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACnD,cAAc,IAAI,OAAO;IACzB,MAAM,KAAK,WAAW,IAAI,MAAM,CAAwB;IACxD,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,Q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,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,aAAa;CACtG"} \ No newline at end of file diff --git a/dist/datamodel/node/data/ValueTypeNode.js b/dist/datamodel/node/data/ValueTypeNode.js index 32ce893..e308dcd 100644 --- a/dist/datamodel/node/data/ValueTypeNode.js +++ b/dist/datamodel/node/data/ValueTypeNode.js @@ -1,10 +1,10 @@ // Copyright 2026 The MathWorks, Inc. -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import PropName from '../../prop/PropName.js'; import PropDataType from '../../prop/PropDataType.js'; import PropDescription from '../../prop/PropDescription.js'; const CLASS_NAME = 'Simulink.ValueType'; -export default class ValueTypeNode extends DataNode { +export default class ValueTypeNode extends SimulinkObjectNode { constructor(name, parent, props, serial) { super(name, parent, serial); this.Description = props.Description || ''; this.DataType = props.DataType || 'double'; } get icon() { return this.isDerived ? 'typeSignalUI' : 'wsValue'; } get className() { return CLASS_NAME; } @@ -17,16 +17,13 @@ export default class ValueTypeNode extends DataNode { get valueEditable() { return false; } getProperties() { return [PropName, PropDataType, PropDescription]; } // PI layout is schema-driven (schema/classes/valueType.json). - _getSerializedProperties() { const props = Object.assign({}, this.serial._properties); if ('DataType' in this.serial._properties || this.DataType !== 'double') { - props.DataType = this.DataType; - } if ('Description' in this.serial._properties || this.Description) { - props.Description = this.Description; - } return props; } - serializeValue() { const overrides = {}; if ('DataType' in this.serial._properties || this.DataType !== 'double') { + // DataType spells its own gate rather than going through _gatedProps: 'double' is what an + // ABSENT DataType means, and it is also truthy, so the shared truthiness test would write + // that default back into every ValueType a dictionary never declared one for. Compared + // against the default instead, only a type the file stated or the model changed is saved. + _serializedOverrides() { const sp = this.serial._properties; const overrides = {}; if ('DataType' in sp || this.DataType !== 'double') { overrides.DataType = this.DataType; - } if ('Description' in this.serial._properties || this.Description) { - overrides.Description = this.Description; - } return this._serializeSimulinkObject(overrides); } + } return Object.assign(overrides, this._gatedProps({ Description: this.Description })); } static get defaultName() { return 'ValueType'; } static createDefault(name, parent) { const rawVal = { _array_class: CLASS_NAME, _array_type: 'MATLABArray', _dimensions: [1, 1], _mw_element_type: 'MATLABArray', _elements: [{ _properties: {} }] }; const props = rawVal._elements[0]._properties; const serial = { _rawVal: rawVal, _properties: props }; return new ValueTypeNode(name, parent, props, serial); } static parse(rawVal, name, parent) { const elem = rawVal._elements && rawVal._elements[0]; const props = ((elem && elem._properties) || {}); const serial = { _rawVal: rawVal, _properties: props }; return new ValueTypeNode(name, parent, props, serial); } diff --git a/dist/datamodel/node/data/ValueTypeNode.js.map b/dist/datamodel/node/data/ValueTypeNode.js.map index a85d245..d500d34 100644 --- a/dist/datamodel/node/data/ValueTypeNode.js.map +++ b/dist/datamodel/node/data/ValueTypeNode.js.map @@ -1 +1 @@ -{"version":3,"file":"ValueTypeNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/data/ValueTypeNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAGtC,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,eAAe,MAAM,+BAA+B,CAAC;AAC5D,MAAM,UAAU,GAAG,oBAAoB,CAAC;AACxC,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,QAAQ;IAG/C,YAAY,IAAY,EAAE,MAAuB,EAAE,KAA8B,EAAE,MAA+B,IAAI,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,GAAI,KAAK,CAAC,WAAsB,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAI,KAAK,CAAC,QAAmB,IAAI,QAAQ,CAAC,CAAC,CAAC;IACpQ,IAAI,IAAI,KAAa,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;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,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAiC,CAAC,CAAC,CAAC,CAAC;CACna"} \ No newline at end of file diff --git a/dist/datamodel/node/data/VariantBankCoderInfoNode.d.ts b/dist/datamodel/node/data/VariantBankCoderInfoNode.d.ts index a8d92ab..b3abc00 100644 --- a/dist/datamodel/node/data/VariantBankCoderInfoNode.d.ts +++ b/dist/datamodel/node/data/VariantBankCoderInfoNode.d.ts @@ -1,15 +1,14 @@ -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import type { PropClass } from '../BaseNode.js'; import type BaseNode from '../BaseNode.js'; -export default class VariantBankCoderInfoNode extends DataNode { +export default class VariantBankCoderInfoNode extends SimulinkObjectNode { Value: unknown; constructor(name: string, parent: BaseNode | null, props: Record, serial: Record); get icon(): string; get className(): string; get displayValue(): string; getProperties(): PropClass[]; - _getSerializedProperties(): Record; - serializeValue(): unknown; + _serializedOverrides(): Record; static get defaultName(): string; static createDefault(name: string, parent: BaseNode | null): VariantBankCoderInfoNode; static parse(rawVal: Record, name: string, parent: BaseNode | null): VariantBankCoderInfoNode; diff --git a/dist/datamodel/node/data/VariantBankCoderInfoNode.d.ts.map b/dist/datamodel/node/data/VariantBankCoderInfoNode.d.ts.map index 58e3415..75194b1 100644 --- a/dist/datamodel/node/data/VariantBankCoderInfoNode.d.ts.map +++ b/dist/datamodel/node/data/VariantBankCoderInfoNode.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"VariantBankCoderInfoNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/data/VariantBankCoderInfoNode.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAK3C,MAAM,CAAC,OAAO,OAAO,wBAAyB,SAAQ,QAAQ;IAC1D,KAAK,EAAE,OAAO,CAAC;gBACH,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAClH,IAAI,IAAI,IAAI,MAAM,CAAyC;IAC3D,IAAI,SAAS,IAAI,MAAM,CAAuB;IAC9C,IAAI,YAAY,IAAI,MAAM,CAAyC;IACnE,aAAa,IAAI,SAAS,EAAE;IAE5B,wBAAwB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACnD,cAAc,IAAI,OAAO;IACzB,MAAM,KAAK,WAAW,IAAI,MAAM,CAAmC;IACnE,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,wBAAwB;IACrF,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,wBAAwB;CACjH"} \ No newline at end of file +{"version":3,"file":"VariantBankCoderInfoNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/data/VariantBankCoderInfoNode.ts"],"names":[],"mappings":"AACA,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAK3C,MAAM,CAAC,OAAO,OAAO,wBAAyB,SAAQ,kBAAkB;IACpE,KAAK,EAAE,OAAO,CAAC;gBACH,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAClH,IAAI,IAAI,IAAI,MAAM,CAAyC;IAC3D,IAAI,SAAS,IAAI,MAAM,CAAuB;IAC9C,IAAI,YAAY,IAAI,MAAM,CAAyC;IACnE,aAAa,IAAI,SAAS,EAAE;IAG5B,oBAAoB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC/C,MAAM,KAAK,WAAW,IAAI,MAAM,CAAmC;IACnE,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,wBAAwB;IACrF,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,wBAAwB;CACjH"} \ No newline at end of file diff --git a/dist/datamodel/node/data/VariantBankCoderInfoNode.js b/dist/datamodel/node/data/VariantBankCoderInfoNode.js index 228ceb4..dd8df5c 100644 --- a/dist/datamodel/node/data/VariantBankCoderInfoNode.js +++ b/dist/datamodel/node/data/VariantBankCoderInfoNode.js @@ -1,18 +1,18 @@ // Copyright 2026 The MathWorks, Inc. -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import PropName from '../../prop/PropName.js'; import PropValue from '../../prop/PropValue.js'; import PropDataType from '../../prop/PropDataType.js'; const CLASS_NAME = 'Simulink.VariantBankCoderInfo'; -export default class VariantBankCoderInfoNode extends DataNode { +export default class VariantBankCoderInfoNode extends SimulinkObjectNode { constructor(name, parent, props, serial) { super(name, parent, serial); this.Value = props.Value !== undefined ? props.Value : ''; } get icon() { return 'wsParameters_bankCoderInfo'; } get className() { return CLASS_NAME; } get displayValue() { return PropValue.format(this.Value); } getProperties() { return [PropName, PropValue, PropDataType]; } // PI layout: schema-driven "General" group (classes/variantBankCoderInfo.json). - _getSerializedProperties() { const props = Object.assign({}, this.serial._properties); props.Value = this.Value; return props; } - serializeValue() { return this._serializeSimulinkObject({ Value: this.Value }); } + // UNGATED, as VariantBankNode's Value is. + _serializedOverrides() { return { Value: this.Value }; } static get defaultName() { return 'VariantBankCoderInfo'; } static createDefault(name, parent) { const rawVal = { _array_class: CLASS_NAME, _array_type: 'MATLABArray', _dimensions: [1, 1], _mw_element_type: 'MATLABArray', _elements: [{ _properties: { Value: '' } }] }; const props = rawVal._elements[0]._properties; const serial = { _rawVal: rawVal, _properties: props }; return new VariantBankCoderInfoNode(name, parent, props, serial); } static parse(rawVal, name, parent) { const elem = rawVal._elements && rawVal._elements[0]; const props = ((elem && elem._properties) || {}); const serial = { _rawVal: rawVal, _properties: props }; return new VariantBankCoderInfoNode(name, parent, props, serial); } diff --git a/dist/datamodel/node/data/VariantBankCoderInfoNode.js.map b/dist/datamodel/node/data/VariantBankCoderInfoNode.js.map index c1b7c8a..0526965 100644 --- a/dist/datamodel/node/data/VariantBankCoderInfoNode.js.map +++ b/dist/datamodel/node/data/VariantBankCoderInfoNode.js.map @@ -1 +1 @@ -{"version":3,"file":"VariantBankCoderInfoNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/data/VariantBankCoderInfoNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAGtC,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,MAAM,UAAU,GAAG,+BAA+B,CAAC;AACnD,MAAM,CAAC,OAAO,OAAO,wBAAyB,SAAQ,QAAQ;IAE1D,YAAY,IAAY,EAAE,MAAuB,EAAE,KAA8B,EAAE,MAA+B,IAAI,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,C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KAA2C,EAAE,MAA4C,CAAC,CAAC,CAAC,CAAC;IAC1f,MAAM,CAAC,KAAK,CAAC,MAA+B,EAAE,IAAY,EAAE,MAAuB,IAA8B,MAAM,IAAI,GAAG,MAAM,CAAC,SAAS,IAAK,MAAM,CAAC,SAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,IAAI,IAAK,IAAgC,CAAC,WAAW,CAAC,IAAI,EAAE,CAA4B,CAAC,CAAC,MAAM,MAAM,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,IAAI,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAiC,CAAC,CAAC,CAAC,CAAC;CACzb"} \ No newline at end of file +{"version":3,"file":"VariantBankCoderInfoNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/data/VariantBankCoderInfoNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAG1D,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,MAAM,UAAU,GAAG,+BAA+B,CAAC;AACnD,MAAM,CAAC,OAAO,OAAO,wBAAyB,SAAQ,kBAAkB;IAEpE,YAAY,IAAY,EAAE,MAAuB,EAAE,KAA8B,EAAE,MAA+B,IAAI,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/M,IAAI,IAAI,KAAa,OAAO,4BAA4B,CAAC,CAAC,CAAC;IAC3D,IAAI,SAAS,KAAa,OAAO,UAAU,CAAC,CAA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M,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,IAAI,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAiC,CAAC,CAAC,CAAC,CAAC;CACzb"} \ No newline at end of file diff --git a/dist/datamodel/node/data/VariantBankNode.d.ts b/dist/datamodel/node/data/VariantBankNode.d.ts index 4ff1041..9c1f9cd 100644 --- a/dist/datamodel/node/data/VariantBankNode.d.ts +++ b/dist/datamodel/node/data/VariantBankNode.d.ts @@ -1,15 +1,14 @@ -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import type { PropClass } from '../BaseNode.js'; import type BaseNode from '../BaseNode.js'; -export default class VariantBankNode extends DataNode { +export default class VariantBankNode extends SimulinkObjectNode { Value: unknown; constructor(name: string, parent: BaseNode | null, props: Record, serial: Record); get icon(): string; get className(): string; get displayValue(): string; getProperties(): PropClass[]; - _getSerializedProperties(): Record; - serializeValue(): unknown; + _serializedOverrides(): Record; static get defaultName(): string; static createDefault(name: string, parent: BaseNode | null): VariantBankNode; static parse(rawVal: Record, name: string, parent: BaseNode | null): VariantBankNode; diff --git a/dist/datamodel/node/data/VariantBankNode.d.ts.map b/dist/datamodel/node/data/VariantBankNode.d.ts.map index 8f5e41c..e8218b2 100644 --- a/dist/datamodel/node/data/VariantBankNode.d.ts.map +++ b/dist/datamodel/node/data/VariantBankNode.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"VariantBankNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/data/VariantBankNode.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAK3C,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,QAAQ;IACjD,KAAK,EAAE,OAAO,CAAC;gBACH,IAAI,EAAE,MAAM,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,MAAM,CAAuB;IAC9C,IAAI,YAAY,IAAI,MAAM,CAAyC;IACnE,aAAa,IAAI,SAAS,EAAE;IAI5B,oBAAoB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC/C,MAAM,KAAK,WAAW,IAAI,MAAM,CAA0B;IAC1D,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,eAAe;IAC5E,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,eAAe;CACxG"} \ No newline at end of file diff --git a/dist/datamodel/node/data/VariantBankNode.js b/dist/datamodel/node/data/VariantBankNode.js index e4110b2..f55ff77 100644 --- a/dist/datamodel/node/data/VariantBankNode.js +++ b/dist/datamodel/node/data/VariantBankNode.js @@ -1,18 +1,19 @@ // Copyright 2026 The MathWorks, Inc. -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import PropName from '../../prop/PropName.js'; import PropValue from '../../prop/PropValue.js'; import PropDataType from '../../prop/PropDataType.js'; const CLASS_NAME = 'Simulink.VariantBank'; -export default class VariantBankNode extends DataNode { +export default class VariantBankNode extends SimulinkObjectNode { constructor(name, parent, props, serial) { super(name, parent, serial); this.Value = props.Value !== undefined ? props.Value : ''; } get icon() { return 'wsParameters_bank'; } get className() { return CLASS_NAME; } get displayValue() { return PropValue.format(this.Value); } getProperties() { return [PropName, PropValue, PropDataType]; } // PI layout: schema-driven "General" group (classes/variantBank.json). - _getSerializedProperties() { const props = Object.assign({}, this.serial._properties); props.Value = this.Value; return props; } - serializeValue() { return this._serializeSimulinkObject({ Value: this.Value }); } + // UNGATED: the Value is what the bank IS, so it is written whether or not the file + // carried the key. + _serializedOverrides() { return { Value: this.Value }; } static get defaultName() { return 'VariantBank'; } static createDefault(name, parent) { const rawVal = { _array_class: CLASS_NAME, _array_type: 'MATLABArray', _dimensions: [1, 1], _mw_element_type: 'MATLABArray', _elements: [{ _properties: { Value: '' } }] }; const props = rawVal._elements[0]._properties; const serial = { _rawVal: rawVal, _properties: props }; return new VariantBankNode(name, parent, props, serial); } static parse(rawVal, name, parent) { const elem = rawVal._elements && rawVal._elements[0]; const props = ((elem && elem._properties) || {}); const serial = { _rawVal: rawVal, _properties: props }; return new VariantBankNode(name, parent, props, serial); } diff --git a/dist/datamodel/node/data/VariantBankNode.js.map b/dist/datamodel/node/data/VariantBankNode.js.map index 18ead29..41824bf 100644 --- a/dist/datamodel/node/data/VariantBankNode.js.map +++ b/dist/datamodel/node/data/VariantBankNode.js.map @@ -1 +1 @@ -{"version":3,"file":"VariantBankNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/data/VariantBankNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAGtC,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,MAAM,UAAU,GAAG,sBAAsB,CAAC;AAC1C,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,QAAQ;IAEjD,YAAY,IAAY,EAAE,MAAuB,EAAE,KAA8B,EAAE,MAA+B,IAAI,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/M,IAAI,IAAI,KAAa,OAAO,mBAAmB,CAAC,CAAC,CAAC;IAClD,IAAI,SAAS,KAAa,OAAO,UAAU,CAAC,CAAC,CAAC;IAC9C,IAAI,YAAY,KAAa,OAAO,SAAS,CAAC,MAA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ts b/dist/datamodel/node/data/VariantConfigurationDataNode.d.ts index d3de6bc..5628b75 100644 --- a/dist/datamodel/node/data/VariantConfigurationDataNode.d.ts +++ b/dist/datamodel/node/data/VariantConfigurationDataNode.d.ts @@ -1,7 +1,7 @@ -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import type { PropClass } from '../BaseNode.js'; import type BaseNode from '../BaseNode.js'; -export default class VariantConfigurationDataNode extends DataNode { +export default class VariantConfigurationDataNode extends SimulinkObjectNode { Value: unknown; constructor(name: string, parent: BaseNode | null, props: Record, serial: Record); get icon(): string; @@ -9,8 +9,7 @@ export default class VariantConfigurationDataNode extends DataNode { get displayValue(): string; get valueEditable(): boolean; getProperties(): PropClass[]; - _getSerializedProperties(): Record; - serializeValue(): unknown; + _serializedOverrides(): Record; static get defaultName(): string; static createDefault(name: string, parent: BaseNode | null): VariantConfigurationDataNode; static parse(rawVal: Record, name: string, parent: BaseNode | null): VariantConfigurationDataNode; diff --git a/dist/datamodel/node/data/VariantConfigurationDataNode.d.ts.map b/dist/datamodel/node/data/VariantConfigurationDataNode.d.ts.map index e81f0bd..0803bfa 100644 --- a/dist/datamodel/node/data/VariantConfigurationDataNode.d.ts.map +++ b/dist/datamodel/node/data/VariantConfigurationDataNode.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"VariantConfigurationDataNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/data/VariantConfigurationDataNode.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAI3C,MAAM,CAAC,OAAO,OAAO,4BAA6B,SAAQ,QAAQ;IAC9D,KAAK,EAAE,OAAO,CAAC;gBACH,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAClH,IAAI,IAAI,IAAI,MAAM,CAA8B;IAGhD,IAAI,SAAS,IAAI,MAAM,CAAwI;IAE/J,IAAI,YAAY,IAAI,MAAM,CAAe;IACzC,IAAI,aAAa,IAAI,OAAO,CAAkB;IAC9C,aAAa,IAAI,SAAS,EAAE;IAE5B,wBAAwB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACnD,cAAc,IAAI,OAAO;IACzB,MAAM,KAAK,WAAW,IAAI,MAAM,CAAuC;IACvE,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,4BAA4B;IACzF,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,4BAA4B;CACrH"} \ No newline at end of file +{"version":3,"file":"VariantConfigurationDataNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/data/VariantConfigurationDataNode.ts"],"names":[],"mappings":"AACA,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAI3C,MAAM,CAAC,OAAO,OAAO,4BAA6B,SAAQ,kBAAkB;IACxE,KAAK,EAAE,OAAO,CAAC;gBACH,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAClH,IAAI,IAAI,IAAI,MAAM,CAA8B;IAGhD,IAAI,SAAS,IAAI,MAAM,CAAwI;IAE/J,IAAI,YAAY,IAAI,MAAM,CAAe;IACzC,IAAI,aAAa,IAAI,OAAO,CAAkB;IAC9C,aAAa,IAAI,SAAS,EAAE;IAG5B,oBAAoB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC/C,MAAM,KAAK,WAAW,IAAI,MAAM,CAAuC;IACvE,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,4BAA4B;IACzF,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,4BAA4B;CACrH"} \ No newline at end of file diff --git a/dist/datamodel/node/data/VariantConfigurationDataNode.js b/dist/datamodel/node/data/VariantConfigurationDataNode.js index bf759d4..121fd13 100644 --- a/dist/datamodel/node/data/VariantConfigurationDataNode.js +++ b/dist/datamodel/node/data/VariantConfigurationDataNode.js @@ -1,9 +1,9 @@ // Copyright 2026 The MathWorks, Inc. -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import PropName from '../../prop/PropName.js'; import PropDataType from '../../prop/PropDataType.js'; const CLASS_NAME = 'Simulink.VariantConfigurationData'; -export default class VariantConfigurationDataNode extends DataNode { +export default class VariantConfigurationDataNode extends SimulinkObjectNode { constructor(name, parent, props, serial) { super(name, parent, serial); this.Value = props.Value !== undefined ? props.Value : ''; } get icon() { return 'variantSettings'; } // Report the real class identity from the parsed value (e.g. the container @@ -14,8 +14,8 @@ export default class VariantConfigurationDataNode extends DataNode { get valueEditable() { return false; } getProperties() { return [PropName, PropDataType]; } // PI layout: schema-driven "General" group (classes/variantConfigurationData.json). - _getSerializedProperties() { const props = Object.assign({}, this.serial._properties); props.Value = this.Value; return props; } - serializeValue() { return this._serializeSimulinkObject({ Value: this.Value }); } + // UNGATED, as VariantBankNode's Value is. + _serializedOverrides() { return { Value: this.Value }; } static get defaultName() { return 'VariantConfigurationData'; } static createDefault(name, parent) { const rawVal = { _array_class: CLASS_NAME, _array_type: 'MATLABArray', _dimensions: [1, 1], _mw_element_type: 'MATLABArray', _elements: [{ _properties: { Value: '' } }] }; const props = rawVal._elements[0]._properties; const serial = { _rawVal: rawVal, _properties: props }; return new VariantConfigurationDataNode(name, parent, props, serial); } static parse(rawVal, name, parent) { const elem = rawVal._elements && rawVal._elements[0]; const props = ((elem && elem._properties) || {}); const serial = { _rawVal: rawVal, _properties: props }; return new VariantConfigurationDataNode(name, parent, props, serial); } diff --git a/dist/datamodel/node/data/VariantConfigurationDataNode.js.map b/dist/datamodel/node/data/VariantConfigurationDataNode.js.map index 15c25b4..1a48953 100644 --- a/dist/datamodel/node/data/VariantConfigurationDataNode.js.map +++ b/dist/datamodel/node/data/VariantConfigurationDataNode.js.map @@ -1 +1 @@ -{"version":3,"file":"VariantConfigurationDataNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/data/VariantConfigurationDataNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAGtC,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,MAAM,UAAU,GAAG,mCAAmC,CAAC;AACvD,MAAM,CAAC,OAAO,OAAO,4BAA6B,SAAQ,QAAQ;IAE9D,YAAY,IAAY,EAAE,MAAuB,EAAE,KAA8B,EAAE,MAA+B,IAAI,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/M,IAAI,IAAI,KAAa,OAAO,iBAAiB,CAAC,CAAC,CAAC;IAChD,2EAA2E;IAC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,CAAC,CAAC,OAAO,IAAI,4BAA4B,CAAC,IAAI,EAAE,MAAM,EAAE,KAA2C,EAAE,MAA4C,CAAC,CAAC,CAAC,CAAC;IAClgB,MAAM,CAAC,KAAK,CAAC,MAA+B,EAAE,IAAY,EAAE,MAAuB,IAAkC,MAAM,IAAI,GAAG,MAAM,CAAC,SAAS,IAAK,MAAM,CAAC,SAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,IAAI,IAAK,IAAgC,CAAC,WAAW,CAAC,IAAI,EAAE,CAA4B,CAAC,CAAC,MAAM,MAAM,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,IAAI,4BAA4B,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAiC,CAAC,CAAC,CAAC,CAAC;CACjc"} \ No newline at end of file +{"version":3,"file":"VariantConfigurationDataNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/data/VariantConfigurationDataNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAG1D,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,MAAM,UAAU,GAAG,mCAAmC,CAAC;AACvD,MAAM,CAAC,OAAO,OAAO,4BAA6B,SAAQ,kBAAkB;IAExE,YAAY,IAAY,EAAE,MAAuB,EAAE,KAA8B,EAAE,MAA+B,IAAI,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/M,IAAI,IAAI,KAAa,OAAO,iBAAiB,CAAC,CAAC,CAAC;IAChD,2EAA2E;IAC3E,6EA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C,SAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,IAAI,IAAK,IAAgC,CAAC,WAAW,CAAC,IAAI,EAAE,CAA4B,CAAC,CAAC,MAAM,MAAM,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,IAAI,4BAA4B,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAiC,CAAC,CAAC,CAAC,CAAC;CACjc"} \ No newline at end of file diff --git a/dist/datamodel/node/data/VariantControlNode.d.ts b/dist/datamodel/node/data/VariantControlNode.d.ts index 1bbf4a1..9a87e0d 100644 --- a/dist/datamodel/node/data/VariantControlNode.d.ts +++ b/dist/datamodel/node/data/VariantControlNode.d.ts @@ -1,7 +1,8 @@ -import DataNode, { type SetPropertyResult } from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; +import type { SetPropertyResult } from '../DataNode.js'; import type { PropClass } from '../BaseNode.js'; import type BaseNode from '../BaseNode.js'; -export default class VariantControlNode extends DataNode { +export default class VariantControlNode extends SimulinkObjectNode { Value: unknown; constructor(name: string, parent: BaseNode | null, props: Record, serial: Record); get icon(): string; @@ -15,8 +16,7 @@ export default class VariantControlNode extends DataNode { * accept/reject logic MATLAB applies. */ setProperty(propName: string, stringValue: string): true | SetPropertyResult; - _getSerializedProperties(): Record; - serializeValue(): unknown; + _serializedOverrides(): Record; static get defaultName(): string; static createDefault(name: string, parent: BaseNode | null): VariantControlNode; static parse(rawVal: Record, name: string, parent: BaseNode | null): VariantControlNode; diff --git a/dist/datamodel/node/data/VariantControlNode.d.ts.map b/dist/datamodel/node/data/VariantControlNode.d.ts.map index b441d43..94642f3 100644 --- a/dist/datamodel/node/data/VariantControlNode.d.ts.map +++ b/dist/datamodel/node/data/VariantControlNode.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"VariantControlNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/data/VariantControlNode.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAW3C,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,QAAQ;IACpD,KAAK,EAAE,OAAO,CAAC;gBACH,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAClH,IAAI,IAAI,IAAI,MAAM,CAAqC;IACvD,IAAI,SAAS,IAAI,MAAM,CAAuB;IAC9C,IAAI,YAAY,IAAI,MAAM,CAAyC;IACnE,aAAa,IAAI,SAAS,EAAE;IAI5B;;;;;OAKG;IACH,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,iBAAiB;IAyD5E,wBAAwB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACnD,cAAc,IAAI,OAAO;IACzB,MAAM,KAAK,WAAW,IAAI,MAAM,CAA6B;IAC7D,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,kBAAkB;IAC/E,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,kBAAkB;CAC3G"} \ No newline at end of file +{"version":3,"file":"VariantControlNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/data/VariantControlNode.ts"],"names":[],"mappings":"AACA,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAW3C,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,kBAAkB;IAC9D,KAAK,EAAE,OAAO,CAAC;gBACH,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAClH,IAAI,IAAI,IAAI,MAAM,CAAqC;IACvD,IAAI,SAAS,IAAI,MAAM,CAAuB;IAC9C,IAAI,YAAY,IAAI,MAAM,CAAyC;IACnE,aAAa,IAAI,SAAS,EAAE;IAI5B;;;;;OAKG;IACH,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,iBAAiB;IA2D5E,oBAAoB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC/C,MAAM,KAAK,WAAW,IAAI,MAAM,CAA6B;IAC7D,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,kBAAkB;IAC/E,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,kBAAkB;CAC3G"} \ No newline at end of file diff --git a/dist/datamodel/node/data/VariantControlNode.js b/dist/datamodel/node/data/VariantControlNode.js index 0429a72..c6d46fe 100644 --- a/dist/datamodel/node/data/VariantControlNode.js +++ b/dist/datamodel/node/data/VariantControlNode.js @@ -1,5 +1,5 @@ // Copyright 2026 The MathWorks, Inc. -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import PropName from '../../prop/PropName.js'; import PropValue from '../../prop/PropValue.js'; import PropDataType from '../../prop/PropDataType.js'; @@ -7,7 +7,7 @@ const CLASS_NAME = 'Simulink.VariantControl'; // Verbatim MATLAB R2027a rejection messages for Simulink.VariantControl.Value. const MSG_INTEGER = 'Simulink.VariantControl value must be an integer, logical, an enumeration, or a Simulink.Parameter with value of type integer, logical or enumeration.'; const MSG_SCALAR = 'Simulink.VariantControl value must be a scalar or a Simulink.Parameter with scalar value.'; -export default class VariantControlNode extends DataNode { +export default class VariantControlNode extends SimulinkObjectNode { constructor(name, parent, props, serial) { super(name, parent, serial); this.Value = props.Value !== undefined ? props.Value : ''; } get icon() { return 'twoConnected_wsDefault'; } get className() { return CLASS_NAME; } @@ -69,8 +69,9 @@ export default class VariantControlNode extends DataNode { this._markModified(); return true; } - _getSerializedProperties() { const props = Object.assign({}, this.serial._properties); props.Value = this.Value; return props; } - serializeValue() { return this._serializeSimulinkObject({ Value: this.Value }); } + // UNGATED: the Value is what the control selects with, so it is written whether or not + // the file carried the key — including the empty one setProperty accepts above. + _serializedOverrides() { return { Value: this.Value }; } static get defaultName() { return 'VariantControl'; } static createDefault(name, parent) { const rawVal = { _array_class: CLASS_NAME, _array_type: 'MATLABArray', _dimensions: [1, 1], _mw_element_type: 'MATLABArray', _elements: [{ _properties: { Value: '' } }] }; const props = rawVal._elements[0]._properties; const serial = { _rawVal: rawVal, _properties: props }; return new VariantControlNode(name, parent, props, serial); } static parse(rawVal, name, parent) { const elem = rawVal._elements && rawVal._elements[0]; const props = ((elem && elem._properties) || {}); const serial = { _rawVal: rawVal, _properties: props }; return new VariantControlNode(name, parent, props, serial); } diff --git a/dist/datamodel/node/data/VariantControlNode.js.map b/dist/datamodel/node/data/VariantControlNode.js.map index dc9ede7..43c499f 100644 --- a/dist/datamodel/node/data/VariantControlNode.js.map +++ b/dist/datamodel/node/data/VariantControlNode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AAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,MAAM,MAAM,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,IAAI,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,KAA2C,EAAE,MAA4C,CAAC,CAAC,CAAC,CAAC;IAC9e,MAAM,CAAC,KAAK,CAAC,MAA+B,EAAE,IAAY,EAAE,MAAuB,IAAwB,MAAM,IAAI,GAAG,MAAM,CAAC,SAAS,IAAK,MAAM,CAAC,SAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,IAAI,IAAK,IAAgC,CAAC,WAAW,CAAC,IAAI,EAAE,CAA4B,CAAC,CAAC,MAAM,MAAM,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,IAAI,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAiC,CAAC,CAAC,CAAC,CAAC;CAC7a"} \ No newline at end of file +{"version":3,"file":"VariantControlNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/data/VariantControlNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAI1D,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,YAAY,MAAM,4BAA4B,CAAC;AAEtD,MAAM,UAAU,GAAG,yBAAyB,CAAC;AAE7C,+EAA+E;AAC/E,MAAM,WAAW,GAAG,wJAAwJ,CAAC;AAC7K,MAAM,UAAU,GAAG,2FAA2F,CAAC;AAE/G,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,kBAAkB;IAE9D,YAAY,IAAY,EAA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AE,MAAiC,CAAC,CAAC,CAAC,CAAC;CAC7a"} \ No newline at end of file diff --git a/dist/datamodel/node/data/VariantExpressionNode.d.ts b/dist/datamodel/node/data/VariantExpressionNode.d.ts index 879f644..3cd3af5 100644 --- a/dist/datamodel/node/data/VariantExpressionNode.d.ts +++ b/dist/datamodel/node/data/VariantExpressionNode.d.ts @@ -1,15 +1,14 @@ -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import type { PropClass } from '../BaseNode.js'; import type BaseNode from '../BaseNode.js'; -export default class VariantExpressionNode extends DataNode { +export default class VariantExpressionNode extends SimulinkObjectNode { Condition: string; constructor(name: string, parent: BaseNode | null, props: Record, serial: Record); get icon(): string; get className(): string; get displayValue(): string; getProperties(): PropClass[]; - _getSerializedProperties(): Record; - serializeValue(): unknown; + _serializedOverrides(): Record; static get defaultName(): string; static createDefault(name: string, parent: BaseNode | null): VariantExpressionNode; static parse(rawVal: Record, name: string, parent: BaseNode | null): VariantExpressionNode; diff --git a/dist/datamodel/node/data/VariantExpressionNode.d.ts.map b/dist/datamodel/node/data/VariantExpressionNode.d.ts.map index d63442b..528b461 100644 --- a/dist/datamodel/node/data/VariantExpressionNode.d.ts.map +++ b/dist/datamodel/node/data/VariantExpressionNode.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"VariantExpressionNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/data/VariantExpressionNode.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAK3C,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,QAAQ;IACvD,SAAS,EAAE,MAAM,CAAC;gBACN,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAClH,IAAI,IAAI,IAAI,MAAM,CAAwB;IAC1C,IAAI,SAAS,IAAI,MAAM,CAAuB;IAC9C,IAAI,YAAY,IAAI,MAAM,CAAiD;IAC3E,aAAa,IAAI,SAAS,EAAE;IAE5B,wBAAwB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACnD,cAAc,IAAI,OAAO;IACzB,MAAM,KAAK,WAAW,IAAI,MAAM,CAAgC;IAChE,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,qBAAqB;IAClF,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,qBAAqB;CAC9G"} \ No newline at end of file +{"version":3,"file":"VariantExpressionNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/data/VariantExpressionNode.ts"],"names":[],"mappings":"AACA,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAK3C,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,kBAAkB;IACjE,SAAS,EAAE,MAAM,CAAC;gBACN,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAClH,IAAI,IAAI,IAAI,MAAM,CAAwB;IAC1C,IAAI,SAAS,IAAI,MAAM,CAAuB;IAC9C,IAAI,YAAY,IAAI,MAAM,CAAiD;IAC3E,aAAa,IAAI,SAAS,EAAE;IAI5B,oBAAoB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC/C,MAAM,KAAK,WAAW,IAAI,MAAM,CAAgC;IAChE,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,qBAAqB;IAClF,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,qBAAqB;CAC9G"} \ No newline at end of file diff --git a/dist/datamodel/node/data/VariantExpressionNode.js b/dist/datamodel/node/data/VariantExpressionNode.js index 18ce972..285e6a0 100644 --- a/dist/datamodel/node/data/VariantExpressionNode.js +++ b/dist/datamodel/node/data/VariantExpressionNode.js @@ -1,18 +1,19 @@ // Copyright 2026 The MathWorks, Inc. -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import PropName from '../../prop/PropName.js'; import PropCondition from '../../prop/PropCondition.js'; import PropDataType from '../../prop/PropDataType.js'; const CLASS_NAME = 'Simulink.VariantExpression'; -export default class VariantExpressionNode extends DataNode { +export default class VariantExpressionNode extends SimulinkObjectNode { constructor(name, parent, props, serial) { super(name, parent, serial); this.Condition = props.Condition || ''; } get icon() { return 'wsVariant'; } get className() { return CLASS_NAME; } get displayValue() { return PropCondition.format(this.Condition); } getProperties() { return [PropName, PropCondition, PropDataType]; } // PI layout: schema-driven "General" group (classes/variantExpression.json). - _getSerializedProperties() { const props = Object.assign({}, this.serial._properties); props.Condition = this.Condition; return props; } - serializeValue() { return this._serializeSimulinkObject({ Condition: this.Condition }); } + // UNGATED: the Condition is the expression itself, so it is written whether or not the + // file carried the key. + _serializedOverrides() { return { Condition: this.Condition }; } static get defaultName() { return 'VariantExpression'; } static createDefault(name, parent) { const rawVal = { _array_class: CLASS_NAME, _array_type: 'MATLABArray', _dimensions: [1, 1], _mw_element_type: 'MATLABArray', _elements: [{ _properties: { Condition: '' } }] }; const props = rawVal._elements[0]._properties; const serial = { _rawVal: rawVal, _properties: props }; return new VariantExpressionNode(name, parent, props, serial); } static parse(rawVal, name, parent) { const elem = rawVal._elements && rawVal._elements[0]; const props = ((elem && elem._properties) || {}); const serial = { _rawVal: rawVal, _properties: props }; return new VariantExpressionNode(name, parent, props, serial); } diff --git a/dist/datamodel/node/data/VariantExpressionNode.js.map b/dist/datamodel/node/data/VariantExpressionNode.js.map index 46d7e34..4d69a67 100644 --- a/dist/datamodel/node/data/VariantExpressionNode.js.map +++ b/dist/datamodel/node/data/VariantExpressionNode.js.map @@ -1 +1 @@ -{"version":3,"file":"VariantExpressionNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/data/VariantExpressionNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAGtC,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,aAAa,MAAM,6BAA6B,CAAC;AACxD,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,MAAM,UAAU,GAAG,4BAA4B,CAAC;AAChD,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,QAAQ;IAEvD,YAAY,IAAY,EAAE,MAAuB,EAAE,KAA8B,EAAE,MAA+B,IAAI,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,GAAI,KAAK,CAAC,SAAoB,IAAI,EAAE,CAAC,CAAC,CAAC;IACxM,IAAI,IAAI,KAAa,OAAO,WAAW,CAAC,CAAC,CAAC;IAC1C,IAAI,SAAS,KAAa,OAAO,UAAU,CAAC,CAAC,CAAC;IAC9C,IAAI,YAAY,KAAa,OAAO,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAC3E,aAAa,KAAkB,OAAO,CAAC,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C,WAAW,CAAC,IAAI,EAAE,CAA4B,CAAC,CAAC,MAAM,MAAM,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,IAAI,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAiC,CAAC,CAAC,CAAC,CAAC;CACnb"} \ No newline at end of file +{"version":3,"file":"VariantExpressionNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/data/VariantExpressionNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAG1D,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,aAAa,MAAM,6BAA6B,CAAC;AACxD,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,MAAM,UAAU,GAAG,4BAA4B,CAAC;AAChD,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,kBAAkB;IAEjE,YAAY,IAAY,EAAE,MAAuB,EAAE,KAA8B,EAAE,MAA+B,IAAI,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,GAAI,KAAK,CAAC,SAAoB,IAAI,EAAE,CAAC,CAAC,CAAC;IACxM,IAAI,IAAI,KAAa,OAAO,WAAW,CAAC,CAAC,CAAC;IAC1C,IAAI,SAAS,KAAa,OAAO,UAAU,CAAC,CAAC,CAAC;IAC9C,IAAI,YAAY,KAAa,OAAO,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAC3E,aAAa,KAAkB,OAAO,CAAC,QAAQ,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IAChF,6EAA6E;IAC7E,uFAAuF;IACvF,wBAAwB;IACxB,oBAAoB,KAA8B,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IACzF,MAAM,KAAK,WAAW,KAAa,OAAO,mBAAmB,CAAC,CAAC,CAAC;IAChE,MAAM,CAAC,aAAa,CAAC,IAAY,EAAE,MAAuB,IAA2B,MAAM,MAAM,GAAG,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,gBAAgB,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,MAAM,MAAM,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,IAAI,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,KAA2C,EAAE,MAA4C,CAAC,CAAC,CAAC,CAAC;IACxf,MAAM,CAAC,KAAK,CAAC,MAA+B,EAAE,IAAY,EAAE,MAAuB,IAA2B,MAAM,IAAI,GAAG,MAAM,CAAC,SAAS,IAAK,MAAM,CAAC,SAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,IAAI,IAAK,IAAgC,CAAC,WAAW,CAAC,IAAI,EAAE,CAA4B,CAAC,CAAC,MAAM,MAAM,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,IAAI,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAiC,CAAC,CAAC,CAAC,CAAC;CACnb"} \ No newline at end of file diff --git a/dist/datamodel/node/data/VariantVariableNode.d.ts b/dist/datamodel/node/data/VariantVariableNode.d.ts index 41bc489..d8af2d9 100644 --- a/dist/datamodel/node/data/VariantVariableNode.d.ts +++ b/dist/datamodel/node/data/VariantVariableNode.d.ts @@ -1,15 +1,15 @@ -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import type { PropClass } from '../BaseNode.js'; import type BaseNode from '../BaseNode.js'; -export default class VariantVariableNode extends DataNode { +export default class VariantVariableNode extends SimulinkObjectNode { Specification: string; constructor(name: string, parent: BaseNode | null, props: Record, serial: Record); get icon(): string; get className(): string; get displayValue(): string; getProperties(): PropClass[]; + _serializedOverrides(): Record; _getSerializedProperties(): Record; - serializeValue(): unknown; static get defaultName(): string; static createDefault(name: string, parent: BaseNode | null): VariantVariableNode; static parse(rawVal: Record, name: string, parent: BaseNode | null): VariantVariableNode; diff --git a/dist/datamodel/node/data/VariantVariableNode.d.ts.map b/dist/datamodel/node/data/VariantVariableNode.d.ts.map index 7061297..e404e43 100644 --- a/dist/datamodel/node/data/VariantVariableNode.d.ts.map +++ b/dist/datamodel/node/data/VariantVariableNode.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"VariantVariableNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/data/VariantVariableNode.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAK3C,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,QAAQ;IACrD,aAAa,EAAE,MAAM,CAAC;gBACV,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAClH,IAAI,IAAI,IAAI,MAAM,CAAmC;IACrD,IAAI,SAAS,IAAI,MAAM,CAAuB;IAC9C,IAAI,YAAY,IAAI,MAAM,CAAyD;IACnF,aAAa,IAAI,SAAS,EAAE;IAO5B,wBAAwB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACnD,cAAc,IAAI,OAAO;IACzB,MAAM,KAAK,WAAW,IAAI,MAAM,CAA8B;IAC9D,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,mBAAmB;IAChF,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,mBAAmB;CAC5G"} \ No newline at end of file +{"version":3,"file":"VariantVariableNode.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/data/VariantVariableNode.ts"],"names":[],"mappings":"AACA,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAK3C,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,kBAAkB;IAC/D,aAAa,EAAE,MAAM,CAAC;gBACV,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAClH,IAAI,IAAI,IAAI,MAAM,CAAmC;IACrD,IAAI,SAAS,IAAI,MAAM,CAAuB;IAC9C,IAAI,YAAY,IAAI,MAAM,CAAyD;IACnF,aAAa,IAAI,SAAS,EAAE;IAI5B,oBAAoB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAQ/C,wBAAwB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACnD,MAAM,KAAK,WAAW,IAAI,MAAM,CAA8B;IAC9D,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,mBAAmB;IAChF,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,mBAAmB;CAC5G"} \ No newline at end of file diff --git a/dist/datamodel/node/data/VariantVariableNode.js b/dist/datamodel/node/data/VariantVariableNode.js index 42ffa8a..046d296 100644 --- a/dist/datamodel/node/data/VariantVariableNode.js +++ b/dist/datamodel/node/data/VariantVariableNode.js @@ -1,23 +1,27 @@ // Copyright 2026 The MathWorks, Inc. -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import PropName from '../../prop/PropName.js'; import PropSpecification from '../../prop/PropSpecification.js'; import PropDataType from '../../prop/PropDataType.js'; const CLASS_NAME = 'Simulink.VariantVariable'; -export default class VariantVariableNode extends DataNode { +export default class VariantVariableNode extends SimulinkObjectNode { constructor(name, parent, props, serial) { super(name, parent, serial); this.Specification = props.Specification || ''; } get icon() { return 'variant_wsParameters'; } get className() { return CLASS_NAME; } get displayValue() { return PropSpecification.format(this.Specification); } getProperties() { return [PropName, PropSpecification, PropDataType]; } // PI layout: schema-driven "General" group (classes/variantVariable.json). - // Through _mergeProps rather than a plain assign so an EMPTY Specification is not - // written next to a saveobj envelope. A variant that serializes through saveobj keeps - // its Specification INSIDE the envelope, where this node cannot see it, so - // `(props.Specification as string) || ''` above is a default and not a value — - // writing it back grew a `

` MATLAB never wrote. - _getSerializedProperties() { return this._mergeProps({ Specification: this.Specification }); } - serializeValue() { return this._serializeSimulinkObject({ Specification: this.Specification }); } + // UNGATED: the Specification is the variable's whole content. What is special here is the + // BINARY path below, not this list. + _serializedOverrides() { return { Specification: this.Specification }; } + // The one class that overrides the binary path, to reach it through _mergeProps rather + // than the plain assign SimulinkObjectNode uses, so an EMPTY Specification is not written + // next to a saveobj envelope. A variant that serializes through saveobj keeps its + // Specification INSIDE the envelope, where this node cannot see it, so + // `(props.Specification as string) || ''` above is a default and not a value — writing it + // back grew a `

` MATLAB never wrote. The list it + // merges is the same one the text path merges; only the merge differs. + _getSerializedProperties() { return this._mergeProps(this._serializedOverrides()); } static get defaultName() { return 'VariantVariable'; } static createDefault(name, parent) { const rawVal = { _array_class: CLASS_NAME, _array_type: 'MATLABArray', _dimensions: [1, 1], _mw_element_type: 'MATLABArray', _elements: [{ _properties: { Specification: '' } }] }; const props = rawVal._elements[0]._properties; const serial = { _rawVal: rawVal, _properties: props }; return new VariantVariableNode(name, parent, props, serial); } static parse(rawVal, name, parent) { const elem = rawVal._elements && rawVal._elements[0]; const props = ((elem && elem._properties) || {}); const serial = { _rawVal: rawVal, _properties: props }; return new VariantVariableNode(name, parent, props, serial); } diff --git a/dist/datamodel/node/data/VariantVariableNode.js.map b/dist/datamodel/node/data/VariantVariableNode.js.map index c0f5b00..5a54244 100644 --- a/dist/datamodel/node/data/VariantVariableNode.js.map +++ b/dist/datamodel/node/data/VariantVariableNode.js.map @@ -1 +1 @@ -{"version":3,"file":"VariantVariableNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/data/VariantVariableNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAGtC,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,iBAAiB,MAAM,iCAAiC,CAAC;AAChE,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,MAAM,UAAU,GAAG,0BAA0B,CAAC;AAC9C,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,QAAQ;IAErD,YAAY,IAAY,EAAE,MAAuB,EAAE,KAA8B,EAAE,MAA+B,IAAI,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,GAAI,KAAK,CAAC,aAAwB,IAAI,EAAE,CAAC,CAAC,CAAC;IAChN,IAAI,I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;IACxf,MAAM,CAAC,KAAK,CAAC,MAA+B,EAAE,IAAY,EAAE,MAAuB,IAAyB,MAAM,IAAI,GAAG,MAAM,CAAC,SAAS,IAAK,MAAM,CAAC,SAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,IAAI,IAAK,IAAgC,CAAC,WAAW,CAAC,IAAI,EAAE,CAA4B,CAAC,CAAC,MAAM,MAAM,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,IAAI,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAiC,CAAC,CAAC,CAAC,CAAC;CAC/a"} \ No newline at end of file +{"version":3,"file":"VariantVariableNode.js","sourceRoot":"","sources":["../../../../src/datamodel/node/data/VariantVariableNode.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAG1D,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,iBAAiB,MAAM,iCAAiC,CAAC;AAChE,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,MAAM,UAAU,GAAG,0BAA0B,CAAC;AAC9C,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,kBAAkB;IAE/D,YAAY,IAAY,EAAE,MAAuB,EAAE,KAA8B,EAAE,MAA+B,IAAI,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,GAAI,KAAK,CAAC,aAAwB,IAAI,EAAE,CAAC,CAAC,CAAC;IAChN,IAAI,IAAI,KAAa,OAAO,sBAAsB,CAAC,CAAC,CAAC;IACrD,IAAI,SAAS,KAAa,OAAO,UAAU,CAAC,CAAC,CAAC;IAC9C,IAAI,YAAY,KAAa,OAAO,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IACnF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AAC,IAAI,IAAK,IAAgC,CAAC,WAAW,CAAC,IAAI,EAAE,CAA4B,CAAC,CAAC,MAAM,MAAM,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,IAAI,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAiC,CAAC,CAAC,CAAC,CAAC;CAC/a"} \ No newline at end of file diff --git a/dist/datamodel/node/data/matlabValueRules.d.ts b/dist/datamodel/node/data/matlabValueRules.d.ts new file mode 100644 index 0000000..814c9e4 --- /dev/null +++ b/dist/datamodel/node/data/matlabValueRules.d.ts @@ -0,0 +1,15 @@ +import type { MatVariable } from '../../parser/MatParser.js'; +export declare function emptyDouble(): MatVariable; +export declare function formatStringElement(el: unknown): string; +export declare const TYPED_NUMERIC_CLASS: RegExp; +export declare function classAfterEdit(current: string, parsedType: string): string; +export declare function elementClass(arrayClass: string): string; +export declare function needsTypedLiteral(type: string, value: unknown): boolean; +export declare function formatMatrix(rows: number, cols: number, elements: unknown[]): string; +export declare function formatCharMatrix(text: string, dims: number[]): string; +export declare function parseMatrixValue(raw: Record): { + dims: number[]; + elements: (number | string)[]; + type: string; +} | null; +//# sourceMappingURL=matlabValueRules.d.ts.map \ No newline at end of file diff --git a/dist/datamodel/node/data/matlabValueRules.d.ts.map b/dist/datamodel/node/data/matlabValueRules.d.ts.map new file mode 100644 index 0000000..1f22159 --- /dev/null +++ b/dist/datamodel/node/data/matlabValueRules.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"matlabValueRules.d.ts","sourceRoot":"","sources":["../../../../src/datamodel/node/data/matlabValueRules.ts"],"names":[],"mappings":"AA0CA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAS7D,wBAAgB,WAAW,IAAI,WAAW,CAUzC;AAQD,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,OAAO,GAAG,MAAM,CAGvD;AAKD,eAAO,MAAM,mBAAmB,QAAqC,CAAC;AAStE,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAE1E;AAkBD,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAEvD;AAQD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAQvE;AASD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,MAAM,CAmBpF;AAWD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAYrE;AAED,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC3B;IAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAyCxE"} \ No newline at end of file diff --git a/dist/datamodel/node/data/matlabValueRules.js b/dist/datamodel/node/data/matlabValueRules.js new file mode 100644 index 0000000..c7ab74c --- /dev/null +++ b/dist/datamodel/node/data/matlabValueRules.js @@ -0,0 +1,207 @@ +// Copyright 2026 The MathWorks, Inc. +// +// The rules about a MATLAB VALUE, with no node anywhere in them. +// +// What class a value keeps across an edit, when a number cannot be spelled as a bare +// JSON literal, how a matrix prints and how that printing reads back: every question +// here is answered from the arguments alone. None of these functions reads node state, +// which is why they were module-local functions inside `MatlabVariableNode.ts` rather +// than methods on it — staying off the class is what lets that file's display getters +// and its static parse entry points share them without either side owning the other. +// +// Being a separate module says the same thing one degree louder, and that is the whole +// gain: the rules cannot acquire a `this` even by accident, and a reader asking "what +// happens to an int32 when its Value is edited?" reads one short file instead of +// searching a 2600-line state machine over `_kind` for the four lines that answer it. +// The reverse direction is the useful one too — a change here is visibly a change to +// what a MATLAB value MEANS, not an incidental edit inside a node. +// +// The MATLAB quirks these encode, so that none of them has to be rediscovered as a bug: +// +// * JSON has ONE number type. `TYPED_NUMERIC_CLASS` names the classes that therefore +// cannot survive as a bare JSON number, and `classAfterEdit`, `elementClass` and +// `needsTypedLiteral` are three views of that one set — change any of them and ask +// whether the other two still mean what they meant. +// * A char matrix is stored COLUMN-major, so `formatCharMatrix` strides through the +// text rather than slicing it. +// * MATLAB's 64-bit integer range is wider than a double's exact one BY +// CONSTRUCTION, so `parseMatrixValue` keeps int64/uint64 elements as decimal text. +// +// One name to be careful about: `formatMatrix` here is the DISPLAY formatter — the +// `[1 2 3; 4 5 6]` a Value cell shows. `BinarySlddParser` has its own module-local +// `formatMatrix` that builds the `Matrix(...)` SERIAL form a `.sldd` stores. Same name, +// opposite ends of the pipeline, no relation; `parseMatrixValue` below is the one that +// reads that serial form back. +// +// Everything here was module-private before it moved, and is `export`ed only so its one +// consumer, `MatlabVariableNode.ts`, can still reach it. That is a real widening of +// visibility, deliberately stopped at the package boundary: none of these names appears +// in `src/index.ts` or `src/node/index.ts`, so they stay internal to this package and a +// consumer cannot start depending on one. +import { formatMatlabChar, formatMatlabString } from '../../parser/MatlabValueParser.js'; +import { EMPTY_NUMERIC, MISSING_STRING } from '../../display/DisplayConvention.js'; +import { formatMatlabNum, parseMatlabNum, parseExactNum, needsExactInt } from '../../parser/XmlUtils.js'; +// An empty 0x0 double, MATLAB's own `[]`. Stands in for a cell slot the parser +// could not read (see _createFromMatCell) and for a struct-array element that no +// longer has one of the array's fields (see _buildVarObject): in both places a +// hole must stay a hole, or every later element slides one slot early. +// A fresh object per call, since the node built from it keeps a reference. +export function emptyDouble() { + return { + name: '', + className: 'double', + dimensions: [0, 0], + isComplex: false, + isLogical: false, + value: [], + fields: null, + }; +} +// One element of a string array as MATLAB displays it: quoted, or the unquoted +// `` for a `missing`. `null` is the marker for a `missing` because the display +// text cannot be — a real string whose characters are `` still has to print +// quoted, and the two would be indistinguishable if the marker were the text. +// `undefined` is a hole rather than a missing (a shorter `_elements` than `_dims` +// claims), and prints as the empty string it always did. +export function formatStringElement(el) { + if (el === null) + return MISSING_STRING; + return formatMatlabString(el !== undefined ? String(el) : ''); +} +// The MATLAB numeric classes a bare JSON number cannot carry. JSON has ONE number +// type, so an int32 or a single written as a plain number reads back as a double — +// a silent class change, not a rounding nit. `double` needs no tag. +export const TYPED_NUMERIC_CLASS = /^(?:u?int(?:8|16|32|64)|single)$/; +// The class a value keeps across an edit. A Value edit sets the VALUE, not the +// class — MATLAB's own `v(:) = 7` on an int32 stays int32, and the Data Type +// column is read-only here — but MatlabValueParser cannot know the class: a bare +// `7` always parses as 'double'. So the node's existing class beats the parser's +// default. Only the integer/single classes qualify: every number is representable +// in them, whereas keeping 'logical' would render `7` as `true`, which MATLAB +// rejects outright. +export function classAfterEdit(current, parsedType) { + return parsedType === 'double' && TYPED_NUMERIC_CLASS.test(current) ? current : parsedType; +} +// The class one ELEMENT of a numeric array carries. One MATLAB array is one class, +// so an element of an int32 array is an int32 and an element of a logical array is a +// logical. The element rows' hardcoded 'double' put 'int32' in the array's Data Type +// column and 'double' in the column of every row beneath it — one value described two +// ways, one of them wrong — and showed a logical array as [true false] over rows +// reading 1 and 0, leaking the 1/0 storage form into the UI. +// +// classAfterEdit's set plus 'logical'. For the integer/single classes this moves the +// Data Type column and nothing else, since they format through formatMatlabNum +// exactly as a double does. 'logical' additionally changes the element's icon and +// text (see MatlabVariableNode's icon getter and _formatScalar), which is the point: +// the row should look like the logical scalar it is, checkbox included. It is also why +// _setConstrainedValue has a logical arm — a row that reads 'true' has to accept 'true'. +// +// Cell and struct children never come through here: they are independent values, and +// their container has no one class to hand down. +export function elementClass(arrayClass) { + return TYPED_NUMERIC_CLASS.test(arrayClass) || arrayClass === 'logical' ? arrayClass : 'double'; +} +// True when a scalar has to be written as the format's typed {_type,_value} +// literal rather than a bare JSON value. Both reasons are silent data loss: +// an int32/single written bare reads back as double (see TYPED_NUMERIC_CLASS), +// and JSON has no literal for Inf/NaN — JSON.stringify writes `null`, which reads +// back as 0. A `logical` normally travels as a JS boolean and needs no tag, except +// when it came from an array, whose elements the parser stores as 1/0. +export function needsTypedLiteral(type, value) { + if (TYPED_NUMERIC_CLASS.test(type)) { + return true; + } + if (type === 'logical') { + return typeof value !== 'boolean'; + } + return typeof value === 'number' && !isFinite(value); +} +// A MATLAB matrix literal: `[1 2 3; 4 5 6]`. Only ever called for rank <= 2 — the +// caller summarizes anything higher, because mat2str itself refuses rank >= 3 and +// there is no MATLAB one-line spelling to match. +// +// The row loop used to run the full rows x cols grid and print '?' for anything it +// could not find, so an element list shorter than the declared shape filled the +// display with question marks. It now formats the elements that exist. +export function formatMatrix(rows, cols, elements) { + if (elements.length === 0) { + return EMPTY_NUMERIC; + } + const rowStrs = []; + for (let r = 0; r < rows; r++) { + const vals = []; + for (let c = 0; c < cols; c++) { + const i = r * cols + c; + if (i >= elements.length) { + break; + } + vals.push(formatMatlabNum(elements[i])); + } + if (vals.length > 0) { + rowStrs.push(vals.join(' ')); + } + } + return '[' + rowStrs.join('; ') + ']'; +} +// A char MATRIX as MATLAB prints one: `['ab'; 'cd']`, one quoted string per ROW. +// +// The stored text is column-major (see XmlUtils' char section), so row r is every +// rows-th character starting at r — MATLAB's own 2x2 'acbd' is rows 'ab' and 'cd'. +// Each row is quoted through formatMatlabChar, so an apostrophe inside one doubles +// exactly as it does in the scalar spelling. +// +// Rank 2 only: the caller summarizes anything higher, for the same reason formatMatrix +// does — MATLAB has no one-line print of a rank-3 array of any class. +export function formatCharMatrix(text, dims) { + const rows = dims[0]; + const cols = dims[1]; + const rowStrs = []; + for (let r = 0; r < rows; r++) { + let row = ''; + for (let c = 0; c < cols; c++) { + row += text.charAt(c * rows + r); + } + rowStrs.push(formatMatlabChar(row)); + } + return '[' + rowStrs.join('; ') + ']'; +} +export function parseMatrixValue(raw) { + const lines = raw._value.split('\n'); + const header = lines[0]; + // Rank 3 and up appear as Matrix(2,3,2) — MATLAB's binary dictionary writes a + // 2x3x2 as Dimension="2*3*2", and BinarySlddParser now carries every extent + // through. Only the two-group form was matched, so an N-D entry fell through + // to the [0,0] empty node with all twelve of its elements gone. + const dimsMatch = header.match(/^Matrix\((\d+(?:,\d+)*)\)$/); + if (!dimsMatch) { + return null; + } + const dims = dimsMatch[1].split(',').map(function (s) { + return parseInt(s, 10); + }); + const body = lines.slice(1).join(''); + const numbers = []; + // Inf/-Inf/NaN are elements too, and a digits-only pattern would skip them — + // shifting every later element one slot left and corrupting the whole matrix. + const numMatches = body.match(/-?(?:[\d.]+(?:[eE][+-]?\d+)?|Inf|NaN)/g); + if (numMatches) { + // An int64/uint64 element is kept as exact decimal TEXT: MATLAB's 64-bit range is + // wider than a double's exact one BY CONSTRUCTION, so parseMatlabNum turned + // maxU64 into 18446744073709552000 one step after the reader had it right + // (defect 29). The suffix never reaches here — the pattern above matches digits, + // so '18446744073709551615U' arrives already bare. + const exact = needsExactInt(raw._type); + numMatches.forEach(function (s) { + numbers.push(exact ? parseExactNum(s) : parseMatlabNum(s)); + }); + } + // A one-group header (Matrix(5)) has no MATLAB spelling but is cheap to accept + // as the row vector it must mean, rather than handing back a rank-1 dims array + // every downstream reader would have to special-case. + return { + dims: dims.length >= 2 ? dims : [1, dims[0] || 0], + elements: numbers, + type: raw._type, + }; +} +//# sourceMappingURL=matlabValueRules.js.map \ No newline at end of file diff --git a/dist/datamodel/node/data/matlabValueRules.js.map b/dist/datamodel/node/data/matlabValueRules.js.map new file mode 100644 index 0000000..999c5f3 --- /dev/null +++ b/dist/datamodel/node/data/matlabValueRules.js.map @@ -0,0 +1 @@ +{"version":3,"file":"matlabValueRules.js","sourceRoot":"","sources":["../../../../src/datamodel/node/data/matlabValueRules.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,EAAE;AACF,iEAAiE;AACjE,EAAE;AACF,qFAAqF;AACrF,qFAAqF;AACrF,uF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KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAErC,MAAM,OAAO,GAAwB,EAAE,CAAC;IACxC,6EAA6E;IAC7E,8EAA8E;IAC9E,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;IACxE,IAAI,UAAU,EAAE,CAAC;QACf,kFAAkF;QAClF,4EAA4E;QAC5E,0EAA0E;QAC1E,iFAAiF;QACjF,mDAAmD;QACnD,MAAM,KAAK,GAAG,aAAa,CAAC,GAAG,CAAC,KAAe,CAAC,CAAC;QACjD,UAAU,CAAC,OAAO,CAAC,UAAU,CAAS;YACpC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7D,CAAC,CAAC,CAAC;IACL,CAAC;IAED,+EAA+E;IAC/E,+EAA+E;IAC/E,sDAAsD;IACtD,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACjD,QAAQ,EAAE,OAAO;QACjB,IAAI,EAAE,GAAG,CAAC,KAAe;KAC1B,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/datamodel/parser/BinarySlddParser.d.ts.map b/dist/datamodel/parser/BinarySlddParser.d.ts.map index edb4261..6315847 100644 --- a/dist/datamodel/parser/BinarySlddParser.d.ts.map +++ b/dist/datamodel/parser/BinarySlddParser.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"BinarySlddParser.d.ts","sourceRoot":"","sources":["../../../src/datamodel/parser/BinarySlddParser.ts"],"names":[],"mappings":"AA+CA,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AA8ChE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAkBrD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAC7B,WAAW,EAAE,WAAW,EACxB,QAAQ,CAAC,EAAE,YAAY,EAAE,GACxB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAmBzB;AAQD,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,EACvC,QAAQ,CAAC,EAAE,YAAY,EAAE,GACxB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAwIzB;AAgUD,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,CAExE"} \ No newline at end of file +{"version":3,"file":"BinarySlddParser.d.ts","sourceRoot":"","sources":["../../../src/datamodel/parser/BinarySlddParser.ts"],"names":[],"mappings":"AA+CA,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AA+ChE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAkBrD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAC7B,WAAW,EAAE,WAAW,EACxB,QAAQ,CAAC,EAAE,YAAY,EAAE,GACxB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAmBzB;AAQD,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,EACvC,QAAQ,CAAC,EAAE,YAAY,EAAE,GACxB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAwIzB;AAgUD,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,CAExE"} \ No newline at end of file diff --git a/dist/datamodel/parser/BinarySlddParser.js b/dist/datamodel/parser/BinarySlddParser.js index c2fc877..b4121f5 100644 --- a/dist/datamodel/parser/BinarySlddParser.js +++ b/dist/datamodel/parser/BinarySlddParser.js @@ -46,6 +46,7 @@ import { unzipSync } from 'fflate'; import { XMLParser } from 'fast-xml-parser'; import { reasonOf } from './ParseWarning.js'; import { SC_PART_XML, catalogFromDefinitions, scPartUnreadableMessage, scanScXml, } from './ScCatalog.js'; +import { DATA_PART_KEY, DATA_PART_XML, TEXT_CONTENT, TEXT_PARTS } from './SlddParts.js'; import { charNeedsShape, formatMatrixSerial, formatMxCharSerial, formatNumLiteral, needsExactInt, parseExactBody, parseMatlabNum, parseNumericBody, transposeFromColumnMajorND, SAVEOBJ_KEY, } from './XmlUtils.js'; const xmlParser = new XMLParser({ ignoreAttributes: false, @@ -113,14 +114,14 @@ export function parseBinarySldd(arrayBuffer, warnings) { const uint8 = new Uint8Array(arrayBuffer); const entries = unzipSync(uint8); const decoder = new TextDecoder(); - const dataXml = entries['data/chunk0.xml']; + const dataXml = entries[DATA_PART_XML]; if (!dataXml) { - throw new Error('Missing data/chunk0.xml in binary SLDD'); + throw new Error(`Missing ${DATA_PART_XML} in binary SLDD`); } const xmlString = decoder.decode(dataXml); const zipMetadata = {}; for (const [name, data] of Object.entries(entries)) { - if (name !== 'data/chunk0.xml') { + if (name !== DATA_PART_XML) { zipMetadata[name] = data; } } @@ -180,7 +181,7 @@ export function parseBinarySlddParts(xmlString, zipMetadata, warnings) { refused = true; warnings?.push({ code: 'source-unreadable', - message: `The dictionary part "data/chunk0.xml" could not be read (${reasonOf(err)}), ` + message: `The dictionary part "${DATA_PART_XML}" could not be read (${reasonOf(err)}), ` + 'so this dictionary reads as empty.', }); } @@ -190,7 +191,7 @@ export function parseBinarySlddParts(xmlString, zipMetadata, warnings) { if (!refused && !Object.prototype.hasOwnProperty.call(doc, 'DataSource')) { warnings?.push({ code: 'source-unreadable', - message: 'The dictionary part "data/chunk0.xml" holds no element, ' + message: `The dictionary part "${DATA_PART_XML}" holds no element, ` + 'so this dictionary reads as empty.', }); } @@ -250,9 +251,9 @@ export function parseBinarySlddParts(xmlString, zipMetadata, warnings) { } return { __MW_TEXT_COREPROPERTIES__: { release }, - __MW_TEXT_PARTS__: { - '__MW_TEXT_PART__/data/chunk0': { - __MW_TEXT_content: { + [TEXT_PARTS]: { + [DATA_PART_KEY]: { + [TEXT_CONTENT]: { entries: ddEntries, 'Dictionary References': dictionaryReferences, AllowAccessBWS: allowAccessBWS, diff --git a/dist/datamodel/parser/BinarySlddParser.js.map b/dist/datamodel/parser/BinarySlddParser.js.map index 7990ac5..2ad3378 100644 --- a/dist/datamodel/parser/BinarySlddParser.js.map +++ b/dist/datamodel/parser/BinarySlddParser.js.map @@ -1 +1 @@ -{"version":3,"file":"BinarySlddParser.js","sourceRoot":"","sources":["../../../src/datamodel/parser/BinarySlddParser.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,qCAAqC;AACrC,EAAE;AACF,wEAAwE;AACxE,EAAE;AACF,kFAAkF;AAClF,kFAAkF;AAClF,qFAAqF;AACrF,+EAA+E;AAC/E,kEAAkE;AAClE,sFAAsF;AACtF,iCAAiC;AACjC,EAAE;AACF,oFAAoF;AACpF,oFAAoF;AACpF,wBAAwB;AACxB,EAAE;AACF,sFAAsF;AACtF,oFAAoF;AACpF,+EAA+E;AAC/E,oFAAoF;AACpF,sFAAsF;AACtF,oFAAoF;AACpF,iFAAiF;AACjF,sFAAsF;AACtF,sEAAsE;AACtE,qEAAqE;AACrE,sFAAsF;AACtF,uFAAuF;AACvF,sFAAsF;AACtF,oFAAoF;AACpF,kEAAkE;AAClE,sFAAsF;AACtF,sFAAsF;AACtF,uFAAuF;AACvF,2EAA2E;AAC3E,gFAAgF;AAChF,2EAA2E;AAC3E,uBAAuB;AACvB,EAAE;AAC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C;QAC1C,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,MAAM,IAAI,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACxC,MAAM,KAAK,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACzC,MAAM,GAAG,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACvC,MAAM,IAAI,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACzC,MAAM,GAAG,GAAG,UAAU,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IACzC,MAAM,GAAG,GAAG,UAAU,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IACzC,OAAO,IAAI,GAAG,GAAG,GAAG,KAAK,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AACnF,CAAC"} \ No newline at end of file +{"version":3,"file":"BinarySlddParser.js","sourceRoot":"","sources":["../../../src/datamodel/parser/BinarySlddParser.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,qCAAqC;AACrC,EAAE;AACF,wEAAwE;AACxE,EAAE;AACF,kFAAkF;AAClF,kFAAkF;AAClF,qFAAqF;AACrF,+EAA+E;AAC/E,kEAAkE;AAClE,sFAAsF;AACtF,iCAAiC;AACjC,EAAE;AACF,oFAAoF;AACpF,oFAAoF;AACpF,wBAAwB;AACxB,EAAE;AACF,sFAAsF;AACtF,oFAAoF;AACpF,+EAA+E;AAC/E,oFAAoF;AACpF,sFAAsF;AACtF,oFAAoF;AACpF,iFAAiF;AACjF,sFAAsF;AACtF,sEAAsE;AACtE,qEAAqE;AACrE,sFAAsF;AACtF,uFAAuF;AACvF,sFAAsF;AACtF,oFAAoF;AACpF,kEAAkE;AAClE,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KAAK,EAAE,CAAC;QACtB,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE,CAAC;YACzB,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,UAAU,CAAC,UAAkB;IACpC,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,GAAG,EAAE,EAAE,CAAC;QAC1C,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,MAAM,IAAI,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACxC,MAAM,KAAK,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACzC,MAAM,GAAG,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACvC,MAAM,IAAI,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACzC,MAAM,GAAG,GAAG,UAAU,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IACzC,MAAM,GAAG,GAAG,UAAU,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IACzC,OAAO,IAAI,GAAG,GAAG,GAAG,KAAK,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AACnF,CAAC"} \ No newline at end of file diff --git a/dist/datamodel/parser/BinarySlddSerializer.d.ts.map b/dist/datamodel/parser/BinarySlddSerializer.d.ts.map index d0f50f8..25f8aee 100644 --- a/dist/datamodel/parser/BinarySlddSerializer.d.ts.map +++ b/dist/datamodel/parser/BinarySlddSerializer.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"BinarySlddSerializer.d.ts","sourceRoot":"","sources":["../../../src/datamodel/parser/BinarySlddSerializer.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,QAAQ,MAAM,+BAA+B,CAAC;AAC1D,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAEhD,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,GAAG,WAAW,CAcnE;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAwB5D;AAED,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,QAAQ,GAAG,MAAM,CAoB/D"} \ No newline at end of file +{"version":3,"file":"BinarySlddSerializer.d.ts","sourceRoot":"","sources":["../../../src/datamodel/parser/BinarySlddSerializer.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,QAAQ,MAAM,+BAA+B,CAAC;AAC1D,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAEhD,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,GAAG,WAAW,CAcnE;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAwB5D;AAED,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,QAAQ,GAAG,MAAM,CAoB/D"} \ No newline at end of file diff --git a/dist/datamodel/parser/BinarySlddSerializer.js b/dist/datamodel/parser/BinarySlddSerializer.js index d7540a7..49489c6 100644 --- a/dist/datamodel/parser/BinarySlddSerializer.js +++ b/dist/datamodel/parser/BinarySlddSerializer.js @@ -7,6 +7,7 @@ // not here. import { zipSync } from 'fflate'; import { escapeXml, matlabTimestampNow } from './XmlUtils.js'; +import { DATA_PART_XML } from './SlddParts.js'; export function serializeBinarySldd(slddNode) { const xmlString = buildDataChunkXml(slddNode); const encoder = new TextEncoder(); @@ -16,7 +17,7 @@ export function serializeBinarySldd(slddNode) { zipEntries[name] = data; } } - zipEntries['data/chunk0.xml'] = encoder.encode(xmlString); + zipEntries[DATA_PART_XML] = encoder.encode(xmlString); const zipped = zipSync(zipEntries, { level: 6 }); return zipped.buffer.slice(zipped.byteOffset, zipped.byteOffset + zipped.byteLength); } diff --git a/dist/datamodel/parser/BinarySlddSerializer.js.map b/dist/datamodel/parser/BinarySlddSerializer.js.map index 1492394..6653a9c 100644 --- a/dist/datamodel/parser/BinarySlddSerializer.js.map +++ b/dist/datamodel/parser/BinarySlddSerializer.js.map @@ -1 +1 @@ -{"version":3,"file":"BinarySlddSerializer.js","sourceRoot":"","sources":["../../../src/datamodel/parser/BinarySlddSerializer.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,EAAE;AACF,mFAAmF;AACnF,kFAAkF;AAClF,qFAAqF;AACrF,qFAAqF;AACrF,YAAY;AAEZ,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAI9D,MAAM,UAAU,mBAAmB,CAAC,QAAkB;IAClD,MAAM,SAAS,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAC9C,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;IAElC,MAAM,UAAU,GAA+B,EAAE,CAAC;IAClD,IAAI,QAAQ,CAAC,YAAY,EAAE,CAAC;QACxB,KAAK,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;YAC/D,UAAU,CAAC,IAAI,CAAC,GAAG,IAAkB,CAAC;QAC1C,CAAC;IACL,CAAC;IACD,UAAU,CAAC,iBAAiB,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAE1D,MAAM,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;IACjD,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AACzF,CAAC;AAED,MAAM,UAAU,i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AmB;IACnD,MAAM,IAAI,GAAG,SAAS,CAAC,QAAQ,IAAI,EAAE,CAAC;IACtC,+EAA+E;IAC/E,iFAAiF;IACjF,kFAAkF;IAClF,kFAAkF;IAClF,6EAA6E;IAC7E,8EAA8E;IAC9E,sEAAsE;IACtE,MAAM,OAAO,GAAI,IAAI,CAAC,WAAsB,IAAK,IAAI,CAAC,OAAkB,IAAI,kBAAkB,EAAE,CAAC;IACjG,IAAI,GAAG,GAAG,iCAAiC,CAAC;IAC5C,GAAG,IAAI,sCAAsC,GAAG,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC;IACrF,GAAG,IAAI,sCAAsC,GAAG,CAAE,IAAI,CAAC,IAAe,IAAI,EAAE,CAAC,GAAG,QAAQ,CAAC;IACzF,GAAG,IAAI,2CAA2C,GAAG,CAAE,IAAI,CAAC,SAAoB,IAAI,EAAE,CAAC,GAAG,QAAQ,CAAC;IACnG,GAAG,IAAI,yCAAyC,GAAG,OAAO,GAAG,QAAQ,CAAC;IACtE,GAAG,IAAI,2CAA2C,GAAG,SAAS,CAAE,IAAI,CAAC,cAAyB,IAAI,EAAE,CAAC,GAAG,QAAQ,CAAC;IACjH,GAAG,IAAI,2CAA2C,GAAG,CAAE,IAAI,CAAC,SAAoB,IAAI,GAAG,CAAC,GAAG,QAAQ,CAAC;IACpG,GAAG,IAAI,SAAS,CAAC,YAAY,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;IAChE,GAAG,IAAI,iBAAiB,CAAC;IACzB,OAAO,GAAG,CAAC;AACf,CAAC"} \ No newline at end of file +{"version":3,"file":"BinarySlddSerializer.js","sourceRoot":"","sources":["../../../src/datamodel/parser/BinarySlddSerializer.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,EAAE;AACF,mFAAmF;AACnF,kFAAkF;AAClF,qFAAqF;AACrF,qFAAqF;AACrF,YAAY;AAEZ,OA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AAG,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC;IACrF,GAAG,IAAI,sCAAsC,GAAG,CAAE,IAAI,CAAC,IAAe,IAAI,EAAE,CAAC,GAAG,QAAQ,CAAC;IACzF,GAAG,IAAI,2CAA2C,GAAG,CAAE,IAAI,CAAC,SAAoB,IAAI,EAAE,CAAC,GAAG,QAAQ,CAAC;IACnG,GAAG,IAAI,yCAAyC,GAAG,OAAO,GAAG,QAAQ,CAAC;IACtE,GAAG,IAAI,2CAA2C,GAAG,SAAS,CAAE,IAAI,CAAC,cAAyB,IAAI,EAAE,CAAC,GAAG,QAAQ,CAAC;IACjH,GAAG,IAAI,2CAA2C,GAAG,CAAE,IAAI,CAAC,SAAoB,IAAI,GAAG,CAAC,GAAG,QAAQ,CAAC;IACpG,GAAG,IAAI,SAAS,CAAC,YAAY,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;IAChE,GAAG,IAAI,iBAAiB,CAAC;IACzB,OAAO,GAAG,CAAC;AACf,CAAC"} \ No newline at end of file diff --git a/dist/datamodel/parser/MatlabValueParser.d.ts.map b/dist/datamodel/parser/MatlabValueParser.d.ts.map index be3f957..ee551f4 100644 --- a/dist/datamodel/parser/MatlabValueParser.d.ts.map +++ b/dist/datamodel/parser/MatlabValueParser.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"MatlabValueParser.d.ts","sourceRoot":"","sources":["../../../src/datamodel/parser/MatlabValueParser.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,WAAW;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,iBAAS,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAmB9C;AA+BD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,CAS9D;AAkDD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAExD;AASD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOtD;AA6BD,iBAAS,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAoGnD;AAkDD,iBAAS,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAoClD;AAyKD,iBAAS,qBAAqB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,CAWlE;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAC;;;;;;;;;;AACjC,wBAQE"} \ No newline at end of file +{"version":3,"file":"MatlabValueParser.d.ts","sourceRoot":"","sources":["../../../src/datamodel/parser/MatlabValueParser.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,WAAW;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,iBAAS,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAmB9C;AA+BD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,CAS9D;AAkDD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAExD;AASD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOtD;AA6BD,iBAAS,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAkGnD;AAsFD,iBAAS,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAgClD;AAwQD,iBAAS,qBAAqB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,CAWlE;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAC;;;;;;;;;;AACjC,wBAQE"} \ No newline at end of file diff --git a/dist/datamodel/parser/MatlabValueParser.js b/dist/datamodel/parser/MatlabValueParser.js index 988328b..2288e38 100644 --- a/dist/datamodel/parser/MatlabValueParser.js +++ b/dist/datamodel/parser/MatlabValueParser.js @@ -1,5 +1,5 @@ // Copyright 2026 The MathWorks, Inc. -import { parseExactNum } from './XmlUtils.js'; +import { parseExactNum, formatMatrixSerial, formatMxCharSerial } from './XmlUtils.js'; function parse(str) { str = str.trim(); if (str === '') { @@ -268,15 +268,13 @@ function parseArray(str) { if (cols < 0) { return null; } - const elements = []; - for (let r = 0; r < matrix.length; r++) { - for (let c = 0; c < cols; c++) { - elements.push(matrix[r][c]); - } - } + // A STRING array's element list is column-major and a numeric one's is row-major — + // not a preference here, but what the readers deliver (see flatten). Writing one + // loop for both is what made a 2x2 string array come back transposed (defect 50). if (isStringArray) { - return { type: 'string-array', value: elements, dims: [matrix.length, cols] }; + return { type: 'string-array', value: flatten(matrix, cols, 'column'), dims: [matrix.length, cols] }; } + const elements = flatten(matrix, cols, 'row'); // 'logical' with an ARRAY value, not a type of its own: the two are told apart by // Array.isArray at every consumer that cares (see _applyParsed and // parsedIsScalarNumeric), the same way 'double' already carries both a scalar and an @@ -288,6 +286,41 @@ function parseArray(str) { } return { type: 'double', value: elements, dims: [matrix.length, cols] }; } +// A literal's rows, flattened into the ONE element list the node layer wants — and the +// order is not the same for every type, which is the whole reason this is a named +// function with an argument rather than the loop it used to be at each site. +// +// A cell's and a string array's element list reach the node layer COLUMN-major; a +// numeric one's reaches it ROW-major. That is measured, not chosen: +// `MatParser.parseMatrix` transposes only its numeric branch and stores cells in file +// order, MATLAB writes both cells and strings column-major, and all four containers +// agree — `test/cellElementOrder.test.ts` pins it against MATLAB's own subscripts in +// `truth.json`. `formatMatrixSerial` then re-transposes the numeric list on the way +// out, which is why row-major is right there and only there. +// +// Every site here used to flatten row-major, so committing a multi-ROW cell or string +// array TRANSPOSED it — `{1 2; 3 4}` came back `{1 3; 2 4}` and saved that way, and +// retyping the displayed text transposed it again (defect 50). It hid for as long as it +// did because a 1xN and an Nx1 read the same in either order, and every editable cell +// fixture in the corpus is a vector. `charFromRows` below had the column-major rule +// right from the start, for the same reason and one value type away. +function flatten(matrix, cols, order) { + const elements = []; + if (order === 'column') { + for (let c = 0; c < cols; c++) { + for (let r = 0; r < matrix.length; r++) { + elements.push(matrix[r][c]); + } + } + return elements; + } + for (let r = 0; r < matrix.length; r++) { + for (let c = 0; c < cols; c++) { + elements.push(matrix[r][c]); + } + } + return elements; +} // The char array `['ab'; 'cd']` spells, from its already-concatenated rows. // // Every row must be the same LENGTH — MATLAB's own rule for vertical char @@ -377,13 +410,9 @@ function parseCell(str) { if (matrix.length === 0) { return { type: 'cell', value: [], dims: [0, 0] }; } - const elements = []; - for (let r = 0; r < matrix.length; r++) { - for (let c = 0; c < cols; c++) { - elements.push(matrix[r][c]); - } - } - return { type: 'cell', value: elements, dims: [matrix.length, cols] }; + // Column-major, which is the order every reader delivers a cell's elements in and + // the order MATLAB writes them (defect 50 — see flatten). + return { type: 'cell', value: flatten(matrix, cols, 'column'), dims: [matrix.length, cols] }; } // Split on the row separator, ignoring any ';' that is inside a nested // bracket/brace or inside a quoted literal — `{'a;b'}` is one element, not two @@ -459,6 +488,17 @@ function tokenizeNumbers(rowStr) { } return nums.length > 0 ? { nums, allLogical } : null; } +// One row of a cell literal, as the raw element values a cell node is built from. +// +// Each element is handed to the SAME `parse` the whole value goes through and then +// spelled by cellElementRaw, so an element of a cell is read exactly like a value of +// its own. This arm used to do its own reading per bracket kind, and the readings +// disagreed with the top level: `[` pushed `parseArray(...).value`, the flat element +// list with the DIMS DROPPED, so `{[1;2]}` came back as a 1x2 and committed as +// `{[1 2]}` — in the file as well as on screen, since _serializeCell rebuilds each +// element from its child node (defect 49, reported from the extension). The `{` arm +// was right precisely because it kept a wrapper carrying `nested.dims`; that wrapper +// is now what every shaped element gets. function tokenizeCellElements(rowStr) { const elements = []; let i = 0; @@ -470,46 +510,25 @@ function tokenizeCellElements(rowStr) { if (i >= len) { break; } + // The span of ONE element. Bracketed and quoted spans are measured by the + // scanners that already know where they end (a ',' or ' ' inside either is + // ordinary content); a bare token runs to the next separator. const ch = rowStr.charAt(i); + let span; if (ch === "'" || ch === '"') { const scanned = scanQuoted(rowStr, i); if (!scanned) { return null; } - elements.push(scanned.text); + span = rowStr.slice(i, scanned.next); i = scanned.next; } - else if (ch === '[') { - const end = findMatchingBracket(rowStr, i, '[', ']'); + else if (ch === '[' || ch === '{') { + const end = findMatchingBracket(rowStr, i, ch, ch === '[' ? ']' : '}'); if (end < 0) { return null; } - const nested = parseArray(rowStr.slice(i, end + 1)); - if (nested === null) { - return null; - } - // Same reason as parseLiteral: a numeric array inside a cell is a double - // array, so no exact-integer token leaves parseCell. `type === 'double'` is - // the gate rather than the value's shape, because a string array's elements - // are strings too and {["12" "ab"]} must keep "12" as text. - elements.push(collapseExact(nested).value); - i = end + 1; - } - else if (ch === '{') { - const end = findMatchingBracket(rowStr, i, '{', '}'); - if (end < 0) { - return null; - } - const nested = parseCell(rowStr.slice(i, end + 1)); - if (nested === null) { - return null; - } - elements.push({ - _array_type: 'Cell', - _dimensions: nested.dims, - _elements: nested.value, - _mw_element_type: 'MATLABArray' - }); + span = rowStr.slice(i, end + 1); i = end + 1; } else { @@ -517,35 +536,128 @@ function tokenizeCellElements(rowStr) { while (end < len && rowStr.charAt(end) !== ',' && rowStr.charAt(end) !== ' ' && rowStr.charAt(end) !== ';') { end++; } - const token = rowStr.slice(i, end); - elements.push(parseLiteral(token)); + span = rowStr.slice(i, end); i = end; } + const parsed = parse(span); + if (parsed === null) { + // A bare identifier in a cell stays text — {a, b} is a cell of two names as + // far as this reader is concerned, and refusing it would reject a value the + // table can perfectly well show. A malformed BRACKETED or QUOTED span is a + // different thing: it announced a shape and then failed to be one, so it is + // still a rejection of the whole cell. + if (ch === '[' || ch === '{' || ch === "'" || ch === '"') { + return null; + } + elements.push(span); + continue; + } + elements.push(cellElementRaw(parsed)); } return elements.length > 0 ? elements : null; } -function parseLiteral(token) { - if (token === 'true') { - return true; - } - if (token === 'false') { - return false; - } - const n = parseMatlabNumber(token); - // A CELL element's class comes from its own literal, and a bare decimal literal is a - // double in MATLAB — {18446744073709551615} holds a double, not a uint64 — so the - // exact-integer token collapses here rather than being carried out of the parser. - // A cell element has no class beside it to consult later, and a bare string in one - // IS text (see the `return token` below), so a token that escaped would come back - // as the char '18446744073709551615'. - if (typeof n === 'string') { - return Number(n); - } - if (n !== null) { - return n; +/** + * One parsed element, in the raw form the READERS produce for that same value — the + * shape NodeRegistry.parseValue dispatches on and _serializeCell writes back. + * + * This is the cell twin of MatlabVariableNode._serializeArray: a shaped value has to + * state its shape, because the bare JSON list every element used to take has nowhere + * to carry [2,1] and reads back as a row. Each arm below is MATLAB's OWN spelling for + * that element, read off two text .sldd files MATLAB wrote itself + * (test/parity/matlab/probe_cell_shapes.m): + * + * {[1;2]} {"_type": "double", "_value": "Matrix(2,1)\n[1.0, 2.0]"} + * {[1 2;3 4]} {"_type": "double", "_value": "Matrix(2,2)\n[[1.0, 2.0]; [3.0, 4.0]]"} + * {[1 2]} [1, 2] <- a double ROW, and only that, goes bare + * {[]} [] + * {1} 1 + * {[true;false]} {"_type": "logical", "_value": "Matrix(2,1)\n[1, 0]"} + * {[true false]} {"_type": "logical", "_value": "[1, 0]"} + * {true} true + * {['ab';'cd']} {"_type": "mxchar", "_value": "Matrix(2,2)\n[[97, 98]; [99, 100]]"} + * {'ab'} "ab" + * {["a";"b"]} {"_array_type": "String", "_dimensions": [2,1], "_elements": ["a","b"]} + * {["a" "b"]} {"_array_type": "String", "_dimensions": [1,2], "_elements": ["a","b"]} + * {"a"} ["a"] + * {{1;2}} {"_array_type": "Cell", "_dimensions": [2,1], "_elements": [1,2]} + * + * Note how little of that is a free choice: a double row is bare and a LOGICAL row is + * not, because the bare form says double; a 1x1 string is a one-element LIST because a + * bare JSON string is a char. Where a shape does have to be stated, the spelling comes + * from the same formatMatrixSerial the readers and the write-back path use, so the + * grammar keeps its single owner (defect 19/21) and only the type tag differs. + * + * MATLAB omits `_mw_element_type` from a NESTED wrapper (both cases above). It is kept + * here because our own writers add it back on save regardless (_serializeCell, + * _serializeString), so this matches the shape a re-read of our file produces. + */ +function cellElementRaw(parsed) { + switch (parsed.type) { + case 'cell': + return { + _array_type: 'Cell', + _dimensions: parsed.dims, + _elements: parsed.value, + _mw_element_type: 'MATLABArray' + }; + case 'string-array': + case 'string': { + // A string is one class with two literals: `["a";"b"]` arrives as an array + // with dims, `"a"` as a lone scalar with none. Neither may be pushed as bare + // TEXT, because a bare JSON string is a char — that is what made `{"a"}` + // display and save as `{'a'}`, retyping the element. + const elems = parsed.type === 'string' ? [parsed.value] : parsed.value; + // A 1x1 string is the one-element LIST `["a"]`, which is both MATLAB's own + // spelling for it in a cell (probe_cell_shapes.m) and what serializeValue + // writes for a string scalar at the top level. Only a string with more than + // one element takes the wrapper — and it takes it at EITHER orientation, a + // 1x2 row included, unlike a double row. + return elems.length === 1 + ? elems + : { + _array_type: 'String', + _dimensions: parsed.dims || [1, elems.length], + _elements: elems, + _mw_element_type: 'MATLABArray' + }; + } + case 'char': + // dims are set only for a char that needs them (charNeedsShape): a 1xN row + // is a bare JSON string in MATLAB's own file, here as at the top level. + return parsed.dims + ? { _type: 'mxchar', _value: formatMxCharSerial(parsed.value, parsed.dims) } + : parsed.value; + case 'logical': + // Every logical ARRAY is tagged, at either orientation — see the table above. + // A logical scalar is a JSON boolean, which is already self-describing. + return Array.isArray(parsed.value) + ? { _type: 'logical', _value: formatMatrixSerial(parsed.value, parsed.dims, 'logical') } + : parsed.value; + case 'double': { + // A numeric array inside a cell is a double array — a cell element has no + // class beside it to consult and a bare decimal literal is a double in MATLAB + // too — so the exact-integer token collapses here rather than leaving the + // parser: `{18446744073709551615}` holds a double, and a token that escaped + // would be written as a JSON string and read back as char (defect 42). + // `type === 'double'` is the gate rather than the value's shape, because a + // string array's elements are strings too and {["12" "ab"]} must keep "12". + const value = collapseExact(parsed).value; + if (!Array.isArray(value)) { + return value; + } + // Bare for the two shapes the bare form states correctly: a row, and the + // empty `[]` (dims [0,0], which has no Matrix() body to write). + const dims = parsed.dims; + return dims.length <= 2 && dims[0] <= 1 + ? value + : { _type: 'double', _value: formatMatrixSerial(value, dims, 'double') }; + } + default: + // 'complex'. MATLAB writes a cdata MAT stream for one of those even inside a + // cell, which this parser cannot build, so the formatted literal is kept as + // text — the reading `{1+2i}` has always had here. Logged in the spec. + return parsed.value; } - // Not a number — keep the raw token (a bare identifier in a cell stays text). - return token; } // Skip over quoted spans rather than counting brackets inside them: a bracket is // ordinary text between quotes, so `{['a]'], 1}` closed its inner array at the ']' diff --git a/dist/datamodel/parser/MatlabValueParser.js.map b/dist/datamodel/parser/MatlabValueParser.js.map index 363c6f7..9a89749 100644 --- a/dist/datamodel/parser/MatlabValueParser.js.map +++ b/dist/datamodel/parser/MatlabValueParser.js.map @@ -1 +1 @@ -{"version":3,"file":"MatlabValueParser.js","sourceRoot":"","sources":["../../../src/datamodel/parser/MatlabValueParser.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAQ9C,SAAS,KAAK,CAAC,GAAW;IACtB,GAAG,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IACjB,IAAI,GAAG,KAAK,EAAE,EAAE,CAAC;QAAC,OAAO,IAAI,CAAC;IAAC,CAAC;IAEhC,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACzB,IAAI,EAAE,KAAK,GAAG,EAAE,CAAC;QAAC,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC;IAAC,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,MAAM,EAAE,CAAC;QAAC,OAAO,KAAK,CAAC;IAAC,CAAC;IAC9B,wFAAwF;IACxF,oFAAoF;IACpF,oFAAoF;IACpF,oBAAoB;IACpB,IAAI,MAAM,CAAC,IAAI,KAAK,QAAQ,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QACxD,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;YAAC,OAAO,MAAM,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;QAAC,CAAC;QACtE,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,KAAK,SAAS,CAAC;AACrC,CAAC;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAC;AACjC,eAAe;IACX,KAAK;IACL,UAAU;IACV,SAAS;IACT,qBAAqB;IACrB,gBAAgB;IAChB,kBAAkB;IAClB,iBAAiB;CACpB,CAAC"} \ No newline at end of file +{"version":3,"file":"MatlabValueParser.js","sourceRoot":"","sources":["../../../src/datamodel/parser/MatlabValueParser.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAQtF,SAAS,KAAK,CAAC,GAAW;IACtB,GAAG,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IACjB,IAAI,GAAG,KAAK,EAAE,EAAE,CAAC;QAAC,OAAO,IAAI,CAAC;IAAC,CAAC;IAEhC,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACzB,IAAI,EAAE,KAAK,GAAG,EAAE,CAAC;QAAC,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC;IAAC,CAAC;IAC3C,IAAI,EAAE,KAAK,GAAG,EAAE,CAAC;QAAC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;IAAC,CAAC;IAC1C,IAAI,EAAE,KAAK,GA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CAAC;AACjC,eAAe;IACX,KAAK;IACL,UAAU;IACV,SAAS;IACT,qBAAqB;IACrB,gBAAgB;IAChB,kBAAkB;IAClB,iBAAiB;CACpB,CAAC"} \ No newline at end of file diff --git a/dist/datamodel/parser/SlddContent.d.ts.map b/dist/datamodel/parser/SlddContent.d.ts.map index 96859fc..a850d99 100644 --- a/dist/datamodel/parser/SlddContent.d.ts.map +++ b/dist/datamodel/parser/SlddContent.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"SlddContent.d.ts","sourceRoot":"","sources":["../../../src/datamodel/parser/SlddContent.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAe1D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,WAAW,EAClB,QAAQ,CAAC,EAAE,YAAY,EAAE,GACxB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAMzB;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAI9F;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,EAAE,CAiBxD"} \ No newline at end of file +{"version":3,"file":"SlddContent.d.ts","sourceRoot":"","sources":["../../../src/datamodel/parser/SlddContent.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAe1D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,WAAW,EAClB,QAAQ,CAAC,EAAE,YAAY,EAAE,GACxB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAMzB;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAI9F;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,EAAE,CAiBxD"} \ No newline at end of file diff --git a/dist/datamodel/parser/SlddContent.js b/dist/datamodel/parser/SlddContent.js index 3f36ba4..d90cdaf 100644 --- a/dist/datamodel/parser/SlddContent.js +++ b/dist/datamodel/parser/SlddContent.js @@ -16,6 +16,7 @@ // that had actually drifted — see `normalizeRefNames`. import { strFromU8 } from 'fflate'; import { parseBinarySldd } from './BinarySlddParser.js'; +import { DATA_PART_KEY, TEXT_CONTENT, TEXT_PARTS } from './SlddParts.js'; /** * True when these bytes open a JSON object, ignoring a leading UTF-8 BOM and any leading * whitespace. A binary `.sldd` is a zip, which starts with 'PK', so the first significant @@ -72,9 +73,9 @@ export function readSlddContent(bytes, warnings) { * than as a parse loss. */ export function slddChunkContent(json) { - const parts = json.__MW_TEXT_PARTS__; - const chunk = parts?.['__MW_TEXT_PART__/data/chunk0']; - return chunk?.__MW_TEXT_content ?? null; + const parts = json[TEXT_PARTS]; + const chunk = parts?.[DATA_PART_KEY]; + return chunk?.[TEXT_CONTENT] ?? null; } /** * Normalise a `Dictionary References` array to plain name strings, dropping any element diff --git a/dist/datamodel/parser/SlddContent.js.map b/dist/datamodel/parser/SlddContent.js.map index 07eb436..ceaeed5 100644 --- a/dist/datamodel/parser/SlddContent.js.map +++ b/dist/datamodel/parser/SlddContent.js.map @@ -1 +1 @@ -{"version":3,"file":"SlddContent.js","sourceRoot":"","sources":["../../../src/datamodel/parser/SlddContent.ts"],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C,IAAI,eAAe,CAAC,EAAE,CAAC,EAAE,CAAC;QACxB,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,CAA4B,CAAC;IAC9D,CAAC;IACD,OAAO,eAAe,CAAC,KAAK,EAAE,QAAQ,IAAI,EAAE,CAA4B,CAAC;AAC3E,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAA6B;IAC5D,MAAM,KAAK,GAAG,IAAI,CAAC,iBAAwD,CAAC;IAC5E,MAAM,KAAK,GAAG,KAAK,EAAE,CAAC,8BAA8B,CAAwC,CAAC;IAC7F,OAAQ,KAAK,EAAE,iBAAyD,IAAI,IAAI,CAAC;AACnF,CAAC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,iBAAiB,CAAC,GAAY;IAC5C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QACxB,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;QACtB,MAAM,IAAI,GACR,OAAO,GAAG,KAAK,QAAQ;YACrB,CAAC,CAAC,GAAG;YACL,CAAC,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ;gBAC9B,CAAC,CAAE,GAA+B,CAAC,IAAI;gBACvC,CAAC,CAAC,SAAS,CAAC;QAClB,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,EAAE,EAAE,CAAC;YAC5C,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"} \ No newline at end of file +{"version":3,"file":"SlddContent.js","sourceRoot":"","sources":["../../../src/datamodel/parser/SlddContent.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,qCAAqC;AACrC,EAAE;AACF,uFAAuF;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AC;IACjC,IAAI,eAAe,CAAC,EAAE,CAAC,EAAE,CAAC;QACxB,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,CAA4B,CAAC;IAC9D,CAAC;IACD,OAAO,eAAe,CAAC,KAAK,EAAE,QAAQ,IAAI,EAAE,CAA4B,CAAC;AAC3E,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAA6B;IAC5D,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAwC,CAAC;IACtE,MAAM,KAAK,GAAG,KAAK,EAAE,CAAC,aAAa,CAAwC,CAAC;IAC5E,OAAQ,KAAK,EAAE,CAAC,YAAY,CAAyC,IAAI,IAAI,CAAC;AAChF,CAAC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,iBAAiB,CAAC,GAAY;IAC5C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QACxB,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;QACtB,MAAM,IAAI,GACR,OAAO,GAAG,KAAK,QAAQ;YACrB,CAAC,CAAC,GAAG;YACL,CAAC,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ;gBAC9B,CAAC,CAAE,GAA+B,CAAC,IAAI;gBACvC,CAAC,CAAC,SAAS,CAAC;QAClB,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,EAAE,EAAE,CAAC;YAC5C,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"} \ No newline at end of file diff --git a/dist/datamodel/parser/SlddParts.d.ts b/dist/datamodel/parser/SlddParts.d.ts new file mode 100644 index 0000000..b26898d --- /dev/null +++ b/dist/datamodel/parser/SlddParts.d.ts @@ -0,0 +1,44 @@ +/** + * The dictionary's data part, without an extension — the shared stem of both spellings + * below, and the reason `chunk0` appears in a zip member name and in a JSON key. + * + * The `0` is MATLAB's, not a placeholder this package fills in, and it does not become a + * loop once a dictionary gets big enough. R2027a was asked for two deliberately extreme + * dictionaries — 120 entries of `rand(120,120)` (36.8 MB as text, 15.8 MB zipped) and + * 20,000 scalar entries — in both on-disk formats, and all four wrote exactly one data + * part. Chunking by payload size or by entry count is not a behaviour this MATLAB has. + * + * That is measured for one release, though, so the reader stays conservative rather than + * asserting: a package that also held a `chunk1.xml` is read for chunk zero and carries + * the rest through untouched as pass-through metadata, so a future chunking scheme would + * make those entries invisible rather than lose them on the next save. + */ +export declare const DATA_PART = "data/chunk0"; +/** + * The data part as a member of a compressed-binary (zip) dictionary. The `.xml` suffix is + * part of the member name, so this is the string to look a member up by, to exclude from + * the pass-through bag, and to name in a warning about it. + */ +export declare const DATA_PART_XML = "data/chunk0.xml"; +/** The parts bag of a deserialized dictionary — the first step of the JSON path. */ +export declare const TEXT_PARTS = "__MW_TEXT_PARTS__"; +/** + * The data part's key INSIDE that bag — the second step. It is the part name with + * MATLAB's `__MW_TEXT_PART__/` prefix on it, and note that the prefix already ends in a + * separator, so this is not a path join with `DATA_PART_XML`: the JSON key carries no + * `.xml`. + */ +export declare const DATA_PART_KEY = "__MW_TEXT_PART__/data/chunk0"; +/** + * The content wrapper inside the part — the third and last step, whose value is the object + * holding `entries`, `Dictionary References` and `AllowAccessBWS`. + * + * The wrapper is MATLAB's for EVERY text part, not just the data one: `arch.sldd` carries + * three parts (`data/chunk0`, `simulink/ArchitecturePart` and the System Composer + * interfaceDictionary) and each is wrapped in this same key. So the catalog reader + * (`SlddNode._parseSystemComposer`) unwraps its own part with this constant too, and the + * name it is combined with — `DATA_PART_KEY` or `__MW_TEXT_PART__/${SC_PART}` — is what + * says WHICH part is being unwrapped. + */ +export declare const TEXT_CONTENT = "__MW_TEXT_content"; +//# sourceMappingURL=SlddParts.d.ts.map \ No newline at end of file diff --git a/dist/datamodel/parser/SlddParts.d.ts.map b/dist/datamodel/parser/SlddParts.d.ts.map new file mode 100644 index 0000000..b87f916 --- /dev/null +++ b/dist/datamodel/parser/SlddParts.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"SlddParts.d.ts","sourceRoot":"","sources":["../../../src/datamodel/parser/SlddParts.ts"],"names":[],"mappings":"AAuCA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,SAAS,gBAAgB,CAAC;AAEvC;;;;GAIG;AACH,eAAO,MAAM,aAAa,oBAAqB,CAAC;AAEhD,oFAAoF;AACpF,eAAO,MAAM,UAAU,sBAAsB,CAAC;AAE9C;;;;;GAKG;AACH,eAAO,MAAM,aAAa,iCAAkC,CAAC;AAE7D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,sBAAsB,CAAC"} \ No newline at end of file diff --git a/dist/datamodel/parser/SlddParts.js b/dist/datamodel/parser/SlddParts.js new file mode 100644 index 0000000..f42d767 --- /dev/null +++ b/dist/datamodel/parser/SlddParts.js @@ -0,0 +1,82 @@ +// src/datamodel/parser/SlddParts.ts +// Copyright 2026 The MathWorks, Inc. +// +// WHERE A DICTIONARY'S ENTRIES LIVE — one set of names, three writers and three readers. +// +// A `.sldd` keeps every entry it has in ONE part. In a compressed-binary dictionary that +// part is a zip member, `data/chunk0.xml`; in a textual one it is a nested key inside the +// JSON, `__MW_TEXT_PARTS__` -> `__MW_TEXT_PART__/data/chunk0` -> `__MW_TEXT_content`. Both +// spellings name the same part, which is why the same `chunk0` appears in both and why +// they are derived from one base here rather than written twice. +// +// These were literals at every site, and the sites are on both sides of a rule that +// nothing checks: +// +// * `parseBinarySldd` LOOKS UP the zip member, and copies every OTHER member into +// `__zipMetadata` as pass-through. `serializeBinarySldd` writes that bag back and then +// puts the member in. Those two names have to be the same string or a save either +// drops the entries or ships two copies of them — and the exclusion is spelled as a +// `!==`, so drift shows up as a valid zip with the wrong contents, not as a throw. +// * The binary reader and `SlddNode.serializeJson` both WRITE the nested JSON path, and +// `slddChunkContent` is the only thing that reads it. A writer that drifted would hand +// back a content object the reader answers `null` for, which SlddNode reports as +// `source-empty`: the dictionary opens, names no entries, and looks like a file the +// user had created and not filled in. SlddContent's own header records that this +// already happened once, when three readers each did the unwrap for themselves. +// * Two of the reader's warnings QUOTE the part name to the user. ScCatalog says why +// that matters for `SC_PART` and it is the same here: a message naming a different +// string from the one that was looked up is a lie no reader can detect. +// +// Published from the barrel for the reason `SC_PART`/`SC_PART_XML` are. A host owns the +// open document — the zip members it must preserve byte-for-byte, the raw JSON text it +// splices offsets into — and this package cannot do either of those for it, so the host +// navigates the same part and must name it identically. data-explorer-vscode does, in its +// writable-binary editor and in the two scanners that walk the JSON path over raw text. +// +// The tests deliberately keep spelling these strings out. A test that asked the constant +// what the constant is would pass for any value; the literals in the fixtures and the +// round-trip suites are what pin these to the bytes MATLAB actually writes. +/** + * The dictionary's data part, without an extension — the shared stem of both spellings + * below, and the reason `chunk0` appears in a zip member name and in a JSON key. + * + * The `0` is MATLAB's, not a placeholder this package fills in, and it does not become a + * loop once a dictionary gets big enough. R2027a was asked for two deliberately extreme + * dictionaries — 120 entries of `rand(120,120)` (36.8 MB as text, 15.8 MB zipped) and + * 20,000 scalar entries — in both on-disk formats, and all four wrote exactly one data + * part. Chunking by payload size or by entry count is not a behaviour this MATLAB has. + * + * That is measured for one release, though, so the reader stays conservative rather than + * asserting: a package that also held a `chunk1.xml` is read for chunk zero and carries + * the rest through untouched as pass-through metadata, so a future chunking scheme would + * make those entries invisible rather than lose them on the next save. + */ +export const DATA_PART = 'data/chunk0'; +/** + * The data part as a member of a compressed-binary (zip) dictionary. The `.xml` suffix is + * part of the member name, so this is the string to look a member up by, to exclude from + * the pass-through bag, and to name in a warning about it. + */ +export const DATA_PART_XML = `${DATA_PART}.xml`; +/** The parts bag of a deserialized dictionary — the first step of the JSON path. */ +export const TEXT_PARTS = '__MW_TEXT_PARTS__'; +/** + * The data part's key INSIDE that bag — the second step. It is the part name with + * MATLAB's `__MW_TEXT_PART__/` prefix on it, and note that the prefix already ends in a + * separator, so this is not a path join with `DATA_PART_XML`: the JSON key carries no + * `.xml`. + */ +export const DATA_PART_KEY = `__MW_TEXT_PART__/${DATA_PART}`; +/** + * The content wrapper inside the part — the third and last step, whose value is the object + * holding `entries`, `Dictionary References` and `AllowAccessBWS`. + * + * The wrapper is MATLAB's for EVERY text part, not just the data one: `arch.sldd` carries + * three parts (`data/chunk0`, `simulink/ArchitecturePart` and the System Composer + * interfaceDictionary) and each is wrapped in this same key. So the catalog reader + * (`SlddNode._parseSystemComposer`) unwraps its own part with this constant too, and the + * name it is combined with — `DATA_PART_KEY` or `__MW_TEXT_PART__/${SC_PART}` — is what + * says WHICH part is being unwrapped. + */ +export const TEXT_CONTENT = '__MW_TEXT_content'; +//# sourceMappingURL=SlddParts.js.map \ No newline at end of file diff --git a/dist/datamodel/parser/SlddParts.js.map b/dist/datamodel/parser/SlddParts.js.map new file mode 100644 index 0000000..271b31e --- /dev/null +++ b/dist/datamodel/parser/SlddParts.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SlddParts.js","sourceRoot":"","sources":["../../../src/datamodel/parser/SlddParts.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,qCAAqC;AACrC,EAAE;AACF,yFAAyF;AACzF,EAAE;AACF,yFAAyF;AACzF,0FAA0F;AAC1F,2FAA2F;AAC3F,uFAAuF;AACvF,iEAAiE;AACjE,EAAE;AACF,oFAAoF;AACpF,kBAAkB;AAClB,EAAE;AACF,oFAAoF;AACpF,2FAA2F;AAC3F,sFAAsF;AACtF,wFAAwF;AACxF,uFAAuF;AACvF,0FAA0F;AAC1F,2FAA2F;AAC3F,qFAAqF;AACrF,wFAAwF;AACxF,qFAAqF;AACrF,oFAAoF;AACpF,uFAAuF;AACvF,uFAAuF;AACvF,4EAA4E;AAC5E,EAAE;AACF,wFAAwF;AACxF,uFAAuF;AACvF,wFAAwF;AACxF,0FAA0F;AAC1F,wFAAwF;AACxF,EAAE;AACF,yFAAyF;AACzF,sFAAsF;AACtF,4EAA4E;AAE5E;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,aAAa,CAAC;AAEvC;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,SAAS,MAAM,CAAC;AAEhD,oFAAoF;AACpF,MAAM,CAAC,MAAM,UAAU,GAAG,mBAAmB,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,oBAAoB,SAAS,EAAE,CAAC;AAE7D;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,mBAAmB,CAAC"} \ No newline at end of file diff --git a/dist/datamodel/usage/UsageIndex.d.ts.map b/dist/datamodel/usage/UsageIndex.d.ts.map index 8dbe7b5..e33b814 100644 --- a/dist/datamodel/usage/UsageIndex.d.ts.map +++ b/dist/datamodel/usage/UsageIndex.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"UsageIndex.d.ts","sourceRoot":"","sources":["../../../src/datamodel/usage/UsageIndex.ts"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD,4DAA4D;AAC5D,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,MAAM,GAAG,KAAK,CAAC;AAEtD;;;;;;;;;GASG;AACH,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,WAAW,CAAC;CACpB;AAED,4FAA4F;AAC5F,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,kFAAkF;IAClF,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,uFAAuF;IACvF,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB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DD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,aAAa,CAmBhE;AAID;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,YAAY,EACnB,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,EACpC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,GAClC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CA8B5C;AAQD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,UAAU,CA2E9D"} \ No newline at end of file +{"version":3,"file":"UsageIndex.d.ts","sourceRoot":"","sources":["../../../src/datamodel/usage/UsageIndex.ts"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD,4DAA4D;AAC5D,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,MAAM,GAAG,KAAK,CAAC;AAEtD;;;;;;;;;GASG;AACH,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,WAAW,CAAC;CACpB;AAED,4FAA4F;AAC5F,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,kFAAkF;IAClF,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,uFAAuF;IACvF,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,+CAA+C;IAC/C,OAAO,EAAE,MAAM,EAAE,CAAC;IAIlB,WAAW,EAAE;QACX,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;QAClB,GAAG,EAAE,MAAM,CAA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EACnB,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,EACpC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,GAClC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CA8B5C;AAQD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,UAAU,CA2E9D"} \ No newline at end of file diff --git a/dist/datamodel/usage/UsageIndex.js b/dist/datamodel/usage/UsageIndex.js index 469f961..b0c3d9e 100644 --- a/dist/datamodel/usage/UsageIndex.js +++ b/dist/datamodel/usage/UsageIndex.js @@ -44,6 +44,14 @@ import { normalizeRefNames, readSlddContent, slddChunkContent } from '../parser/ import { parseModel } from '../parser/ModelParser.js'; import { parseMat } from '../parser/MatParser.js'; // --- Summarising ------------------------------------------------------------- +// Every `??` below defaults a field ParsedSlx declares as REQUIRED, so TypeScript says none +// of them can be taken and a coverage report lists them as branches never hit. They are kept +// deliberately, and the next person measuring coverage should leave them alone: these fields +// are what a PARSER made of a user's file, and the type is only as true as SlxParser is on +// every malformed `.slx` anyone ever opens. Deleting them to move that number up trades a +// summary short of one field for a TypeError that costs the whole file — the opposite of the +// policy on summarizeFiles below, where one unreadable file must not empty the answers for +// the rest of the folder. function modelSummary(parsed, srcId, filename) { const externals = parsed.externalDataSources ?? []; return { @@ -118,7 +126,6 @@ export function summarizeFiles(files) { matByName.set(refBasename(file.filename), matSummary(file.srcId, parseMat(file.bytes))); } else if (isSlddFile(file.filename)) { - matByName.delete(refBasename(file.filename)); // never both; last write wins per kind slddByName.set(refBasename(file.filename), slddSummary(file.srcId, readSlddContent(file.bytes))); } } diff --git a/dist/datamodel/usage/UsageIndex.js.map b/dist/datamodel/usage/UsageIndex.js.map index 51d387d..b55bec9 100644 --- a/dist/datamodel/usage/UsageIndex.js.map +++ b/dist/datamodel/usage/Us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AAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE;aAC3D,CAAC,CAAC;YACH,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC;QACpD,CAAC;IACH,CAAC;IAED,OAAO;QACL,MAAM;QACN,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,IAAI,EAAE;QACrE,QAAQ,EAAE,CAAC,UAAU,EAAE,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE;KAC9E,CAAC;AACJ,CAAC"} \ No newline at end of file +{"version":3,"file":"UsageIndex.js","sourceRoot":"","sources":["../../../src/datamodel/usage/UsageIndex.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,qCAAqC;AACrC,EAAE;AACF,0FAA0F;AAC1F,EAAE;AACF,0FAA0F;AAC1F,yFAAyF;AACzF,2FAA2F;AAC3F,sFAAsF;AACtF,2FAA2F;AAC3F,2FAA2F;AAC3F,wFAAwF;AACxF,kCAAkC;AAClC,EAAE;AACF,yFAAyF;AACzF,sEAAsE;AACtE,EAAE;AACF,mFAAmF;AACnF,4FAA4F;AAC5F,4FAA4F;AAC5F,yFAAyF;AACzF,wFAAwF;AACxF,4FAA4F;AAC5F,4FAA4F;AAC5F,4FAA4F;AAC5F,kFAAkF;AAClF,EAAE;AACF,2FAA2F;AAC3F,2FAA2F;AAC3F,2FAA2F;AAC3F,2FAA2F;AAC3F,0DAA0D;AAC1D,EAAE;AACF,wFAAwF;AACxF,uFAAuF;AACvF,0FAA0F;AAC1F,0FAA0F;AAC1F,sFAAsF;AACtF,+EAA+E;AAC/E,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ts +++ b/dist/index.d.ts @@ -1,4 +1,4 @@ -import './datamodel/node/NodeClassMap.js'; +import './datamodel/node/data/NodeClassMap.js'; export { default as DataModel } from './core/DataModel.js'; export type { AllNode, SourceMeta } from './core/DataModel.js'; export * as EventBus from './core/EventBus.js'; @@ -30,8 +30,9 @@ export type { ParsedMat, MatVariable } from './datamodel/parser/MatParser.js'; export type { ParseWarning, ParseWarningCode } from './datamodel/parser/ParseWarning.js'; export { ingest } from './core/ingest.js'; export type { IngestContent, IngestOptions } from './core/ingest.js'; -export { extOf, basenameOf, refBasename, modelNameOf, isModelFile, isSlddFile, isMatFile, isProjectFile, } from './datamodel/fileKinds.js'; +export { extOf, basenameOf, refBasename, modelNameOf, refModelExt, projectNameOf, isModelFile, isSlddFile, isMatFile, isProjectFile, } from './datamodel/fileKinds.js'; export { readSlddContent, slddChunkContent, isJsonTextBytes, normalizeRefNames } from './datamodel/parser/SlddContent.js'; +export { DATA_PART, DATA_PART_XML, DATA_PART_KEY, TEXT_PARTS, TEXT_CONTENT } from './datamodel/parser/SlddParts.js'; export { SC_PART, SC_PART_XML, SC_TYPE_TO_CLASSIFICATION, applyScEdits, catalogFromDefinitions, classificationOf, scRenameEdits, scanScJsonText, scanScXml, } from './datamodel/parser/ScCatalog.js'; export type { ScDefinition, ScNameSite, ScTextEdit, SystemComposerCatalog } from './datamodel/parser/ScCatalog.js'; export { buildUsageIndex, summarizeFiles, resolveName } from './datamodel/usage/UsageIndex.js'; diff --git a/dist/index.d.ts.map b/dist/index.d.ts.map index 364184d..5e2c1a7 100644 --- a/dist/index.d.ts.map +++ b/dist/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,kCAAkC,CAAC;AAG1C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC3D,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;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,QAAQ,EAAE,MAAM,8BAA8B,CAAC"} \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index 1d97602..deee5f2 100644 --- a/dist/index.js +++ b/dist/index.js @@ -3,7 +3,7 @@ // Milestone 1: re-exports the surface consumed by data-explorer-vscode today, // with no renaming. A curated REST-style facade lands in a later milestone. // Side-effecting node-class registration (must be imported for registry setup). -import './datamodel/node/NodeClassMap.js'; +import './datamodel/node/data/NodeClassMap.js'; // Runtime services (core). export { default as DataModel } from './core/DataModel.js'; export * as EventBus from './core/EventBus.js'; @@ -53,7 +53,17 @@ export { ingest } from './core/ingest.js'; // file was not, so `Params.SLDD` is found, opened, and then classified as nothing. These // are the tests this package's own readers dispatch on, so a host that shares them cannot // disagree with the package about what a file is. -export { extOf, basenameOf, refBasename, modelNameOf, isModelFile, isSlddFile, isMatFile, isProjectFile, } from './datamodel/fileKinds.js'; +// `refModelExt` is here for a sharper version of the same reason: it is not a question +// about a file this package was GIVEN, it is the guess this package MAKES when a model +// names a reference without an extension — and a host that indexes `parseModel`'s raw +// `modelReferences` has to make the identical guess to resolve an edge by filename. Both +// spelled `/\.mdl$/i.test(name) ? '.mdl' : '.slx'` independently, so the tree row and the +// graph edge agreed only by coincidence; now there is one of them. +// `projectNameOf` is the third of that kind, and the plainest: `parseProject` is public and +// takes a project NAME, not a filename, so every caller has to strip the `.prj` first — +// this package before it builds a project's node tree, a host before it builds its own +// index over the same parse. The result is a label a user reads on both sides. +export { extOf, basenameOf, refBasename, modelNameOf, refModelExt, projectNameOf, isModelFile, isSlddFile, isMatFile, isProjectFile, } from './datamodel/fileKinds.js'; // Reading a `.sldd` without a session: which of the two on-disk formats the bytes are, // where the content sits inside the result, and what a reference means. Public because a // consumer that scans dictionaries WITHOUT opening them — to index a folder, to resolve a @@ -63,6 +73,16 @@ export { extOf, basenameOf, refBasename, modelNameOf, isModelFile, isSlddFile, i // depending on which writer produced the file, so a reader that accepts only strings // resolves the sub-dictionaries of one flavour and none of the other. export { readSlddContent, slddChunkContent, isJsonTextBytes, normalizeRefNames } from './datamodel/parser/SlddContent.js'; +// WHERE those entries sit — the zip member name and the three-step JSON key path to the +// one part a dictionary keeps its entries in. Published for the same reason `SC_PART` is, +// and more sharply: a host that WRITES a dictionary owns the document this package cannot +// touch. It holds the open zip's other members and must preserve them byte-for-byte while +// replacing exactly one, and it splices byte offsets into the raw JSON text rather than +// re-serializing it — so it looks the part up, excludes it, and re-inserts it under names +// that have to be identical to these. Drift is not a throw at either end: the wrong +// exclusion ships a zip carrying the entries twice, and the wrong JSON key hands back +// content this package reads as `null` and reports as an empty dictionary. +export { DATA_PART, DATA_PART_XML, DATA_PART_KEY, TEXT_PARTS, TEXT_CONTENT } from './datamodel/parser/SlddParts.js'; // The System Composer catalog: what says a `Simulink.Bus` is a struct type rather than // a data interface. It is a SEPARATE part of the dictionary that references its entries // BY NAME, so a host that renames a catalogued entry has to carry the rename into that diff --git a/dist/index.js.map b/dist/index.js.map index 4d1d23d..4902cb6 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,6CAA6C;AAC7C,8EAA8E;AAC9E,4EAA4E;AAE5E,gFAAgF;AAChF,OAAO,kCAAkC,CAAC;AAE1C,2BAA2B;AAC3B,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,KAAK,QAAQ,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,KAAK,WAAW,MAAM,uBAAuB,CAAC;AAErD,iEAAiE;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAgBpD,uFAAuF;AACvF,qFAAqF;AACrF,wFAAwF;AACxF,sFAAsF;AACtF,wFAAwF;AACxF,8CAA8C;AAC9C,OAAO,EAAE,aAAa,E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FAAqF;AACrF,sEAAsE;AACtE,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAE1H,uFAAuF;AACvF,wFAAwF;AACxF,uFAAuF;AACvF,yFAAyF;AACzF,oFAAoF;AACpF,sFAAsF;AACtF,wFAAwF;AACxF,yFAAyF;AACzF,kFAAkF;AAClF,OAAO,EACL,OAAO,EACP,WAAW,EACX,yBAAyB,EACzB,YAAY,EACZ,sBAAsB,EACtB,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,SAAS,GACV,MAAM,iCAAiC,CAAC;AAGzC,qFAAqF;AACrF,wFAAwF;AACxF,wFAAwF;AACxF,uFAAuF;AACvF,wFAAwF;AACxF,yFAAyF;AACzF,cAAc;AACd,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAW/F,kFAAkF;AAClF,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGtC,qDAAqD;AACrD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,6CAA6C;AAC7C,8EAA8E;AAC9E,4EAA4E;AAE5E,gFAAgF;AAChF,OAAO,uCAAuC,CAAC;AAE/C,2BAA2B;AAC3B,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,qBAAqB,CAAC;AA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d,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAW/F,kFAAkF;AAClF,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGtC,qDAAqD;AACrD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC"} \ No newline at end of file diff --git a/dist/node/index.d.ts b/dist/node/index.d.ts index a5358c2..652657c 100644 --- a/dist/node/index.d.ts +++ b/dist/node/index.d.ts @@ -1,4 +1,4 @@ -import '../datamodel/node/NodeClassMap.js'; +import '../datamodel/node/data/NodeClassMap.js'; import { createSession as _createSession } from '../core/DataModel.js'; import type { Session } from '../core/DataModel.js'; import type { ISourceNode } from '../core/NodeInterfaces.js'; diff --git a/dist/node/index.d.ts.map b/dist/node/index.d.ts.map index d27d7c6..837928b 100644 --- a/dist/node/index.d.ts.map +++ b/dist/node/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAWA,OAAO,mCAAmC,CAAC;AAC3C,OAAO,EAAE,aAAa,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEvE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAKlF,eAAO,MAAM,aAAa,uBAAiB,CAAC;AAE5C,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW,CAOxE;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,EAAE,GAAG,WAAW,EAAE,CAiBpG"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAWA,OAAO,wCAAwC,CAAC;AAChD,OAAO,EAAE,aAAa,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEvE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAKlF,eAAO,MAAM,aAAa,uBAAiB,CAAC;AAE5C,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW,CAOxE;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,EAAE,GAAG,WAAW,EAAE,CAiBpG"} \ No newline at end of file diff --git a/dist/node/index.js b/dist/node/index.js index 21a5bf1..9466c0e 100644 --- a/dist/node/index.js +++ b/dist/node/index.js @@ -8,7 +8,7 @@ import { readFileSync, statSync, readdirSync } from 'node:fs'; import { basename, join, extname } from 'node:path'; // Side-effect import: registers node classes so SectionNode.addEntry and // NodeRegistry value-parsing work when consumers import ONLY from this subpath. -import '../datamodel/node/NodeClassMap.js'; +import '../datamodel/node/data/NodeClassMap.js'; import { createSession as _createSession } from '../core/DataModel.js'; import { ingest } from '../core/ingest.js'; import { reasonOf } from '../datamodel/parser/ParseWarning.js'; diff --git a/dist/node/index.js.map b/dist/node/index.js.map index a6fa438..04a766d 100644 --- a/dist/node/index.js.map +++ b/dist/node/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,qCAAqC;AACrC,EAAE;AACF,6EAA6E;AAC7E,iFAAiF;AACjF,qFAAqF;AAErF,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpD,yEAAyE;AACzE,gFAAgF;AAChF,OAAO,mCAAmC,CAAC;AAC3C,OAAO,EAAE,aAAa,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAG3C,OAAO,EAAE,QAAQ,EAAqB,MAAM,qCAAqC,CAAC;AAElF,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAErE,kFAAkF;AAClF,MAAM,CAAC,MAAM,aAAa,GAAG,cAAc,CAAC;AAE5C,MAAM,UAAU,YAAY,CAAC,OAAgB,EAAE,IAAY;IACzD,MAAM,GAAG,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IAC/B,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC5B,OAAO,MAAM,CAAC,OAAO,EAAE,GAAG,EAAE;QAC1B,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC;QACxB,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE;KAC9E,CAAC,CAAC;A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;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,8EAA8E;YAC9E,2CAA2C;YAC3C,OAAO,EAAE,IAAI,CAAC;gBACZ,IAAI,EAAE,mBAAmB;gBACzB,OAAO,EAAE,GAAG,IAAI,yCAAyC,QAAQ,CAAC,GAAG,CAAC,GAAG;gBACzE,IAAI,EAAE,IAAI;aACX,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"} \ No newline at end of file diff --git a/package.json b/package.json index 417d2bd..f4960de 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "data-explorer-core", - "version": "1.12.0", + "version": "1.13.0", "description": "Parser, data model, and node schema for Simulink data-dictionary, model, MAT-file, and project files. Presentation-independent; embeddable in-process.", "license": "BSD-3-Clause", "type": "module", diff --git a/src/core/DataModel.ts b/src/core/DataModel.ts index 1b2f70c..881c309 100644 --- a/src/core/DataModel.ts +++ b/src/core/DataModel.ts @@ -1,6 +1,6 @@ // Copyright 2026 The MathWorks, Inc. -import { defaultBus, createEventBus, type EventBusInstance } from './EventBus.js'; +import { defaultBus, createEventBus } from './EventBus.js'; import { createUndoManager } from './UndoManager.js'; import SlddNode from '../datamodel/node/container/SlddNode.js'; import ModelNode from '../datamodel/node/container/ModelNode.js'; @@ -15,7 +15,7 @@ import { serializeBinarySldd } from '../datamodel/parser/BinarySlddSerializer.js // The name reductions and the expression reading, from the leaf modules that hold the // single copy of each. This file used to spell all three itself; the usage index needs // the same three, and a rule stated twice is a rule that drifts (see fileKinds). -import { basenameOf, isMatFile, isSlddFile, modelNameOf, refBasename } from '../datamodel/fileKinds.js'; +import { basenameOf, isMatFile, isSlddFile, modelNameOf, projectNameOf, refBasename } from '../datamodel/fileKinds.js'; import { identifiersIn } from '../datamodel/expressions.js'; import { blockKey, blockLabel, joinBlockPath } from '../datamodel/blockIdentity.js'; import { normalizeRefNames } from '../datamodel/parser/SlddContent.js'; @@ -26,285 +26,32 @@ import type { ParseWarning } from '../datamodel/parser/ParseWarning.js'; // a field of NodeUsage breaks the one line that installs the resolver — see UsageResolver. import type { RowData, UsageResolver } from '../datamodel/node/BaseNode.js'; -export type { IAllNode as AllNode, SourceMeta }; - -export interface CreateSessionOptions { - bus?: EventBusInstance; -} - -/** - * One source's content, ready to be written back over the file it came from. - * - * Discriminated on `kind` rather than left as `ArrayBuffer | string`, because this is - * a machine contract in the same register as SourceDTO: a caller about to write a - * file must not have to `typeof` the answer to find out which of the two it got, and - * a `typeof` check is exactly the kind of test that stops being correct the moment a - * third flavour appears. `bytes` is a Uint8Array rather than an ArrayBuffer because - * that is what a filesystem write actually accepts. - * - * `sourceFormat` is the source node's OWN format string — the same vocabulary - * SourceDTO.sourceFormat publishes ('json' for a textual `.sldd`, 'xml' for a - * compressed-binary one) — so a consumer can correlate the two without a mapping - * table of its own. - */ -export type SerializedSource = - | { kind: 'binary'; sourceFormat: string; bytes: Uint8Array } - | { kind: 'text'; sourceFormat: string; text: string }; - -/** - * What a link target resolved to — see session.resolveLink(). - * - * Discriminated on `status` for the reason SerializedSource is discriminated on `kind`: - * this is a machine contract, and the interesting part of it is the FAILURES. A bare - * `INode | null` would fold three different situations into one answer and leave the - * host unable to tell them apart, which matters because they call for different - * behaviour: - * - * - 'resolved' — a node to go to. - * - 'not-found' — the file IS open and holds nothing by that name. Report it; there - * is nothing to offer the user, and the link is probably stale or the target was - * built from an expression this could not read (see resolveLink). - * - 'source-not-open' — the file is not open in this session. This is the one a host - * can act on: "open mdlparams.sldd to follow this" is a genuinely better answer - * than a dead link, and it is only possible because the status carries `sourceId` - * AND `name`, so the host can re-ask once the file is open. - * - 'empty' — the caller passed nothing at all (no target, or whitespace). Separated - * from the other two because it is a bug in the CALLER's plumbing rather than a - * fact about the session, and answering it with 'source-not-open' for the source - * named '' would send a host off to open a file with no name. - * - * Never throws, for the reason serializeSource returns null rather than throwing: a - * consumer walking every link in a table must not need a try/catch per row. - * - * `nodes` is every candidate in document order and `node` is `nodes[0]`. Both are - * present on purpose: a `.sldd` target names an ENTRY, not a node id, and a dictionary - * can hold that name in two sections at once (a design entry and its derived - * counterpart). A host with nowhere to put a choice follows `node` and is right for - * the ordinary case; a host that can offer a picker has the alternatives without - * having to re-run the search. Being ambiguous is therefore not a separate status — - * it would make every caller handle a fourth case to learn something the list already - * says. - * - * Plain data apart from the nodes themselves. The nodes are LIVE INodes, as - * findNodes() hands back live nodes and for the same reason: an in-process host edits - * what it followed, and toDTO is the projection applied at the out-of-process edge by - * the caller that needs it (see src/core/dto.ts). - */ -export type LinkResolution = - | { status: 'resolved'; sourceId: string; node: INode; nodes: INode[] } - | { status: 'not-found'; sourceId: string; name: string } - | { status: 'source-not-open'; sourceId: string; name: string | null } - | { status: 'empty' }; - -/** - * One place a definition is referenced — see session.findUsages(). - * - * Plain data, with NO live node on it, which is the opposite of the choice - * LinkResolution makes and deliberate. This is what fills a `UsedBy` cell: it goes - * into a RowData, and a RowData is a plain-data shape that hosts pass through - * structured clone or JSON to a webview or an RPC client (the same reason ParseWarning - * carries a reason string instead of an Error). A live node on this object would make - * the whole result unclonable for the consumer it exists to serve. A caller that wants - * the block node itself passes `linkTarget` straight back to resolveLink(). - * - * `linkTarget` is `blockKey@modelSrcId` — the SAME grammar ModelBlockNode writes for - * the forward direction, so the reverse link needs no second target format and no - * second resolver. It round-trips: resolveLink(usage.linkTarget) is the block node. - * - * No display text is pre-baked here. What a `UsedBy` cell should READ is a - * presentation decision ("Const (Constant)" or "mdlcases.mdl: Const" or a count), and - * this package is consumed by a VS Code extension, a CLI and an RPC server that will - * not agree on it. The four facts a label could want are all here separately. - */ -export interface NodeUsage { - /** - * What the block READS as — 'Const', or `` for one whose label the model does - * not give (blockIdentity.blockLabel). Display text, and not an identity: two blocks of - * one model can share it. `linkTarget` is what tells them apart. - */ - blockName: string; - /** - * WHERE the block is — `Controller/Gain`, and just the label for one in the root - * system (blockIdentity.joinBlockPath). Model-relative, because the model is already - * named by `modelSrcId`. - * - * What makes two usages that read alike tell-apart-able for a PERSON: a dictionary - * entry used by four blocks all named `Gain` renders as one word four times, each link - * correctly reaching a different block, with nothing on screen to say which. Display - * text like `blockName`, not an identity — `linkTarget` remains the identity. - */ - blockPath: string; - /** The block's type — 'Constant'. Empty when the model did not record one. */ - blockType: string; - /** The block parameter that holds the reference — 'Value', 'Denominator'. */ - paramProperty: string; - /** The parameter's value VERBATIM, which is an expression as often as a bare name: '[tau 1]'. */ - paramValue: string; - /** The srcId of the model the block is in, as getDataSourceIds() reports it. */ - modelSrcId: string; - /** - * A target resolveLink() turns back into the block node — `blockKey@modelSrcId`, the key - * being the block's SID where the file records one (blockIdentity.blockKey). - */ - linkTarget: string; -} - -/** - * One sub-dictionary a `.sldd` references, and whether this session can reach it — - * see session.resolveDictionaryReferences(). - * - * `name` is what the FILE records (a bare file name, e.g. 'common.sldd'), normalized to - * a string: the node keeps these as `unknown[]` because the two `.sldd` readers put - * different shapes in it, and every consumer would otherwise repeat the same narrowing. - */ -export interface DictionaryReference { - /** The sub-dictionary as the referencing file names it. */ - name: string; - /** The same answer resolveLink() gives for that name — a root node, or why not. */ - resolution: LinkResolution; -} - -/** - * What session.findNodes() matches on. - * - * `name` and `value` are searches, so a string is a SUBSTRING test — what a search - * box does. `className` and `kind` are filters over closed vocabularies a host holds - * verbatim (see kindForClass), so a string there is a WHOLE-string test: 'Simulink.Bus' - * must not also answer for Simulink.BusElement. Neither takes a RegExp today; widening - * either to `string | RegExp` later is a backward-compatible change. - * - * `sourceId`, `caseSensitive` and `limit` are modifiers rather than criteria: they - * shape an answer, they do not select one. A query holding only modifiers therefore - * has no criteria at all — see findNodes for what that means. - */ -export interface FindNodesQuery { - /** Substring of the node's own name, or a RegExp tested against it. */ - name?: string | RegExp; - /** The Class column, matched whole — e.g. 'Simulink.Parameter'. */ - className?: string; - /** The Kind column, matched whole — e.g. 'Bus Element'. */ - kind?: string; - /** Substring of the node's rendered value, or a RegExp tested against it. */ - value?: string | RegExp; - /** Restrict the search to one open source. Omitted means every open source. */ - sourceId?: string; - /** Applies to STRING criteria only; a RegExp always keeps its own flags. Default false. */ - caseSensitive?: boolean; - /** Cap on the number of matches. Omitted means uncapped. */ - limit?: number; -} - -// One query field, reduced to a test over a node. Compiled once per query rather -// than re-decided per node, so the per-node cost is a call and a string compare -// instead of a walk back through the query object. -type NodeCriterion = (node: INode) => boolean; - -// Whether a query field was actually asked about. -// -// `undefined` is the field a host left out. `''` is the field it filled in from an -// empty search box, and it is treated as ALSO not asked: a substring test against '' -// passes for every node, so honouring it would answer "the user has typed nothing" -// with every node in every open file — the largest allocation the session can make -// and the one nobody asked for. A caller that really means "renders as empty" says -// so with a pattern, `/^$/`, which this leaves alone. A RegExp is never `''`, so an -// explicit `new RegExp('')` stays a match-all: a pattern object is a choice, an -// empty string is a blank. -function isAsked(field: string | RegExp | undefined): boolean { - return field !== undefined && field !== ''; -} - -// A criterion over one piece of a node's text. -// -// The read is defensive. Name, class, kind and value are all getters over parsed -// content, and a host may hand the session a tree this package did not build -// (addParsedSource exists for exactly that), so one node that throws on read must not -// take a whole search down — the same rule readPropertyValue applies on the edit path. -// -// A failed read is NOT the empty string: a criterion is a claim about a field, and a -// field that cannot be read is a claim that cannot be checked, so it is false. Folding -// it to '' instead would let `{ value: /^$/ }` — a caller asking specifically which -// nodes render no value — answer with a node whose value might render as anything, if -// only it could be read. -function textCriterion(read: (node: INode) => string, test: (text: string) => boolean): NodeCriterion { - return (node) => { - let text: string; - try { - text = read(node); - } catch { - return false; - } - return typeof text === 'string' && test(text); - }; -} - -// A caller's string or RegExp as a test over one piece of text. `whole` picks between -// the two kinds of string criterion described on FindNodesQuery. -function compileTextTest( - pattern: string | RegExp, - caseSensitive: boolean, - whole: boolean, -): (text: string) => boolean { - if (typeof pattern !== 'string') { - // A RegExp is honoured exactly as written: `caseSensitive` never adds an `i` flag - // and never takes one away, because the caller already made that choice and a - // pattern that behaves differently inside this call than it did in the host's own - // test is worse than either default. - // - // The one rewrite is `g`/`y`, and it is not optional. RegExp.prototype.test on a - // global or sticky pattern advances lastIndex and resumes from there next call, - // so reusing one caller-supplied pattern across a whole index would match roughly - // every SECOND node — and because the state lives in the caller's object, a host - // retyping the same search would watch its own results flicker. Cloned rather - // than reset per node so the caller's own object is never mutated, and once per - // query rather than once per node. - if (pattern.global || pattern.sticky) { - const stateless = new RegExp(pattern.source, pattern.flags.replace(/[gy]/g, '')); - return (text) => stateless.test(text); - } - return (text) => pattern.test(text); - } - if (caseSensitive) { - return whole ? (text) => text === pattern : (text) => text.includes(pattern); - } - // Folded once here, per query, rather than per node per criterion. - const folded = pattern.toLowerCase(); - return whole ? (text) => text.toLowerCase() === folded : (text) => text.toLowerCase().includes(folded); -} - -// The criteria a query asks for, in the order they should be evaluated: the two -// whole-string compares first, then the name substring, and the VALUE last — -// displayValue formats its content on read (a large matrix or cell renders through -// the display-convention machinery), so it is the one field worth not reading for a -// node another criterion has already rejected. -function compileCriteria(query: FindNodesQuery): NodeCriterion[] { - const caseSensitive = query.caseSensitive === true; - const criteria: NodeCriterion[] = []; - if (isAsked(query.className)) { - criteria.push(textCriterion((node) => node.className, compileTextTest(query.className!, caseSensitive, true))); - } - if (isAsked(query.kind)) { - criteria.push(textCriterion((node) => node.kind, compileTextTest(query.kind!, caseSensitive, true))); - } - if (isAsked(query.name)) { - // The node's own name — the identifier its id is built from, and the same string - // findNodeById resolves against — not its rendered displayName. The two differ - // only for positional elements, whose label embeds the PARENT's name ('Array(1)' - // for the node named '1'), so matching the label as well would make a search for - // `Array` return every element of every array and bury the variable in its own - // contents. A host that wants label matching has displayName one field away. - criteria.push(textCriterion((node) => node.name, compileTextTest(query.name!, caseSensitive, false))); - } - if (isAsked(query.value)) { - // Matched against displayValue, which is the string a host actually shows: it is - // what PropValue.readValue returns for the Value column and what BaseNode.toRow - // falls back to, so a user searches over exactly what a user can read. A node - // with no value renders '' and so fails every non-empty pattern, which is what - // keeps a value query from sweeping up the sections and the structure-only - // entries the way a listing would. - criteria.push(textCriterion((node) => node.displayValue, compileTextTest(query.value!, caseSensitive, false))); - } - return criteria; -} +// The session's own vocabulary — what a caller passes in and what these functions hand +// back — and the compiler that turns one of those types, FindNodesQuery, into the tests +// findNodes runs. Both used to be written out in this file, above createSession; neither +// is session code, and each now has a module of its own that says why (see the headers of +// `sessionTypes.ts` and `findQuery.ts`). +import { compileCriteria } from './findQuery.js'; +import type { + CreateSessionOptions, + DictionaryReference, + FindNodesQuery, + LinkResolution, + NodeUsage, + SerializedSource, +} from './sessionTypes.js'; + +// Every type this file used to declare is still importable FROM this file, at the same +// path, because that is the path its consumers already name: `src/index.ts` publishes +// them from here onto the package barrel, and `datamodel/usage/UsageIndex.ts` reaches up +// for `NodeUsage` — the one upward edge from `datamodel/` into `core/` that +// `test/moduleBoundaries.test.ts` allows, by name and on condition that it stays +// type-only. So the declarations moved and not one importer changed, which is the only +// reason the move was free. Do not "clean this up" by pointing the barrel at +// `sessionTypes.js` instead: `AllNode` and `SourceMeta` are aliases published here, the +// barrel is a released surface, and that test asserts the shape of the UsageIndex edge. +export type { AllNode, SourceMeta } from './sessionTypes.js'; +export type { CreateSessionOptions, DictionaryReference, FindNodesQuery, LinkResolution, NodeUsage, SerializedSource }; // A link target split into the entry name it asks for and the source it asks in. // @@ -659,8 +406,11 @@ function addProjectSource( // filename for its fallback, hence the strip — note ProjectNode.fromParsed labels // itself from the basename and never reads parsed.name, so the stripped form only // shows up if a host calls parseProject itself. - const basename = ((meta && meta.path) || srcId).split(/[\\/]/).pop() || srcId; - const parsed = parseProject(files, basename.replace(/\.prj$/i, '')); + // No `|| srcId` guard on the reduction: `basenameOf` returns the whole string when it + // finds no separator to cut at, so it is falsy only for input that was already empty — + // in which case srcId is the empty string too and the fallback returned it unchanged. + const basename = basenameOf((meta && meta.path) || srcId); + const parsed = parseProject(files, projectNameOf(basename)); const projectNode = ProjectNode.fromParsed(parsed, basename); return registerSource(srcId, projectNode, meta, parsed.warnings); } @@ -845,8 +595,8 @@ function findNodeById(nodeId: string): INode | null { * already precise and cheap through getDataSource(id).flatten(). * * - A RegExp keeps its own flags; `caseSensitive` governs string criteria only. See - * compileTextTest, which also explains the one rewrite (`g`/`y`) and why it is - * forced. + * compileTextTest in findQuery.ts, which also explains the one rewrite (`g`/`y`) and + * why it is forced. * * - Results come back in the order the session indexed them: per source, the * pre-order walk indexSource performs (parent before child, siblings in tree @@ -1398,7 +1148,7 @@ function collectUsages(definitions: INode[]): Map { // package did not build, and a host that supplies block-parameter usages in the // documented shape should be searchable. The reads below are defensive for the same // reason — one hostile source must not take the whole scan down, the rule - // textCriterion applies on the search path. + // findQuery.ts's textCriterion applies on the search path. const declared = (source as unknown as { blockParamUsages?: unknown }).blockParamUsages; if (!Array.isArray(declared)) { continue; diff --git a/src/core/findQuery.ts b/src/core/findQuery.ts new file mode 100644 index 0000000..6d64f6f --- /dev/null +++ b/src/core/findQuery.ts @@ -0,0 +1,144 @@ +// src/core/findQuery.ts +// Copyright 2026 The MathWorks, Inc. +// +// A FindNodesQuery, compiled into the per-node tests that answer it. +// +// This is the whole of the "decide what matching MEANS" half of session.findNodes(), +// and it is separate from the session because it needs nothing from one: it reads the +// caller's query object and a node's own getters, holds no state between calls, and +// touches neither the node index, the open sources nor the event bus. Compiling a query +// and running it over a session are two different jobs, and only the second one is +// session bookkeeping — so the corners that a query API's behaviour actually lives in +// (an empty search box, a caller's `/g` pattern, a getter that throws) can be read, +// reviewed and reasoned about here without 1900 lines of session around them. +// +// What stayed in `core/DataModel.ts`, so that this file is not mistaken for the whole +// search: session.findNodes() owns everything that needs the session — the walk over +// the flat node index, the `sourceId` scope (compared by walking to the owning root), +// the `limit`, and the ordering guarantee. It also owns the two DECISIONS that read +// like they might be here and are not: +// +// * criteria combine with AND — that is the inner loop in findNodes, which rejects a +// node at the first criterion that says no; +// * a query with no criteria matches NOTHING — compileCriteria simply returns an +// empty array for such a query, and findNodes is what turns an empty array into an +// empty answer rather than into "everything passes an AND over nothing". +// +// Both are documented on findNodes, which is where a host reads them. Changing either +// one is a change to findNodes, not to this file. + +import type { INode } from './NodeInterfaces.js'; +import type { FindNodesQuery } from './sessionTypes.js'; + +// One query field, reduced to a test over a node. Compiled once per query rather +// than re-decided per node, so the per-node cost is a call and a string compare +// instead of a walk back through the query object. +export type NodeCriterion = (node: INode) => boolean; + +// Whether a query field was actually asked about. +// +// `undefined` is the field a host left out. `''` is the field it filled in from an +// empty search box, and it is treated as ALSO not asked: a substring test against '' +// passes for every node, so honouring it would answer "the user has typed nothing" +// with every node in every open file — the largest allocation the session can make +// and the one nobody asked for. A caller that really means "renders as empty" says +// so with a pattern, `/^$/`, which this leaves alone. A RegExp is never `''`, so an +// explicit `new RegExp('')` stays a match-all: a pattern object is a choice, an +// empty string is a blank. +function isAsked(field: string | RegExp | undefined): boolean { + return field !== undefined && field !== ''; +} + +// A criterion over one piece of a node's text. +// +// The read is defensive. Name, class, kind and value are all getters over parsed +// content, and a host may hand the session a tree this package did not build +// (session.addParsedSource() exists for exactly that), so one node that throws on read +// must not take a whole search down — the same rule readPropertyValue applies on the +// edit path over in DataModel.ts. +// +// A failed read is NOT the empty string: a criterion is a claim about a field, and a +// field that cannot be read is a claim that cannot be checked, so it is false. Folding +// it to '' instead would let `{ value: /^$/ }` — a caller asking specifically which +// nodes render no value — answer with a node whose value might render as anything, if +// only it could be read. +function textCriterion(read: (node: INode) => string, test: (text: string) => boolean): NodeCriterion { + return (node) => { + let text: string; + try { + text = read(node); + } catch { + return false; + } + return typeof text === 'string' && test(text); + }; +} + +// A caller's string or RegExp as a test over one piece of text. `whole` picks between +// the two kinds of string criterion described on FindNodesQuery. +function compileTextTest( + pattern: string | RegExp, + caseSensitive: boolean, + whole: boolean, +): (text: string) => boolean { + if (typeof pattern !== 'string') { + // A RegExp is honoured exactly as written: `caseSensitive` never adds an `i` flag + // and never takes one away, because the caller already made that choice and a + // pattern that behaves differently inside this call than it did in the host's own + // test is worse than either default. + // + // The one rewrite is `g`/`y`, and it is not optional. RegExp.prototype.test on a + // global or sticky pattern advances lastIndex and resumes from there next call, + // so reusing one caller-supplied pattern across a whole index would match roughly + // every SECOND node — and because the state lives in the caller's object, a host + // retyping the same search would watch its own results flicker. Cloned rather + // than reset per node so the caller's own object is never mutated, and once per + // query rather than once per node. + if (pattern.global || pattern.sticky) { + const stateless = new RegExp(pattern.source, pattern.flags.replace(/[gy]/g, '')); + return (text) => stateless.test(text); + } + return (text) => pattern.test(text); + } + if (caseSensitive) { + return whole ? (text) => text === pattern : (text) => text.includes(pattern); + } + // Folded once here, per query, rather than per node per criterion. + const folded = pattern.toLowerCase(); + return whole ? (text) => text.toLowerCase() === folded : (text) => text.toLowerCase().includes(folded); +} + +// The criteria a query asks for, in the order they should be evaluated: the two +// whole-string compares first, then the name substring, and the VALUE last — +// displayValue formats its content on read (a large matrix or cell renders through +// the display-convention machinery), so it is the one field worth not reading for a +// node another criterion has already rejected. +export function compileCriteria(query: FindNodesQuery): NodeCriterion[] { + const caseSensitive = query.caseSensitive === true; + const criteria: NodeCriterion[] = []; + if (isAsked(query.className)) { + criteria.push(textCriterion((node) => node.className, compileTextTest(query.className!, caseSensitive, true))); + } + if (isAsked(query.kind)) { + criteria.push(textCriterion((node) => node.kind, compileTextTest(query.kind!, caseSensitive, true))); + } + if (isAsked(query.name)) { + // The node's own name — the identifier its id is built from, and the same string + // findNodeById resolves against — not its rendered displayName. The two differ + // only for positional elements, whose label embeds the PARENT's name ('Array(1)' + // for the node named '1'), so matching the label as well would make a search for + // `Array` return every element of every array and bury the variable in its own + // contents. A host that wants label matching has displayName one field away. + criteria.push(textCriterion((node) => node.name, compileTextTest(query.name!, caseSensitive, false))); + } + if (isAsked(query.value)) { + // Matched against displayValue, which is the string a host actually shows: it is + // what PropValue.readValue returns for the Value column and what BaseNode.toRow + // falls back to, so a user searches over exactly what a user can read. A node + // with no value renders '' and so fails every non-empty pattern, which is what + // keeps a value query from sweeping up the sections and the structure-only + // entries the way a listing would. + criteria.push(textCriterion((node) => node.displayValue, compileTextTest(query.value!, caseSensitive, false))); + } + return criteria; +} diff --git a/src/core/sessionTypes.ts b/src/core/sessionTypes.ts new file mode 100644 index 0000000..2756440 --- /dev/null +++ b/src/core/sessionTypes.ts @@ -0,0 +1,204 @@ +// src/core/sessionTypes.ts +// Copyright 2026 The MathWorks, Inc. +// +// The vocabulary a session speaks: what a caller hands `createSession` and its methods, +// and what those methods hand back. +// +// Every declaration here was written inside `core/DataModel.ts`, above the 1900-line +// `createSession` that implements them. Nothing about them is session code — they are +// the CONTRACT, the part a consumer names in its own signatures, and the part it reads +// to find out what an answer means. Keeping them in the implementing file made the one +// question a host actually asks ("what does resolveLink give me back, and what are the +// failure arms for?") a question you had to open the session to answer. This file is +// that answer on its own, and it is the file to read first. +// +// Two things a maintainer would otherwise rediscover: +// +// * `core/DataModel.ts` still re-exports every name here, from the same path it +// always did, so NO importer changed — not `src/index.ts`, which publishes them onto +// the package barrel, not `src/node/index.ts`, and above all not +// `datamodel/usage/UsageIndex.ts`, which reaches UP for `NodeUsage` and is the one +// upward edge `test/moduleBoundaries.test.ts` allows by name. Import from here in NEW +// core code if you like; do not go rewriting the existing importers, because that +// test asserts the shape of that one edge and the barrel is a published surface. +// +// * This file holds types and nothing else, deliberately. Every import of it is +// therefore erased by tsc, which is what keeps it free of the layering questions +// `test/moduleBoundaries.test.ts` asks: an erased edge pulls no bytes into a +// consumer's bundle and creates no load order to get wrong. Putting a `const`, a +// default or a helper function in here would quietly end that. +// +// `Session` did not come with them: it is `ReturnType`, so it is +// derived from the implementation and cannot live apart from it. + +import type { EventBusInstance } from './EventBus.js'; +import type { INode, IAllNode, SourceMeta } from './NodeInterfaces.js'; + +export type { IAllNode as AllNode, SourceMeta }; + +export interface CreateSessionOptions { + bus?: EventBusInstance; +} + +/** + * One source's content, ready to be written back over the file it came from. + * + * Discriminated on `kind` rather than left as `ArrayBuffer | string`, because this is + * a machine contract in the same register as SourceDTO: a caller about to write a + * file must not have to `typeof` the answer to find out which of the two it got, and + * a `typeof` check is exactly the kind of test that stops being correct the moment a + * third flavour appears. `bytes` is a Uint8Array rather than an ArrayBuffer because + * that is what a filesystem write actually accepts. + * + * `sourceFormat` is the source node's OWN format string — the same vocabulary + * SourceDTO.sourceFormat publishes ('json' for a textual `.sldd`, 'xml' for a + * compressed-binary one) — so a consumer can correlate the two without a mapping + * table of its own. + */ +export type SerializedSource = + | { kind: 'binary'; sourceFormat: string; bytes: Uint8Array } + | { kind: 'text'; sourceFormat: string; text: string }; + +/** + * What a link target resolved to — see session.resolveLink(). + * + * Discriminated on `status` for the reason SerializedSource is discriminated on `kind`: + * this is a machine contract, and the interesting part of it is the FAILURES. A bare + * `INode | null` would fold three different situations into one answer and leave the + * host unable to tell them apart, which matters because they call for different + * behaviour: + * + * - 'resolved' — a node to go to. + * - 'not-found' — the file IS open and holds nothing by that name. Report it; there + * is nothing to offer the user, and the link is probably stale or the target was + * built from an expression this could not read (see session.resolveLink()). + * - 'source-not-open' — the file is not open in this session. This is the one a host + * can act on: "open mdlparams.sldd to follow this" is a genuinely better answer + * than a dead link, and it is only possible because the status carries `sourceId` + * AND `name`, so the host can re-ask once the file is open. + * - 'empty' — the caller passed nothing at all (no target, or whitespace). Separated + * from the other two because it is a bug in the CALLER's plumbing rather than a + * fact about the session, and answering it with 'source-not-open' for the source + * named '' would send a host off to open a file with no name. + * + * Never throws, for the reason session.serializeSource() returns null rather than + * throwing: a consumer walking every link in a table must not need a try/catch per row. + * + * `nodes` is every candidate in document order and `node` is `nodes[0]`. Both are + * present on purpose: a `.sldd` target names an ENTRY, not a node id, and a dictionary + * can hold that name in two sections at once (a design entry and its derived + * counterpart). A host with nowhere to put a choice follows `node` and is right for + * the ordinary case; a host that can offer a picker has the alternatives without + * having to re-run the search. Being ambiguous is therefore not a separate status — + * it would make every caller handle a fourth case to learn something the list already + * says. + * + * Plain data apart from the nodes themselves. The nodes are LIVE INodes, as + * session.findNodes() hands back live nodes and for the same reason: an in-process host + * edits what it followed, and toDTO is the projection applied at the out-of-process edge + * by the caller that needs it (see src/core/dto.ts). + */ +export type LinkResolution = + | { status: 'resolved'; sourceId: string; node: INode; nodes: INode[] } + | { status: 'not-found'; sourceId: string; name: string } + | { status: 'source-not-open'; sourceId: string; name: string | null } + | { status: 'empty' }; + +/** + * One place a definition is referenced — see session.findUsages(). + * + * Plain data, with NO live node on it, which is the opposite of the choice + * LinkResolution makes and deliberate. This is what fills a `UsedBy` cell: it goes + * into a RowData, and a RowData is a plain-data shape that hosts pass through + * structured clone or JSON to a webview or an RPC client (the same reason ParseWarning + * carries a reason string instead of an Error). A live node on this object would make + * the whole result unclonable for the consumer it exists to serve. A caller that wants + * the block node itself passes `linkTarget` straight back to session.resolveLink(). + * + * `linkTarget` is `blockKey@modelSrcId` — the SAME grammar ModelBlockNode writes for + * the forward direction, so the reverse link needs no second target format and no + * second resolver. It round-trips: resolveLink(usage.linkTarget) is the block node. + * + * No display text is pre-baked here. What a `UsedBy` cell should READ is a + * presentation decision ("Const (Constant)" or "mdlcases.mdl: Const" or a count), and + * this package is consumed by a VS Code extension, a CLI and an RPC server that will + * not agree on it. The four facts a label could want are all here separately. + */ +export interface NodeUsage { + /** + * What the block READS as — 'Const', or `` for one whose label the model does + * not give (blockIdentity.blockLabel). Display text, and not an identity: two blocks of + * one model can share it. `linkTarget` is what tells them apart. + */ + blockName: string; + /** + * WHERE the block is — `Controller/Gain`, and just the label for one in the root + * system (blockIdentity.joinBlockPath). Model-relative, because the model is already + * named by `modelSrcId`. + * + * What makes two usages that read alike tell-apart-able for a PERSON: a dictionary + * entry used by four blocks all named `Gain` renders as one word four times, each link + * correctly reaching a different block, with nothing on screen to say which. Display + * text like `blockName`, not an identity — `linkTarget` remains the identity. + */ + blockPath: string; + /** The block's type — 'Constant'. Empty when the model did not record one. */ + blockType: string; + /** The block parameter that holds the reference — 'Value', 'Denominator'. */ + paramProperty: string; + /** The parameter's value VERBATIM, which is an expression as often as a bare name: '[tau 1]'. */ + paramValue: string; + /** The srcId of the model the block is in, as getDataSourceIds() reports it. */ + modelSrcId: string; + /** + * A target resolveLink() turns back into the block node — `blockKey@modelSrcId`, the key + * being the block's SID where the file records one (blockIdentity.blockKey). + */ + linkTarget: string; +} + +/** + * One sub-dictionary a `.sldd` references, and whether this session can reach it — + * see session.resolveDictionaryReferences(). + * + * `name` is what the FILE records (a bare file name, e.g. 'common.sldd'), normalized to + * a string: the node keeps these as `unknown[]` because the two `.sldd` readers put + * different shapes in it, and every consumer would otherwise repeat the same narrowing. + */ +export interface DictionaryReference { + /** The sub-dictionary as the referencing file names it. */ + name: string; + /** The same answer resolveLink() gives for that name — a root node, or why not. */ + resolution: LinkResolution; +} + +/** + * What session.findNodes() matches on. + * + * `name` and `value` are searches, so a string is a SUBSTRING test — what a search + * box does. `className` and `kind` are filters over closed vocabularies a host holds + * verbatim (see kindForClass), so a string there is a WHOLE-string test: 'Simulink.Bus' + * must not also answer for Simulink.BusElement. Neither takes a RegExp today; widening + * either to `string | RegExp` later is a backward-compatible change. + * + * `sourceId`, `caseSensitive` and `limit` are modifiers rather than criteria: they + * shape an answer, they do not select one. A query holding only modifiers therefore + * has no criteria at all — see session.findNodes() for what that means, and + * `core/findQuery.ts` for how each field above becomes a test. + */ +export interface FindNodesQuery { + /** Substring of the node's own name, or a RegExp tested against it. */ + name?: string | RegExp; + /** The Class column, matched whole — e.g. 'Simulink.Parameter'. */ + className?: string; + /** The Kind column, matched whole — e.g. 'Bus Element'. */ + kind?: string; + /** Substring of the node's rendered value, or a RegExp tested against it. */ + value?: string | RegExp; + /** Restrict the search to one open source. Omitted means every open source. */ + sourceId?: string; + /** Applies to STRING criteria only; a RegExp always keeps its own flags. Default false. */ + caseSensitive?: boolean; + /** Cap on the number of matches. Omitted means uncapped. */ + limit?: number; +} diff --git a/src/datamodel/fileKinds.ts b/src/datamodel/fileKinds.ts index 19ba5ab..7b60f21 100644 --- a/src/datamodel/fileKinds.ts +++ b/src/datamodel/fileKinds.ts @@ -67,6 +67,29 @@ export function isModelFile(filename: string): boolean { return ext === '.slx' || ext === '.mdl'; } +/** + * The extension to complete a bare model-reference name with, given the name of the + * model that RECORDS the reference. + * + * A model file names its references without an extension, so the bare name has to be + * completed before it can be used as a link target or matched against a file on disk. + * It takes the PARENT's own extension: a reference is far likelier to be the same + * generation of file as the model referencing it — a legacy `.mdl` hierarchy is legacy + * throughout — and a `.mdl` model whose children were all labelled `.slx` would link to + * nothing. + * + * This is published for the same reason `isModelFile` is. The guess is made TWICE for + * every model opened, on two paths that must not disagree: this package completes it for + * the node tree (`ModelNode.fromParsed` → `addReferenceEntry`), and a host completes it + * again for whatever index it builds over `parseModel`'s raw `modelReferences` — a usage + * graph resolves edges by filename, so it cannot use the bare name either. When the two + * copies drift, the tree row and the graph edge name two different files for one + * reference, and the row you can see stops agreeing with the link that resolves. + */ +export function refModelExt(parentFilename: string): string { + return extOf(parentFilename) === '.mdl' ? '.mdl' : '.slx'; +} + /** True if `filename` names a data dictionary. */ export function isSlddFile(filename: string): boolean { return extOf(filename) === '.sldd'; @@ -81,3 +104,24 @@ export function isMatFile(filename: string): boolean { export function isProjectFile(filename: string): boolean { return extOf(filename) === '.prj'; } + +/** + * A project file name with its `.prj` removed — the project's NAME, as distinct from the + * file it is stored in. + * + * `parseProject` takes this rather than a filename, because it is what a project calls + * itself: the name appears in a `.prj`'s own metadata and is the fallback when that + * metadata is missing or unreadable. So every caller of `parseProject` has to make this + * reduction first, and — like `refModelExt` — it is made on two paths that must not + * disagree: this package makes it when adding a project source to a session, and a host + * makes it again for whatever index it builds directly over `parseProject`. The name is + * user-visible on both (a tree row and a graph group label), so a drift between the two + * shows up as one project appearing under two names. + * + * Total rather than nullable, unlike `modelNameOf`: that one returns null to mean "not a + * model, do not compare stems", whereas the answer wanted here is always a label. A name + * with no `.prj` to strip is returned unchanged. + */ +export function projectNameOf(filename: string): string { + return filename.replace(/\.prj$/i, ''); +} diff --git a/src/datamodel/node/SimulinkObjectNode.ts b/src/datamodel/node/SimulinkObjectNode.ts new file mode 100644 index 0000000..8b83913 --- /dev/null +++ b/src/datamodel/node/SimulinkObjectNode.ts @@ -0,0 +1,94 @@ +// Copyright 2026 The MathWorks, Inc. + +import DataNode from './DataNode.js'; + +/** + * A dictionary entry that saves as a Simulink object: its live values are written back over + * the property bag the FILE held. + * + * There are two save paths — `_getSerializedProperties`, iterated into `

` tags for a + * compressed-binary `.sldd`, and `serializeValue`, whose override bag becomes the JSON of an + * uncompressed-text one — and every class here used to state its written properties TWICE, + * once per path. This class exists so that list is stated ONCE, in `_serializedOverrides`, + * and both paths read it. The failure that shape rules out is a class whose two copies stop + * agreeing: teach it a second property, or tighten one gate, and the same edit has to be + * made in both methods with nothing objecting if only one moves. What comes out then is one + * dictionary that saves differently in its two flavours — a key written into the binary file + * and missing from the text one, from the same model in the same session — which is the + * hardest kind of difference to notice, because either file on its own looks right. + * + * The two paths still MERGE that one list differently, and that was left exactly as it was. + * `_getSerializedProperties` assigns the overrides straight over the stored bag; + * `serializeValue` reaches `DataNode._mergeProps`, which knows about MATLAB's saveobj + * envelope — it drops an EMPTY override rather than writing back a default MATLAB never + * wrote, and writes a non-empty one INTO the envelope as well as beside it, because the + * envelope is what MATLAB's loadobj actually reads (defects 40 and 46; `_mergeProps` carries + * the full account). Making both paths merge the same way would change what one of them + * writes for every class here, so it is a separate question from where the list of written + * properties lives. `VariantVariableNode` is the one class whose BINARY path is + * envelope-aware, and it says so by overriding `_getSerializedProperties` to put its own + * `_serializedOverrides` through `_mergeProps`. + * + * `SignalNode` and `ParameterNode` are Simulink objects too and deliberately do not extend + * this class: a Signal's two paths write different VALUES for a cleared bound (`[]` in + * binary, `undefined` in text so `JSON.stringify` drops the key), which one shared list + * cannot express, and a Parameter already funnels `serializeValue` through + * `_getSerializedProperties`. + */ +export default class SimulinkObjectNode extends DataNode { + /** + * The live values this node writes over the file's own property bag — the single place a + * subclass names what it saves. + * + * Insertion order matters and is preserved by both paths: the binary writer emits one + * `

` per key in iteration order and the text path is serialized by `JSON.stringify`, so + * a key the stored bag already carries keeps its position on disk and a NEW key lands in + * the order named here. Build the object in the order the file should read. + * + * Empty by default, which is the right answer for a node that adds nothing to what the + * file already held. + */ + _serializedOverrides(): Record { + return {}; + } + + _getSerializedProperties(): Record { + return Object.assign({}, this.serial._properties as Record, this._serializedOverrides()); + } + + serializeValue(): unknown { + return this._serializeSimulinkObject(this._serializedOverrides()); + } + + /** + * The write-back gate for properties whose absence from the file is meaningful: keep a + * candidate when the FILE already carried its key, or when the node now holds a value for + * it. Everything else is dropped, so a save invents no key the file did not have. + * + * Both halves fail in opposite directions — lose `key in stored` and a key the file + * carried whose value happens to be empty vanishes from the saved bag, so opening a + * dictionary and saving it with no edits produces a diff in source control; lose the value + * half and an edit just made in the Property Inspector is silently discarded on save, + * surviving only until the file is reopened. The rule is about the FILE's key set, not + * about what the writer upstream of us meant by leaving a key out — + * `test/absentPropertyWriteBack.test.ts` states it that way and records which format + * really omits a key for an empty value and which does not. + * + * The truthiness test is what scopes this helper: it fits a property whose "nothing to + * say" state really is falsy, which for this cluster means the empty-string Descriptions. + * A property whose absent state is a non-empty DEFAULT must state its own predicate + * instead — a `Simulink.ValueType` with no `DataType` key IS a double, and 'double' is + * truthy, so routing it through here would write that default into every dictionary saved + * without edits. + */ + _gatedProps(candidates: Record): Record { + const stored = this.serial._properties as Record; + const gated: Record = {}; + for (const [key, val] of Object.entries(candidates)) { + if (key in stored || val) { + gated[key] = val; + } + } + return gated; + } +} diff --git a/src/datamodel/node/container/ModelNode.ts b/src/datamodel/node/container/ModelNode.ts index 4126f5a..38e124b 100644 --- a/src/datamodel/node/container/ModelNode.ts +++ b/src/datamodel/node/container/ModelNode.ts @@ -11,6 +11,7 @@ import type { ParseWarning } from '../../parser/ParseWarning.js'; import PropName from '../../prop/PropName.js'; import PropRelease from '../../prop/PropRelease.js'; import { blockKey } from '../../blockIdentity.js'; +import { extOf, refModelExt } from '../../fileKinds.js'; const SECTION_DEFS = [ { key: 'blocks', label: 'Model Elements', icon: 'blocks' }, @@ -120,7 +121,7 @@ export default class ModelNode extends ContainerNode { if (!this._zipEntries) { return 'mdl'; } - return /\.mdl$/i.test(this.name) ? 'mdl-package' : 'slx'; + return extOf(this.name) === '.mdl' ? 'mdl-package' : 'slx'; } get icon(): string { @@ -280,7 +281,7 @@ export default class ModelNode extends ContainerNode { // Populate model references section const refSection = node.getSection('references')!; - const refExt = /\.mdl$/i.test(filename) ? '.mdl' : '.slx'; + const refExt = refModelExt(filename); for (const ref of parsed.modelReferences) { refSection.addReferenceEntry(ref, refExt); } diff --git a/src/datamodel/node/container/ModelSectionNode.ts b/src/datamodel/node/container/ModelSectionNode.ts index ae069f2..79a9edd 100644 --- a/src/datamodel/node/container/ModelSectionNode.ts +++ b/src/datamodel/node/container/ModelSectionNode.ts @@ -11,6 +11,7 @@ import ModelReferenceNode from '../data/ModelReferenceNode.js'; import DataSourceNode from '../data/DataSourceNode.js'; import type BaseNode from '../BaseNode.js'; import type { ParsedConfigSet } from '../../parser/SlxParser.js'; +import { basenameOf, isModelFile } from '../../fileKinds.js'; export default class ModelSectionNode extends ContainerNode { label: string; @@ -91,8 +92,19 @@ export default class ModelSectionNode extends ContainerNode { // far likelier to be the same generation of file as the model referencing it — a // legacy `.mdl` hierarchy is legacy throughout — and a `.mdl` model whose children // were all labelled `.slx` would link to nothing. - addReferenceEntry(ref: { blockPath: string; modelName: string }, defaultExt = '.slx'): BaseNode { - const named = /\.(slx|mdl)$/i.test(ref.modelName); + // + // `isModelFile` decides whether the name is already complete, rather than a regex + // spelled here: that is the same question this package publishes an answer to, and a + // second copy of it is a second opinion about whether `plant.MDL` needs completing — + // which would produce `plant.MDL.slx`, a link to nothing. + // + // Required, with no `.slx` default: a default would be a THIRD answer to "which + // extension" — one a caller that forgot the parent's would take silently. The guess + // belongs to `fileKinds.refModelExt`, and the point of it living there is that every + // caller makes it the same way. No caller ever took the default; omitting the argument + // is now a compile error rather than a `.mdl` hierarchy labelled `.slx`. + addReferenceEntry(ref: { blockPath: string; modelName: string }, defaultExt: string): BaseNode { + const named = isModelFile(ref.modelName); const node = new ModelReferenceNode(named ? ref.modelName : ref.modelName + defaultExt, this, ref.blockPath); this.addChild(node); return node; @@ -125,8 +137,12 @@ export default class ModelSectionNode extends ContainerNode { } addDataSourceEntry(path: string): BaseNode { - const filename = path.split('/').pop()!; - const node = new DataSourceNode(filename, this, path); + // `path` is whatever MATLAB wrote into the model, so a model saved on Windows records + // `..\shared\signals.mat`. Splitting on `/` alone left that entire string as the + // node's name — a path in the Name column and a path as the link target — while the + // link still resolved, because `refBasename` does split on both. `basenameOf` is the + // one place that rule lives. + const node = new DataSourceNode(basenameOf(path), this, path); this.addChild(node); return node; } diff --git a/src/datamodel/node/container/SlddNode.ts b/src/datamodel/node/container/SlddNode.ts index de499a7..222e50f 100644 --- a/src/datamodel/node/container/SlddNode.ts +++ b/src/datamodel/node/container/SlddNode.ts @@ -13,6 +13,7 @@ import { slddChunkContent } from '../../parser/SlddContent.js'; import type { ParseWarning } from '../../parser/ParseWarning.js'; import type { SystemComposerCatalog } from '../../parser/ScCatalog.js'; import { SC_PART, scPartUnreadableMessage } from '../../parser/ScCatalog.js'; +import { DATA_PART_KEY, TEXT_CONTENT, TEXT_PARTS } from '../../parser/SlddParts.js'; const SECTION_DEFS = [ { key: 'design', label: 'Design Data', icon: 'databaseFolderDesign' }, @@ -122,7 +123,15 @@ export default class SlddNode extends ContainerNode { node._dataSourceAttrs = (json.__dataSourceAttrs as Record) || null; } - const parts = json.__MW_TEXT_PARTS__ as Record; + // `TEXT_PARTS`, not the literal: `serializeJson` below WRITES this bag through the + // constant, and a reader in the same file spelling it by hand is the two-copies-of- + // one-name shape SlddParts exists to close. A drift here would not empty the + // dictionary — the entries arrive through `slddChunkContent` — it would drop only + // the System Composer catalog, and drop it QUIETLY: a bag that is not there looks + // exactly like a dictionary with no catalog part, which _parseSystemComposer is + // deliberately silent about. That is the degrade its own comment below calls the + // nastiest partial in this reader. + const parts = json[TEXT_PARTS] as Record; // The shared unwrap (SlddContent), not a local one: the same three-level path is what // the usage index reads a dictionary's entries through, and a second copy here is a // second chance for one of them to look in the wrong place and report an empty file. @@ -168,9 +177,7 @@ export default class SlddNode extends ContainerNode { message: `"${filename}" holds no dictionary content part, so it reads as empty. ` + 'It may not be a data dictionary, or it may not have been written completely.', }); - } - - if (content) { + } else { // VERBATIM, and `unknown[]` on purpose: a reference is a bare string in a // compressed dictionary and can be a `{ file: ... }` object in a textual one, and // serializeJson writes this array straight back out on save. Normalising here @@ -200,7 +207,7 @@ export default class SlddNode extends ContainerNode { warnings?: ParseWarning[], ): SystemComposerCatalog | null { const part = parts && (parts[`__MW_TEXT_PART__/${SC_PART}`] as Record); - const content = part && (part.__MW_TEXT_content as Record); + const content = part && (part[TEXT_CONTENT] as Record); const entries = content && (content.entries as Record[]); if (!entries) { // The two reasons for a null catalog are opposites, and only one of them is a @@ -287,9 +294,9 @@ export default class SlddNode extends ContainerNode { return { __MW_TEXT_COREPROPERTIES__: this.coreProperties, - __MW_TEXT_PARTS__: { - '__MW_TEXT_PART__/data/chunk0': { - __MW_TEXT_content: { + [TEXT_PARTS]: { + [DATA_PART_KEY]: { + [TEXT_CONTENT]: { entries, 'Dictionary References': this.dictionaryReferences, AllowAccessBWS: this.allowAccessBWS diff --git a/src/datamodel/node/data/AliasTypeNode.ts b/src/datamodel/node/data/AliasTypeNode.ts index 9bcf8a3..87b6d3a 100644 --- a/src/datamodel/node/data/AliasTypeNode.ts +++ b/src/datamodel/node/data/AliasTypeNode.ts @@ -1,12 +1,12 @@ // Copyright 2026 The MathWorks, Inc. -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import type { PropClass } from '../BaseNode.js'; import type BaseNode from '../BaseNode.js'; import PropName from '../../prop/PropName.js'; import PropBaseType from '../../prop/PropBaseType.js'; import PropDescription from '../../prop/PropDescription.js'; const CLASS_NAME = 'Simulink.AliasType'; -export default class AliasTypeNode extends DataNode { +export default class AliasTypeNode extends SimulinkObjectNode { BaseType: string; Description: string; constructor(name: string, parent: BaseNode | null, props: Record, serial: Record) { super(name, parent, serial); this.BaseType = (props.BaseType as string) || ''; this.Description = (props.Description as string) || ''; } get icon(): string { return this.isDerived ? 'typeAlias' : 'wsAlias'; } @@ -20,8 +20,10 @@ export default class AliasTypeNode extends DataNode { // would show the class name 'Simulink.AliasType') is omitted here. getProperties(): PropClass[] { return [PropName, PropBaseType, PropDescription]; } // PI layout is schema-driven (schema/classes/aliasType.json). - _getSerializedProperties(): Record { const props = Object.assign({}, this.serial._properties as Record); props.BaseType = this.BaseType; if ('Description' in (this.serial._properties as Record) || this.Description) { props.Description = this.Description; } return props; } - serializeValue(): unknown { const overrides: Record = { BaseType: this.BaseType }; if ('Description' in (this.serial._properties as Record) || this.Description) { overrides.Description = this.Description; } return this._serializeSimulinkObject(overrides); } + // BaseType is UNGATED: an alias with no base type is not a type at all, so MATLAB gets + // the key even as the empty string a half-built entry carries. It is named first because + // that is the order a bag that lacks both keys reads on disk. + _serializedOverrides(): Record { return Object.assign({ BaseType: this.BaseType }, this._gatedProps({ Description: this.Description })); } static get defaultName(): string { return 'AliasType'; } static createDefault(name: string, parent: BaseNode | null): AliasTypeNode { const rawVal = { _array_class: CLASS_NAME, _array_type: 'MATLABArray', _dimensions: [1, 1], _mw_element_type: 'MATLABArray', _elements: [{ _properties: { BaseType: 'double', DataScope: 'Auto', Description: '', HeaderFile: '' } }] }; const props = rawVal._elements[0]._properties; const serial = { _rawVal: rawVal, _properties: props }; return new AliasTypeNode(name, parent, props as unknown as Record, serial as unknown as Record); } static parse(rawVal: Record, name: string, parent: BaseNode | null): AliasTypeNode { const elem = rawVal._elements && (rawVal._elements as unknown[])[0]; const props = ((elem && (elem as Record)._properties) || {}) as Record; const serial = { _rawVal: rawVal, _properties: props }; return new AliasTypeNode(name, parent, props, serial as Record); } diff --git a/src/datamodel/node/data/BreakpointNode.ts b/src/datamodel/node/data/BreakpointNode.ts index 77a793e..daec0e7 100644 --- a/src/datamodel/node/data/BreakpointNode.ts +++ b/src/datamodel/node/data/BreakpointNode.ts @@ -1,12 +1,12 @@ // Copyright 2026 The MathWorks, Inc. -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import type { PropClass } from '../BaseNode.js'; import type BaseNode from '../BaseNode.js'; import PropName from '../../prop/PropName.js'; import PropDataType from '../../prop/PropDataType.js'; import PropDescription from '../../prop/PropDescription.js'; const CLASS_NAME = 'Simulink.Breakpoint'; -export default class BreakpointNode extends DataNode { +export default class BreakpointNode extends SimulinkObjectNode { Description: string; constructor(name: string, parent: BaseNode | null, props: Record, serial: Record) { super(name, parent, serial); this.Description = (props.Description as string) || ''; } get icon(): string { return 'wsSimulinkBreakpoint'; } @@ -16,8 +16,7 @@ export default class BreakpointNode extends DataNode { get valueEditable(): boolean { return false; } getProperties(): PropClass[] { return [PropName, PropDataType, PropDescription]; } // PI layout: schema-driven "General" group (classes/breakpoint.json). - _getSerializedProperties(): Record { const props = Object.assign({}, this.serial._properties as Record); if ('Description' in (this.serial._properties as Record) || this.Description) { props.Description = this.Description; } return props; } - serializeValue(): unknown { const overrides: Record = {}; if ('Description' in (this.serial._properties as Record) || this.Description) { overrides.Description = this.Description; } return this._serializeSimulinkObject(overrides); } + _serializedOverrides(): Record { return this._gatedProps({ Description: this.Description }); } static get defaultName(): string { return 'Breakpoint'; } static createDefault(name: string, parent: BaseNode | null): BreakpointNode { const rawVal = { _array_class: CLASS_NAME, _array_type: 'MATLABArray', _dimensions: [1, 1], _mw_element_type: 'MATLABArray', _elements: [{ _properties: {} }] }; const props = rawVal._elements[0]._properties; const serial = { _rawVal: rawVal, _properties: props }; return new BreakpointNode(name, parent, props as unknown as Record, serial as unknown as Record); } static parse(rawVal: Record, name: string, parent: BaseNode | null): BreakpointNode { const elem = rawVal._elements && (rawVal._elements as unknown[])[0]; const props = ((elem && (elem as Record)._properties) || {}) as Record; const serial = { _rawVal: rawVal, _properties: props }; return new BreakpointNode(name, parent, props, serial as Record); } diff --git a/src/datamodel/node/data/BusNode.ts b/src/datamodel/node/data/BusNode.ts index 4fffa11..ce042a0 100644 --- a/src/datamodel/node/data/BusNode.ts +++ b/src/datamodel/node/data/BusNode.ts @@ -14,8 +14,6 @@ import PropDimensionsMode from '../../prop/PropDimensionsMode.js'; const CLASS_NAME = 'Simulink.Bus'; export class BusElementNode extends BaseBusElementNode { - _rawMin: unknown; - _rawMax: unknown; Min: number | undefined; Max: number | undefined; Unit: string; @@ -34,10 +32,14 @@ export class BusElementNode extends BaseBusElementNode { constructor(name: string, parent: BaseNode | null, props: Record, serial: Record) { super(name, parent, props, serial); - this._rawMin = props.Min_internal !== undefined ? props.Min_internal : props.Min; - this._rawMax = props.Max_internal !== undefined ? props.Max_internal : props.Max; - this.Min = BusElementNode._normalizeMinMax(this._rawMin); - this.Max = BusElementNode._normalizeMinMax(this._rawMax); + // A bus element's bounds may arrive under either spelling; only the normalized + // value is kept. The raw one was held in a field until the write-back stopped + // falling back to it — nothing else ever read it, and while it existed a cleared + // bound was silently restored from it on save. + const rawMin = props.Min_internal !== undefined ? props.Min_internal : props.Min; + const rawMax = props.Max_internal !== undefined ? props.Max_internal : props.Max; + this.Min = BusElementNode._normalizeMinMax(rawMin); + this.Max = BusElementNode._normalizeMinMax(rawMax); this.Unit = (props.DocUnits as string) || (props.Unit as string) || ''; // The element's data type is stored in DataType_internal (falling back to // DataType); an unset type means the Simulink default of 'double'. @@ -160,8 +162,15 @@ export class BusElementNode extends BaseBusElementNode { const maxKey = 'Max_internal' in sp ? 'Max_internal' : 'Max'; const unitKey = 'DocUnits' in sp ? 'DocUnits' : 'Unit'; const dtKey = 'DataType_internal' in sp ? 'DataType_internal' : 'DataType'; - if (minKey in sp || this.Min !== undefined) { props[minKey] = this.Min !== undefined ? this.Min : this._rawMin; } - if (maxKey in sp || this.Max !== undefined) { props[maxKey] = this.Max !== undefined ? this.Max : this._rawMax; } + // A cleared bound goes out as `[]` — MATLAB's own empty — under the key the file + // used, and not as the value the file held there: falling back to that (what this + // did) meant emptying the Minimum box blanked the row and saved the old number, + // so the bound came back on reopen. `undefined` is not the alternative here + // either; this bag reaches the XML writer, which spells `undefined` as + // `Class="char"`. See ParameterNode._getSerializedProperties for the full note, + // including the residual `"Min": []`-vs-omitted-key difference on the text path. + if (minKey in sp || this.Min !== undefined) { props[minKey] = this.Min !== undefined ? this.Min : []; } + if (maxKey in sp || this.Max !== undefined) { props[maxKey] = this.Max !== undefined ? this.Max : []; } if (unitKey in sp || this.Unit) { props[unitKey] = this.Unit; } // Only write the data type back when the source had it or it differs from // the implicit 'double' default, so untyped elements stay untouched. diff --git a/src/datamodel/node/data/ConfigSetNode.ts b/src/datamodel/node/data/ConfigSetNode.ts index fbc6256..537a157 100644 --- a/src/datamodel/node/data/ConfigSetNode.ts +++ b/src/datamodel/node/data/ConfigSetNode.ts @@ -1,11 +1,11 @@ // Copyright 2026 The MathWorks, Inc. -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import type { PropClass } from '../BaseNode.js'; import type BaseNode from '../BaseNode.js'; import PropName from '../../prop/PropName.js'; import PropDataType from '../../prop/PropDataType.js'; const CLASS_NAME = 'Simulink.ConfigSet'; -export default class ConfigSetNode extends DataNode { +export default class ConfigSetNode extends SimulinkObjectNode { // The config set's own Name property. In a .sldd the entry name and this // property are the same string — both parse paths build the node with // _properties.Name equal to the entry name — so this is a view of `name` @@ -26,8 +26,10 @@ export default class ConfigSetNode extends DataNode { get valueEditable(): boolean { return false; } getProperties(): PropClass[] { return [PropName, PropDataType]; } // PI layout: schema-driven "General" group (classes/configSet.json). - _getSerializedProperties(): Record { const props = Object.assign({}, this.serial._properties as Record); props.Name = this.ConfigName; return props; } - serializeValue(): unknown { return this._serializeSimulinkObject({ Name: this.ConfigName }); } + // UNGATED: a config set MATLAB can load has to be able to say what it is called, so the + // key is written whatever the file carried — and because it is a view of `name`, a + // renamed entry saves under the new name on both paths. + _serializedOverrides(): Record { return { Name: this.ConfigName }; } static get defaultName(): string { return 'Configuration'; } static createDefault(name: string, parent: BaseNode | null): ConfigSetNode { const rawVal = { _array_class: CLASS_NAME, _array_type: 'MATLABArray', _dimensions: [1, 1], _mw_element_type: 'MATLABArray', _elements: [{ _properties: { Name: name || 'Configuration' } }] }; const props = rawVal._elements[0]._properties; const serial = { _rawVal: rawVal, _properties: props }; return new ConfigSetNode(name, parent, props as unknown as Record, serial as unknown as Record); } static parse(rawVal: Record, name: string, parent: BaseNode | null): ConfigSetNode { const elem = rawVal._elements && (rawVal._elements as unknown[])[0]; const props = ((elem && (elem as Record)._properties) || {}) as Record; const serial = { _rawVal: rawVal, _properties: props }; return new ConfigSetNode(name, parent, props, serial as Record); } diff --git a/src/datamodel/node/data/ConfigSetRefNode.ts b/src/datamodel/node/data/ConfigSetRefNode.ts index d9c7a83..1a0cc35 100644 --- a/src/datamodel/node/data/ConfigSetRefNode.ts +++ b/src/datamodel/node/data/ConfigSetRefNode.ts @@ -1,11 +1,11 @@ // Copyright 2026 The MathWorks, Inc. -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import type { PropClass } from '../BaseNode.js'; import type BaseNode from '../BaseNode.js'; import PropName from '../../prop/PropName.js'; import PropDataType from '../../prop/PropDataType.js'; const CLASS_NAME = 'Simulink.ConfigSetRef'; -export default class ConfigSetRefNode extends DataNode { +export default class ConfigSetRefNode extends SimulinkObjectNode { SourceName: string; // See ConfigSetNode.active — set by the SLX parser only. active?: boolean; @@ -17,8 +17,10 @@ export default class ConfigSetRefNode extends DataNode { get valueEditable(): boolean { return false; } getProperties(): PropClass[] { return [PropName, PropDataType]; } // PI layout: schema-driven "General" group (classes/configSetRef.json). - _getSerializedProperties(): Record { const props = Object.assign({}, this.serial._properties as Record); props.SourceName = this.SourceName; return props; } - serializeValue(): unknown { return this._serializeSimulinkObject({ SourceName: this.SourceName }); } + // UNGATED, on the same terms as a ConfigSet's Name: a reference that cannot say what it + // points at is not a reference, so the key is written even as the empty string a + // half-built entry carries. + _serializedOverrides(): Record { return { SourceName: this.SourceName }; } static get defaultName(): string { return 'ConfigSetRef'; } static createDefault(name: string, parent: BaseNode | null): ConfigSetRefNode { const rawVal = { _array_class: CLASS_NAME, _array_type: 'MATLABArray', _dimensions: [1, 1], _mw_element_type: 'MATLABArray', _elements: [{ _properties: { SourceName: '' } }] }; const props = rawVal._elements[0]._properties; const serial = { _rawVal: rawVal, _properties: props }; return new ConfigSetRefNode(name, parent, props as unknown as Record, serial as unknown as Record); } static parse(rawVal: Record, name: string, parent: BaseNode | null): ConfigSetRefNode { const elem = rawVal._elements && (rawVal._elements as unknown[])[0]; const props = ((elem && (elem as Record)._properties) || {}) as Record; const serial = { _rawVal: rawVal, _properties: props }; return new ConfigSetRefNode(name, parent, props, serial as Record); } diff --git a/src/datamodel/node/data/CustomObjectNode.ts b/src/datamodel/node/data/CustomObjectNode.ts index 7e12a26..69dd548 100644 --- a/src/datamodel/node/data/CustomObjectNode.ts +++ b/src/datamodel/node/data/CustomObjectNode.ts @@ -1,5 +1,5 @@ // Copyright 2026 The MathWorks, Inc. -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import type { PropClass } from '../BaseNode.js'; import type BaseNode from '../BaseNode.js'; import PropName from '../../prop/PropName.js'; @@ -8,7 +8,7 @@ import PropDataType from '../../prop/PropDataType.js'; import PropDescription from '../../prop/PropDescription.js'; import { OBJECT_ICON } from '../icons.js'; const CLASS_NAME = 'CustomObject'; -export default class CustomObjectNode extends DataNode { +export default class CustomObjectNode extends SimulinkObjectNode { Description: string; constructor(name: string, parent: BaseNode | null, props: Record, serial: Record) { super(name, parent, serial); this.Description = (props.Description as string) || ''; } get icon(): string { return OBJECT_ICON; } @@ -16,8 +16,7 @@ export default class CustomObjectNode extends DataNode { get displayValue(): string { return '<1x1 ' + CLASS_NAME + '>'; } getProperties(): PropClass[] { return [PropName, PropValue, PropDataType, PropDescription]; } // PI layout: schema-driven "General" group (classes/customObject.json). - _getSerializedProperties(): Record { const props = Object.assign({}, this.serial._properties as Record); if ('Description' in (this.serial._properties as Record) || this.Description) { props.Description = this.Description; } return props; } - serializeValue(): unknown { const overrides: Record = {}; if ('Description' in (this.serial._properties as Record) || this.Description) { overrides.Description = this.Description; } return this._serializeSimulinkObject(overrides); } + _serializedOverrides(): Record { return this._gatedProps({ Description: this.Description }); } static get defaultName(): string { return 'CustomObject'; } static createDefault(name: string, parent: BaseNode | null): CustomObjectNode { const rawVal = { _array_class: CLASS_NAME, _array_type: 'MATLABArray', _dimensions: [1, 1], _mw_element_type: 'MATLABArray', _elements: [{ _properties: {} }] }; const props = rawVal._elements[0]._properties; const serial = { _rawVal: rawVal, _properties: props }; return new CustomObjectNode(name, parent, props as unknown as Record, serial as unknown as Record); } static parse(rawVal: Record, name: string, parent: BaseNode | null): CustomObjectNode { const elem = rawVal._elements && (rawVal._elements as unknown[])[0]; const props = ((elem && (elem as Record)._properties) || {}) as Record; const serial = { _rawVal: rawVal, _properties: props }; return new CustomObjectNode(name, parent, props, serial as Record); } diff --git a/src/datamodel/node/data/DataSourceNode.ts b/src/datamodel/node/data/DataSourceNode.ts index a110989..854e377 100644 --- a/src/datamodel/node/data/DataSourceNode.ts +++ b/src/datamodel/node/data/DataSourceNode.ts @@ -5,6 +5,7 @@ import type { PropClass, PIGroupDef, RowData } from '../BaseNode.js'; import PropName from '../../prop/PropName.js'; import PropPath from '../../prop/PropPath.js'; import PropStatus from '../../prop/PropStatus.js'; +import { isModelFile, isSlddFile } from '../../fileKinds.js'; export default class DataSourceNode extends BaseNode { fullPath: string; @@ -20,12 +21,30 @@ export default class DataSourceNode extends BaseNode { return true; } - get icon(): string { - if (this.name.endsWith('.sldd')) { return 'simulinkDataDictionary_FT'; } + /** + * The one classification behind BOTH the icon and the class name. + * + * These were two independent chains of `endsWith`, which is two answers to one + * question: a kind added to one and not the other shows a dictionary icon on a row + * labelled 'MAT File'. They were also both case-SENSITIVE, while `refBasename` — + * which is what actually RESOLVES this source against the workspace — is not. So a + * model naming `Params.SLDD`, exactly as its author typed it, got a working link and a + * MAT-file presentation, and no part of that looks like a bug from either side. + * Deriving from `fileKinds` puts the case rule where the rest of this package keeps it. + */ + private get presentation(): { icon: string; className: string } { + if (isSlddFile(this.name)) { return { icon: 'simulinkDataDictionary_FT', className: 'Data Dictionary' }; } // A `.mdl` is a Simulink model too — the same thing in an older container — // so it gets the model icon rather than falling through to the MAT default. - if (this.name.endsWith('.slx') || this.name.endsWith('.mdl')) { return 'simulinkModel_FT'; } - return 'matlabWorkspaceFile'; + if (isModelFile(this.name)) { return { icon: 'simulinkModel_FT', className: 'Simulink Model' }; } + // A model's external data sources are dictionaries, models and MAT-files, so an + // extension none of those tests recognise is presented as the last of them rather + // than as nothing at all. + return { icon: 'matlabWorkspaceFile', className: 'MAT File' }; + } + + get icon(): string { + return this.presentation.icon; } get displayName(): string { @@ -37,9 +56,7 @@ export default class DataSourceNode extends BaseNode { } get className(): string { - if (this.name.endsWith('.sldd')) { return 'Data Dictionary'; } - if (this.name.endsWith('.slx') || this.name.endsWith('.mdl')) { return 'Simulink Model'; } - return 'MAT File'; + return this.presentation.className; } get nameEditable(): boolean { diff --git a/src/datamodel/node/data/LookupTableNode.ts b/src/datamodel/node/data/LookupTableNode.ts index 1264a95..30842a8 100644 --- a/src/datamodel/node/data/LookupTableNode.ts +++ b/src/datamodel/node/data/LookupTableNode.ts @@ -1,12 +1,12 @@ // Copyright 2026 The MathWorks, Inc. -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import type { PropClass } from '../BaseNode.js'; import type BaseNode from '../BaseNode.js'; import PropName from '../../prop/PropName.js'; import PropDataType from '../../prop/PropDataType.js'; import PropDescription from '../../prop/PropDescription.js'; const CLASS_NAME = 'Simulink.LookupTable'; -export default class LookupTableNode extends DataNode { +export default class LookupTableNode extends SimulinkObjectNode { Description: string; constructor(name: string, parent: BaseNode | null, props: Record, serial: Record) { super(name, parent, serial); this.Description = (props.Description as string) || ''; } get icon(): string { return 'wsLookup'; } @@ -16,8 +16,7 @@ export default class LookupTableNode extends DataNode { get valueEditable(): boolean { return false; } getProperties(): PropClass[] { return [PropName, PropDataType, PropDescription]; } // PI layout: schema-driven "General" group (classes/lookupTable.json). - _getSerializedProperties(): Record { const props = Object.assign({}, this.serial._properties as Record); if ('Description' in (this.serial._properties as Record) || this.Description) { props.Description = this.Description; } return props; } - serializeValue(): unknown { const overrides: Record = {}; if ('Description' in (this.serial._properties as Record) || this.Description) { overrides.Description = this.Description; } return this._serializeSimulinkObject(overrides); } + _serializedOverrides(): Record { return this._gatedProps({ Description: this.Description }); } static get defaultName(): string { return 'LookupTable'; } static createDefault(name: string, parent: BaseNode | null): LookupTableNode { const rawVal = { _array_class: CLASS_NAME, _array_type: 'MATLABArray', _dimensions: [1, 1], _mw_element_type: 'MATLABArray', _elements: [{ _properties: {} }] }; const props = rawVal._elements[0]._properties; const serial = { _rawVal: rawVal, _properties: props }; return new LookupTableNode(name, parent, props as unknown as Record, serial as unknown as Record); } static parse(rawVal: Record, name: string, parent: BaseNode | null): LookupTableNode { const elem = rawVal._elements && (rawVal._elements as unknown[])[0]; const props = ((elem && (elem as Record)._properties) || {}) as Record; const serial = { _rawVal: rawVal, _properties: props }; return new LookupTableNode(name, parent, props, serial as Record); } diff --git a/src/datamodel/node/data/MatlabVariableNode.ts b/src/datamodel/node/data/MatlabVariableNode.ts index 9f30623..b40509c 100644 --- a/src/datamodel/node/data/MatlabVariableNode.ts +++ b/src/datamodel/node/data/MatlabVariableNode.ts @@ -23,7 +23,6 @@ import { encodeCdata } from '../../parser/MatWriter.js'; import { EMPTY_CELL, EMPTY_NUMERIC, - MISSING_STRING, effectiveDims, elementCount, needsSummary, @@ -49,12 +48,25 @@ import { transposeFromColumnMajorND, pad as xmlPad, } from '../../parser/XmlUtils.js'; - -// ---- Pure value helpers ---- -// None of these read node state, which is why they are module-local functions and -// not methods: staying off the class is what lets the display getters and the -// static parse entry points at the bottom of the file share them without either -// side owning the other. +import { + TYPED_NUMERIC_CLASS, + classAfterEdit, + elementClass, + emptyDouble, + formatCharMatrix, + formatMatrix, + formatStringElement, + needsTypedLiteral, + parseMatrixValue, +} from './matlabValueRules.js'; + +// ---- Node-local tables ---- +// The pure rules about a MATLAB VALUE — what class an edit leaves behind, when a +// number needs a typed spelling, how a matrix prints and parses back — live in +// matlabValueRules.ts, which reads no node state and so could stop being part of +// this file. What stays here is the two module-level facts that are about THIS +// NODE's own jobs rather than about the value it holds: the icon a tree row shows +// for an opaque object, and the one MAT-file tag the cdata reader below looks for. const MCOS_ICON_MAP: Record = { 'Simulink.Parameter': 'wsParameters', @@ -78,34 +90,6 @@ const MCOS_ICON_MAP: Record = { string: 'wsString', }; -// An empty 0x0 double, MATLAB's own `[]`. Stands in for a cell slot the parser -// could not read (see _createFromMatCell) and for a struct-array element that no -// longer has one of the array's fields (see _buildVarObject): in both places a -// hole must stay a hole, or every later element slides one slot early. -// A fresh object per call, since the node built from it keeps a reference. -function emptyDouble(): MatVariable { - return { - name: '', - className: 'double', - dimensions: [0, 0], - isComplex: false, - isLogical: false, - value: [], - fields: null, - }; -} - -// One element of a string array as MATLAB displays it: quoted, or the unquoted -// `` for a `missing`. `null` is the marker for a `missing` because the display -// text cannot be — a real string whose characters are `` still has to print -// quoted, and the two would be indistinguishable if the marker were the text. -// `undefined` is a hole rather than a missing (a shorter `_elements` than `_dims` -// claims), and prints as the empty string it always did. -function formatStringElement(el: unknown): string { - if (el === null) return MISSING_STRING; - return formatMatlabString(el !== undefined ? String(el) : ''); -} - // A text .sldd stores a value its JSON schema cannot spell as uuencoded bytes, // and what those bytes CONTAIN is an 8-byte preamble followed by one MAT-file // miMATRIX element — so decoding stops at the transport (parser/CdataCodec) and @@ -121,154 +105,6 @@ function formatStringElement(el: unknown): string { // MAT-file element type miMATRIX: the one thing a cdata payload ever holds. const MI_MATRIX = 14; -// The MATLAB numeric classes a bare JSON number cannot carry. JSON has ONE number -// type, so an int32 or a single written as a plain number reads back as a double — -// a silent class change, not a rounding nit. `double` needs no tag. -const TYPED_NUMERIC_CLASS = /^(?:u?int(?:8|16|32|64)|single)$/; - -// The class a value keeps across an edit. A Value edit sets the VALUE, not the -// class — MATLAB's own `v(:) = 7` on an int32 stays int32, and the Data Type -// column is read-only here — but MatlabValueParser cannot know the class: a bare -// `7` always parses as 'double'. So the node's existing class beats the parser's -// default. Only the integer/single classes qualify: every number is representable -// in them, whereas keeping 'logical' would render `7` as `true`, which MATLAB -// rejects outright. -function classAfterEdit(current: string, parsedType: string): string { - return parsedType === 'double' && TYPED_NUMERIC_CLASS.test(current) ? current : parsedType; -} - -// The class one ELEMENT of a numeric array carries. One MATLAB array is one class, -// so an element of an int32 array is an int32 and an element of a logical array is a -// logical. The element rows' hardcoded 'double' put 'int32' in the array's Data Type -// column and 'double' in the column of every row beneath it — one value described two -// ways, one of them wrong — and showed a logical array as [true false] over rows -// reading 1 and 0, leaking the 1/0 storage form into the UI. -// -// classAfterEdit's set plus 'logical'. For the integer/single classes this moves the -// Data Type column and nothing else, since they format through formatMatlabNum -// exactly as a double does. 'logical' additionally changes the element's icon and -// text (see icon and _formatScalar), which is the point: the row should look like the -// logical scalar it is, checkbox included. It is also why _setConstrainedValue has a -// logical arm — a row that reads 'true' has to accept 'true'. -// -// Cell and struct children never come through here: they are independent values, and -// their container has no one class to hand down. -function elementClass(arrayClass: string): string { - return TYPED_NUMERIC_CLASS.test(arrayClass) || arrayClass === 'logical' ? arrayClass : 'double'; -} - -// True when a scalar has to be written as the format's typed {_type,_value} -// literal rather than a bare JSON value. Both reasons are silent data loss: -// an int32/single written bare reads back as double (see TYPED_NUMERIC_CLASS), -// and JSON has no literal for Inf/NaN — JSON.stringify writes `null`, which reads -// back as 0. A `logical` normally travels as a JS boolean and needs no tag, except -// when it came from an array, whose elements the parser stores as 1/0. -function needsTypedLiteral(type: string, value: unknown): boolean { - if (TYPED_NUMERIC_CLASS.test(type)) { - return true; - } - if (type === 'logical') { - return typeof value !== 'boolean'; - } - return typeof value === 'number' && !isFinite(value); -} - -// A MATLAB matrix literal: `[1 2 3; 4 5 6]`. Only ever called for rank <= 2 — the -// caller summarizes anything higher, because mat2str itself refuses rank >= 3 and -// there is no MATLAB one-line spelling to match. -// -// The row loop used to run the full rows x cols grid and print '?' for anything it -// could not find, so an element list shorter than the declared shape filled the -// display with question marks. It now formats the elements that exist. -function formatMatrix(rows: number, cols: number, elements: unknown[]): string { - if (elements.length === 0) { - return EMPTY_NUMERIC; - } - const rowStrs: string[] = []; - for (let r = 0; r < rows; r++) { - const vals: string[] = []; - for (let c = 0; c < cols; c++) { - const i = r * cols + c; - if (i >= elements.length) { - break; - } - vals.push(formatMatlabNum(elements[i])); - } - if (vals.length > 0) { - rowStrs.push(vals.join(' ')); - } - } - return '[' + rowStrs.join('; ') + ']'; -} - -// A char MATRIX as MATLAB prints one: `['ab'; 'cd']`, one quoted string per ROW. -// -// The stored text is column-major (see XmlUtils' char section), so row r is every -// rows-th character starting at r — MATLAB's own 2x2 'acbd' is rows 'ab' and 'cd'. -// Each row is quoted through formatMatlabChar, so an apostrophe inside one doubles -// exactly as it does in the scalar spelling. -// -// Rank 2 only: the caller summarizes anything higher, for the same reason formatMatrix -// does — MATLAB has no one-line print of a rank-3 array of any class. -function formatCharMatrix(text: string, dims: number[]): string { - const rows = dims[0]; - const cols = dims[1]; - const rowStrs: string[] = []; - for (let r = 0; r < rows; r++) { - let row = ''; - for (let c = 0; c < cols; c++) { - row += text.charAt(c * rows + r); - } - rowStrs.push(formatMatlabChar(row)); - } - return '[' + rowStrs.join('; ') + ']'; -} - -function parseMatrixValue( - raw: Record, -): { dims: number[]; elements: (number | string)[]; type: string } | null { - const lines = (raw._value as string).split('\n'); - const header = lines[0]; - // Rank 3 and up appear as Matrix(2,3,2) — MATLAB's binary dictionary writes a - // 2x3x2 as Dimension="2*3*2", and BinarySlddParser now carries every extent - // through. Only the two-group form was matched, so an N-D entry fell through - // to the [0,0] empty node with all twelve of its elements gone. - const dimsMatch = header.match(/^Matrix\((\d+(?:,\d+)*)\)$/); - if (!dimsMatch) { - return null; - } - - const dims = dimsMatch[1].split(',').map(function (s) { - return parseInt(s, 10); - }); - const body = lines.slice(1).join(''); - - const numbers: (number | string)[] = []; - // Inf/-Inf/NaN are elements too, and a digits-only pattern would skip them — - // shifting every later element one slot left and corrupting the whole matrix. - const numMatches = body.match(/-?(?:[\d.]+(?:[eE][+-]?\d+)?|Inf|NaN)/g); - if (numMatches) { - // An int64/uint64 element is kept as exact decimal TEXT: MATLAB's 64-bit range is - // wider than a double's exact one BY CONSTRUCTION, so parseMatlabNum turned - // maxU64 into 18446744073709552000 one step after the reader had it right - // (defect 29). The suffix never reaches here — the pattern above matches digits, - // so '18446744073709551615U' arrives already bare. - const exact = needsExactInt(raw._type as string); - numMatches.forEach(function (s: string) { - numbers.push(exact ? parseExactNum(s) : parseMatlabNum(s)); - }); - } - - // A one-group header (Matrix(5)) has no MATLAB spelling but is cheap to accept - // as the row vector it must mean, rather than handing back a rank-1 dims array - // every downstream reader would have to special-case. - return { - dims: dims.length >= 2 ? dims : [1, dims[0] || 0], - elements: numbers, - type: raw._type as string, - }; -} - // Re-exported so the many callers that reach this type through the node keep // working; MatParser owns the single declaration. export type { MatVariable }; diff --git a/src/datamodel/node/NodeClassMap.ts b/src/datamodel/node/data/NodeClassMap.ts similarity index 82% rename from src/datamodel/node/NodeClassMap.ts rename to src/datamodel/node/data/NodeClassMap.ts index 8755377..d3934e2 100644 --- a/src/datamodel/node/NodeClassMap.ts +++ b/src/datamodel/node/data/NodeClassMap.ts @@ -1,33 +1,33 @@ // Copyright 2026 The MathWorks, Inc. -import * as NodeRegistry from './NodeRegistry.js'; -import type { NodeClassType, NodeParser } from './NodeRegistry.js'; -import type BaseNode from './BaseNode.js'; -import type DataNode from './DataNode.js'; -import MatlabVariableNode from './data/MatlabVariableNode.js'; -import ConstantNode from './data/ConstantNode.js'; -import StructNode from './data/StructNode.js'; -import ObjectNode from './data/ObjectNode.js'; -import ParameterNode from './data/ParameterNode.js'; -import SignalNode from './data/SignalNode.js'; -import { BusNode } from './data/BusNode.js'; -import { ConnectionBusNode } from './data/ConnectionBusNode.js'; -import { ServiceBusNode } from './data/ServiceBusNode.js'; -import { EnumTypeNode } from './data/EnumTypeNode.js'; -import AliasTypeNode from './data/AliasTypeNode.js'; -import ConfigSetNode from './data/ConfigSetNode.js'; -import VariantExpressionNode from './data/VariantExpressionNode.js'; -import VariantVariableNode from './data/VariantVariableNode.js'; -import LookupTableNode from './data/LookupTableNode.js'; -import BreakpointNode from './data/BreakpointNode.js'; -import NumericTypeNode from './data/NumericTypeNode.js'; -import ValueTypeNode from './data/ValueTypeNode.js'; -import VariantControlNode from './data/VariantControlNode.js'; -import VariantBankNode from './data/VariantBankNode.js'; -import VariantBankCoderInfoNode from './data/VariantBankCoderInfoNode.js'; -import CustomObjectNode from './data/CustomObjectNode.js'; -import ConfigSetRefNode from './data/ConfigSetRefNode.js'; -import VariantConfigurationDataNode from './data/VariantConfigurationDataNode.js'; +import * as NodeRegistry from '../NodeRegistry.js'; +import type { NodeClassType, NodeParser } from '../NodeRegistry.js'; +import type BaseNode from '../BaseNode.js'; +import type DataNode from '../DataNode.js'; +import MatlabVariableNode from './MatlabVariableNode.js'; +import ConstantNode from './ConstantNode.js'; +import StructNode from './StructNode.js'; +import ObjectNode from './ObjectNode.js'; +import ParameterNode from './ParameterNode.js'; +import SignalNode from './SignalNode.js'; +import { BusNode } from './BusNode.js'; +import { ConnectionBusNode } from './ConnectionBusNode.js'; +import { ServiceBusNode } from './ServiceBusNode.js'; +import { EnumTypeNode } from './EnumTypeNode.js'; +import AliasTypeNode from './AliasTypeNode.js'; +import ConfigSetNode from './ConfigSetNode.js'; +import VariantExpressionNode from './VariantExpressionNode.js'; +import VariantVariableNode from './VariantVariableNode.js'; +import LookupTableNode from './LookupTableNode.js'; +import BreakpointNode from './BreakpointNode.js'; +import NumericTypeNode from './NumericTypeNode.js'; +import ValueTypeNode from './ValueTypeNode.js'; +import VariantControlNode from './VariantControlNode.js'; +import VariantBankNode from './VariantBankNode.js'; +import VariantBankCoderInfoNode from './VariantBankCoderInfoNode.js'; +import CustomObjectNode from './CustomObjectNode.js'; +import ConfigSetRefNode from './ConfigSetRefNode.js'; +import VariantConfigurationDataNode from './VariantConfigurationDataNode.js'; const CLASS_MAP: Record = { 'MatlabVariable': MatlabVariableNode, diff --git a/src/datamodel/node/data/NumericTypeNode.ts b/src/datamodel/node/data/NumericTypeNode.ts index 43bae20..14d2ed2 100644 --- a/src/datamodel/node/data/NumericTypeNode.ts +++ b/src/datamodel/node/data/NumericTypeNode.ts @@ -1,12 +1,12 @@ // Copyright 2026 The MathWorks, Inc. -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import type { PropClass } from '../BaseNode.js'; import type BaseNode from '../BaseNode.js'; import PropName from '../../prop/PropName.js'; import PropDataType from '../../prop/PropDataType.js'; import PropDescription from '../../prop/PropDescription.js'; const CLASS_NAME = 'Simulink.NumericType'; -export default class NumericTypeNode extends DataNode { +export default class NumericTypeNode extends SimulinkObjectNode { Description: string; constructor(name: string, parent: BaseNode | null, props: Record, serial: Record) { super(name, parent, serial); this.Description = (props.Description as string) || ''; } get icon(): string { return this.isDerived ? 'typeNumeric' : 'wsNumeric'; } @@ -17,8 +17,7 @@ export default class NumericTypeNode extends DataNode { get valueEditable(): boolean { return false; } getProperties(): PropClass[] { return [PropName, PropDataType, PropDescription]; } // PI layout is schema-driven (schema/classes/numericType.json). - _getSerializedProperties(): Record { const props = Object.assign({}, this.serial._properties as Record); if ('Description' in (this.serial._properties as Record) || this.Description) { props.Description = this.Description; } return props; } - serializeValue(): unknown { const overrides: Record = {}; if ('Description' in (this.serial._properties as Record) || this.Description) { overrides.Description = this.Description; } return this._serializeSimulinkObject(overrides); } + _serializedOverrides(): Record { return this._gatedProps({ Description: this.Description }); } static get defaultName(): string { return 'NumericType'; } static createDefault(name: string, parent: BaseNode | null): NumericTypeNode { const rawVal = { _array_class: CLASS_NAME, _array_type: 'MATLABArray', _dimensions: [1, 1], _mw_element_type: 'MATLABArray', _elements: [{ _properties: {} }] }; const props = rawVal._elements[0]._properties; const serial = { _rawVal: rawVal, _properties: props }; return new NumericTypeNode(name, parent, props as unknown as Record, serial as unknown as Record); } static parse(rawVal: Record, name: string, parent: BaseNode | null): NumericTypeNode { const elem = rawVal._elements && (rawVal._elements as unknown[])[0]; const props = ((elem && (elem as Record)._properties) || {}) as Record; const serial = { _rawVal: rawVal, _properties: props }; return new NumericTypeNode(name, parent, props, serial as Record); } diff --git a/src/datamodel/node/data/ParameterNode.ts b/src/datamodel/node/data/ParameterNode.ts index ed3eb18..0a908cb 100644 --- a/src/datamodel/node/data/ParameterNode.ts +++ b/src/datamodel/node/data/ParameterNode.ts @@ -26,8 +26,6 @@ export default class ParameterNode extends DataNode { // — see _adoptValueNode; otherwise it lives here and nowhere else. _valueNode: DataNode | null; DataType: string; - _rawMin: unknown; - _rawMax: unknown; Min: number | undefined; Max: number | undefined; Unit: string; @@ -44,8 +42,6 @@ export default class ParameterNode extends DataNode { // Display-only — _getSerializedProperties copies the on-disk properties, so // nothing writes this default back into a file that did not have it. this.DataType = (props.DataType as string) || 'auto'; - this._rawMin = props.Min; - this._rawMax = props.Max; this.Min = ParameterNode._normalizeMinMax(props.Min); this.Max = ParameterNode._normalizeMinMax(props.Max); this.Unit = (props.DocUnits as string) || (props.Unit as string) || ''; @@ -297,16 +293,34 @@ export default class ParameterNode extends DataNode { } else { innerValue = this.Value; } - const props = Object.assign({}, this.serial._properties as Record); + // `sp` is the bag as the FILE holds it, `props` the copy that goes out — the same + // two names SignalNode and BusElementNode use in their versions of this method. + // Every guard below asks `sp`, never the copy, because the question each one asks + // is what the FILE had. The two answer alike today (nothing written into the copy + // shares a key with a later guard), so this is about the next guard added: one + // asking the copy about a key an earlier line already put there — `Value` is + // written before all four — would read this save's own output as evidence about + // the file and write a property the file never carried. + const sp = this.serial._properties as Record; + const props = Object.assign({}, sp); if (innerValue !== undefined) { props.Value = innerValue; } - if ('Min' in (this.serial._properties as Record) || this.Min !== undefined) { - props.Min = this.Min !== undefined ? this.Min : this._rawMin; + // A cleared bound is written as `[]`, the empty value MATLAB itself stores — + // NOT as whatever the file held, which is what this used to fall back to: the + // node's row went blank, the save put the old number back, and the bound + // reappeared on reopen with no error anywhere (the same rule SignalNode already + // wrote correctly). `undefined` is not the alternative: this one bag feeds BOTH + // save paths, and serializePropertyXml spells `undefined` as `Class="char"` — an + // empty char where a double belongs. The residual difference from MATLAB is that + // the TEXT dictionary gets `"Min": []` where MATLAB omits the key entirely; both + // read back as no bound, so this is a correct value spelled our way, not parity. + if ('Min' in sp || this.Min !== undefined) { + props.Min = this.Min !== undefined ? this.Min : []; } - if ('Max' in (this.serial._properties as Record) || this.Max !== undefined) { - props.Max = this.Max !== undefined ? this.Max : this._rawMax; + if ('Max' in sp || this.Max !== undefined) { + props.Max = this.Max !== undefined ? this.Max : []; } - if ('DocUnits' in (this.serial._properties as Record) || this.Unit) { props.DocUnits = this.Unit; } - if ('Description' in (this.serial._properties as Record) || this.Description) { props.Description = this.Description; } + if ('DocUnits' in sp || this.Unit) { props.DocUnits = this.Unit; } + if ('Description' in sp || this.Description) { props.Description = this.Description; } return props; } diff --git a/src/datamodel/node/data/ProjectItemNode.ts b/src/datamodel/node/data/ProjectItemNode.ts index 390dc81..430d710 100644 --- a/src/datamodel/node/data/ProjectItemNode.ts +++ b/src/datamodel/node/data/ProjectItemNode.ts @@ -6,6 +6,7 @@ import PropName from '../../prop/PropName.js'; import PropType from '../../prop/PropType.js'; import PropLocation from '../../prop/PropLocation.js'; import PropLabels from '../../prop/PropLabels.js'; +import { isMatFile, isModelFile, isSlddFile } from '../../fileKinds.js'; export interface ProjectItemOpts { itemType: string; @@ -46,15 +47,17 @@ export default class ProjectItemNode extends BaseNode { if (type === 'Reference') { return 'modelReference'; } - // File: pick by extension. - const lower = this.name.toLowerCase(); - if (lower.endsWith('.slx') || lower.endsWith('.mdl')) { + // File: pick by extension, through the module that owns the case rule. The + // fallback differs from DataSourceNode's on purpose — a project's members are + // arbitrary files (`.m`, `.txt`, an image), so an unrecognised one is generic here, + // where a model's external data sources can only be the three kinds above. + if (isModelFile(this.name)) { return 'simulinkModel_FT'; } - if (lower.endsWith('.sldd')) { + if (isSlddFile(this.name)) { return 'simulinkDataDictionary_FT'; } - if (lower.endsWith('.mat')) { + if (isMatFile(this.name)) { return 'matlabWorkspaceFile'; } return 'wsDefault'; diff --git a/src/datamodel/node/data/ValueTypeNode.ts b/src/datamodel/node/data/ValueTypeNode.ts index 2229e9d..9203c27 100644 --- a/src/datamodel/node/data/ValueTypeNode.ts +++ b/src/datamodel/node/data/ValueTypeNode.ts @@ -1,12 +1,12 @@ // Copyright 2026 The MathWorks, Inc. -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import type { PropClass } from '../BaseNode.js'; import type BaseNode from '../BaseNode.js'; import PropName from '../../prop/PropName.js'; import PropDataType from '../../prop/PropDataType.js'; import PropDescription from '../../prop/PropDescription.js'; const CLASS_NAME = 'Simulink.ValueType'; -export default class ValueTypeNode extends DataNode { +export default class ValueTypeNode extends SimulinkObjectNode { Description: string; DataType: string; constructor(name: string, parent: BaseNode | null, props: Record, serial: Record) { super(name, parent, serial); this.Description = (props.Description as string) || ''; this.DataType = (props.DataType as string) || 'double'; } @@ -21,8 +21,11 @@ export default class ValueTypeNode extends DataNode { get valueEditable(): boolean { return false; } getProperties(): PropClass[] { return [PropName, PropDataType, PropDescription]; } // PI layout is schema-driven (schema/classes/valueType.json). - _getSerializedProperties(): Record { const props = Object.assign({}, this.serial._properties as Record); if ('DataType' in (this.serial._properties as Record) || this.DataType !== 'double') { props.DataType = this.DataType; } if ('Description' in (this.serial._properties as Record) || this.Description) { props.Description = this.Description; } return props; } - serializeValue(): unknown { const overrides: Record = {}; if ('DataType' in (this.serial._properties as Record) || this.DataType !== 'double') { overrides.DataType = this.DataType; } if ('Description' in (this.serial._properties as Record) || this.Description) { overrides.Description = this.Description; } return this._serializeSimulinkObject(overrides); } + // DataType spells its own gate rather than going through _gatedProps: 'double' is what an + // ABSENT DataType means, and it is also truthy, so the shared truthiness test would write + // that default back into every ValueType a dictionary never declared one for. Compared + // against the default instead, only a type the file stated or the model changed is saved. + _serializedOverrides(): Record { const sp = this.serial._properties as Record; const overrides: Record = {}; if ('DataType' in sp || this.DataType !== 'double') { overrides.DataType = this.DataType; } return Object.assign(overrides, this._gatedProps({ Description: this.Description })); } static get defaultName(): string { return 'ValueType'; } static createDefault(name: string, parent: BaseNode | null): ValueTypeNode { const rawVal = { _array_class: CLASS_NAME, _array_type: 'MATLABArray', _dimensions: [1, 1], _mw_element_type: 'MATLABArray', _elements: [{ _properties: {} }] }; const props = rawVal._elements[0]._properties; const serial = { _rawVal: rawVal, _properties: props }; return new ValueTypeNode(name, parent, props as unknown as Record, serial as unknown as Record); } static parse(rawVal: Record, name: string, parent: BaseNode | null): ValueTypeNode { const elem = rawVal._elements && (rawVal._elements as unknown[])[0]; const props = ((elem && (elem as Record)._properties) || {}) as Record; const serial = { _rawVal: rawVal, _properties: props }; return new ValueTypeNode(name, parent, props, serial as Record); } diff --git a/src/datamodel/node/data/VariantBankCoderInfoNode.ts b/src/datamodel/node/data/VariantBankCoderInfoNode.ts index 1ce4fd0..61c46a0 100644 --- a/src/datamodel/node/data/VariantBankCoderInfoNode.ts +++ b/src/datamodel/node/data/VariantBankCoderInfoNode.ts @@ -1,12 +1,12 @@ // Copyright 2026 The MathWorks, Inc. -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import type { PropClass } from '../BaseNode.js'; import type BaseNode from '../BaseNode.js'; import PropName from '../../prop/PropName.js'; import PropValue from '../../prop/PropValue.js'; import PropDataType from '../../prop/PropDataType.js'; const CLASS_NAME = 'Simulink.VariantBankCoderInfo'; -export default class VariantBankCoderInfoNode extends DataNode { +export default class VariantBankCoderInfoNode extends SimulinkObjectNode { Value: unknown; constructor(name: string, parent: BaseNode | null, props: Record, serial: Record) { super(name, parent, serial); this.Value = props.Value !== undefined ? props.Value : ''; } get icon(): string { return 'wsParameters_bankCoderInfo'; } @@ -14,8 +14,8 @@ export default class VariantBankCoderInfoNode extends DataNode { get displayValue(): string { return PropValue.format(this.Value); } getProperties(): PropClass[] { return [PropName, PropValue, PropDataType]; } // PI layout: schema-driven "General" group (classes/variantBankCoderInfo.json). - _getSerializedProperties(): Record { const props = Object.assign({}, this.serial._properties as Record); props.Value = this.Value; return props; } - serializeValue(): unknown { return this._serializeSimulinkObject({ Value: this.Value }); } + // UNGATED, as VariantBankNode's Value is. + _serializedOverrides(): Record { return { Value: this.Value }; } static get defaultName(): string { return 'VariantBankCoderInfo'; } static createDefault(name: string, parent: BaseNode | null): VariantBankCoderInfoNode { const rawVal = { _array_class: CLASS_NAME, _array_type: 'MATLABArray', _dimensions: [1, 1], _mw_element_type: 'MATLABArray', _elements: [{ _properties: { Value: '' } }] }; const props = rawVal._elements[0]._properties; const serial = { _rawVal: rawVal, _properties: props }; return new VariantBankCoderInfoNode(name, parent, props as unknown as Record, serial as unknown as Record); } static parse(rawVal: Record, name: string, parent: BaseNode | null): VariantBankCoderInfoNode { const elem = rawVal._elements && (rawVal._elements as unknown[])[0]; const props = ((elem && (elem as Record)._properties) || {}) as Record; const serial = { _rawVal: rawVal, _properties: props }; return new VariantBankCoderInfoNode(name, parent, props, serial as Record); } diff --git a/src/datamodel/node/data/VariantBankNode.ts b/src/datamodel/node/data/VariantBankNode.ts index 37c9616..36ffeb8 100644 --- a/src/datamodel/node/data/VariantBankNode.ts +++ b/src/datamodel/node/data/VariantBankNode.ts @@ -1,12 +1,12 @@ // Copyright 2026 The MathWorks, Inc. -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import type { PropClass } from '../BaseNode.js'; import type BaseNode from '../BaseNode.js'; import PropName from '../../prop/PropName.js'; import PropValue from '../../prop/PropValue.js'; import PropDataType from '../../prop/PropDataType.js'; const CLASS_NAME = 'Simulink.VariantBank'; -export default class VariantBankNode extends DataNode { +export default class VariantBankNode extends SimulinkObjectNode { Value: unknown; constructor(name: string, parent: BaseNode | null, props: Record, serial: Record) { super(name, parent, serial); this.Value = props.Value !== undefined ? props.Value : ''; } get icon(): string { return 'wsParameters_bank'; } @@ -14,8 +14,9 @@ export default class VariantBankNode extends DataNode { get displayValue(): string { return PropValue.format(this.Value); } getProperties(): PropClass[] { return [PropName, PropValue, PropDataType]; } // PI layout: schema-driven "General" group (classes/variantBank.json). - _getSerializedProperties(): Record { const props = Object.assign({}, this.serial._properties as Record); props.Value = this.Value; return props; } - serializeValue(): unknown { return this._serializeSimulinkObject({ Value: this.Value }); } + // UNGATED: the Value is what the bank IS, so it is written whether or not the file + // carried the key. + _serializedOverrides(): Record { return { Value: this.Value }; } static get defaultName(): string { return 'VariantBank'; } static createDefault(name: string, parent: BaseNode | null): VariantBankNode { const rawVal = { _array_class: CLASS_NAME, _array_type: 'MATLABArray', _dimensions: [1, 1], _mw_element_type: 'MATLABArray', _elements: [{ _properties: { Value: '' } }] }; const props = rawVal._elements[0]._properties; const serial = { _rawVal: rawVal, _properties: props }; return new VariantBankNode(name, parent, props as unknown as Record, serial as unknown as Record); } static parse(rawVal: Record, name: string, parent: BaseNode | null): VariantBankNode { const elem = rawVal._elements && (rawVal._elements as unknown[])[0]; const props = ((elem && (elem as Record)._properties) || {}) as Record; const serial = { _rawVal: rawVal, _properties: props }; return new VariantBankNode(name, parent, props, serial as Record); } diff --git a/src/datamodel/node/data/VariantConfigurationDataNode.ts b/src/datamodel/node/data/VariantConfigurationDataNode.ts index 89c5b9c..c00e002 100644 --- a/src/datamodel/node/data/VariantConfigurationDataNode.ts +++ b/src/datamodel/node/data/VariantConfigurationDataNode.ts @@ -1,11 +1,11 @@ // Copyright 2026 The MathWorks, Inc. -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import type { PropClass } from '../BaseNode.js'; import type BaseNode from '../BaseNode.js'; import PropName from '../../prop/PropName.js'; import PropDataType from '../../prop/PropDataType.js'; const CLASS_NAME = 'Simulink.VariantConfigurationData'; -export default class VariantConfigurationDataNode extends DataNode { +export default class VariantConfigurationDataNode extends SimulinkObjectNode { Value: unknown; constructor(name: string, parent: BaseNode | null, props: Record, serial: Record) { super(name, parent, serial); this.Value = props.Value !== undefined ? props.Value : ''; } get icon(): string { return 'variantSettings'; } @@ -17,8 +17,8 @@ export default class VariantConfigurationDataNode extends DataNode { get valueEditable(): boolean { return false; } getProperties(): PropClass[] { return [PropName, PropDataType]; } // PI layout: schema-driven "General" group (classes/variantConfigurationData.json). - _getSerializedProperties(): Record { const props = Object.assign({}, this.serial._properties as Record); props.Value = this.Value; return props; } - serializeValue(): unknown { return this._serializeSimulinkObject({ Value: this.Value }); } + // UNGATED, as VariantBankNode's Value is. + _serializedOverrides(): Record { return { Value: this.Value }; } static get defaultName(): string { return 'VariantConfigurationData'; } static createDefault(name: string, parent: BaseNode | null): VariantConfigurationDataNode { const rawVal = { _array_class: CLASS_NAME, _array_type: 'MATLABArray', _dimensions: [1, 1], _mw_element_type: 'MATLABArray', _elements: [{ _properties: { Value: '' } }] }; const props = rawVal._elements[0]._properties; const serial = { _rawVal: rawVal, _properties: props }; return new VariantConfigurationDataNode(name, parent, props as unknown as Record, serial as unknown as Record); } static parse(rawVal: Record, name: string, parent: BaseNode | null): VariantConfigurationDataNode { const elem = rawVal._elements && (rawVal._elements as unknown[])[0]; const props = ((elem && (elem as Record)._properties) || {}) as Record; const serial = { _rawVal: rawVal, _properties: props }; return new VariantConfigurationDataNode(name, parent, props, serial as Record); } diff --git a/src/datamodel/node/data/VariantControlNode.ts b/src/datamodel/node/data/VariantControlNode.ts index 687f1d6..8309ce3 100644 --- a/src/datamodel/node/data/VariantControlNode.ts +++ b/src/datamodel/node/data/VariantControlNode.ts @@ -1,5 +1,6 @@ // Copyright 2026 The MathWorks, Inc. -import DataNode, { type SetPropertyResult } from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; +import type { SetPropertyResult } from '../DataNode.js'; import type { PropClass } from '../BaseNode.js'; import type BaseNode from '../BaseNode.js'; import PropName from '../../prop/PropName.js'; @@ -12,7 +13,7 @@ const CLASS_NAME = 'Simulink.VariantControl'; const MSG_INTEGER = 'Simulink.VariantControl value must be an integer, logical, an enumeration, or a Simulink.Parameter with value of type integer, logical or enumeration.'; const MSG_SCALAR = 'Simulink.VariantControl value must be a scalar or a Simulink.Parameter with scalar value.'; -export default class VariantControlNode extends DataNode { +export default class VariantControlNode extends SimulinkObjectNode { Value: unknown; constructor(name: string, parent: BaseNode | null, props: Record, serial: Record) { super(name, parent, serial); this.Value = props.Value !== undefined ? props.Value : ''; } get icon(): string { return 'twoConnected_wsDefault'; } @@ -85,8 +86,9 @@ export default class VariantControlNode extends DataNode { return true; } - _getSerializedProperties(): Record { const props = Object.assign({}, this.serial._properties as Record); props.Value = this.Value; return props; } - serializeValue(): unknown { return this._serializeSimulinkObject({ Value: this.Value }); } + // UNGATED: the Value is what the control selects with, so it is written whether or not + // the file carried the key — including the empty one setProperty accepts above. + _serializedOverrides(): Record { return { Value: this.Value }; } static get defaultName(): string { return 'VariantControl'; } static createDefault(name: string, parent: BaseNode | null): VariantControlNode { const rawVal = { _array_class: CLASS_NAME, _array_type: 'MATLABArray', _dimensions: [1, 1], _mw_element_type: 'MATLABArray', _elements: [{ _properties: { Value: '' } }] }; const props = rawVal._elements[0]._properties; const serial = { _rawVal: rawVal, _properties: props }; return new VariantControlNode(name, parent, props as unknown as Record, serial as unknown as Record); } static parse(rawVal: Record, name: string, parent: BaseNode | null): VariantControlNode { const elem = rawVal._elements && (rawVal._elements as unknown[])[0]; const props = ((elem && (elem as Record)._properties) || {}) as Record; const serial = { _rawVal: rawVal, _properties: props }; return new VariantControlNode(name, parent, props, serial as Record); } diff --git a/src/datamodel/node/data/VariantExpressionNode.ts b/src/datamodel/node/data/VariantExpressionNode.ts index 21f70ac..8cc91df 100644 --- a/src/datamodel/node/data/VariantExpressionNode.ts +++ b/src/datamodel/node/data/VariantExpressionNode.ts @@ -1,12 +1,12 @@ // Copyright 2026 The MathWorks, Inc. -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import type { PropClass } from '../BaseNode.js'; import type BaseNode from '../BaseNode.js'; import PropName from '../../prop/PropName.js'; import PropCondition from '../../prop/PropCondition.js'; import PropDataType from '../../prop/PropDataType.js'; const CLASS_NAME = 'Simulink.VariantExpression'; -export default class VariantExpressionNode extends DataNode { +export default class VariantExpressionNode extends SimulinkObjectNode { Condition: string; constructor(name: string, parent: BaseNode | null, props: Record, serial: Record) { super(name, parent, serial); this.Condition = (props.Condition as string) || ''; } get icon(): string { return 'wsVariant'; } @@ -14,8 +14,9 @@ export default class VariantExpressionNode extends DataNode { get displayValue(): string { return PropCondition.format(this.Condition); } getProperties(): PropClass[] { return [PropName, PropCondition, PropDataType]; } // PI layout: schema-driven "General" group (classes/variantExpression.json). - _getSerializedProperties(): Record { const props = Object.assign({}, this.serial._properties as Record); props.Condition = this.Condition; return props; } - serializeValue(): unknown { return this._serializeSimulinkObject({ Condition: this.Condition }); } + // UNGATED: the Condition is the expression itself, so it is written whether or not the + // file carried the key. + _serializedOverrides(): Record { return { Condition: this.Condition }; } static get defaultName(): string { return 'VariantExpression'; } static createDefault(name: string, parent: BaseNode | null): VariantExpressionNode { const rawVal = { _array_class: CLASS_NAME, _array_type: 'MATLABArray', _dimensions: [1, 1], _mw_element_type: 'MATLABArray', _elements: [{ _properties: { Condition: '' } }] }; const props = rawVal._elements[0]._properties; const serial = { _rawVal: rawVal, _properties: props }; return new VariantExpressionNode(name, parent, props as unknown as Record, serial as unknown as Record); } static parse(rawVal: Record, name: string, parent: BaseNode | null): VariantExpressionNode { const elem = rawVal._elements && (rawVal._elements as unknown[])[0]; const props = ((elem && (elem as Record)._properties) || {}) as Record; const serial = { _rawVal: rawVal, _properties: props }; return new VariantExpressionNode(name, parent, props, serial as Record); } diff --git a/src/datamodel/node/data/VariantVariableNode.ts b/src/datamodel/node/data/VariantVariableNode.ts index ea2c0a2..8ce9618 100644 --- a/src/datamodel/node/data/VariantVariableNode.ts +++ b/src/datamodel/node/data/VariantVariableNode.ts @@ -1,12 +1,12 @@ // Copyright 2026 The MathWorks, Inc. -import DataNode from '../DataNode.js'; +import SimulinkObjectNode from '../SimulinkObjectNode.js'; import type { PropClass } from '../BaseNode.js'; import type BaseNode from '../BaseNode.js'; import PropName from '../../prop/PropName.js'; import PropSpecification from '../../prop/PropSpecification.js'; import PropDataType from '../../prop/PropDataType.js'; const CLASS_NAME = 'Simulink.VariantVariable'; -export default class VariantVariableNode extends DataNode { +export default class VariantVariableNode extends SimulinkObjectNode { Specification: string; constructor(name: string, parent: BaseNode | null, props: Record, serial: Record) { super(name, parent, serial); this.Specification = (props.Specification as string) || ''; } get icon(): string { return 'variant_wsParameters'; } @@ -14,13 +14,17 @@ export default class VariantVariableNode extends DataNode { get displayValue(): string { return PropSpecification.format(this.Specification); } getProperties(): PropClass[] { return [PropName, PropSpecification, PropDataType]; } // PI layout: schema-driven "General" group (classes/variantVariable.json). - // Through _mergeProps rather than a plain assign so an EMPTY Specification is not - // written next to a saveobj envelope. A variant that serializes through saveobj keeps - // its Specification INSIDE the envelope, where this node cannot see it, so - // `(props.Specification as string) || ''` above is a default and not a value — - // writing it back grew a `

` MATLAB never wrote. - _getSerializedProperties(): Record { return this._mergeProps({ Specification: this.Specification }); } - serializeValue(): unknown { return this._serializeSimulinkObject({ Specification: this.Specification }); } + // UNGATED: the Specification is the variable's whole content. What is special here is the + // BINARY path below, not this list. + _serializedOverrides(): Record { return { Specification: this.Specification }; } + // The one class that overrides the binary path, to reach it through _mergeProps rather + // than the plain assign SimulinkObjectNode uses, so an EMPTY Specification is not written + // next to a saveobj envelope. A variant that serializes through saveobj keeps its + // Specification INSIDE the envelope, where this node cannot see it, so + // `(props.Specification as string) || ''` above is a default and not a value — writing it + // back grew a `

` MATLAB never wrote. The list it + // merges is the same one the text path merges; only the merge differs. + _getSerializedProperties(): Record { return this._mergeProps(this._serializedOverrides()); } static get defaultName(): string { return 'VariantVariable'; } static createDefault(name: string, parent: BaseNode | null): VariantVariableNode { const rawVal = { _array_class: CLASS_NAME, _array_type: 'MATLABArray', _dimensions: [1, 1], _mw_element_type: 'MATLABArray', _elements: [{ _properties: { Specification: '' } }] }; const props = rawVal._elements[0]._properties; const serial = { _rawVal: rawVal, _properties: props }; return new VariantVariableNode(name, parent, props as unknown as Record, serial as unknown as Record); } static parse(rawVal: Record, name: string, parent: BaseNode | null): VariantVariableNode { const elem = rawVal._elements && (rawVal._elements as unknown[])[0]; const props = ((elem && (elem as Record)._properties) || {}) as Record; const serial = { _rawVal: rawVal, _properties: props }; return new VariantVariableNode(name, parent, props, serial as Record); } diff --git a/src/datamodel/node/data/matlabValueRules.ts b/src/datamodel/node/data/matlabValueRules.ts new file mode 100644 index 0000000..0f69a7d --- /dev/null +++ b/src/datamodel/node/data/matlabValueRules.ts @@ -0,0 +1,221 @@ +// Copyright 2026 The MathWorks, Inc. +// +// The rules about a MATLAB VALUE, with no node anywhere in them. +// +// What class a value keeps across an edit, when a number cannot be spelled as a bare +// JSON literal, how a matrix prints and how that printing reads back: every question +// here is answered from the arguments alone. None of these functions reads node state, +// which is why they were module-local functions inside `MatlabVariableNode.ts` rather +// than methods on it — staying off the class is what lets that file's display getters +// and its static parse entry points share them without either side owning the other. +// +// Being a separate module says the same thing one degree louder, and that is the whole +// gain: the rules cannot acquire a `this` even by accident, and a reader asking "what +// happens to an int32 when its Value is edited?" reads one short file instead of +// searching a 2600-line state machine over `_kind` for the four lines that answer it. +// The reverse direction is the useful one too — a change here is visibly a change to +// what a MATLAB value MEANS, not an incidental edit inside a node. +// +// The MATLAB quirks these encode, so that none of them has to be rediscovered as a bug: +// +// * JSON has ONE number type. `TYPED_NUMERIC_CLASS` names the classes that therefore +// cannot survive as a bare JSON number, and `classAfterEdit`, `elementClass` and +// `needsTypedLiteral` are three views of that one set — change any of them and ask +// whether the other two still mean what they meant. +// * A char matrix is stored COLUMN-major, so `formatCharMatrix` strides through the +// text rather than slicing it. +// * MATLAB's 64-bit integer range is wider than a double's exact one BY +// CONSTRUCTION, so `parseMatrixValue` keeps int64/uint64 elements as decimal text. +// +// One name to be careful about: `formatMatrix` here is the DISPLAY formatter — the +// `[1 2 3; 4 5 6]` a Value cell shows. `BinarySlddParser` has its own module-local +// `formatMatrix` that builds the `Matrix(...)` SERIAL form a `.sldd` stores. Same name, +// opposite ends of the pipeline, no relation; `parseMatrixValue` below is the one that +// reads that serial form back. +// +// Everything here was module-private before it moved, and is `export`ed only so its one +// consumer, `MatlabVariableNode.ts`, can still reach it. That is a real widening of +// visibility, deliberately stopped at the package boundary: none of these names appears +// in `src/index.ts` or `src/node/index.ts`, so they stay internal to this package and a +// consumer cannot start depending on one. + +import { formatMatlabChar, formatMatlabString } from '../../parser/MatlabValueParser.js'; +import type { MatVariable } from '../../parser/MatParser.js'; +import { EMPTY_NUMERIC, MISSING_STRING } from '../../display/DisplayConvention.js'; +import { formatMatlabNum, parseMatlabNum, parseExactNum, needsExactInt } from '../../parser/XmlUtils.js'; + +// An empty 0x0 double, MATLAB's own `[]`. Stands in for a cell slot the parser +// could not read (see _createFromMatCell) and for a struct-array element that no +// longer has one of the array's fields (see _buildVarObject): in both places a +// hole must stay a hole, or every later element slides one slot early. +// A fresh object per call, since the node built from it keeps a reference. +export function emptyDouble(): MatVariable { + return { + name: '', + className: 'double', + dimensions: [0, 0], + isComplex: false, + isLogical: false, + value: [], + fields: null, + }; +} + +// One element of a string array as MATLAB displays it: quoted, or the unquoted +// `` for a `missing`. `null` is the marker for a `missing` because the display +// text cannot be — a real string whose characters are `` still has to print +// quoted, and the two would be indistinguishable if the marker were the text. +// `undefined` is a hole rather than a missing (a shorter `_elements` than `_dims` +// claims), and prints as the empty string it always did. +export function formatStringElement(el: unknown): string { + if (el === null) return MISSING_STRING; + return formatMatlabString(el !== undefined ? String(el) : ''); +} + +// The MATLAB numeric classes a bare JSON number cannot carry. JSON has ONE number +// type, so an int32 or a single written as a plain number reads back as a double — +// a silent class change, not a rounding nit. `double` needs no tag. +export const TYPED_NUMERIC_CLASS = /^(?:u?int(?:8|16|32|64)|single)$/; + +// The class a value keeps across an edit. A Value edit sets the VALUE, not the +// class — MATLAB's own `v(:) = 7` on an int32 stays int32, and the Data Type +// column is read-only here — but MatlabValueParser cannot know the class: a bare +// `7` always parses as 'double'. So the node's existing class beats the parser's +// default. Only the integer/single classes qualify: every number is representable +// in them, whereas keeping 'logical' would render `7` as `true`, which MATLAB +// rejects outright. +export function classAfterEdit(current: string, parsedType: string): string { + return parsedType === 'double' && TYPED_NUMERIC_CLASS.test(current) ? current : parsedType; +} + +// The class one ELEMENT of a numeric array carries. One MATLAB array is one class, +// so an element of an int32 array is an int32 and an element of a logical array is a +// logical. The element rows' hardcoded 'double' put 'int32' in the array's Data Type +// column and 'double' in the column of every row beneath it — one value described two +// ways, one of them wrong — and showed a logical array as [true false] over rows +// reading 1 and 0, leaking the 1/0 storage form into the UI. +// +// classAfterEdit's set plus 'logical'. For the integer/single classes this moves the +// Data Type column and nothing else, since they format through formatMatlabNum +// exactly as a double does. 'logical' additionally changes the element's icon and +// text (see MatlabVariableNode's icon getter and _formatScalar), which is the point: +// the row should look like the logical scalar it is, checkbox included. It is also why +// _setConstrainedValue has a logical arm — a row that reads 'true' has to accept 'true'. +// +// Cell and struct children never come through here: they are independent values, and +// their container has no one class to hand down. +export function elementClass(arrayClass: string): string { + return TYPED_NUMERIC_CLASS.test(arrayClass) || arrayClass === 'logical' ? arrayClass : 'double'; +} + +// True when a scalar has to be written as the format's typed {_type,_value} +// literal rather than a bare JSON value. Both reasons are silent data loss: +// an int32/single written bare reads back as double (see TYPED_NUMERIC_CLASS), +// and JSON has no literal for Inf/NaN — JSON.stringify writes `null`, which reads +// back as 0. A `logical` normally travels as a JS boolean and needs no tag, except +// when it came from an array, whose elements the parser stores as 1/0. +export function needsTypedLiteral(type: string, value: unknown): boolean { + if (TYPED_NUMERIC_CLASS.test(type)) { + return true; + } + if (type === 'logical') { + return typeof value !== 'boolean'; + } + return typeof value === 'number' && !isFinite(value); +} + +// A MATLAB matrix literal: `[1 2 3; 4 5 6]`. Only ever called for rank <= 2 — the +// caller summarizes anything higher, because mat2str itself refuses rank >= 3 and +// there is no MATLAB one-line spelling to match. +// +// The row loop used to run the full rows x cols grid and print '?' for anything it +// could not find, so an element list shorter than the declared shape filled the +// display with question marks. It now formats the elements that exist. +export function formatMatrix(rows: number, cols: number, elements: unknown[]): string { + if (elements.length === 0) { + return EMPTY_NUMERIC; + } + const rowStrs: string[] = []; + for (let r = 0; r < rows; r++) { + const vals: string[] = []; + for (let c = 0; c < cols; c++) { + const i = r * cols + c; + if (i >= elements.length) { + break; + } + vals.push(formatMatlabNum(elements[i])); + } + if (vals.length > 0) { + rowStrs.push(vals.join(' ')); + } + } + return '[' + rowStrs.join('; ') + ']'; +} + +// A char MATRIX as MATLAB prints one: `['ab'; 'cd']`, one quoted string per ROW. +// +// The stored text is column-major (see XmlUtils' char section), so row r is every +// rows-th character starting at r — MATLAB's own 2x2 'acbd' is rows 'ab' and 'cd'. +// Each row is quoted through formatMatlabChar, so an apostrophe inside one doubles +// exactly as it does in the scalar spelling. +// +// Rank 2 only: the caller summarizes anything higher, for the same reason formatMatrix +// does — MATLAB has no one-line print of a rank-3 array of any class. +export function formatCharMatrix(text: string, dims: number[]): string { + const rows = dims[0]; + const cols = dims[1]; + const rowStrs: string[] = []; + for (let r = 0; r < rows; r++) { + let row = ''; + for (let c = 0; c < cols; c++) { + row += text.charAt(c * rows + r); + } + rowStrs.push(formatMatlabChar(row)); + } + return '[' + rowStrs.join('; ') + ']'; +} + +export function parseMatrixValue( + raw: Record, +): { dims: number[]; elements: (number | string)[]; type: string } | null { + const lines = (raw._value as string).split('\n'); + const header = lines[0]; + // Rank 3 and up appear as Matrix(2,3,2) — MATLAB's binary dictionary writes a + // 2x3x2 as Dimension="2*3*2", and BinarySlddParser now carries every extent + // through. Only the two-group form was matched, so an N-D entry fell through + // to the [0,0] empty node with all twelve of its elements gone. + const dimsMatch = header.match(/^Matrix\((\d+(?:,\d+)*)\)$/); + if (!dimsMatch) { + return null; + } + + const dims = dimsMatch[1].split(',').map(function (s) { + return parseInt(s, 10); + }); + const body = lines.slice(1).join(''); + + const numbers: (number | string)[] = []; + // Inf/-Inf/NaN are elements too, and a digits-only pattern would skip them — + // shifting every later element one slot left and corrupting the whole matrix. + const numMatches = body.match(/-?(?:[\d.]+(?:[eE][+-]?\d+)?|Inf|NaN)/g); + if (numMatches) { + // An int64/uint64 element is kept as exact decimal TEXT: MATLAB's 64-bit range is + // wider than a double's exact one BY CONSTRUCTION, so parseMatlabNum turned + // maxU64 into 18446744073709552000 one step after the reader had it right + // (defect 29). The suffix never reaches here — the pattern above matches digits, + // so '18446744073709551615U' arrives already bare. + const exact = needsExactInt(raw._type as string); + numMatches.forEach(function (s: string) { + numbers.push(exact ? parseExactNum(s) : parseMatlabNum(s)); + }); + } + + // A one-group header (Matrix(5)) has no MATLAB spelling but is cheap to accept + // as the row vector it must mean, rather than handing back a rank-1 dims array + // every downstream reader would have to special-case. + return { + dims: dims.length >= 2 ? dims : [1, dims[0] || 0], + elements: numbers, + type: raw._type as string, + }; +} diff --git a/src/datamodel/parser/BinarySlddParser.ts b/src/datamodel/parser/BinarySlddParser.ts index 1e905d5..1adcdfa 100644 --- a/src/datamodel/parser/BinarySlddParser.ts +++ b/src/datamodel/parser/BinarySlddParser.ts @@ -53,6 +53,7 @@ import { scPartUnreadableMessage, scanScXml, } from './ScCatalog.js'; +import { DATA_PART_KEY, DATA_PART_XML, TEXT_CONTENT, TEXT_PARTS } from './SlddParts.js'; import { charNeedsShape, formatDoubleXml, @@ -155,15 +156,15 @@ export function parseBinarySldd( const entries = unzipSync(uint8); const decoder = new TextDecoder(); - const dataXml = entries['data/chunk0.xml']; + const dataXml = entries[DATA_PART_XML]; if (!dataXml) { - throw new Error('Missing data/chunk0.xml in binary SLDD'); + throw new Error(`Missing ${DATA_PART_XML} in binary SLDD`); } const xmlString = decoder.decode(dataXml); const zipMetadata: Record = {}; for (const [name, data] of Object.entries(entries)) { - if (name !== 'data/chunk0.xml') { + if (name !== DATA_PART_XML) { zipMetadata[name] = data; } } @@ -230,7 +231,7 @@ export function parseBinarySlddParts( refused = true; warnings?.push({ code: 'source-unreadable', - message: `The dictionary part "data/chunk0.xml" could not be read (${reasonOf(err)}), ` + message: `The dictionary part "${DATA_PART_XML}" could not be read (${reasonOf(err)}), ` + 'so this dictionary reads as empty.', }); } @@ -240,7 +241,7 @@ export function parseBinarySlddParts( if (!refused && !Object.prototype.hasOwnProperty.call(doc, 'DataSource')) { warnings?.push({ code: 'source-unreadable', - message: 'The dictionary part "data/chunk0.xml" holds no element, ' + message: `The dictionary part "${DATA_PART_XML}" holds no element, ` + 'so this dictionary reads as empty.', }); } @@ -303,9 +304,9 @@ export function parseBinarySlddParts( return { __MW_TEXT_COREPROPERTIES__: { release }, - __MW_TEXT_PARTS__: { - '__MW_TEXT_PART__/data/chunk0': { - __MW_TEXT_content: { + [TEXT_PARTS]: { + [DATA_PART_KEY]: { + [TEXT_CONTENT]: { entries: ddEntries, 'Dictionary References': dictionaryReferences, AllowAccessBWS: allowAccessBWS, diff --git a/src/datamodel/parser/BinarySlddSerializer.ts b/src/datamodel/parser/BinarySlddSerializer.ts index fda4599..0096e0c 100644 --- a/src/datamodel/parser/BinarySlddSerializer.ts +++ b/src/datamodel/parser/BinarySlddSerializer.ts @@ -8,6 +8,7 @@ import { zipSync } from 'fflate'; import { escapeXml, matlabTimestampNow } from './XmlUtils.js'; +import { DATA_PART_XML } from './SlddParts.js'; import type SlddNode from '../node/container/SlddNode.js'; import type DataNode from '../node/DataNode.js'; @@ -21,7 +22,7 @@ export function serializeBinarySldd(slddNode: SlddNode): ArrayBuffer { zipEntries[name] = data as Uint8Array; } } - zipEntries['data/chunk0.xml'] = encoder.encode(xmlString); + zipEntries[DATA_PART_XML] = encoder.encode(xmlString); const zipped = zipSync(zipEntries, { level: 6 }); return zipped.buffer.slice(zipped.byteOffset, zipped.byteOffset + zipped.byteLength); diff --git a/src/datamodel/parser/MatlabValueParser.ts b/src/datamodel/parser/MatlabValueParser.ts index 87ee0ed..0e277cd 100644 --- a/src/datamodel/parser/MatlabValueParser.ts +++ b/src/datamodel/parser/MatlabValueParser.ts @@ -1,5 +1,5 @@ // Copyright 2026 The MathWorks, Inc. -import { parseExactNum } from './XmlUtils.js'; +import { parseExactNum, formatMatrixSerial, formatMxCharSerial } from './XmlUtils.js'; export interface ParsedValue { type: string; @@ -263,15 +263,13 @@ function parseArray(str: string): ParsedValue | null { return null; } - const elements: unknown[] = []; - for (let r = 0; r < matrix.length; r++) { - for (let c = 0; c < cols; c++) { - elements.push(matrix[r][c]); - } - } + // A STRING array's element list is column-major and a numeric one's is row-major — + // not a preference here, but what the readers deliver (see flatten). Writing one + // loop for both is what made a 2x2 string array come back transposed (defect 50). if (isStringArray) { - return { type: 'string-array', value: elements, dims: [matrix.length, cols] }; + return { type: 'string-array', value: flatten(matrix, cols, 'column'), dims: [matrix.length, cols] }; } + const elements = flatten(matrix, cols, 'row'); // 'logical' with an ARRAY value, not a type of its own: the two are told apart by // Array.isArray at every consumer that cares (see _applyParsed and // parsedIsScalarNumeric), the same way 'double' already carries both a scalar and an @@ -284,6 +282,42 @@ function parseArray(str: string): ParsedValue | null { return { type: 'double', value: elements, dims: [matrix.length, cols] }; } +// A literal's rows, flattened into the ONE element list the node layer wants — and the +// order is not the same for every type, which is the whole reason this is a named +// function with an argument rather than the loop it used to be at each site. +// +// A cell's and a string array's element list reach the node layer COLUMN-major; a +// numeric one's reaches it ROW-major. That is measured, not chosen: +// `MatParser.parseMatrix` transposes only its numeric branch and stores cells in file +// order, MATLAB writes both cells and strings column-major, and all four containers +// agree — `test/cellElementOrder.test.ts` pins it against MATLAB's own subscripts in +// `truth.json`. `formatMatrixSerial` then re-transposes the numeric list on the way +// out, which is why row-major is right there and only there. +// +// Every site here used to flatten row-major, so committing a multi-ROW cell or string +// array TRANSPOSED it — `{1 2; 3 4}` came back `{1 3; 2 4}` and saved that way, and +// retyping the displayed text transposed it again (defect 50). It hid for as long as it +// did because a 1xN and an Nx1 read the same in either order, and every editable cell +// fixture in the corpus is a vector. `charFromRows` below had the column-major rule +// right from the start, for the same reason and one value type away. +function flatten(matrix: unknown[][], cols: number, order: 'row' | 'column'): unknown[] { + const elements: unknown[] = []; + if (order === 'column') { + for (let c = 0; c < cols; c++) { + for (let r = 0; r < matrix.length; r++) { + elements.push(matrix[r][c]); + } + } + return elements; + } + for (let r = 0; r < matrix.length; r++) { + for (let c = 0; c < cols; c++) { + elements.push(matrix[r][c]); + } + } + return elements; +} + // The char array `['ab'; 'cd']` spells, from its already-concatenated rows. // // Every row must be the same LENGTH — MATLAB's own rule for vertical char @@ -361,13 +395,9 @@ function parseCell(str: string): ParsedValue | null { return { type: 'cell', value: [], dims: [0, 0] }; } - const elements: unknown[] = []; - for (let r = 0; r < matrix.length; r++) { - for (let c = 0; c < cols; c++) { - elements.push(matrix[r][c]); - } - } - return { type: 'cell', value: elements, dims: [matrix.length, cols] }; + // Column-major, which is the order every reader delivers a cell's elements in and + // the order MATLAB writes them (defect 50 — see flatten). + return { type: 'cell', value: flatten(matrix, cols, 'column'), dims: [matrix.length, cols] }; } // Split on the row separator, ignoring any ';' that is inside a nested @@ -438,6 +468,17 @@ function tokenizeNumbers(rowStr: string): { nums: (number | string)[]; allLogica return nums.length > 0 ? { nums, allLogical } : null; } +// One row of a cell literal, as the raw element values a cell node is built from. +// +// Each element is handed to the SAME `parse` the whole value goes through and then +// spelled by cellElementRaw, so an element of a cell is read exactly like a value of +// its own. This arm used to do its own reading per bracket kind, and the readings +// disagreed with the top level: `[` pushed `parseArray(...).value`, the flat element +// list with the DIMS DROPPED, so `{[1;2]}` came back as a 1x2 and committed as +// `{[1 2]}` — in the file as well as on screen, since _serializeCell rebuilds each +// element from its child node (defect 49, reported from the extension). The `{` arm +// was right precisely because it kept a wrapper carrying `nested.dims`; that wrapper +// is now what every shaped element gets. function tokenizeCellElements(rowStr: string): unknown[] | null { const elements: unknown[] = []; let i = 0; @@ -447,62 +488,146 @@ function tokenizeCellElements(rowStr: string): unknown[] | null { while (i < len && (rowStr.charAt(i) === ' ' || rowStr.charAt(i) === ',')) { i++; } if (i >= len) { break; } + // The span of ONE element. Bracketed and quoted spans are measured by the + // scanners that already know where they end (a ',' or ' ' inside either is + // ordinary content); a bare token runs to the next separator. const ch = rowStr.charAt(i); + let span: string; if (ch === "'" || ch === '"') { const scanned = scanQuoted(rowStr, i); if (!scanned) { return null; } - elements.push(scanned.text); + span = rowStr.slice(i, scanned.next); i = scanned.next; - } else if (ch === '[') { - const end = findMatchingBracket(rowStr, i, '[', ']'); - if (end < 0) { return null; } - const nested = parseArray(rowStr.slice(i, end + 1)); - if (nested === null) { return null; } - // Same reason as parseLiteral: a numeric array inside a cell is a double - // array, so no exact-integer token leaves parseCell. `type === 'double'` is - // the gate rather than the value's shape, because a string array's elements - // are strings too and {["12" "ab"]} must keep "12" as text. - elements.push(collapseExact(nested).value); - i = end + 1; - } else if (ch === '{') { - const end = findMatchingBracket(rowStr, i, '{', '}'); + } else if (ch === '[' || ch === '{') { + const end = findMatchingBracket(rowStr, i, ch, ch === '[' ? ']' : '}'); if (end < 0) { return null; } - const nested = parseCell(rowStr.slice(i, end + 1)); - if (nested === null) { return null; } - elements.push({ - _array_type: 'Cell', - _dimensions: nested.dims, - _elements: nested.value, - _mw_element_type: 'MATLABArray' - }); + span = rowStr.slice(i, end + 1); i = end + 1; } else { let end = i; while (end < len && rowStr.charAt(end) !== ',' && rowStr.charAt(end) !== ' ' && rowStr.charAt(end) !== ';') { end++; } - const token = rowStr.slice(i, end); - elements.push(parseLiteral(token)); + span = rowStr.slice(i, end); i = end; } + + const parsed = parse(span); + if (parsed === null) { + // A bare identifier in a cell stays text — {a, b} is a cell of two names as + // far as this reader is concerned, and refusing it would reject a value the + // table can perfectly well show. A malformed BRACKETED or QUOTED span is a + // different thing: it announced a shape and then failed to be one, so it is + // still a rejection of the whole cell. + if (ch === '[' || ch === '{' || ch === "'" || ch === '"') { return null; } + elements.push(span); + continue; + } + elements.push(cellElementRaw(parsed)); } return elements.length > 0 ? elements : null; } -function parseLiteral(token: string): unknown { - if (token === 'true') { return true; } - if (token === 'false') { return false; } - const n = parseMatlabNumber(token); - // A CELL element's class comes from its own literal, and a bare decimal literal is a - // double in MATLAB — {18446744073709551615} holds a double, not a uint64 — so the - // exact-integer token collapses here rather than being carried out of the parser. - // A cell element has no class beside it to consult later, and a bare string in one - // IS text (see the `return token` below), so a token that escaped would come back - // as the char '18446744073709551615'. - if (typeof n === 'string') { return Number(n); } - if (n !== null) { return n; } - // Not a number — keep the raw token (a bare identifier in a cell stays text). - return token; +/** + * One parsed element, in the raw form the READERS produce for that same value — the + * shape NodeRegistry.parseValue dispatches on and _serializeCell writes back. + * + * This is the cell twin of MatlabVariableNode._serializeArray: a shaped value has to + * state its shape, because the bare JSON list every element used to take has nowhere + * to carry [2,1] and reads back as a row. Each arm below is MATLAB's OWN spelling for + * that element, read off two text .sldd files MATLAB wrote itself + * (test/parity/matlab/probe_cell_shapes.m): + * + * {[1;2]} {"_type": "double", "_value": "Matrix(2,1)\n[1.0, 2.0]"} + * {[1 2;3 4]} {"_type": "double", "_value": "Matrix(2,2)\n[[1.0, 2.0]; [3.0, 4.0]]"} + * {[1 2]} [1, 2] <- a double ROW, and only that, goes bare + * {[]} [] + * {1} 1 + * {[true;false]} {"_type": "logical", "_value": "Matrix(2,1)\n[1, 0]"} + * {[true false]} {"_type": "logical", "_value": "[1, 0]"} + * {true} true + * {['ab';'cd']} {"_type": "mxchar", "_value": "Matrix(2,2)\n[[97, 98]; [99, 100]]"} + * {'ab'} "ab" + * {["a";"b"]} {"_array_type": "String", "_dimensions": [2,1], "_elements": ["a","b"]} + * {["a" "b"]} {"_array_type": "String", "_dimensions": [1,2], "_elements": ["a","b"]} + * {"a"} ["a"] + * {{1;2}} {"_array_type": "Cell", "_dimensions": [2,1], "_elements": [1,2]} + * + * Note how little of that is a free choice: a double row is bare and a LOGICAL row is + * not, because the bare form says double; a 1x1 string is a one-element LIST because a + * bare JSON string is a char. Where a shape does have to be stated, the spelling comes + * from the same formatMatrixSerial the readers and the write-back path use, so the + * grammar keeps its single owner (defect 19/21) and only the type tag differs. + * + * MATLAB omits `_mw_element_type` from a NESTED wrapper (both cases above). It is kept + * here because our own writers add it back on save regardless (_serializeCell, + * _serializeString), so this matches the shape a re-read of our file produces. + */ +function cellElementRaw(parsed: ParsedValue): unknown { + switch (parsed.type) { + case 'cell': + return { + _array_type: 'Cell', + _dimensions: parsed.dims, + _elements: parsed.value, + _mw_element_type: 'MATLABArray' + }; + case 'string-array': + case 'string': { + // A string is one class with two literals: `["a";"b"]` arrives as an array + // with dims, `"a"` as a lone scalar with none. Neither may be pushed as bare + // TEXT, because a bare JSON string is a char — that is what made `{"a"}` + // display and save as `{'a'}`, retyping the element. + const elems = parsed.type === 'string' ? [parsed.value] : (parsed.value as unknown[]); + // A 1x1 string is the one-element LIST `["a"]`, which is both MATLAB's own + // spelling for it in a cell (probe_cell_shapes.m) and what serializeValue + // writes for a string scalar at the top level. Only a string with more than + // one element takes the wrapper — and it takes it at EITHER orientation, a + // 1x2 row included, unlike a double row. + return elems.length === 1 + ? elems + : { + _array_type: 'String', + _dimensions: parsed.dims || [1, elems.length], + _elements: elems, + _mw_element_type: 'MATLABArray' + }; + } + case 'char': + // dims are set only for a char that needs them (charNeedsShape): a 1xN row + // is a bare JSON string in MATLAB's own file, here as at the top level. + return parsed.dims + ? { _type: 'mxchar', _value: formatMxCharSerial(parsed.value as string, parsed.dims) } + : parsed.value; + case 'logical': + // Every logical ARRAY is tagged, at either orientation — see the table above. + // A logical scalar is a JSON boolean, which is already self-describing. + return Array.isArray(parsed.value) + ? { _type: 'logical', _value: formatMatrixSerial(parsed.value, parsed.dims!, 'logical') } + : parsed.value; + case 'double': { + // A numeric array inside a cell is a double array — a cell element has no + // class beside it to consult and a bare decimal literal is a double in MATLAB + // too — so the exact-integer token collapses here rather than leaving the + // parser: `{18446744073709551615}` holds a double, and a token that escaped + // would be written as a JSON string and read back as char (defect 42). + // `type === 'double'` is the gate rather than the value's shape, because a + // string array's elements are strings too and {["12" "ab"]} must keep "12". + const value = collapseExact(parsed).value; + if (!Array.isArray(value)) { return value; } + // Bare for the two shapes the bare form states correctly: a row, and the + // empty `[]` (dims [0,0], which has no Matrix() body to write). + const dims = parsed.dims!; + return dims.length <= 2 && dims[0] <= 1 + ? value + : { _type: 'double', _value: formatMatrixSerial(value, dims, 'double') }; + } + default: + // 'complex'. MATLAB writes a cdata MAT stream for one of those even inside a + // cell, which this parser cannot build, so the formatted literal is kept as + // text — the reading `{1+2i}` has always had here. Logged in the spec. + return parsed.value; + } } // Skip over quoted spans rather than counting brackets inside them: a bracket is diff --git a/src/datamodel/parser/SlddContent.ts b/src/datamodel/parser/SlddContent.ts index 76ea47f..e322475 100644 --- a/src/datamodel/parser/SlddContent.ts +++ b/src/datamodel/parser/SlddContent.ts @@ -16,6 +16,7 @@ // that had actually drifted — see `normalizeRefNames`. import { strFromU8 } from 'fflate'; import { parseBinarySldd } from './BinarySlddParser.js'; +import { DATA_PART_KEY, TEXT_CONTENT, TEXT_PARTS } from './SlddParts.js'; import type { ParseWarning } from './ParseWarning.js'; /** @@ -79,9 +80,9 @@ export function readSlddContent( * than as a parse loss. */ export function slddChunkContent(json: Record): Record | null { - const parts = json.__MW_TEXT_PARTS__ as Record | undefined; - const chunk = parts?.['__MW_TEXT_PART__/data/chunk0'] as Record | undefined; - return (chunk?.__MW_TEXT_content as Record | undefined) ?? null; + const parts = json[TEXT_PARTS] as Record | undefined; + const chunk = parts?.[DATA_PART_KEY] as Record | undefined; + return (chunk?.[TEXT_CONTENT] as Record | undefined) ?? null; } /** diff --git a/src/datamodel/parser/SlddParts.ts b/src/datamodel/parser/SlddParts.ts new file mode 100644 index 0000000..25567c7 --- /dev/null +++ b/src/datamodel/parser/SlddParts.ts @@ -0,0 +1,86 @@ +// src/datamodel/parser/SlddParts.ts +// Copyright 2026 The MathWorks, Inc. +// +// WHERE A DICTIONARY'S ENTRIES LIVE — one set of names, three writers and three readers. +// +// A `.sldd` keeps every entry it has in ONE part. In a compressed-binary dictionary that +// part is a zip member, `data/chunk0.xml`; in a textual one it is a nested key inside the +// JSON, `__MW_TEXT_PARTS__` -> `__MW_TEXT_PART__/data/chunk0` -> `__MW_TEXT_content`. Both +// spellings name the same part, which is why the same `chunk0` appears in both and why +// they are derived from one base here rather than written twice. +// +// These were literals at every site, and the sites are on both sides of a rule that +// nothing checks: +// +// * `parseBinarySldd` LOOKS UP the zip member, and copies every OTHER member into +// `__zipMetadata` as pass-through. `serializeBinarySldd` writes that bag back and then +// puts the member in. Those two names have to be the same string or a save either +// drops the entries or ships two copies of them — and the exclusion is spelled as a +// `!==`, so drift shows up as a valid zip with the wrong contents, not as a throw. +// * The binary reader and `SlddNode.serializeJson` both WRITE the nested JSON path, and +// `slddChunkContent` is the only thing that reads it. A writer that drifted would hand +// back a content object the reader answers `null` for, which SlddNode reports as +// `source-empty`: the dictionary opens, names no entries, and looks like a file the +// user had created and not filled in. SlddContent's own header records that this +// already happened once, when three readers each did the unwrap for themselves. +// * Two of the reader's warnings QUOTE the part name to the user. ScCatalog says why +// that matters for `SC_PART` and it is the same here: a message naming a different +// string from the one that was looked up is a lie no reader can detect. +// +// Published from the barrel for the reason `SC_PART`/`SC_PART_XML` are. A host owns the +// open document — the zip members it must preserve byte-for-byte, the raw JSON text it +// splices offsets into — and this package cannot do either of those for it, so the host +// navigates the same part and must name it identically. data-explorer-vscode does, in its +// writable-binary editor and in the two scanners that walk the JSON path over raw text. +// +// The tests deliberately keep spelling these strings out. A test that asked the constant +// what the constant is would pass for any value; the literals in the fixtures and the +// round-trip suites are what pin these to the bytes MATLAB actually writes. + +/** + * The dictionary's data part, without an extension — the shared stem of both spellings + * below, and the reason `chunk0` appears in a zip member name and in a JSON key. + * + * The `0` is MATLAB's, not a placeholder this package fills in, and it does not become a + * loop once a dictionary gets big enough. R2027a was asked for two deliberately extreme + * dictionaries — 120 entries of `rand(120,120)` (36.8 MB as text, 15.8 MB zipped) and + * 20,000 scalar entries — in both on-disk formats, and all four wrote exactly one data + * part. Chunking by payload size or by entry count is not a behaviour this MATLAB has. + * + * That is measured for one release, though, so the reader stays conservative rather than + * asserting: a package that also held a `chunk1.xml` is read for chunk zero and carries + * the rest through untouched as pass-through metadata, so a future chunking scheme would + * make those entries invisible rather than lose them on the next save. + */ +export const DATA_PART = 'data/chunk0'; + +/** + * The data part as a member of a compressed-binary (zip) dictionary. The `.xml` suffix is + * part of the member name, so this is the string to look a member up by, to exclude from + * the pass-through bag, and to name in a warning about it. + */ +export const DATA_PART_XML = `${DATA_PART}.xml`; + +/** The parts bag of a deserialized dictionary — the first step of the JSON path. */ +export const TEXT_PARTS = '__MW_TEXT_PARTS__'; + +/** + * The data part's key INSIDE that bag — the second step. It is the part name with + * MATLAB's `__MW_TEXT_PART__/` prefix on it, and note that the prefix already ends in a + * separator, so this is not a path join with `DATA_PART_XML`: the JSON key carries no + * `.xml`. + */ +export const DATA_PART_KEY = `__MW_TEXT_PART__/${DATA_PART}`; + +/** + * The content wrapper inside the part — the third and last step, whose value is the object + * holding `entries`, `Dictionary References` and `AllowAccessBWS`. + * + * The wrapper is MATLAB's for EVERY text part, not just the data one: `arch.sldd` carries + * three parts (`data/chunk0`, `simulink/ArchitecturePart` and the System Composer + * interfaceDictionary) and each is wrapped in this same key. So the catalog reader + * (`SlddNode._parseSystemComposer`) unwraps its own part with this constant too, and the + * name it is combined with — `DATA_PART_KEY` or `__MW_TEXT_PART__/${SC_PART}` — is what + * says WHICH part is being unwrapped. + */ +export const TEXT_CONTENT = '__MW_TEXT_content'; diff --git a/src/datamodel/usage/UsageIndex.ts b/src/datamodel/usage/UsageIndex.ts index 531ba30..4276c6a 100644 --- a/src/datamodel/usage/UsageIndex.ts +++ b/src/datamodel/usage/UsageIndex.ts @@ -158,6 +158,14 @@ export interface UsageIndex { // --- Summarising ------------------------------------------------------------- +// Every `??` below defaults a field ParsedSlx declares as REQUIRED, so TypeScript says none +// of them can be taken and a coverage report lists them as branches never hit. They are kept +// deliberately, and the next person measuring coverage should leave them alone: these fields +// are what a PARSER made of a user's file, and the type is only as true as SlxParser is on +// every malformed `.slx` anyone ever opens. Deleting them to move that number up trades a +// summary short of one field for a TypeError that costs the whole file — the opposite of the +// policy on summarizeFiles below, where one unreadable file must not empty the answers for +// the rest of the folder. function modelSummary(parsed: ParsedSlx, srcId: string, filename: string): ModelSummary { const externals = parsed.externalDataSources ?? []; return { @@ -233,7 +241,6 @@ export function summarizeFiles(files: UsageFile[]): FileSummaries { } else if (isMatFile(file.filename)) { matByName.set(refBasename(file.filename), matSummary(file.srcId, parseMat(file.bytes))); } else if (isSlddFile(file.filename)) { - matByName.delete(refBasename(file.filename)); // never both; last write wins per kind slddByName.set(refBasename(file.filename), slddSummary(file.srcId, readSlddContent(file.bytes))); } } catch { diff --git a/src/index.ts b/src/index.ts index 90baa2b..1c19e5c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,7 +4,7 @@ // with no renaming. A curated REST-style facade lands in a later milestone. // Side-effecting node-class registration (must be imported for registry setup). -import './datamodel/node/NodeClassMap.js'; +import './datamodel/node/data/NodeClassMap.js'; // Runtime services (core). export { default as DataModel } from './core/DataModel.js'; @@ -97,11 +97,23 @@ export type { IngestContent, IngestOptions } from './core/ingest.js'; // file was not, so `Params.SLDD` is found, opened, and then classified as nothing. These // are the tests this package's own readers dispatch on, so a host that shares them cannot // disagree with the package about what a file is. +// `refModelExt` is here for a sharper version of the same reason: it is not a question +// about a file this package was GIVEN, it is the guess this package MAKES when a model +// names a reference without an extension — and a host that indexes `parseModel`'s raw +// `modelReferences` has to make the identical guess to resolve an edge by filename. Both +// spelled `/\.mdl$/i.test(name) ? '.mdl' : '.slx'` independently, so the tree row and the +// graph edge agreed only by coincidence; now there is one of them. +// `projectNameOf` is the third of that kind, and the plainest: `parseProject` is public and +// takes a project NAME, not a filename, so every caller has to strip the `.prj` first — +// this package before it builds a project's node tree, a host before it builds its own +// index over the same parse. The result is a label a user reads on both sides. export { extOf, basenameOf, refBasename, modelNameOf, + refModelExt, + projectNameOf, isModelFile, isSlddFile, isMatFile, @@ -118,6 +130,17 @@ export { // resolves the sub-dictionaries of one flavour and none of the other. export { readSlddContent, slddChunkContent, isJsonTextBytes, normalizeRefNames } from './datamodel/parser/SlddContent.js'; +// WHERE those entries sit — the zip member name and the three-step JSON key path to the +// one part a dictionary keeps its entries in. Published for the same reason `SC_PART` is, +// and more sharply: a host that WRITES a dictionary owns the document this package cannot +// touch. It holds the open zip's other members and must preserve them byte-for-byte while +// replacing exactly one, and it splices byte offsets into the raw JSON text rather than +// re-serializing it — so it looks the part up, excludes it, and re-inserts it under names +// that have to be identical to these. Drift is not a throw at either end: the wrong +// exclusion ships a zip carrying the entries twice, and the wrong JSON key hands back +// content this package reads as `null` and reports as an empty dictionary. +export { DATA_PART, DATA_PART_XML, DATA_PART_KEY, TEXT_PARTS, TEXT_CONTENT } from './datamodel/parser/SlddParts.js'; + // The System Composer catalog: what says a `Simulink.Bus` is a struct type rather than // a data interface. It is a SEPARATE part of the dictionary that references its entries // BY NAME, so a host that renames a catalogued entry has to carry the rename into that diff --git a/src/node/index.ts b/src/node/index.ts index 6a68180..24aed84 100644 --- a/src/node/index.ts +++ b/src/node/index.ts @@ -9,7 +9,7 @@ import { readFileSync, statSync, readdirSync } from 'node:fs'; import { basename, join, extname } from 'node:path'; // Side-effect import: registers node classes so SectionNode.addEntry and // NodeRegistry value-parsing work when consumers import ONLY from this subpath. -import '../datamodel/node/NodeClassMap.js'; +import '../datamodel/node/data/NodeClassMap.js'; import { createSession as _createSession } from '../core/DataModel.js'; import { ingest } from '../core/ingest.js'; import type { Session } from '../core/DataModel.js'; diff --git a/test/absentPropertyWriteBack.test.ts b/test/absentPropertyWriteBack.test.ts new file mode 100644 index 0000000..1d8888b --- /dev/null +++ b/test/absentPropertyWriteBack.test.ts @@ -0,0 +1,647 @@ +// Copyright 2026 The MathWorks, Inc. +// +// ONE WRITE-BACK RULE, TWO SAVE PATHS, ELEVEN CLASSES. +// +// The eleven, so the count above can be checked rather than trusted: NumericType, +// AliasType, ValueType, Signal, Breakpoint, LookupTable and the registered CustomObject +// are the `CASES` table below; Parameter, BusElement, ConfigSet and ConfigSetRef have +// their own blocks, because a bound and an ungated key are not the table's shape. A bus +// is not counted separately — it appears only as the thing a BusElement is saved inside. +// +// A dictionary entry's property bag is what the FILE held, and what this file is about is +// that the bag we write back is a function of that bag — not of what our model happens to +// hold at save time. +// +// An earlier version of this header justified that with "MATLAB writes only the properties +// it has something to say about", called it measured in BOTH formats, and cited +// `test/fixtures/object_array_binary.sldd`. The binary half is now measured FALSE, and the +// correction is recorded here rather than quietly dropped, because the false half is the +// more intuitive one and would otherwise be re-derived. R2027a Prerelease +// (27.1.0.3353139), three `Simulink.Parameter` entries in one compressed-binary dictionary +// MATLAB wrote itself: a parameter whose `Min` was NEVER touched still gets +// `

`, and its whole entry block is +// byte-identical to one explicitly assigned `Min = []` once Name/UUID/LastMod are +// normalized out. `Description`, `DocUnits`, `DataType`, `Complexity` and `Dimensions` +// behave the same way, as do `Simulink.Signal` and `Simulink.ValueType`. In memory the two +// states are `isequal`, so there is no "was it ever assigned" bit to serialize even in +// principle. The fixture cited as evidence is not MATLAB output: zero `UUID`, zero +// `LastMod`, no `CoderInfo` on any of its three parameters (a real MATLAB-written +// `Simulink.Parameter` always carries one), no `DD.Dictionary` trailer, and the entire +// chunk on ONE unindented line where MATLAB pretty-prints with 4-space indents. +// +// The TEXT half stands: an uncompressed-text `.sldd` really does omit the key for an empty +// Description or bound. So the two formats encode emptiness by different mechanisms — +// binary as `Dimension="0*0"` versus a value body, text as an absent key versus a present +// one — and presence distinguishes "never set" from "set to empty" in NEITHER: in binary +// those two states are the same bytes, in text the same absent key. +// +// None of which makes the gate below wrong, which is worth saying so the correction does +// not read as a licence to remove it. The gate's real rule is not "presence means MATLAB +// had something to say" but the narrower, format-independent one: preserve exactly the key +// set the file had, and add a key only where the user has actually set a value. That holds +// whatever the upstream writer emits, and it is what makes the third failure mode below — +// open a dictionary, save with no edits, get a diff in source control — impossible. What +// the measurement does change is the gate's REACH: on a genuine MATLAB-written binary +// dictionary the key is always present, so the `in stored` half always fires and the gate +// never has to decide. Its live audience is bags some other writer produced — our own +// fixtures, an older release, and this extension's own output on a re-save. +// +// Most nodes in this cluster therefore gate their write-back on the same question — "was +// this key on disk, or has the user since set it?" — spelled +// `if ('Description' in stored || this.Description)`. Both halves matter and they fail in +// opposite directions: +// +// * drop the `in stored` half and a property MATLAB DID write, whose value happens to +// be empty, disappears from the saved file; +// * drop the `this.X` half and an edit the user just made in the Property Inspector is +// silently discarded on save — it survives until the file is reopened, which is the +// worst place to find out; +// * lose the gate entirely and every save invents keys the file never had, so opening +// a dictionary and saving it with no edits produces a diff in source control. +// +// Three keys here are deliberately NOT gated, and they are in this file because the +// invariant asserted is the same one: an alias's BaseType, a ConfigSet's Name and a +// ConfigSetRef's SourceName identify the entry rather than describe it, so MATLAB gets +// them even when the value is the empty string a half-built entry carries. The two paths +// still have to agree, and for these three what they must agree ON is that the key is +// unconditional — one path gating what the other writes always is the same divergence +// wearing different clothes. +// +// The reason this deserves its own file rather than a line in each class's tests is that +// each of these classes spells the rule TWICE. `_getSerializedProperties` is read by +// `_serializeSimulinkObjectXml` on the way into a compressed-binary `.sldd`; +// `serializeValue` builds the override bag for the JSON of an uncompressed-text one. The +// two are independent copies of one decision, so they can drift — and a per-class test +// that asserts a literal about one of them cannot see the drift. `ParameterNode` shows +// the shape that cannot drift: its `serializeValue` calls `_getSerializedProperties`. +// Until the others do the same, the agreement between the pair is the invariant worth +// asserting, and it is asserted here for all of them at once. +// +// The other edge of that shape, recorded here because it is the one thing this file +// cannot claim for a Parameter or a bus element: ONE shared method cannot express a +// legitimate per-format difference. A cleared numeric bound is such a difference — +// MATLAB spells an empty Min in a binary dictionary as `

` (an empty `[]`) and in a text one by OMITTING the key. `SignalNode`, +// whose two paths are separate, writes each format's own spelling. `ParameterNode` and +// `BusElementNode` write `[]` on BOTH paths, so their text flavour carries `"Min": []` +// where MATLAB would carry nothing. That is a correct value spelled differently, and +// MATLAB reads it back as the same absent bound — so what is asserted below is the +// ANSWER a reopened file gives, plus the exact binary spelling. The `[]` in the text +// bag is pinned as what we do write, NOT as byte parity with MATLAB. `undefined` is not +// the way out: the two paths share the bag, and `undefined` reaches the binary writer as +// `Class="char"` — an empty char where a double belongs — which is why the XML spelling +// is asserted too. +// +// "MATLAB reads it back as the same absent bound" is measured, not assumed: R2027a reads a +// text dictionary's `"Min": []` as `class double`, `size [0 0]`, `isempty 1`, and `isequal` +// to an entry whose key was omitted returns 1. Worth knowing alongside that: MATLAB does +// NOT normalize our spelling away. It re-serializes only the entries it actually modified, +// so editing a neighbouring entry leaves `"Min": []` byte-identical on disk and an entry the +// user never touches again keeps it indefinitely. The difference is durable, which is why it +// is recorded as a known divergence rather than treated as something that resolves itself. +// +// One honest caveat about how the rule is reached. The `this.X` half of the gate is only +// reachable by an EDIT for the properties a user can actually edit — Description, Min, Max +// and an alias's BaseType all have editors. `Unit` and a ValueType's `DataType` are declared +// `editor: 'label'`, so `getPropInfo` reports them non-editable in the table and in the +// Property Inspector alike and no user action changes them; their gates are therefore +// exercised here through what the FILE carried, which is the only thing that moves them. +// +// Related: signalNode.test.ts covers the Unit/DocUnits spelling from the JSON side, +// archPresentation.test.ts the ValueType default, minMaxConstraint.test.ts what Min/Max +// accept. This file is about which keys reach the file, and about the two paths agreeing. + +import { describe, it, expect } from 'vitest'; +import NumericTypeNode from '../src/datamodel/node/data/NumericTypeNode.js'; +import AliasTypeNode from '../src/datamodel/node/data/AliasTypeNode.js'; +import ValueTypeNode from '../src/datamodel/node/data/ValueTypeNode.js'; +import SignalNode from '../src/datamodel/node/data/SignalNode.js'; +import ParameterNode from '../src/datamodel/node/data/ParameterNode.js'; +import BreakpointNode from '../src/datamodel/node/data/BreakpointNode.js'; +import LookupTableNode from '../src/datamodel/node/data/LookupTableNode.js'; +import CustomObjectNode from '../src/datamodel/node/data/CustomObjectNode.js'; +import ConfigSetNode from '../src/datamodel/node/data/ConfigSetNode.js'; +import ConfigSetRefNode from '../src/datamodel/node/data/ConfigSetRefNode.js'; +import { BusNode } from '../src/datamodel/node/data/BusNode.js'; +import type DataNode from '../src/datamodel/node/DataNode.js'; +// Registers the class map the nodes' shared machinery dispatches through. +import '../src/datamodel/node/data/NodeClassMap.js'; + +function rawVal(className: string, properties: Record): Record { + return { + _array_class: className, + _array_type: 'MATLABArray', + _dimensions: [1, 1], + _mw_element_type: 'MATLABArray', + _elements: [{ _properties: properties }], + }; +} + +// The two save paths, each reduced to the property bag it puts in the file. +const binaryPath = (node: DataNode) => node._getSerializedProperties(); +const textPath = (node: DataNode) => { + const sv = node.serializeValue() as { _elements: { _properties: Record }[] }; + return sv._elements[0]._properties; +}; +// The text path's bag is written out with JSON.stringify, which drops keys whose value is +// `undefined` — so this is the bag as the FILE would carry it, not as the object holds it. +const textFileBag = (node: DataNode) => + JSON.parse(JSON.stringify({ p: textPath(node) })).p as Record; + +// The elements wrapper a bus carries its elements in, built the way +// archPresentation.test.ts builds it. A bus element has no save path of its own — it +// reaches a file only inside its parent's `Elements_internal` — so the element bag is +// pulled back out of whichever of the BUS's two bags is under test. +function elementsInternal(elementClass: string, elems: Record[]): Record { + return { + _array_class: elementClass, + _dimensions: [elems.length, 1], + _mw_element_type: 'MATLABArray', + _elements: elems.map((p) => ({ _properties: p })), + }; +} +const firstElementBag = (busBag: Record) => + (busBag.Elements_internal as { _elements: { _properties: Record }[] })._elements[0]._properties; + +type Case = { + // How a user names the entry's class, since that is what the Class column shows. + label: string; + className: string; + parse: (raw: Record, name: string) => DataNode; + // The Property Inspector row, and the key it is stored under on disk. + prop: string; + key: string; + // Something a user would plausibly type into that row. + typed: string; +}; + +const CASES: Case[] = [ + { + label: 'Simulink.NumericType', + className: 'Simulink.NumericType', + parse: (raw, name) => NumericTypeNode.parse(raw, name, null), + prop: 'Description', + key: 'Description', + typed: 'fixed-point type for the throttle path', + }, + { + label: 'Simulink.AliasType', + className: 'Simulink.AliasType', + parse: (raw, name) => AliasTypeNode.parse(raw, name, null), + prop: 'Description', + key: 'Description', + typed: 'engineering units alias', + }, + { + label: 'Simulink.ValueType', + className: 'Simulink.ValueType', + parse: (raw, name) => ValueTypeNode.parse(raw, name, null), + prop: 'Description', + key: 'Description', + typed: 'speed of the vehicle', + }, + { + label: 'Simulink.Signal', + className: 'Simulink.Signal', + parse: (raw, name) => SignalNode.parse(raw, name, null), + prop: 'Description', + key: 'Description', + typed: 'commanded torque', + }, + // The three classes below hold nothing but a Description, so today their two save + // paths are character-for-character the same gate. That identity is not a property of + // the code, though — it is still two hand-written copies — so the next person who + // teaches one of these classes a second property, or hoists one of its paths onto a + // shared helper, can change one method and leave the other behind with nothing + // objecting. Being trivially correct today is the reason to pin them here, not a + // reason to leave them out. + { + label: 'Simulink.Breakpoint', + className: 'Simulink.Breakpoint', + parse: (raw, name) => BreakpointNode.parse(raw, name, null), + prop: 'Description', + key: 'Description', + typed: 'engine speed breakpoints, 0:500:6000 rpm', + }, + { + label: 'Simulink.LookupTable', + className: 'Simulink.LookupTable', + parse: (raw, name) => LookupTableNode.parse(raw, name, null), + prop: 'Description', + key: 'Description', + typed: 'engine torque vs. speed and throttle', + }, + { + // Not a Simulink class name: `CustomObject` is the literal `_array_class` this + // package registers a node for, and the Class column shows it verbatim. + label: 'CustomObject', + className: 'CustomObject', + parse: (raw, name) => CustomObjectNode.parse(raw, name, null), + prop: 'Description', + key: 'Description', + typed: 'legacy calibration object, kept for the report generator', + }, +]; + +describe('a property the file never had', () => { + it('is not written by either save path while the user leaves it alone', () => { + // This is the "no edits, no diff" guarantee. A host opens a dictionary and saves it + // (a backup, a format conversion, an unrelated edit to another entry); an entry the + // user did not touch must come back out with the keys it went in with. Inventing + // `Description: ''` here is not merely noise — MATLAB stores an unset Description as + // an empty 0x0 char, and a written `''` is a different value that shows up as a + // source-control diff on a file nobody edited. + for (const c of CASES) { + const node = c.parse(rawVal(c.className, {}), 'e'); + expect(binaryPath(node), `${c.label} binary`).not.toHaveProperty(c.key); + expect(textFileBag(node), `${c.label} text`).not.toHaveProperty(c.key); + } + }); + + it('is written by both save paths once the user types one in', () => { + // The other direction, and the one a user notices: an edit made in the Property + // Inspector on an entry whose file had no such key. If the gate only admitted keys + // that were already on disk, the edit would be accepted by the UI, survive in the + // open document, and then be gone on reopen. + for (const c of CASES) { + const node = c.parse(rawVal(c.className, {}), 'e'); + expect(node.setProperty(c.prop, c.typed), `${c.label} setProperty`).toBe(true); + expect(binaryPath(node)[c.key], `${c.label} binary`).toBe(c.typed); + expect(textFileBag(node)[c.key], `${c.label} text`).toBe(c.typed); + } + }); + + it('is written by both save paths when the file HAD it and the user cleared it', () => { + // The `in stored` half on its own. An emptied Description must be written as the + // empty string it now is, because the key is still the file's — silently restoring + // the old text would make the deletion look like it never happened. + for (const c of CASES) { + const node = c.parse(rawVal(c.className, { [c.key]: c.typed }), 'e'); + expect(node.setProperty(c.prop, ''), `${c.label} setProperty`).toBe(true); + expect(binaryPath(node)[c.key], `${c.label} binary`).toBe(''); + expect(textFileBag(node)[c.key], `${c.label} text`).toBe(''); + } + }); + + it('keeps what the file held when the user changes nothing', () => { + for (const c of CASES) { + const node = c.parse(rawVal(c.className, { [c.key]: c.typed }), 'e'); + expect(binaryPath(node)[c.key], `${c.label} binary`).toBe(c.typed); + expect(textFileBag(node)[c.key], `${c.label} text`).toBe(c.typed); + } + }); +}); + +describe('the compressed-binary and uncompressed-text save paths agree', () => { + // `_getSerializedProperties` and `serializeValue` are two hand-written copies of one + // rule per class. These assert they name the same keys in each of the three states the + // gate distinguishes, which is the drift a per-path literal cannot catch. + it('names exactly the same keys, in all three states, for every class', () => { + for (const c of CASES) { + const states: [string, () => DataNode][] = [ + ['file had no such key, untouched', () => c.parse(rawVal(c.className, {}), 'e')], + [ + 'file had no such key, user set it', + () => { + const n = c.parse(rawVal(c.className, {}), 'e'); + n.setProperty(c.prop, c.typed); + return n; + }, + ], + [ + 'file had the key, user cleared it', + () => { + const n = c.parse(rawVal(c.className, { [c.key]: c.typed }), 'e'); + n.setProperty(c.prop, ''); + return n; + }, + ], + ]; + for (const [state, make] of states) { + const node = make(); + expect(Object.keys(binaryPath(node)).sort(), `${c.label} — ${state}`).toEqual( + Object.keys(textPath(node)).sort(), + ); + } + } + }); + + it('carries an AliasType BaseType unconditionally, on both paths', () => { + // BaseType is the one property in this cluster that is NOT gated: an alias with no + // base type is not a type at all, so it is written even as the empty string a + // half-built entry has. Both paths have to agree about that too — a BaseType present + // in one flavour of the same dictionary and absent in the other is the divergence + // this file exists to rule out. + const bare = AliasTypeNode.parse(rawVal('Simulink.AliasType', {}), 'A', null); + expect(binaryPath(bare)).toHaveProperty('BaseType', ''); + expect(textFileBag(bare)).toHaveProperty('BaseType', ''); + + const edited = AliasTypeNode.parse(rawVal('Simulink.AliasType', {}), 'A', null); + edited.setProperty('BaseType', 'int8'); + expect(binaryPath(edited)).toHaveProperty('BaseType', 'int8'); + expect(textFileBag(edited)).toHaveProperty('BaseType', 'int8'); + }); + + it('carries a ConfigSet Name and a ConfigSetRef SourceName unconditionally, on both paths', () => { + // The other two ungated keys in this cluster, asserted the same way as BaseType and + // for the same reason: an unconditional write is still written twice, so the two + // copies can still lose each other. A config set MATLAB can load has to be able to + // say what it is called and a reference has to say what it points at, so neither key + // waits for the file to have carried it — and what a bare bag proves is exactly that, + // since a gated key would be missing here. + const cfg = ConfigSetNode.parse(rawVal('Simulink.ConfigSet', {}), 'Cfg', null); + expect(binaryPath(cfg)).toHaveProperty('Name', 'Cfg'); + expect(textFileBag(cfg)).toHaveProperty('Name', 'Cfg'); + + // A ConfigSet's Name is the entry name rather than a field of its own, which is the + // whole point of writing it unconditionally: rename the entry and BOTH saved bags + // have to name the new one. When ConfigName was stored separately the binary and + // text bags agreed with each other and disagreed with the tree, and the config set + // came back under its old name on reopen. + expect(cfg.setProperty('Name', 'FasterCfg')).toBe(true); + expect(binaryPath(cfg)).toHaveProperty('Name', 'FasterCfg'); + expect(textFileBag(cfg)).toHaveProperty('Name', 'FasterCfg'); + + const ref = ConfigSetRefNode.parse(rawVal('Simulink.ConfigSetRef', {}), 'R', null); + expect(binaryPath(ref)).toHaveProperty('SourceName', ''); + expect(textFileBag(ref)).toHaveProperty('SourceName', ''); + + const pointed = ConfigSetRefNode.parse(rawVal('Simulink.ConfigSetRef', { SourceName: 'shared' }), 'R', null); + expect(binaryPath(pointed)).toHaveProperty('SourceName', 'shared'); + expect(textFileBag(pointed)).toHaveProperty('SourceName', 'shared'); + }); + + it('spells a saved Signal unit key the way the file spelled it, on both paths', () => { + // `Unit` and `DocUnits` are two spellings of one property and a dictionary may carry + // either; both show in the Unit column. Both save paths choose the output key by + // looking at the stored bag, and they must look the same way — a binary save that + // renamed DocUnits → Unit while the text save kept DocUnits would make saving the + // same dictionary twice, in its two flavours, produce two different files. Neither + // path may write BOTH spellings either: MATLAB would then have two units to pick from. + const modern = SignalNode.parse(rawVal('Simulink.Signal', { DocUnits: 'm/s' }), 'sig', null); + expect(modern.toRow()!.Unit).toBe('m/s'); + expect(binaryPath(modern)).toEqual({ DocUnits: 'm/s' }); + expect(textFileBag(modern)).toEqual({ DocUnits: 'm/s' }); + + const legacy = SignalNode.parse(rawVal('Simulink.Signal', { Unit: 'm/s' }), 'sig', null); + expect(legacy.toRow()!.Unit).toBe('m/s'); + expect(binaryPath(legacy)).toEqual({ Unit: 'm/s' }); + expect(textFileBag(legacy)).toEqual({ Unit: 'm/s' }); + + // A file with no unit at all does not acquire one, under either spelling, on either + // path — the Unit column stays blank across a save. + const neither = SignalNode.parse(rawVal('Simulink.Signal', {}), 'sig', null); + expect(neither.toRow()!.Unit).toBe(''); + expect(binaryPath(neither)).toEqual({}); + expect(textFileBag(neither)).toEqual({}); + }); + + it("keeps a ValueType's declared data type on both paths, and invents none when the file omits it", () => { + // The same gate over a property whose "absent" is a DEFAULT rather than an empty + // string: MATLAB treats a ValueType with no DataType key as a double, so the column + // reads `double` for a file that never said so. That default must not be written + // back — a dictionary saved with no edits would gain a `DataType: "double"` key the + // file never had, on whichever path wrote it. + const declared = ValueTypeNode.parse(rawVal('Simulink.ValueType', { DataType: 'uint16' }), 'V', null); + expect(declared.toRow()!.DataType).toBe('uint16'); + expect(binaryPath(declared)).toEqual({ DataType: 'uint16' }); + expect(textFileBag(declared)).toEqual({ DataType: 'uint16' }); + + const implied = ValueTypeNode.parse(rawVal('Simulink.ValueType', {}), 'V', null); + expect(implied.toRow()!.DataType).toBe('double'); + expect(binaryPath(implied)).toEqual({}); + expect(textFileBag(implied)).toEqual({}); + }); +}); + +describe('a Signal bound the user cleared', () => { + // Min/Max are the one place the two paths write DIFFERENT bytes for the same state, and + // the difference is deliberate rather than drift: MATLAB's empty is `[]`, which the + // binary path writes literally, while the text path drops the key and lets MATLAB + // supply the same default on load. What must not differ is the ANSWER — a reopened + // Signal shows no minimum either way — so that is what is asserted, on both. + const minCell = (node: SignalNode) => (node.toRow()!.Min as { text: string }).text; + const maxCell = (node: SignalNode) => (node.toRow()!.Max as { text: string }).text; + + it('reads back as no minimum from either flavour of the saved file', () => { + const node = SignalNode.parse(rawVal('Simulink.Signal', { Min: 5, Max: 9 }), 'sig', null); + expect(minCell(node)).toBe('5'); + expect(node.setProperty('Min', '')).toBe(true); + expect(minCell(node)).toBe(''); + + // Binary: MATLAB's empty, written out; reopening shows a blank Minimum. + expect(binaryPath(node).Min).toEqual([]); + const reopenedBinary = SignalNode.parse(rawVal('Simulink.Signal', binaryPath(node)), 'sig', null); + expect(minCell(reopenedBinary)).toBe(''); + + // Text: the key does not survive JSON.stringify, which is the same statement. + expect(textFileBag(node)).not.toHaveProperty('Min'); + const reopenedText = SignalNode.parse(rawVal('Simulink.Signal', textFileBag(node)), 'sig', null); + expect(minCell(reopenedText)).toBe(''); + + // The bound the user did NOT clear is untouched by either path. + expect(binaryPath(node).Max).toBe(9); + expect(textFileBag(node).Max).toBe(9); + + // And the upper bound behaves as the lower one does. Asserted rather than assumed: + // Min and Max are two hand-written copies of the rule in each of the two save paths, + // so "clearing the minimum works" says nothing about the maximum. + expect(node.setProperty('Max', '')).toBe(true); + expect(maxCell(node)).toBe(''); + expect(binaryPath(node).Max).toEqual([]); + expect(textFileBag(node)).not.toHaveProperty('Max'); + expect(maxCell(SignalNode.parse(rawVal('Simulink.Signal', binaryPath(node)), 'sig', null))).toBe(''); + }); + + it('does not gain a Min key at all when the file had none and the user set none', () => { + // The gate's false arm for a numeric property: `undefined` is "no bound", and a + // Signal that never had one must not acquire `Min: []` on every save. + const node = SignalNode.parse(rawVal('Simulink.Signal', {}), 'sig', null); + expect(binaryPath(node)).not.toHaveProperty('Min'); + expect(binaryPath(node)).not.toHaveProperty('Max'); + expect(textFileBag(node)).not.toHaveProperty('Min'); + expect(textFileBag(node)).not.toHaveProperty('Max'); + }); + + it('writes a bound the user typed into a Signal the file gave none', () => { + const node = SignalNode.parse(rawVal('Simulink.Signal', {}), 'sig', null); + expect(node.setProperty('Min', '-10')).toBe(true); + expect(node.setProperty('Max', '10')).toBe(true); + expect(binaryPath(node)).toMatchObject({ Min: -10, Max: 10 }); + expect(textFileBag(node)).toMatchObject({ Min: -10, Max: 10 }); + }); +}); + +describe('a Parameter bound the user cleared', () => { + // The same rule as the Signal above, in a different hand-written copy. A Parameter's + // two paths are the SHARED shape (`serializeValue` calls `_getSerializedProperties`), + // so both write MATLAB's binary spelling `[]`; see the note in this file's header for + // why the text flavour's `"Min": []` is the right answer spelled our way rather than + // MATLAB's omitted key. + const param = (props: Record) => + ParameterNode.parse(rawVal('Simulink.Parameter', props), 'p', null); + const minCell = (node: DataNode) => (node.toRow()!.Min as { text: string }).text; + const maxCell = (node: DataNode) => (node.toRow()!.Max as { text: string }).text; + + it('reads back as no minimum from either flavour of the saved file', () => { + // What a user does: a Parameter whose dictionary gives it Min 5, and they empty the + // Minimum box. Before this was fixed, the node's own row went blank and the SAVED + // file still said 5 — so the bound came back on reopen and the edit was gone with no + // error anywhere. The reopen is asserted, not just the bag, because "what the file + // holds" only matters through what it shows when read again. + const node = param({ Min: 5, Max: 9 }); + expect(minCell(node)).toBe('5'); + expect(node.setProperty('Min', '')).toBe(true); + expect(minCell(node)).toBe(''); + + // Binary: MATLAB's own empty, written out. + expect(binaryPath(node).Min).toEqual([]); + expect(minCell(param(binaryPath(node)))).toBe(''); + + // Text: `[]` survives JSON.stringify where MATLAB would have omitted the key. Both + // are read back as "no bound" (_normalizeMinMax maps an empty array to undefined), + // which is the statement that matters to the user. + expect(textFileBag(node).Min).toEqual([]); + expect(minCell(param(textFileBag(node)))).toBe(''); + + // The bound the user did NOT clear is untouched by either path. + expect(binaryPath(node).Max).toBe(9); + expect(textFileBag(node).Max).toBe(9); + + // And the upper bound behaves as the lower one does — asserted rather than assumed, + // for the reason the Signal case gives: Min and Max are separate copies of the rule. + expect(node.setProperty('Max', '')).toBe(true); + expect(maxCell(node)).toBe(''); + expect(binaryPath(node).Max).toEqual([]); + expect(textFileBag(node).Max).toEqual([]); + expect(maxCell(param(binaryPath(node)))).toBe(''); + expect(maxCell(param(textFileBag(node)))).toBe(''); + }); + + it('spells a cleared bound in the binary XML as the empty double, not an empty char', () => { + // The assertion that rules out the tempting "simplification" to `undefined`. This is + // the one place the bytes are visible: `undefined` reaches the XML writer as + // `

` — an empty CHAR where MATLAB writes an empty + // DOUBLE — and a stale fallback reaches it as the old number, still 5.0. + const node = param({ Min: 5, Max: 9 }); + expect(node.setProperty('Min', '')).toBe(true); + expect(node.setProperty('Max', '')).toBe(true); + const xml = node.serializeXml('P', { Name: 'Value' }, 0); + expect(xml).toContain('

'); + expect(xml).toContain('

'); + expect(xml).not.toContain('Name="Min" Class="char"'); + expect(xml).not.toContain('Name="Max" Class="char"'); + }); + + it('does not gain a Min key at all when the file had none and the user set none', () => { + const node = param({}); + expect(binaryPath(node)).not.toHaveProperty('Min'); + expect(binaryPath(node)).not.toHaveProperty('Max'); + expect(textFileBag(node)).not.toHaveProperty('Min'); + expect(textFileBag(node)).not.toHaveProperty('Max'); + }); + + it('writes a bound the user typed into a Parameter the file gave none', () => { + const node = param({}); + expect(node.setProperty('Min', '-10')).toBe(true); + expect(node.setProperty('Max', '10')).toBe(true); + expect(binaryPath(node)).toMatchObject({ Min: -10, Max: 10 }); + expect(textFileBag(node)).toMatchObject({ Min: -10, Max: 10 }); + }); +}); + +describe('a BusElement bound the user cleared', () => { + // The third copy of the rule, reached the way a file reaches it: an element serializes + // only as part of its bus, under the `Min_internal`/`Max_internal` spelling a bus + // element's bag uses, so every assertion here goes through the BUS's two save paths + // rather than through `_applyElementOverrides` directly. + const busWith = (elemProps: Record) => + BusNode.parse( + rawVal('Simulink.Bus', { Elements_internal: elementsInternal('Simulink.BusElement', [elemProps]) }), + 'B', + null, + ); + const element = (bus: DataNode) => bus.children[0] as DataNode; + const minCell = (node: DataNode) => (node.toRow()!.Min as { text: string }).text; + const maxCell = (node: DataNode) => (node.toRow()!.Max as { text: string }).text; + // The element bag as each of the bus's paths puts it in the file. + const binaryElement = (bus: DataNode) => firstElementBag(binaryPath(bus)); + const textFileElement = (bus: DataNode) => firstElementBag(textFileBag(bus)); + + it('reads back as no minimum from either flavour of the saved file', () => { + const bus = busWith({ Name: 'a', Min_internal: 5, Max_internal: 9 }); + const el = element(bus); + expect(minCell(el)).toBe('5'); + expect(el.setProperty('Min', '')).toBe(true); + expect(minCell(el)).toBe(''); + + // Written under the key the file used, as MATLAB's empty double — and NOT under the + // un-aliased `Min`, which would leave the element with two minima to choose from. + expect(binaryElement(bus).Min_internal).toEqual([]); + expect(binaryElement(bus)).not.toHaveProperty('Min'); + expect(textFileElement(bus).Min_internal).toEqual([]); + expect(textFileElement(bus)).not.toHaveProperty('Min'); + + // Reopened from either saved bag, the element shows no minimum. + expect(minCell(element(busWith(binaryElement(bus))))).toBe(''); + expect(minCell(element(busWith(textFileElement(bus))))).toBe(''); + + // The bound the user did NOT clear is untouched by either path. + expect(binaryElement(bus).Max_internal).toBe(9); + expect(textFileElement(bus).Max_internal).toBe(9); + + // Max separately — a separate copy of the rule again. + expect(el.setProperty('Max', '')).toBe(true); + expect(maxCell(el)).toBe(''); + expect(binaryElement(bus).Max_internal).toEqual([]); + expect(textFileElement(bus).Max_internal).toEqual([]); + expect(maxCell(element(busWith(binaryElement(bus))))).toBe(''); + expect(maxCell(element(busWith(textFileElement(bus))))).toBe(''); + }); + + it('spells a cleared bound in the binary XML as the empty double, not an empty char', () => { + const bus = busWith({ Name: 'a', Min_internal: 5, Max_internal: 9 }); + expect(element(bus).setProperty('Min', '')).toBe(true); + expect(element(bus).setProperty('Max', '')).toBe(true); + const xml = bus.serializeXml('P', { Name: 'Value' }, 0); + expect(xml).toContain('

'); + expect(xml).toContain('

'); + expect(xml).not.toContain('Name="Min_internal" Class="char"'); + expect(xml).not.toContain('Name="Max_internal" Class="char"'); + }); + + it('keeps a bound the file spelled without the alias under that same plain key', () => { + // A bag carrying plain `Min`/`Max` is read the same way, and a clear must go back + // under the spelling the file used — inventing the `_internal` alias here would + // leave the old plain key beside it, unchanged, and MATLAB reading the old bound. + const bus = busWith({ Name: 'a', Min: 5, Max: 9 }); + expect(element(bus).setProperty('Min', '')).toBe(true); + expect(binaryElement(bus).Min).toEqual([]); + expect(binaryElement(bus)).not.toHaveProperty('Min_internal'); + expect(textFileElement(bus).Min).toEqual([]); + expect(minCell(element(busWith(binaryElement(bus))))).toBe(''); + }); + + it('does not gain a Min key at all when the file had none and the user set none', () => { + const bus = busWith({ Name: 'a' }); + expect(binaryElement(bus)).not.toHaveProperty('Min'); + expect(binaryElement(bus)).not.toHaveProperty('Min_internal'); + expect(binaryElement(bus)).not.toHaveProperty('Max'); + expect(binaryElement(bus)).not.toHaveProperty('Max_internal'); + expect(textFileElement(bus)).not.toHaveProperty('Min'); + expect(textFileElement(bus)).not.toHaveProperty('Min_internal'); + expect(textFileElement(bus)).not.toHaveProperty('Max'); + expect(textFileElement(bus)).not.toHaveProperty('Max_internal'); + }); + + it('writes a bound the user typed into an element the file gave none', () => { + const bus = busWith({ Name: 'a' }); + expect(element(bus).setProperty('Min', '-10')).toBe(true); + expect(element(bus).setProperty('Max', '10')).toBe(true); + // No alias to inherit from the file, so the plain keys are the ones written. + expect(binaryElement(bus)).toMatchObject({ Min: -10, Max: 10 }); + expect(textFileElement(bus)).toMatchObject({ Min: -10, Max: 10 }); + expect(minCell(element(busWith(binaryElement(bus))))).toBe('-10'); + expect(maxCell(element(busWith(textFileElement(bus))))).toBe('10'); + }); +}); diff --git a/test/archPresentation.test.ts b/test/archPresentation.test.ts index 2ee5364..777545e 100644 --- a/test/archPresentation.test.ts +++ b/test/archPresentation.test.ts @@ -19,9 +19,10 @@ import LookupTableNode from '../src/datamodel/node/data/LookupTableNode.js'; import VariantConfigurationDataNode from '../src/datamodel/node/data/VariantConfigurationDataNode.js'; import ConfigSetNode from '../src/datamodel/node/data/ConfigSetNode.js'; import ConfigSetRefNode from '../src/datamodel/node/data/ConfigSetRefNode.js'; +import SlddNode from '../src/datamodel/node/container/SlddNode.js'; import type DataNode from '../src/datamodel/node/DataNode.js'; // Registers the node class map so StructNode.parse can recurse into field values. -import { parseValue } from '../src/datamodel/node/NodeClassMap.js'; +import { parseValue } from '../src/datamodel/node/data/NodeClassMap.js'; // Build the raw Simulink-object value wrapper a node's static parse() expects, // with a single element carrying the given _properties. @@ -107,6 +108,52 @@ describe('ValueType defaultName and isDerived icon', () => { }); }); +// The same rule as the ValueType case just above, stated for the whole family that +// obeys it, and driven from the SECTION rather than from a hand-set metadata bag — +// which is where the distinction comes from for a real user: the same class dropped +// into Design Data and into Architectural Data is byte-identical on disk apart from +// `isderived`, so the icon is the ONLY thing in the tree that says which section an +// entry belongs to. A class whose ternary collapsed to one glyph would make an arch +// entry indistinguishable from a design one, and these four are the classes both +// sections admit (see ALLOWED_TYPES), so they are exactly the ones it can happen to. +describe('Design Data and Architectural Data icons for the classes both sections admit', () => { + const CASES: [string, string, string][] = [ + // className, Design Data icon, Architectural Data icon + ['Simulink.NumericType', 'wsNumeric', 'typeNumeric'], + ['Simulink.AliasType', 'wsAlias', 'typeAlias'], + ['Simulink.ValueType', 'wsValue', 'typeSignalUI'], + // A derived Signal shares the serviceInterfaces glyph with a derived + // Simulink.ServiceBus; what matters here is that it is NOT the wsSignal one. + ['Simulink.Signal', 'wsSignal', 'serviceInterfaces'], + ]; + + it('gives each class a different glyph in each section', () => { + const root = new SlddNode('d.sldd'); + for (const [className, designIcon, archIcon] of CASES) { + const design = root.getSection('design')!.addEntry(className)!; + const arch = root.getSection('arch')!.addEntry(className)!; + // addEntry stamps isderived from the section key; that is the whole difference. + expect(design.isDerived, className).toBe(false); + expect(arch.isDerived, className).toBe(true); + expect(design.icon, className).toBe(designIcon); + expect(arch.icon, className).toBe(archIcon); + expect(design.icon, `${className} must not share one glyph`).not.toBe(arch.icon); + } + }); + + it('follows the entry when it is moved between the two sections', () => { + // Paste and drag between Design and Architectural Data rebind `isderived` and + // re-read the entry, so the icon has to be derived from the metadata every time it + // is asked for rather than cached at construction — otherwise a pasted entry keeps + // the glyph of the section it came from. + const root = new SlddNode('d.sldd'); + const node = root.getSection('design')!.addEntry('Simulink.AliasType', 'MyAlias')!; + expect(node.icon).toBe('wsAlias'); + node.metadata = { ...node.metadata, isderived: '1' }; + expect(node.icon).toBe('typeAlias'); + }); +}); + describe('NumericType / AliasType Value column', () => { it('NumericType shows an empty, non-editable Value', () => { const node = NumericTypeNode.parse(rawVal('Simulink.NumericType', {}), 'NT', null); diff --git a/test/binarySlddRoundTrip.test.ts b/test/binarySlddRoundTrip.test.ts index bd5551f..a326f71 100644 --- a/test/binarySlddRoundTrip.test.ts +++ b/test/binarySlddRoundTrip.test.ts @@ -9,7 +9,7 @@ import { readFileSync } from 'node:fs'; import { fileURLToPath } from 'node:url'; import { unzipSync } from 'fflate'; import DataModel from '../src/core/DataModel.js'; -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; import { parseBinarySlddParts } from '../src/datamodel/parser/BinarySlddParser.js'; import { serializeBinarySldd, diff --git a/test/binarySlddSerializer.test.ts b/test/binarySlddSerializer.test.ts index b3eddbb..1afd78a 100644 --- a/test/binarySlddSerializer.test.ts +++ b/test/binarySlddSerializer.test.ts @@ -3,28 +3,67 @@ // Data-model serializer tests for the binary (zip) .sldd format. Loads a fixture // through the data model directly (parse binary parts -> addDataSource) and // asserts the serializer output, with no presentation/host layer. +// +// The second half of the file is about everything in a package that is NOT an entry: +// the `` header attributes, the base-workspace flag, and the zip members +// the reader carried through untouched. None of those appear in the tree a user sees, +// which is exactly why a save that drops one is quiet — the dictionary reopens, every +// entry is present and correct, and the only evidence is a setting that has turned +// itself off, or a header carrying an attribute MATLAB never wrote. Two of those +// fields also have a NORMALIZING reader: `BinarySlddParser` spells a missing `Arch` +// as `''` and a missing `AccessBaseWorkspace` as `false`, so the writer's job is to +// say back what the reader read and nothing more. That agreement is only observable +// over a whole parse -> serialize -> parse trip, which is what the tests below drive, +// each over a real MATLAB-authored package with one field of its header rewritten to +// the shape being pinned. import { describe, it, expect } from 'vitest'; import { readFileSync } from 'node:fs'; import { fileURLToPath } from 'node:url'; -import { unzipSync } from 'fflate'; +import { unzipSync, zipSync } from 'fflate'; import DataModel from '../src/core/DataModel.js'; import { parseBinarySldd } from '../src/datamodel/parser/BinarySlddParser.js'; import { + buildDataChunkXml, serializeBinarySldd, serializeEntryToXml, } from '../src/datamodel/parser/BinarySlddSerializer.js'; -import '../src/datamodel/node/NodeClassMap.js'; +import SlddNode from '../src/datamodel/node/container/SlddNode.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; const binPath = fileURLToPath(new URL('./parity/artifacts/binary/params.sldd', import.meta.url)); const bytes = readFileSync(binPath); -function freshModel(uri: string) { +function modelFrom(uri: string, ab: ArrayBuffer) { DataModel.removeDataSource(uri); - const ab = bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength); - const content = parseBinarySldd(ab as ArrayBuffer); + const content = parseBinarySldd(ab); return DataModel.addDataSource(uri, content as Record, { path: 'params.sldd' }); } +function freshModel(uri: string) { + return modelFrom(uri, bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength) as ArrayBuffer); +} + +/** The rebuilt `data/chunk0.xml` of a package this serializer just wrote. */ +function chunkXmlOf(zipped: ArrayBuffer): string { + return new TextDecoder().decode(unzipSync(new Uint8Array(zipped))['data/chunk0.xml']); +} + +/** + * The MATLAB-authored fixture with its `data/chunk0.xml` rewritten and everything + * else — all six other members, byte for byte — left alone. + * + * Rewriting one field of MATLAB's own XML rather than hand-writing a package is + * deliberate: the header fields under test are three attributes and one character in a + * forty-entry document, and a package built from scratch would prove only that the + * writer agrees with whatever this test made up. + */ +function repackaged(edit: (xml: string) => string): ArrayBuffer { + const members = unzipSync(new Uint8Array(bytes)); + members['data/chunk0.xml'] = new TextEncoder().encode(edit(new TextDecoder().decode(members['data/chunk0.xml']))); + const zipped = zipSync(members, { level: 6 }); + return zipped.buffer.slice(zipped.byteOffset, zipped.byteOffset + zipped.byteLength) as ArrayBuffer; +} + describe('serializeBinarySldd', () => { it('round-trips: re-serialized zip re-parses to the same entry names', () => { const model = freshModel('mem://ser1'); @@ -78,3 +117,95 @@ describe('serializeBinarySldd', () => { expect(entry.lastModified).toBe('2020-01-01T01:02:03Z'); }); }); + +describe('the package around the entries', () => { + it('carries a dictionary whose base-workspace access is on back out as on', () => { + // One character in the whole package — `

1` — and it + // is the dictionary's "allow access to the base workspace" setting. Nothing in the + // tree shows it, so a writer that always spelled it `0` would lose a user's setting + // on the first save of a file they only opened to read: the dictionary reopens with + // all forty entries intact and the setting silently off. The round trip goes back + // through the reader because reader and writer flipping the same way is the one + // failure a one-sided assertion would pass. + const model = modelFrom('mem://abws-on', repackaged((xml) => + xml.replace('

0

', '

1

'), + )); + expect(model.allowAccessBWS, 'the flag must reach the model before the writer can be blamed').toBe(true); + + const written = serializeBinarySldd(model); + expect(chunkXmlOf(written)).toContain('

1

'); + expect(modelFrom('mem://abws-reread', written).allowAccessBWS).toBe(true); + + // The control, so this is measuring the flag and not merely writing a 1: the + // fixture as MATLAB wrote it has the setting off, and it stays off. + const off = freshModel('mem://abws-off'); + expect(chunkXmlOf(serializeBinarySldd(off))).toContain('

0

'); + expect(modelFrom('mem://abws-off-reread', serializeBinarySldd(off)).allowAccessBWS).toBe(false); + }); + + it('copies the release the header declared, and says nothing about Arch when it declared none', () => { + // `Arch` is optional in a `` header, which is why the reader spells a + // missing one as `''` — and an empty string is not the same document as an absent + // attribute. A writer that always emitted `Arch=""` would put an attribute in the + // header of every dictionary that had none, on a file the user may have opened only + // to look at. The distinctive FormatVersion and MinRelease here are what separate + // "copied from the file" from "fell back to the built-in R2014a default", which the + // fixture's own header cannot do — its values ARE the defaults. + const model = modelFrom('mem://noarch', repackaged((xml) => + xml.replace(/]*>/, ''), + )); + const xml = chunkXmlOf(serializeBinarySldd(model)); + expect(xml).toContain(''); + expect(xml, 'an absent attribute must stay absent, not become an empty one').not.toContain('Arch='); + + // The control: the fixture does declare an Arch, and it survives verbatim. + expect(chunkXmlOf(serializeBinarySldd(freshModel('mem://arch')))).toContain( + '', + ); + }); + + it('writes a dictionary tree that never came out of a package', () => { + // `_zipMetadata` and `_dataSourceAttrs` are the two things a SlddNode learns ONLY + // from the binary reader, and both are null until it does. So this is the writer + // being total over the class it is typed against: a tree with no package provenance + // has no members to carry through and no header to copy, and it still has to + // produce a package that opens. Without the two fallbacks it does not fail + // gracefully — `Object.entries(null)` throws and the save dies part-written. + const node = new SlddNode('brand-new.sldd'); + expect(node._zipMetadata).toBe(null); + expect(node._dataSourceAttrs).toBe(null); + node.getSection('design')!.addEntry('Simulink.Parameter'); + + const written = serializeBinarySldd(node); + // Exactly the one member it has bytes for: nothing invented to fill the package out. + expect(Object.keys(unzipSync(new Uint8Array(written)))).toEqual(['data/chunk0.xml']); + const xml = chunkXmlOf(written); + expect(xml).toContain(''); + expect(xml, 'the default header declares no architecture').not.toContain('Arch='); + expect(modelFrom('mem://fresh-reread', written).children.flatMap((s: any) => s.children).length).toBe(1); + }); + + it('writes an entry whose record carried no metadata rather than failing the whole save', () => { + // `SectionNode.parseEntry` spells a record with no `metadata` key as null — that is + // its own `|| null` — so a null-metadata entry is a state the model admits. What is + // at stake is not that entry's six fields but the OTHER forty: `serializeEntryToXml` + // reads `metadata.uuid` in the middle of a whole-document rebuild, so one such entry + // used to take the entire save down with a TypeError. It is written with its fields + // empty, and the document around it is written too. + const model = freshModel('mem://nometa'); + const entry = model.getSection('design')!.parseEntry({ name: 'noMeta', value: 5 }); + expect(entry.metadata).toBe(null); + + const frag = serializeEntryToXml(entry as any); + expect(frag).toContain('

noMeta

'); + expect(frag).toContain('

'); + expect(frag).toContain('

'); + expect(frag).toContain('

'); + // Not `undefined`: IsDerived is what puts an entry in Design Data or in + // Architectural Data, and the reader compares it to the literal '1'. + expect(frag).toContain('

0

'); + // With no timestamp of its own the entry gets the save's, in MATLAB's own spelling. + expect(frag).toMatch(/

\d{8}T\d{6}\.\d{6}<\/P>/); + expect(buildDataChunkXml(model)).toContain('

noMeta

'); + }); +}); diff --git a/test/binarySlddValues.test.ts b/test/binarySlddValues.test.ts index 8173146..4057b3f 100644 --- a/test/binarySlddValues.test.ts +++ b/test/binarySlddValues.test.ts @@ -18,7 +18,7 @@ import { describe, it, expect } from 'vitest'; import { zipSync } from 'fflate'; import { parseBinarySldd, parseBinarySlddParts } from '../src/datamodel/parser/BinarySlddParser.js'; import DataNode from '../src/datamodel/node/DataNode.js'; -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; const DECL = ''; diff --git a/test/binaryWriteBackGate.test.ts b/test/binaryWriteBackGate.test.ts index a3dfeed..389573c 100644 --- a/test/binaryWriteBackGate.test.ts +++ b/test/binaryWriteBackGate.test.ts @@ -39,7 +39,7 @@ import { readFileSync } from 'node:fs'; import { fileURLToPath } from 'node:url'; import { unzipSync } from 'fflate'; import DataModel from '../src/core/DataModel.js'; -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; import { parseBinarySlddParts } from '../src/datamodel/parser/BinarySlddParser.js'; import { buildDataChunkXml } from '../src/datamodel/parser/BinarySlddSerializer.js'; import * as NodeRegistry from '../src/datamodel/node/NodeRegistry.js'; diff --git a/test/cellElementOrder.test.ts b/test/cellElementOrder.test.ts index 3ca6ac2..b264fb6 100644 --- a/test/cellElementOrder.test.ts +++ b/test/cellElementOrder.test.ts @@ -10,10 +10,23 @@ // numeric/cell/string alike), which is why nobody checked: a 2x3 cell's SET of // labels looks right, and only the label->value pairing exposes the transpose. // Verified against MATLAB's own answer in artifacts/truth.json. +// +// TWO blocks below, one per path. The first is the read path (defect 14). The second is +// the EDIT path (defect 50), which had the identical transpose and stayed green through +// all of the first — see its own header for why, and for why it is the second block of +// this file rather than a file of its own. import { describe, it, expect } from 'vitest'; import { readFileSync } from 'node:fs'; import { fileURLToPath } from 'node:url'; import { loadFile, findEntry } from './parity/loadFile.js'; +import MatlabValueParser from '../src/datamodel/parser/MatlabValueParser.js'; +import { + loadModel, + entryByName, + serializeModel, + reparseEntry, + type SlddFormat, +} from './parity/fidelity/roundTripHarness.js'; interface VarTruth { size: number[]; @@ -133,3 +146,105 @@ describe('cell and string arrays label their elements in MATLAB order', () => { } }); }); + +// Defect 50 — everything above is the READ path, and the WRITE path disagreed with it. +// +// `MatlabValueParser` built the element list of a cell and of a string array ROW-major, +// so committing a multi-row one TRANSPOSED it: `{1 2 3; 4 5 6}` came back +// `{1, 4, 2; 5, 3, 6}`, and `saveChanges` wrote that. Retyping the displayed text +// transposed it again, so the value never settled. MATLAB's own file agrees with the +// readers rather than with the parser — `probe_cell_shapes.m` measures `{1 2; 3 4}` as +// `"_elements": [1, 3, 2, 4]`. +// +// This is the same bug as the one the header describes, on the other path, and it stayed +// green through the whole of the read-path fix — because that fix pinned the READ path's +// answer rather than the invariant BETWEEN the two paths. That is what this block does +// instead: +// it never states an order of its own. It retypes each fixture's OWN displayed text and +// demands MATLAB's subscript->value pairs back, so the read path is the write path's +// expected answer and neither can drift without a failure here. +// +// It hid for as long as it did because a 1xN and an Nx1 flatten to the same list either +// way, and every editable cell fixture in the corpus is a vector. +describe('defect 50: the edit path stores its elements in the same order the readers do', () => { + let seq = 0; + + /** Retype `name`'s own displayed text, then report the pairs, before and after a save. */ + function retypeOwnText(format: SlddFormat, name: string) { + // A fresh uri per edit: the uri is the model's key, so a repeated one edits the + // PREVIOUS edit's node instead of a fresh copy of the fixture. + const uri = `test://order-${format}-${seq++}.sldd`; + const model = loadModel(format, 'cases.sldd', uri); + const node = entryByName(model, uri, name); + const text = String(node.displayValue); + expect(node.setProperty('Value', text), `${name} must accept its own displayed text`).toBe(true); + const fresh = reparseEntry(serializeModel(model, format), format, 'cases.sldd', name); + const pairs = (n: { children: { displayName: string; displayValue: unknown }[] }) => { + const m = new Map(); + for (const child of n.children) { + m.set(child.displayName, String(child.displayValue).replace(/^["']|["']$/g, '')); + } + return m; + }; + return { text, display: String(node.displayValue), edited: pairs(node), saved: pairs(fresh) }; + } + + for (const format of ['json', 'binary'] as SlddFormat[]) { + // cell2x3 and strMat are the only non-square, non-vector fixtures of their kinds: + // on a square one a transpose moves the off-diagonal elements only, and on a vector + // it moves nothing at all. mat2x3 is the control — it must stay row-major. + for (const name of ['cell2x3', 'strMat', 'mat2x3']) { + it(`${name} — ${format} — every MATLAB subscript still holds MATLAB's value`, () => { + const want = matlabPairs(name); + const { text, display, edited, saved } = retypeOwnText(format, name); + + // The literal itself is unchanged, which is the symptom a user sees: what the + // table shows has to be text that means what the table shows. + expect(display, `${name} display after retyping ${text}`).toBe(text); + + expect(edited.size).toBe(want.size); + for (const [label, value] of want) { + expect(edited.get(label) ?? '(no such label)', `edited ${label}`).toBe(value); + expect(saved.get(label) ?? '(no such label)', `saved ${label}`).toBe(value); + } + }); + } + } + + // The rule at the unit level, with no fixture in the way, so a failure points at the + // parser rather than at a container. `flatten(matrix, cols, order)` is the one place + // that decides this, and these are its two orders. + it('the parser flattens a cell and a string array down the COLUMNS', () => { + expect(MatlabValueParser.parse('{1, 2, 3; 4, 5, 6}')).toEqual({ + type: 'cell', value: [1, 4, 2, 5, 3, 6], dims: [2, 3], + }); + expect(MatlabValueParser.parse('["a" "b" "c"; "d" "e" "f"]')).toEqual({ + type: 'string-array', value: ['a', 'd', 'b', 'e', 'c', 'f'], dims: [2, 3], + }); + // A char matrix already did this, one value type away and from the start — + // charFromRows stores 'ab';'cd' as the column-major 'acbd'. + expect(MatlabValueParser.parse("['ab'; 'cd']")).toEqual({ + type: 'char', value: 'acbd', dims: [2, 2], + }); + }); + + it('and a NUMERIC array across the rows, which is the difference', () => { + // Not an inconsistency: formatMatrixSerial re-transposes the numeric list on the + // way out, so row-major is what the numeric writer is owed. Making everything + // column-major "for consistency" is the mistake this test exists to catch. + expect(MatlabValueParser.parse('[1 2 3; 4 5 6]')).toEqual({ + type: 'double', value: [1, 2, 3, 4, 5, 6], dims: [2, 3], + }); + expect(MatlabValueParser.parse('[true false; false true]')).toEqual({ + type: 'logical', value: [1, 0, 0, 1], dims: [2, 2], + }); + }); + + it('a vector is the same list in either order, which is why this hid', () => { + for (const literal of ['{1, 2, 3}', '{1; 2; 3}']) { + expect(MatlabValueParser.parse(literal)!.value, literal).toEqual([1, 2, 3]); + } + expect(MatlabValueParser.parse('["a" "b"]')!.value).toEqual(['a', 'b']); + expect(MatlabValueParser.parse('["a"; "b"]')!.value).toEqual(['a', 'b']); + }); +}); diff --git a/test/cellElementShape.test.ts b/test/cellElementShape.test.ts new file mode 100644 index 0000000..f58b904 --- /dev/null +++ b/test/cellElementShape.test.ts @@ -0,0 +1,310 @@ +// Copyright 2026 The MathWorks, Inc. +// +// Defect 49 — a shaped value inside a cell lost its shape, in the file as well as +// on screen. Typing `{[1;2]}` into a cell gave back `{[1 2]}`: a 2x1 double became +// a 1x2, and `saveChanges` wrote the 1x2. +// +// The cause is this repo's recurring one — a rule applied on one path and not on its +// twin. `MatlabValueParser.tokenizeCellElements` read each element with its own code +// per bracket kind instead of with the parser's own `parse`, and the `[` arm pushed +// `parseArray(...).value`: the flat element list, with `dims` dropped on the floor. A +// bare JSON list has nowhere to carry [2,1] and reads back as a row — exactly what +// MatlabVariableNode._serializeArray says in the comment above its own typed-literal +// fallback, one directory away. The `{` arm was right the whole time, because a nested +// cell had to keep a wrapper to carry `nested.dims`. +// +// Every element type that has a shape or a class the bare form cannot state was +// affected, which is why this file checks six of them and not just the numeric column: +// a numeric matrix, a logical array (retyped to double), a char matrix (flattened to a +// 1xN row), a string array (retyped to char, then flattened) and a 1x1 string (retyped +// to char) all went the same way. The spellings asserted here are MATLAB's own, read +// off a dictionary MATLAB wrote itself — see test/parity/matlab/probe_cell_shapes.m, +// whose header lists the file's exact bytes for each case. +import { describe, it, expect } from 'vitest'; +import MatlabValueParser from '../src/datamodel/parser/MatlabValueParser.js'; +import { + loadModel, + entryByName, + serializeModel, + reparseEntry, + type SlddFormat, +} from './parity/fidelity/roundTripHarness.js'; + +/** The single element of a 1x1 cell literal, as the raw value a node is built from. */ +function element(literal: string): unknown { + const parsed = MatlabValueParser.parse(literal); + expect(parsed, literal).not.toBeNull(); + expect(parsed!.type, literal).toBe('cell'); + return (parsed!.value as unknown[])[0]; +} + +describe('defect 49: a cell element is spelled the way MATLAB spells it', () => { + it('states a numeric COLUMN as a typed Matrix literal — the reported case', () => { + expect(element('{[1;2]}')).toEqual({ _type: 'double', _value: 'Matrix(2,1)\n[1.0, 2.0]' }); + // The flat list is what it used to push, and reading that back is the 1x2 the + // user was shown. It is still the right answer for a value that IS a 1x2. + expect(element('{[1 2]}')).toEqual([1, 2]); + }); + + it('states a numeric MATRIX, in row-major groups', () => { + // Asymmetric under transpose on purpose: [[1,2];[3,4]] would survive a transposed + // write unnoticed if the values were symmetric. + expect(element('{[1 2; 3 4]}')).toEqual({ + _type: 'double', + _value: 'Matrix(2,2)\n[[1.0, 2.0]; [3.0, 4.0]]', + }); + }); + + it('leaves the two shapes the bare form already states alone', () => { + // A row and the empty array, which is where MATLAB itself writes a bare list — + // so keeping the typed literal off them is parity, not laziness, and it keeps + // every existing file from churning on save. + expect(element('{[]}')).toEqual([]); + expect(element('{1}')).toBe(1); + expect(element('{-2.5}')).toBe(-2.5); + }); + + it('keeps a logical array LOGICAL, at either orientation', () => { + // Both orientations are tagged, unlike the double row: a bare JSON list reads + // back as a double, so the class is the thing the envelope is carrying here and + // the shape is only half the story. `{[true false]}` used to be written `[1, 0]` + // — a double row, two changes to the value at once. + expect(element('{[true; false]}')).toEqual({ + _type: 'logical', + _value: 'Matrix(2,1)\n[1, 0]', + }); + expect(element('{[true false]}')).toEqual({ _type: 'logical', _value: '[1, 0]' }); + // A scalar needs no envelope — a JSON boolean is already a logical. + expect(element('{true}')).toBe(true); + expect(element('{false}')).toBe(false); + // The guard on the arm above: [1 0] is a DOUBLE literal in MATLAB, and it must + // not be promoted to logical just because its values look like flags. + expect(element('{[1 0]}')).toEqual([1, 0]); + }); + + it('keeps a char MATRIX 2-D, as char codes in MATLAB order', () => { + // ['ab';'cd'] is a 2x2 char, and the codes are laid out one bracketed group per + // ROW: 97 98 / 99 100. Flattened to the bare string it became the 1x4 'acbd' — + // MATLAB's column-major storage order, read back as a row, so the text itself + // came out scrambled and not merely reshaped. + expect(element("{['ab'; 'cd']}")).toEqual({ + _type: 'mxchar', + _value: 'Matrix(2,2)\n[[97, 98]; [99, 100]]', + }); + // A 1xN char row is a bare JSON string in MATLAB's own file — charNeedsShape. + expect(element("{'ab'}")).toBe('ab'); + expect(element("{'a,b'}")).toBe('a,b'); + }); + + it('keeps a string array a STRING, with its dimensions', () => { + expect(element('{["a"; "b"]}')).toEqual({ + _array_type: 'String', + _dimensions: [2, 1], + _elements: ['a', 'b'], + _mw_element_type: 'MATLABArray', + }); + // A string ROW is wrapped as well — the opposite of the double row, because the + // bare list would say double. + expect(element('{["a" "b"]}')).toEqual({ + _array_type: 'String', + _dimensions: [1, 2], + _elements: ['a', 'b'], + _mw_element_type: 'MATLABArray', + }); + // And a 1x1 string is the one-element LIST, which is MATLAB's spelling and also + // what serializeValue writes for a string scalar at the top level. Bare text + // would be a char: `{"a"}` used to display and save as `{'a'}`. + expect(element('{"a"}')).toEqual(['a']); + expect(element('{["a"]}')).toEqual(['a']); + }); + + it('still wraps a nested CELL the way it always did', () => { + // The arm that was already right. Kept under test because the rewrite routed it + // through the shared converter, so it could have been broken by the fix. + expect(element('{{1;2}}')).toEqual({ + _array_type: 'Cell', + _dimensions: [2, 1], + _elements: [1, 2], + _mw_element_type: 'MATLABArray', + }); + expect(element('{{}}')).toEqual({ + _array_type: 'Cell', + _dimensions: [0, 0], + _elements: [], + _mw_element_type: 'MATLABArray', + }); + // Two levels down, which is the whole point of parsing an element recursively: + // the inner column keeps its shape as well. + expect(element('{{[1;2]}}')).toEqual({ + _array_type: 'Cell', + _dimensions: [1, 1], + _elements: [{ _type: 'double', _value: 'Matrix(2,1)\n[1.0, 2.0]' }], + _mw_element_type: 'MATLABArray', + }); + }); + + it('keeps the behaviours the rewrite could have dropped', () => { + // A bare identifier stays text: the parser cannot evaluate `f(x)` or resolve a + // name, and refusing the cell would reject a value the table can show. + expect(element('{abc}')).toBe('abc'); + // An exact-integer token collapses to its double inside a cell, because a bare + // decimal literal is a double in MATLAB and a cell element has no class beside + // it to say otherwise (defect 42). A token that escaped would be written as a + // JSON string and read back as char. + expect(element('{18446744073709551615}')).toBe(18446744073709551615); + expect(typeof element('{18446744073709551615}')).toBe('number'); + // Separators inside a quoted element are content, not delimiters. + expect(element("{'a;b'}")).toBe('a;b'); + expect(MatlabValueParser.parse("{'it''s', 'ok'}")).toEqual({ + type: 'cell', + value: ["it's", 'ok'], + dims: [1, 2], + }); + // The row/column COUNT is unchanged. The element order is not, and that is defect + // 50's fix rather than this one's: written row by row, stored column by column. + expect(MatlabValueParser.parse('{1, 2; 3, 4}')).toEqual({ + type: 'cell', + value: [1, 3, 2, 4], + dims: [2, 2], + }); + // A malformed bracketed or quoted span is still a rejection of the whole cell. + expect(MatlabValueParser.parse('{[1 "a"]}')).toBeNull(); + expect(MatlabValueParser.parse('{[1 2}')).toBeNull(); + expect(MatlabValueParser.parse("{'abc}")).toBeNull(); + expect(MatlabValueParser.parse('{{[}}')).toBeNull(); + }); +}); + +// The parse assertions above are about the raw shape; these are about what a USER +// sees and what the FILE gets. They are the half that made this a defect rather than +// an internal detail: _serializeCell rebuilds each element from its child node, so a +// child built from a shapeless list is written back shapeless. +// +// Both flavours, for the reason defect 44 needed both: the JSON and XML channels +// spell a value independently, and a shape kept in one can be dropped by the other. +for (const format of ['json', 'binary'] as SlddFormat[]) { + describe(`defect 49: a shaped cell element survives the edit and the write — ${format}`, () => { + // One source per edit. The uri is the model's key, so a repeated one would edit + // the PREVIOUS edit's node instead of a fresh copy of the fixture — which reads + // as a transposed result the second time round and has nothing to do with the + // value being tested. + let seq = 0; + function editAndReread(typed: string): { display: string; children: string[]; fresh: any } { + const uri = `test://cellshape-${format}-${seq++}.sldd`; + const model = loadModel(format, 'cases.sldd', uri); + const node = entryByName(model, uri, 'cellFlat'); + expect(node.setProperty('Value', typed), typed).toBe(true); + const fresh = reparseEntry(serializeModel(model, format), format, 'cases.sldd', 'cellFlat'); + return { + display: String(node.displayValue), + children: node.children.map((c: any) => String(c.displayValue)), + fresh, + }; + } + + // The user's own report: type it, and it must still be there after the save. + it('a numeric column stays a column', () => { + const { display, fresh } = editAndReread('{[1;2]}'); + expect(display).toBe('{[1; 2]}'); + expect(fresh.displayValue).toBe('{[1; 2]}'); + expect(fresh.children.map((c: any) => String(c.displayValue))).toEqual(['[1; 2]']); + expect(fresh.children[0].dataType).toBe('double'); + }); + + it('a numeric matrix stays a matrix, with its elements in place', () => { + const { fresh } = editAndReread('{[1 2; 3 4]}'); + expect(fresh.displayValue).toBe('{[1 2; 3 4]}'); + }); + + it('a logical array stays logical', () => { + const { fresh } = editAndReread('{[true; false]}'); + expect(fresh.displayValue).toBe('{[true; false]}'); + expect(fresh.children[0].dataType).toBe('logical'); + }); + + it('a char matrix keeps its rows', () => { + const { fresh } = editAndReread("{['ab'; 'cd']}"); + expect(fresh.displayValue).toBe("{['ab'; 'cd']}"); + expect(fresh.children[0].dataType).toBe('char'); + }); + + it('a string array stays a string array', () => { + const { display, fresh } = editAndReread('{["a"; "b"]}'); + // The edit itself is right in both channels — this is the 2x1 that used to + // come back as `{["a" "b"]}`. + expect(display).toBe('{["a"; "b"]}'); + if (format === 'binary') { + // Then the XML channel loses it, and NOT because of anything above: a string + // nested in a cell is written as an MCOS payload this repo does not decode + // for an unnamed value, so it re-reads as an opaque summary with no text. + // That is the known limitation DESIGN.md records for a string in a struct + // field or cell element (and it degrades the same way with the shape fix + // reverted). Pinned rather than skipped, so the day the payload is decoded + // this line fails and the real assertion below takes over. + expect(String(fresh.displayValue)).toBe('{<1x1 string>}'); + return; + } + expect(String(fresh.displayValue)).toBe('{["a"; "b"]}'); + expect(fresh.children[0].dataType).toBe('string'); + }); + + it('a 1x1 string stays a string', () => { + const { display, fresh } = editAndReread('{"a"}'); + expect(display).toBe('{"a"}'); + if (format === 'binary') { + expect(String(fresh.displayValue)).toBe('{<1x1 string>}'); + return; + } + expect(fresh.children[0].dataType).toBe('string'); + expect(String(fresh.displayValue)).toBe('{"a"}'); + }); + + // The invariant that ties the two halves together, and the cheapest way to state + // the whole defect: what the table SHOWS has to be acceptable input that means + // the same thing. `{[1;2]}` showing as `{[1 2]}` broke it in the worst way, by + // being acceptable input for a different value. + it('every shape round-trips through its own displayed text', () => { + for (const typed of [ + '{[1;2]}', + '{[1 2]}', + '{[1 2; 3 4]}', + '{[true; false]}', + '{[true false]}', + "{['ab'; 'cd']}", + "{'ab'}", + '{["a"; "b"]}', + '{"a"}', + '{{[1;2]}}', + ]) { + const first = editAndReread(typed); + const second = editAndReread(first.display); + expect(second.display, typed).toBe(first.display); + // On the binary channel a string element does not survive the write at all + // (see 'a string array stays a string array'), so what re-reads is the + // opaque summary rather than the value. The DISPLAY invariant above is the + // one this test is about and it holds in both channels. + if (format === 'binary' && typed.indexOf('"') >= 0) { + expect(String(second.fresh.displayValue), typed).toBe('{<1x1 string>}'); + continue; + } + expect(String(second.fresh.displayValue), typed).toBe(first.display); + } + }); + + // Defect 50, which this file found while pinning 49 and which is fixed in the commit + // after it: the parser assembled a cell's OWN element list row-major while every + // reader stores one column-major, so editing a multi-ROW cell transposed it. Kept + // here as well as in cellElementOrder.test.ts — that file owns the rule and states it + // against MATLAB's subscripts, this one is the shape-fix's neighbour and would notice + // if a later change to cellElementRaw reintroduced the transpose one type at a time. + it('a multi-row cell keeps its layout, and so does a vector', () => { + const { display, fresh } = editAndReread('{1, 2; 3, 4}'); + expect(display).toBe('{1, 2; 3, 4}'); + expect(String(fresh.displayValue)).toBe('{1, 2; 3, 4}'); + // A vector was unaffected even before the fix, which is why this hid: a 1xN and + // an Nx1 flatten to the same list in either order. + expect(editAndReread('{1, 2, 3}').display).toBe('{1, 2, 3}'); + expect(editAndReread('{1; 2; 3}').display).toBe('{1; 2; 3}'); + }); + }); +} diff --git a/test/charShape.test.ts b/test/charShape.test.ts index ba0fd02..cf8e4d5 100644 --- a/test/charShape.test.ts +++ b/test/charShape.test.ts @@ -42,7 +42,7 @@ import { unzipSync } from 'fflate'; import { loadFile, findEntry } from './parity/loadFile.js'; import MatlabValueParser from '../src/datamodel/parser/MatlabValueParser.js'; import { charNeedsShape } from '../src/datamodel/parser/XmlUtils.js'; -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; // ---- MATLAB's bytes, both flavours ------------------------------------------- diff --git a/test/classWithoutElement.test.ts b/test/classWithoutElement.test.ts new file mode 100644 index 0000000..181e41e --- /dev/null +++ b/test/classWithoutElement.test.ts @@ -0,0 +1,125 @@ +// Copyright 2026 The MathWorks, Inc. +// +// A VALUE THAT NAMES A CLASS BUT CARRIES NO ELEMENT STILL MODELS AS AN ENTRY. +// +// A Simulink object in a dictionary is stored as an envelope — the class on the wrapper, +// the properties inside `_elements[0]._properties` — and every typed node's `static parse` +// unwraps it with the same expression: +// +// const elem = rawVal._elements && rawVal._elements[0]; +// const props = ((elem && elem._properties) || {}); +// +// The `|| {}` is the arm that runs when the envelope names a class and holds no element: +// a 0x0 empty object array, or an entry that was written incompletely. Without it the +// unwrap throws, and the throw does not cost one entry — `SlddNode.parse` walks the entry +// list in a plain `forEach`, so an exception inside any one entry's `parse` aborts the walk +// and the dictionary does not open at all. This package has already been bitten by that +// exact shape once, on the other side of the same envelope: see the comment on +// `objectArrayValue` in BinarySlddParser, where indexing a single-element wrapper "threw on +// a classless later element and took the whole file's read down with it". +// +// So the behaviour worth pinning is the degradation: one unreadable entry reads as an entry +// of its class with every property at its default — right name, right Class column, right +// icon, blank Value — and the other entries in the file are unaffected. Five classes in this +// cluster spell that unwrap verbatim, which is why it is asserted once, here, over all of +// them rather than five times in five files. +// +// Note this is reached through `parseValue`, the real dispatch, on purpose: its own rule is +// that a value object with more than one element expands into an array container, so a +// ZERO-element one falls through to the typed class — the routing and the fallback have to +// agree about that or the test would be exercising a path nothing takes. + +import { describe, it, expect } from 'vitest'; +import { parseValue } from '../src/datamodel/node/data/NodeClassMap.js'; +import SectionNode from '../src/datamodel/node/container/SectionNode.js'; +import SlddNode from '../src/datamodel/node/container/SlddNode.js'; +import type DataNode from '../src/datamodel/node/DataNode.js'; + +// The envelope MATLAB writes for an empty (0x0) object array: the class is on the wrapper, +// and there is no element to carry properties. +function noElement(className: string): Record { + return { + _array_class: className, + _array_type: 'MATLABArray', + _dimensions: [0, 0], + _mw_element_type: 'MATLABArray', + _elements: [], + }; +} + +// Each class, with the answers a user would see in the table for an entry of it that +// carries no properties at all. The Data Type column differs per class because each +// derives it from a different property, which is precisely what the defaults decide. +const CLASSES: { className: string; node: string; icon: string; dataType: string; kind: string }[] = [ + { className: 'Simulink.NumericType', node: 'NumericTypeNode', icon: 'wsNumeric', dataType: '', kind: 'Numeric Type' }, + { className: 'Simulink.AliasType', node: 'AliasTypeNode', icon: 'wsAlias', dataType: '', kind: 'Alias Type' }, + // 'double' rather than blank: absent DataType is MATLAB's default for a ValueType, not + // a missing value, so the column shows the type the entry actually has. + { className: 'Simulink.ValueType', node: 'ValueTypeNode', icon: 'wsValue', dataType: 'double', kind: 'Value Type' }, + { className: 'Simulink.ConfigSet', node: 'ConfigSetNode', icon: 'settings', dataType: '', kind: 'Configuration Set' }, + // 'auto' for the same reason as ValueType's 'double' — see the constructor comment. + { className: 'Simulink.Signal', node: 'SignalNode', icon: 'wsSignal', dataType: 'auto', kind: 'Simulink Signal' }, +]; + +describe('an entry whose value names a class but holds no element', () => { + it('models as an entry of that class with default properties, rather than throwing', () => { + for (const c of CLASSES) { + const node = parseValue(noElement(c.className), 'lonely', null) as DataNode; + expect(node.constructor.name, c.className).toBe(c.node); + // The Class column still names the class the file claimed; falling through to a + // generic object node here would relabel the entry and lose its editing rules. + expect(node.className, c.className).toBe(c.className); + expect(node.kind, c.className).toBe(c.kind); + expect(node.icon, c.className).toBe(c.icon); + } + }); + + it('shows the same blank, non-editable Value the fully-populated entry shows', () => { + // None of these classes has a scalar value, so an empty one must not fall back to a + // placeholder like "<0x0 Simulink.Signal>" — the column is blank for every entry of + // the class, populated or not. + for (const c of CLASSES) { + const row = (parseValue(noElement(c.className), 'lonely', null) as DataNode).toRow()!; + expect(row.Value, c.className).toBe(''); + expect(row._valueEditable, c.className).toBe(false); + expect(row.DataType, c.className).toBe(c.dataType); + expect((row.Name as { label: string }).label, c.className).toBe('lonely'); + } + }); + + it('serializes back out without inventing properties the file did not have', () => { + // A file that opens must also save. The empty envelope has to survive the round trip + // rather than acquiring a bag of defaults, which would turn a read-only glitch into a + // written-out one. + for (const c of CLASSES) { + const node = parseValue(noElement(c.className), 'lonely', null) as DataNode; + const sv = node.serializeValue() as { _array_class: string; _elements: { _properties: Record }[] }; + expect(sv._array_class, c.className).toBe(c.className); + expect(sv._elements, c.className).toHaveLength(1); + // AliasType writes its BaseType unconditionally and ConfigSet its Name (they follow + // the entry, not the bag); no class invents anything else. + const written = Object.keys(sv._elements[0]._properties).sort(); + const allowed = { 'Simulink.AliasType': ['BaseType'], 'Simulink.ConfigSet': ['Name'] }[c.className] ?? []; + expect(written, c.className).toEqual(allowed); + } + }); + + it('does not stop the entries around it from being read', () => { + // The consequence that matters. `SlddNode.parse` walks the entry list with forEach, so + // this is the difference between one odd row and a dictionary that will not open. + const entry = (name: string, value: unknown) => ({ + name, + value, + metadata: { namespace: '', isderived: '0' }, + }); + const root = new SlddNode('d.sldd'); + const design = root.getSection('design') as SectionNode; + design.parseEntry(entry('before', { _type: 'double', _value: '1' })); + design.parseEntry(entry('lonely', noElement('Simulink.Signal'))); + design.parseEntry(entry('after', { _type: 'double', _value: '2' })); + + expect(design.children.map((c) => c.name)).toEqual(['before', 'lonely', 'after']); + expect(design.children[1].className).toBe('Simulink.Signal'); + expect(root.NumberOfEntries).toBe(3); + }); +}); diff --git a/test/codegenEdit.test.ts b/test/codegenEdit.test.ts index 99fc251..2a5e71d 100644 --- a/test/codegenEdit.test.ts +++ b/test/codegenEdit.test.ts @@ -12,7 +12,7 @@ import ParameterNode from '../src/datamodel/node/data/ParameterNode.js'; import DataModel from '../src/core/DataModel.js'; import { parseBinarySldd } from '../src/datamodel/parser/BinarySlddParser.js'; import { resolveSourcePath } from '../src/datamodel/schema/index.js'; -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; describe('trySetSchemaProperty routing via node.setProperty', () => { it('sets storageClass to a valid enum value', () => { diff --git a/test/configSetSerialize.test.ts b/test/configSetSerialize.test.ts index c5f1209..cf0b6aa 100644 --- a/test/configSetSerialize.test.ts +++ b/test/configSetSerialize.test.ts @@ -15,7 +15,7 @@ import { describe, it, expect } from 'vitest'; import ConfigSetNode from '../src/datamodel/node/data/ConfigSetNode.js'; import ConfigSetRefNode from '../src/datamodel/node/data/ConfigSetRefNode.js'; -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; const savedProps = (node: { serializeValue(): unknown }): Record => { const sv = node.serializeValue() as { _elements: { _properties: Record }[] }; diff --git a/test/configSetUnified.test.ts b/test/configSetUnified.test.ts index 6931692..e2f6a1c 100644 --- a/test/configSetUnified.test.ts +++ b/test/configSetUnified.test.ts @@ -1,6 +1,6 @@ // Copyright 2026 The MathWorks, Inc. import { describe, it, expect } from 'vitest'; -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; import ModelSectionNode from '../src/datamodel/node/container/ModelSectionNode.js'; import ConfigSetNode from '../src/datamodel/node/data/ConfigSetNode.js'; import ConfigSetRefNode from '../src/datamodel/node/data/ConfigSetRefNode.js'; diff --git a/test/constantNode.test.ts b/test/constantNode.test.ts index ec65375..0b0726a 100644 --- a/test/constantNode.test.ts +++ b/test/constantNode.test.ts @@ -15,7 +15,7 @@ import ConstantNode from '../src/datamodel/node/data/ConstantNode.js'; import MatlabVariableNode from '../src/datamodel/node/data/MatlabVariableNode.js'; import { parsedIsScalarNumeric } from '../src/datamodel/parser/MatlabValueParser.js'; import MatlabValueParser from '../src/datamodel/parser/MatlabValueParser.js'; -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; describe('parsedIsScalarNumeric truth table', () => { const scalarNumeric = ['5', '3.14', '-2', 'true', 'false', '1+2i']; diff --git a/test/containerIcon.test.ts b/test/containerIcon.test.ts index 0ae142c..6382315 100644 --- a/test/containerIcon.test.ts +++ b/test/containerIcon.test.ts @@ -21,7 +21,7 @@ import { describe, it, expect } from 'vitest'; // Importing the class map registers the NodeRegistry every case dispatches through. -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; import * as NodeRegistry from '../src/datamodel/node/NodeRegistry.js'; interface IconNode { icon: string; className: string; children: IconNode[] } diff --git a/test/containerNode.test.ts b/test/containerNode.test.ts index aa926f7..3460429 100644 --- a/test/containerNode.test.ts +++ b/test/containerNode.test.ts @@ -23,7 +23,7 @@ import { describe, it, expect } from 'vitest'; import ContainerNode from '../src/datamodel/node/ContainerNode.js'; import BaseNode from '../src/datamodel/node/BaseNode.js'; import SlddNode from '../src/datamodel/node/container/SlddNode.js'; -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; /** A container holding `a` (with one nested child) and `b`. */ function tree(): { box: ContainerNode; a: BaseNode; a1: BaseNode; b: BaseNode } { diff --git a/test/dataNodeXml.test.ts b/test/dataNodeXml.test.ts index d92cddf..359bde6 100644 --- a/test/dataNodeXml.test.ts +++ b/test/dataNodeXml.test.ts @@ -16,7 +16,7 @@ import { describe, it, expect } from 'vitest'; import DataNode from '../src/datamodel/node/DataNode.js'; import SlddNode from '../src/datamodel/node/container/SlddNode.js'; -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; const prop = (name: string, value: unknown, indent = 0) => DataNode.serializePropertyXml(name, value, indent, null); diff --git a/test/dataTaxonomy.test.ts b/test/dataTaxonomy.test.ts index e5a833b..e72de32 100644 --- a/test/dataTaxonomy.test.ts +++ b/test/dataTaxonomy.test.ts @@ -15,7 +15,7 @@ import { EnumTypeNode } from '../src/datamodel/node/data/EnumTypeNode.js'; import { BusNode } from '../src/datamodel/node/data/BusNode.js'; import { ConnectionBusNode } from '../src/datamodel/node/data/ConnectionBusNode.js'; import MatlabVariableNode from '../src/datamodel/node/data/MatlabVariableNode.js'; -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; function rawVal(className: string, properties: Record): Record { return { diff --git a/test/editsTheFormatCannotKeep.test.ts b/test/editsTheFormatCannotKeep.test.ts index f06d284..196f69a 100644 --- a/test/editsTheFormatCannotKeep.test.ts +++ b/test/editsTheFormatCannotKeep.test.ts @@ -24,7 +24,7 @@ import { describe, it, expect } from 'vitest'; import ParameterNode from '../src/datamodel/node/data/ParameterNode.js'; import MatlabVariableNode from '../src/datamodel/node/data/MatlabVariableNode.js'; import StructNode from '../src/datamodel/node/data/StructNode.js'; -import * as NodeClassMap from '../src/datamodel/node/NodeClassMap.js'; +import * as NodeClassMap from '../src/datamodel/node/data/NodeClassMap.js'; void NodeClassMap; diff --git a/test/elementLabelFollowsName.test.ts b/test/elementLabelFollowsName.test.ts index cbe6ea0..996bd32 100644 --- a/test/elementLabelFollowsName.test.ts +++ b/test/elementLabelFollowsName.test.ts @@ -15,7 +15,7 @@ import { describe, it, expect } from 'vitest'; import StructNode from '../src/datamodel/node/data/StructNode.js'; import MatlabVariableNode from '../src/datamodel/node/data/MatlabVariableNode.js'; import * as NodeRegistry from '../src/datamodel/node/NodeRegistry.js'; -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; import type { MatVariable } from '../src/datamodel/parser/MatParser.js'; type Any = any; diff --git a/test/fileKinds.test.ts b/test/fileKinds.test.ts index e5f6624..dcd7e6e 100644 --- a/test/fileKinds.test.ts +++ b/test/fileKinds.test.ts @@ -15,11 +15,14 @@ import { basenameOf, refBasename, modelNameOf, + refModelExt, + projectNameOf, isModelFile, isSlddFile, isMatFile, isProjectFile, } from '../src/index.js'; +import ModelSectionNode from '../src/datamodel/node/container/ModelSectionNode.js'; describe('extOf', () => { it('returns the extension lower-cased, with the dot', () => { @@ -102,6 +105,117 @@ describe('modelNameOf', () => { }); }); +describe('refModelExt', () => { + it('completes a reference with the PARENT model’s container', () => { + expect(refModelExt('legacy.mdl')).toBe('.mdl'); + expect(refModelExt('modern.slx')).toBe('.slx'); + }); + + it('is case-insensitive, like every other test in this module', () => { + // The whole reason these live together: MATLAB and Windows both write `Legacy.MDL`, + // and a case-sensitive copy of this rule labels a legacy hierarchy's children `.slx`, + // so every reference in it resolves to a file that does not exist. + expect(refModelExt('Legacy.MDL')).toBe('.mdl'); + expect(refModelExt('/work/models/LEGACY.MDL')).toBe('.mdl'); + }); + + it('answers `.slx` for anything that is not a `.mdl`, including a bare name', () => { + // `.slx` is the default because it is the modern container: a caller that hands over + // a name with no extension (a model named the MATLAB way, `engine`) wants the + // extension a fresh save_system would produce. + expect(refModelExt('engine')).toBe('.slx'); + expect(refModelExt('')).toBe('.slx'); + expect(refModelExt('params.sldd')).toBe('.slx'); + }); + + it('takes the LAST extension, so a name that merely contains .mdl is a .slx', () => { + expect(refModelExt('legacy.mdl.slx')).toBe('.slx'); + expect(refModelExt('notes-about-mdl.slx')).toBe('.slx'); + }); +}); + +// The seam this module exists to remove. `refModelExt` decides WHICH extension, and +// `addReferenceEntry` decides WHETHER to add one — two halves of completing a bare +// reference name, and until they were joined here each half was spelled twice (once in +// this package, once in its vscode host) with no test that could see both copies. +describe('refModelExt and addReferenceEntry complete a name together', () => { + const ref = (modelName: string, parent: string) => + ( + new ModelSectionNode('references', null, 'Model References', 'modelReference').addReferenceEntry( + { blockPath: 'top/ref', modelName }, + refModelExt(parent), + ) as { name: string } + ).name; + + it('gives a bare name the parent’s container, in both directions', () => { + expect(ref('plant', 'legacy.mdl')).toBe('plant.mdl'); + expect(ref('plant', 'modern.slx')).toBe('plant.slx'); + }); + + it('leaves an ALREADY-complete name alone, in either container and either case', () => { + // The bug the `isModelFile` call replaced a local regex to prevent: a second opinion + // about whether `plant.MDL` still needs an extension appends one, and `plant.MDL.slx` + // is a link to nothing. + expect(ref('plant.slx', 'legacy.mdl')).toBe('plant.slx'); + expect(ref('plant.mdl', 'modern.slx')).toBe('plant.mdl'); + expect(ref('plant.MDL', 'modern.slx')).toBe('plant.MDL'); + expect(ref('Plant.SLX', 'legacy.mdl')).toBe('Plant.SLX'); + }); + + it('names the same child two ways, which is what modelNameOf reconciles', () => { + // A mixed hierarchy is the case the guess exists to serve: the SAME child model is + // `plant.mdl` seen from a `.mdl` parent and `plant.slx` seen from a `.slx` one, so a + // resolver comparing full names finds nothing and one comparing stems finds it. + const fromMdl = ref('plant', 'legacy.mdl'); + const fromSlx = ref('plant', 'modern.slx'); + expect(fromMdl).not.toBe(fromSlx); + expect(modelNameOf(fromMdl)).toBe(modelNameOf(fromSlx)); + }); +}); + +// The other reduction a consumer has to make before it can call a public parser, and the +// third rule in this module that was spelled once here and once in the vscode host. +describe('projectNameOf', () => { + it('takes the `.prj` off, in either case', () => { + expect(projectNameOf('work.prj')).toBe('work'); + expect(projectNameOf('Work.PRJ')).toBe('Work'); + }); + + it('keeps the rest of the name exactly as written', () => { + // The name is a LABEL — it goes in a tree row and a graph group heading — so its case + // and its dots are the author's, not ours. Only the extension is ours to remove. + expect(projectNameOf('My.Big.Project.prj')).toBe('My.Big.Project'); + expect(projectNameOf('Simulink_Model_Advisor.PRJ')).toBe('Simulink_Model_Advisor'); + }); + + it('leaves a name with no `.prj` alone rather than returning null', () => { + // Deliberately total, unlike modelNameOf: every caller wants a label, and a null here + // would only be re-defaulted back to the filename at each of them. + expect(projectNameOf('work')).toBe('work'); + expect(projectNameOf('')).toBe(''); + expect(projectNameOf('notes-about-prj.txt')).toBe('notes-about-prj.txt'); + }); + + it('strips only the LAST extension', () => { + expect(projectNameOf('work.prj.bak')).toBe('work.prj.bak'); + expect(projectNameOf('old.prj.prj')).toBe('old.prj'); + }); + + it('composes with basenameOf the way its callers do', () => { + // Neither this nor modelNameOf takes a path: a caller reduces the path first and the + // name second, which is the composition `UsageIndex` already spells for models. Pinned + // because the two halves live in the same module and could each look right alone — + // `projectNameOf('/work/proj/thing.prj')` returning a path with the extension gone is + // exactly the kind of half-answer that reads fine at a call site. + expect(projectNameOf(basenameOf('/work/proj/thing.prj'))).toBe('thing'); + expect(projectNameOf(basenameOf('C:\\work\\proj\\Thing.PRJ'))).toBe('Thing'); + // And a project file is still recognisably one before the strip and not after, which is + // what makes the order of the two calls matter. + expect(isProjectFile(basenameOf('C:\\work\\Thing.PRJ'))).toBe(true); + expect(isProjectFile(projectNameOf('Thing.PRJ'))).toBe(false); + }); +}); + describe('the four kind tests', () => { it('classify each supported extension', () => { expect(isModelFile('engine.slx')).toBe(true); diff --git a/test/matWriter.test.ts b/test/matWriter.test.ts index 14bf5ee..f160336 100644 --- a/test/matWriter.test.ts +++ b/test/matWriter.test.ts @@ -59,6 +59,69 @@ function readStream(s: string): { bytes: Uint8Array; declared: number; variable: return { bytes, declared, variable: parseMatrix(view, 16, declared) }; } +/** + * The same stream read as if the file had ENDED after `keep` bytes of it. + * + * MatParser stops at the end it was given — a struct with no room left for its + * field-name table keeps `fields` null, and a struct array with no room left for + * element 10 hands back a field list shorter than the dimensions declare. Both are + * shapes a truncated or partially written file really produces, and both then have to + * come back out of the writer. + */ +function readTruncatedStream(s: string, keep: number): MatVariable { + const bytes = uudecode(s); + const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength); + return parseMatrix(view, 16, keep); +} + +/** The MatVariable inside one bare `miMATRIX` element — what `encodeMatVariable` returns. */ +function readElement(bytes: Uint8Array): MatVariable { + const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength); + expect(view.getUint32(0, true)).toBe(MI_MATRIX); + return parseMatrix(view, 8, view.getUint32(4, true)); +} + +/** + * The type code and payload length of every subelement of one `miMATRIX` element, in + * order: array flags, dimensions, name, then the data. Read by hand rather than through + * MatParser because the point of the tests that use it is the TAG — which of the ten + * numeric element types the payload declares itself to be, and how many bytes it claims + * per value. Nothing MatParser hands back names those two things. + */ +function subelements(bytes: Uint8Array): { type: number; bytes: number }[] { + const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength); + const end = 8 + view.getUint32(4, true); + const out: { type: number; bytes: number }[] = []; + for (let at = 8; at < end; ) { + // The small form packs the byte count into the tag's upper half; the long form + // spends a second word on it and pads the payload to an 8-byte boundary. + const packed = view.getUint16(at + 2, true); + if (packed !== 0) { + out.push({ type: view.getUint16(at, true), bytes: packed }); + at += 8; + } else { + const n = view.getUint32(at + 4, true); + out.push({ type: view.getUint32(at, true), bytes: n }); + at += 8 + n + ((8 - (n % 8)) % 8); + } + } + return out; +} + +/** A 1x1 double: the starting point each hand-built case below varies one field of. */ +function variable(over: Partial): MatVariable { + return { + name: '', + className: 'double', + dimensions: [1, 1], + isComplex: false, + isLogical: false, + value: 1, + fields: null, + ...over, + }; +} + describe('the cdata transport is its own inverse', () => { // The content is 8 bytes of preamble plus the element the stream declares; // anything past that is MATLAB's NUL padding, which carries no data. @@ -211,6 +274,33 @@ describe('the layout choices, stated where a failure is readable', () => { expect((back.value as MatVariable[]).map((c) => c.value)).toEqual([1, 2, 3, 4, 5, 6]); }); + it('keeps a hole a hole, and an empty value indistinguishable from one', () => { + // The placeholder a hole gets IS MATLAB's `[]`, byte for byte — which is the whole + // reason a hole is readable at all, and the reason an empty value must not be + // treated as a defect. `flatValues` is where that lands: MatParser leaves an empty + // variable's value null, and null is neither a list nor a scalar. Read as a + // one-element list it contradicts the declared [0,0] and raises MatWriteError, + // which for an N-D value is not an error a user sees — `_serializeCdata` catches it + // and falls back to the rank-2 literal grammar MATLAB reads as an empty 1x0. One + // empty slot would take the whole surrounding value with it. + const hole = encodeMatVariable(variable({ className: 'cell', dimensions: [1, 1], value: [null] })); + const written = encodeMatVariable( + variable({ + className: 'cell', + dimensions: [1, 1], + value: [variable({ className: 'double', dimensions: [0, 0], value: null })], + }), + ); + expect(written).toEqual(hole); + + // And an empty value of some other class keeps that class rather than becoming the + // placeholder: an empty int32 reopens as int32, not as double. + const emptyInt = readElement(encodeMatVariable(variable({ className: 'int32', dimensions: [0, 0], value: null }))); + expect(emptyInt.className).toBe('int32'); + expect(emptyInt.dimensions).toEqual([0, 0]); + expect(emptyInt.value).toEqual([]); + }); + it('keeps a hole a hole', () => { const cell: MatVariable = { name: '', @@ -231,3 +321,149 @@ describe('the layout choices, stated where a failure is readable', () => { expect(cells[2].dimensions).toEqual([0, 0]); }); }); + +// Ten numeric classes reach the payload writer and each is one line differing only in +// which DataView setter it calls — that is, only in how many bytes it spends per value +// and whether it treats the top bit as a sign. MATLAB's own cdata corpus happens to +// use six of them (double, single, int32, uint64, uint8-as-logical, and char's UTF-8), +// so four have never been written by anything but this file. Getting one wrong is not +// a crash: an int16 written through the int8 line stores 300 as 44, and MATLAB reopens +// the dictionary and shows 44. So the tag and the width are asserted directly, against +// the type codes the MAT-file format fixes, and the extremes of each class are in the +// data because a narrower setter cannot carry them. +// +// Signedness is deliberately NOT asserted: setInt16 and setUint16 write identical bytes +// for every value either class can hold, so the two lines are interchangeable and a +// test claiming otherwise would be claiming something untrue about the format. What +// distinguishes the classes is the class code in the array flags, which is asserted by +// reading the class name back. +describe('the integer widths MATLAB’s own corpus never made this writer produce', () => { + const CASES: { className: string; miType: number; width: number; values: number[] }[] = [ + { className: 'int8', miType: 1, width: 1, values: [-128, 127, -1, 0, 1, 42] }, + { className: 'uint8', miType: 2, width: 1, values: [0, 255, 128, 1, 7, 42] }, + { className: 'int16', miType: 3, width: 2, values: [-32768, 32767, 300, -1, 0, 256] }, + { className: 'uint16', miType: 4, width: 2, values: [0, 65535, 300, 1, 256, 7] }, + { className: 'int32', miType: 5, width: 4, values: [-2147483648, 2147483647, 70000, -1, 0, 4] }, + { className: 'uint32', miType: 6, width: 4, values: [0, 4294967295, 70000, 1, 65536, 4] }, + ]; + + for (const c of CASES) { + it(`writes a rank-3 ${c.className} as a ${c.width}-byte mi type ${c.miType} payload`, () => { + const bytes = encodeMatVariable(variable({ className: c.className, dimensions: [2, 1, 3], value: c.values })); + const parts = subelements(bytes); + expect(parts.length, 'array flags, dimensions, name, data').toBe(4); + expect(parts[3].type).toBe(c.miType); + expect(parts[3].bytes, 'six values at the class’s own width').toBe(c.width * 6); + + const back = readElement(bytes); + expect(back.className).toBe(c.className); + expect(back.dimensions).toEqual([2, 1, 3]); + // Including the extremes, which is what a too-narrow setter loses. + expect(back.value).toEqual(c.values); + }); + } +}); + +// The guards that answer with a placeholder instead of refusing. +// +// A MatWriteError raised over a value that is merely INCOMPLETE is the worst outcome +// available here, and it does not look like an error. `MatlabVariableNode._serializeCdata` +// wraps this writer in a try/catch and returns null on a throw; `serializeValue` then +// falls through to the rank-2 literal grammar, which — per the file header above — is +// exactly the spelling MATLAB reads back as an empty 1x0. So one element the model +// could not hand over whole does not produce a warning or a failed save: it deletes the +// value it belonged to, quietly, in a file that reopens perfectly. +// +// Every case below is a shape a real reader or a real edit produces, and the behaviour +// pinned is always the same one — the slot is kept, filled with the nearest thing MATLAB +// can read, and the rest of the value goes out intact. +describe('a value the model could not hand over whole is still written', () => { + it('writes a non-finite int64 element as zero rather than failing the save', () => { + // `BigInt()` throws on Inf and on NaN, and there is no integer to write instead — + // an int64 that came in through a path still reading it as a double, or an element a + // user typed `Inf` into, has no 64-bit form at all. Zero in the slot keeps every + // other element of the array in its own place. + const back = readElement( + encodeMatVariable(variable({ className: 'int64', dimensions: [1, 1, 3], value: [1, Infinity, NaN] })), + ); + expect(back.className).toBe('int64'); + expect(back.value).toEqual([1, 0, 0]); + }); + + it('writes a complex element that lost its imaginary part as x+0i, in its own slot', () => { + // A complex value's elements arrive as `{re, im}` pairs from the reader, but not from + // every edit: `_buildVarObject`'s complex-scalar arm only builds a pair when its + // regex matches the element's text, and leaves the raw value in place when it does + // not — a complex scalar a user retyped as plain `5` is a bare value under an + // `isComplex` header. Reading no `im` as no ELEMENT would shorten the payload and + // slide every later value one position early. + const back = readElement( + encodeMatVariable( + variable({ + className: 'double', + isComplex: true, + dimensions: [1, 3], + value: [{ re: 1, im: 2 }, 7, { re: 3, im: 4 }], + }), + ), + ); + expect(back.value).toEqual([{ re: 1, im: 2 }, { re: 7, im: 0 }, { re: 3, im: 4 }]); + + // The shape the node layer actually hands over for that retyped scalar: one bare + // string under a complex header, which is 5+0i and not an empty value. + const scalar = readElement(encodeMatVariable(variable({ className: 'double', isComplex: true, value: '5' }))); + expect(scalar.value).toEqual([{ re: 5, im: 0 }]); + }); + + it('writes an empty char as no characters, not as the four letters of “null”', () => { + // `_buildVarObject` assigns a char's `value` straight from the node's scalar value + // and only guards the DIMENSIONS computation against a non-string, so the writer is + // where a char with nothing in it arrives as null. `String(null)` is the text + // 'null' — four characters against a declared zero, which raises MatWriteError and + // so deletes the value the empty char sat inside. + const empty = encodeMatVariable(variable({ className: 'char', dimensions: [0, 0], value: null })); + const parts = subelements(empty); + expect(parts[3].type, 'char data is miUTF8').toBe(16); + expect(parts[3].bytes).toBe(0); + expect(readElement(empty).value).toBe(''); + + // A char whose text arrived as a number is written as its digits — the same + // coercion, in the direction the display layer already tolerates. + expect(readElement(encodeMatVariable(variable({ className: 'char', dimensions: [1, 2], value: 65 }))).value).toBe('65'); + }); + + it('keeps every slot of a struct array whose bytes ran out before the last element', () => { + // MATLAB's own 2x3x2 `structNd`, read as if the file had ended 400 bytes early: the + // reader stops at the end it was given, so `fields.a` comes back with six of the + // twelve elements. The twelve slots are not interchangeable — a MAT struct array + // stores them in order, so writing only the six would move element 7's value into + // element 1's place for every field, and the six values that DID survive would come + // back attached to the wrong elements. + const structNd = STREAMS.find((s) => s.name === 'structNd')!; + const short = readTruncatedStream(structNd.value, readStream(structNd.value).declared - 400); + expect((short.fields!.a as MatVariable[]).length, 'the reader kept what was there').toBe(6); + + const back = readElement(encodeMatVariable(short)); + expect(back.dimensions).toEqual([2, 3, 2]); + const slots = back.fields!.a as MatVariable[]; + expect(slots.length).toBe(12); + // 1..6 where MATLAB put them; an empty double for each element that was lost. + expect(slots.map((f) => f.value)).toEqual([1, 2, 3, 4, 5, 6, [], [], [], [], [], []]); + }); + + it('writes a struct whose field table was lost as a struct with no fields', () => { + // Truncated harder — before the field-name stride — the reader has no field names to + // report and leaves `fields` null. `Object.keys(null)` throws, and this is a whole + // ENTRY's value in a forty-entry save, so the dictionary is what would be lost, not + // the struct. It goes out as a 2x3x2 struct with nothing in it. + const structNd = STREAMS.find((s) => s.name === 'structNd')!; + const gutted = readTruncatedStream(structNd.value, 48); + expect(gutted.className).toBe('struct'); + expect(gutted.fields).toBe(null); + + const back = readElement(encodeMatVariable(gutted)); + expect(back.className).toBe('struct'); + expect(back.dimensions).toEqual([2, 3, 2]); + expect(back.fields).toEqual({}); + }); +}); diff --git a/test/matlabValueParser.test.ts b/test/matlabValueParser.test.ts index 67e1472..f5e0f4b 100644 --- a/test/matlabValueParser.test.ts +++ b/test/matlabValueParser.test.ts @@ -272,10 +272,19 @@ describe('MatlabValueParser — char and string', () => { expect(parse('["hello"]')).toEqual({ type: 'string-array', value: ['hello'], dims: [1, 1] }); }); - it('parses a multi-row string matrix', () => { + it('parses a multi-row string matrix, COLUMN-major', () => { + // ["a" "b"; "c" "d"] is written row by row and stored column by column, so the + // element list is a c b d — the order every reader delivers a string array in and + // the order MATLAB writes one (defect 50). Row-major here made committing a 2x2 + // string array transpose it; the numeric branch beside it stays row-major, because + // formatMatrixSerial re-transposes that one on the way out. expect(parse('["a" "b"; "c" "d"]')).toEqual({ - type: 'string-array', value: ['a', 'b', 'c', 'd'], dims: [2, 2], + type: 'string-array', value: ['a', 'c', 'b', 'd'], dims: [2, 2], }); + // A vector is the same list either way, which is why every existing case here and + // every editable fixture in the corpus missed it. + expect(parse('["a" "b"]')).toEqual({ type: 'string-array', value: ['a', 'b'], dims: [1, 2] }); + expect(parse('["a"; "b"]')).toEqual({ type: 'string-array', value: ['a', 'b'], dims: [2, 1] }); }); it('rejects a ragged string matrix', () => { @@ -372,8 +381,15 @@ describe('MatlabValueParser — cell arrays', () => { }); it('parses double-quoted strings in a cell', () => { - expect(parse('{"hello"}')).toEqual({ type: 'cell', value: ['hello'], dims: [1, 1] }); - expect(parse('{"a,b"}')).toEqual({ type: 'cell', value: ['a,b'], dims: [1, 1] }); + // A one-element LIST, not the bare text: a bare JSON string is a CHAR, so the + // element used to come back the wrong class — `{"hello"}` displayed and saved as + // `{'hello'}`, retyping a string to char the way defect 25 did at the top level. + // `["hello"]` is MATLAB's own spelling for a 1x1 string in a cell + // (test/parity/matlab/probe_cell_shapes.m). + expect(parse('{"hello"}')).toEqual({ type: 'cell', value: [['hello']], dims: [1, 1] }); + expect(parse('{"a,b"}')).toEqual({ type: 'cell', value: [['a,b']], dims: [1, 1] }); + // The single-quoted twin stays bare text, because that one IS a char. + expect(parse("{'hello'}")).toEqual({ type: 'cell', value: ['hello'], dims: [1, 1] }); }); it('rejects an unterminated quote inside a cell element', () => { @@ -436,7 +452,10 @@ describe('MatlabValueParser — cell arrays', () => { // so this 1x2 cell tokenized to the THREE elements "it", "s'" and "ok" and was // written back to the file as a 1x3 cell of mangled text. expect(parse("{'it''s', 'ok'}")).toEqual({ type: 'cell', value: ["it's", 'ok'], dims: [1, 2] }); - expect(parse('{"a""b", "c"}')).toEqual({ type: 'cell', value: ['a"b', 'c'], dims: [1, 2] }); + // Each double-quoted element is a 1x1 string, hence a one-element list — see + // 'parses double-quoted strings in a cell'. What this asserts is the SHAPE: two + // elements, and the escaped quote inside the first one. + expect(parse('{"a""b", "c"}')).toEqual({ type: 'cell', value: [['a"b'], ['c']], dims: [1, 2] }); expect(parse("{''''}")).toEqual({ type: 'cell', value: ["'"], dims: [1, 1] }); }); diff --git a/test/matlabVariableNode.test.ts b/test/matlabVariableNode.test.ts index b8cbb0c..5c814e4 100644 --- a/test/matlabVariableNode.test.ts +++ b/test/matlabVariableNode.test.ts @@ -21,7 +21,7 @@ import { describe, it, expect } from 'vitest'; import MatlabVariableNode from '../src/datamodel/node/data/MatlabVariableNode.js'; import { NOT_AVAILABLE } from '../src/datamodel/parser/McosParser.js'; -import * as NodeClassMap from '../src/datamodel/node/NodeClassMap.js'; +import * as NodeClassMap from '../src/datamodel/node/data/NodeClassMap.js'; import { CLASS, MI, arrayFlags, dims, matrix, numericData, varName } from './tools/matBytes.js'; // These tests reach into the node's internal state (_kind, _elements, _dims) on diff --git a/test/mcosCrossFormat.test.ts b/test/mcosCrossFormat.test.ts index a031cba..bf620ed 100644 --- a/test/mcosCrossFormat.test.ts +++ b/test/mcosCrossFormat.test.ts @@ -3,7 +3,7 @@ import { describe, it, expect } from 'vitest'; import { readFileSync } from 'node:fs'; import { fileURLToPath } from 'node:url'; // Importing the class map registers the NodeRegistry the parsers route through. -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; import * as NodeRegistry from '../src/datamodel/node/NodeRegistry.js'; import MatNode from '../src/datamodel/node/container/MatNode.js'; import ModelNode from '../src/datamodel/node/container/ModelNode.js'; diff --git a/test/mcosDegradeWarning.test.ts b/test/mcosDegradeWarning.test.ts index 474367f..913c7ee 100644 --- a/test/mcosDegradeWarning.test.ts +++ b/test/mcosDegradeWarning.test.ts @@ -35,7 +35,7 @@ vi.mock('../src/datamodel/node/NodeRegistry.js', async (importOriginal) => { // Side-effect import: registers the class map, so the REAL getClass (kept by the spread // above) answers truthy for a known class and the code reaches the try/catch. -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; import { buildTypedNodeFromMcos } from '../src/datamodel/node/data/mcosTypedNode.js'; import type { ParseWarning } from '../src/index.js'; diff --git a/test/mcosTypedNode.test.ts b/test/mcosTypedNode.test.ts index 669ef19..2bf9194 100644 --- a/test/mcosTypedNode.test.ts +++ b/test/mcosTypedNode.test.ts @@ -3,7 +3,7 @@ import { describe, it, expect, vi } from 'vitest'; import { readFileSync } from 'node:fs'; import { fileURLToPath } from 'node:url'; // Importing the class map registers the NodeRegistry the adapter routes through. -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; import { loadFile, findEntry } from './parity/loadFile.js'; import * as NodeRegistry from '../src/datamodel/node/NodeRegistry.js'; import { diff --git a/test/metadataColumns.test.ts b/test/metadataColumns.test.ts index a890602..0cafcf5 100644 --- a/test/metadataColumns.test.ts +++ b/test/metadataColumns.test.ts @@ -9,7 +9,7 @@ // the extension's integration tests. import { describe, it, expect } from 'vitest'; import DataNode from '../src/datamodel/node/DataNode.js'; -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; describe('DataNode metadata normalization', () => { it('normalizes the text-format keys (lastmod / modifiedby)', () => { diff --git a/test/minMaxConstraint.test.ts b/test/minMaxConstraint.test.ts index 185a913..9a6ce74 100644 --- a/test/minMaxConstraint.test.ts +++ b/test/minMaxConstraint.test.ts @@ -9,7 +9,7 @@ import { describe, it, expect } from 'vitest'; import ParameterNode from '../src/datamodel/node/data/ParameterNode.js'; import SignalNode from '../src/datamodel/node/data/SignalNode.js'; -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; type Maker = () => any; const makers: Array<[string, Maker]> = [ diff --git a/test/modelNode.test.ts b/test/modelNode.test.ts index e40d928..886fb09 100644 --- a/test/modelNode.test.ts +++ b/test/modelNode.test.ts @@ -257,13 +257,68 @@ describe('DataSourceNode', () => { ]); }); - it('shows the full path but links by filename', () => { + it('classifies the extension case-insensitively, the way the link already did', () => { + // A model records a linked file the way its author typed it, and neither the file + // systems these live on nor this package's reference matching care: `refBasename` + // lower-cases precisely so `Params.SLDD` inside a model resolves to `params.sldd` on + // disk. The icon and the class name were the two readers that did NOT, so a + // dictionary spelled in caps resolved as a dictionary and was then presented as a + // MAT file — the row disagreed with its own working link, and nothing about it looked + // broken. This is the defect `fileKinds` was written to end, in the package that + // wrote it. + const ds = model({ externalDataSources: ['A.SLDD', 'B.SLX', 'C.MDL', 'D.MAT'] }).getSection('dataSources'); + expect(ds.children.map((c: any) => [c.icon, c.className])).toEqual([ + ['simulinkDataDictionary_FT', 'Data Dictionary'], + ['simulinkModel_FT', 'Simulink Model'], + ['simulinkModel_FT', 'Simulink Model'], + ['matlabWorkspaceFile', 'MAT File'], + ]); + }); + + it('picks the icon and the class name from ONE classification', () => { + // Two getters answering one question, and they were two independent chains of + // `endsWith`. A fourth kind — or a case fix — applied to one and not the other gives + // a row a dictionary icon under the label 'MAT File', which is not a crash and not a + // warning, just a row that is quietly wrong about what it points at. + // + // Asserted as a partition rather than as a table so it pins the RELATIONSHIP: both + // getters must draw the same lines between these names, whatever the two vocabularies + // happen to be. Adding a kind to one getter alone fails here even if every literal + // above is still correct. + const ds = model({ + externalDataSources: ['a.sldd', 'b.slx', 'c.mdl', 'd.mat', 'e.txt', 'F.SLDD', 'G.MDL'], + }).getSection('dataSources'); + const partition = (answer: (c: any) => string): string[] => { + const groups = new Map(); + for (const child of ds.children) { + const key = answer(child); + groups.set(key, [...(groups.get(key) ?? []), child.name]); + } + return [...groups.values()].map((names) => names.join(',')).sort(); + }; + expect(partition((c) => c.icon)).toEqual(partition((c) => c.className)); + // And it is a real partition, not everything in one bucket, which would pass above. + expect(partition((c) => c.icon).length).toBeGreaterThan(2); + }); + + it('shows the full path but links by filename, on either separator', () => { // The name is what the host resolves against the workspace, so a nested // source must link by basename even though the cell shows its whole path. const ds = model({ externalDataSources: ['sub/dir/signals.mat'] }).getSection('dataSources').children[0]; expect(ds.name).toBe('signals.mat'); expect(ds.fullPath).toBe('sub/dir/signals.mat'); expect(ds.toRow().Value).toEqual({ text: 'sub/dir/signals.mat', linkTarget: 'signals.mat' }); + + // A backslash path is not hypothetical: this string is whatever MATLAB wrote into the + // model, so a model saved on Windows records `..\shared\signals.mat`. Splitting on `/` + // alone left the WHOLE path as the node's name, so the Name column showed a path and + // `linkTarget` was a path — while the link still resolved, because that matching goes + // through `refBasename`, which splits on both. One rule, two spellings, and only the + // spelling a user reads was wrong. + const win = model({ externalDataSources: ['..\\shared\\signals.mat'] }).getSection('dataSources').children[0]; + expect(win.name).toBe('signals.mat'); + expect(win.fullPath).toBe('..\\shared\\signals.mat'); + expect(win.toRow().Value).toEqual({ text: '..\\shared\\signals.mat', linkTarget: 'signals.mat' }); }); it('is a non-renamable entry reporting Not Loaded', () => { diff --git a/test/moduleBoundaries.test.ts b/test/moduleBoundaries.test.ts new file mode 100644 index 0000000..9a2dbd2 --- /dev/null +++ b/test/moduleBoundaries.test.ts @@ -0,0 +1,242 @@ +// Copyright 2026 The MathWorks, Inc. +// +// The shape of this package, asserted rather than described. +// +// Everything here already holds. That is the point: these are the properties the +// package's LAYOUT provides — a browser-safe barrel, a Node-only side entry, a data +// model that does not need the session layer, an acyclic class hierarchy — and every +// one of them was, until this file, held in place by nothing but the habit of the +// people editing it. Each is a single `import` away from being lost, and none of the +// four fails in the place it was broken: +// +// * a `node:fs` import in a parser breaks the CONSUMER's browser build +// * a value import where a type import was breaks at BUNDLE LOAD, before any test +// * a datamodel→core value edge silently doubles what a folder scan drags in +// * an undeclared dependency breaks a fresh `npm install`, not this repo's tests +// +// So they are asserted here, in the repo that owns the layout, where the failure names +// the file and line that caused it. See `test/publicTypeSurface.test.ts` for the other +// half of the contract — what a consumer can NAME, as opposed to what it must not reach. +import { describe, it, expect } from 'vitest'; +import { readFileSync } from 'node:fs'; +import { fileURLToPath } from 'node:url'; +import type { ModuleEdge } from './tools/moduleGraph.js'; +import { readModuleGraph, runtimeCycles, runtimeEdges, describeEdges } from './tools/moduleGraph.js'; + +const SRC = fileURLToPath(new URL('../src', import.meta.url)); +const graph = readModuleGraph(SRC); +const pkg = JSON.parse(readFileSync(fileURLToPath(new URL('../package.json', import.meta.url)), 'utf8')) as { + dependencies?: Record; + exports: Record; +}; + +const under = (dir: string, file: string): boolean => file === `${dir}.ts` || file.startsWith(`${dir}/`); + +// A walker that silently read nothing would make every assertion below pass. These +// numbers are floors, not counts — they exist to fail if the tree moves or the parser +// stops matching, not to be updated whenever a file is added. +describe('the walker is actually reading this tree', () => { + it('finds the modules and the imports between them', () => { + expect(graph.files.length).toBeGreaterThan(80); + expect(graph.files).toContain('index.ts'); + expect(graph.files).toContain('node/index.ts'); + expect(runtimeEdges(graph).length).toBeGreaterThan(200); + }); + + it('sees the `type` keyword, which every test here depends on', () => { + // If `typeOnly` were always false the cycle test below would fail loudly, but the + // two layering tests would fail QUIETLY — they would flag erased edges as + // violations. This pins the distinction itself, on a known pair: `BaseNode` needs + // `schemaBridge` as a value, and `schemaBridge` needs `BaseNode` only as a type. + const between = (from: string, to: string) => graph.edges.filter((e) => e.from === from && e.to === to); + const [toBridge] = between('datamodel/node/BaseNode.ts', 'datamodel/node/schemaBridge.ts'); + const [toBase] = between('datamodel/node/schemaBridge.ts', 'datamodel/node/BaseNode.ts'); + expect(toBridge?.typeOnly, 'BaseNode imports buildPILayout as a value').toBe(false); + expect(toBase?.typeOnly, 'schemaBridge imports BaseNode as a type only').toBe(true); + }); +}); + +describe('the runtime module graph is acyclic', () => { + it('has no cycle a bundler could evaluate in the wrong order', () => { + // The node layer is a deep class hierarchy, so a cycle here is not a smell — it is + // a crash. `class DataNode extends BaseNode` runs at module-evaluation time, and in + // a cycle one of the two modules necessarily evaluates first and sees `undefined`: + // "Class extends value undefined is not a constructor or null", at import, before a + // single test body runs. Fifteen `Prop*` atoms plus `schemaBridge` reference + // `BaseNode` for typing alone and say so with `import type`, which is what keeps + // this at zero — a maintainer dropping one `type` keyword is the whole risk. + const cycles = runtimeCycles(graph).map((c) => c.join(' -> ')); + expect(cycles).toEqual([]); + }); +}); + +// The same edges, counted by FOLDER instead of by file: one edge per importer's +// directory → target's directory, self-edges dropped (a folder depending on itself is +// what a folder is for). A view of the graph above, not a second graph. +const dirOf = (file: string): string => (file.includes('/') ? file.slice(0, file.lastIndexOf('/')) : '.'); + +const directoryEdges = (): Map => { + const byPair = new Map(); + for (const e of runtimeEdges(graph)) { + const [from, to] = [dirOf(e.from), dirOf(e.to)]; + if (from === to) continue; + byPair.set(`${from} -> ${to}`, [...(byPair.get(`${from} -> ${to}`) ?? []), e]); + } + return byPair; +}; + +describe('the directory graph is acyclic too', () => { + it('has no folder pair that imports both ways round', () => { + // Weaker than the file-level rule above and worth its own test, because it is the + // one the file level cannot see: a directory cycle can exist while every FILE + // stays acyclic, and it did here until `NodeClassMap` moved. It bundles and runs + // perfectly — the cost is paid later, by whoever tries to lift a folder out into + // its own package and finds the dependency points both ways. A DAG of folders is + // the precondition for ever splitting this package up, and it is cheap to hold + // and expensive to restore, so it is asserted now rather than rediscovered then. + // + // Two folders on one side of a cycle usually means a file is filed in the wrong + // one: the fix is a `git mv`, not an interface. `NodeClassMap` enumerates the + // subclasses in `node/data/`, so it belongs beside them; sitting in `node/` with + // the base classes it imported DOWNWARD 24 times, against the layering, and one + // move deleted the cycle without inverting anything. + const pairs = directoryEdges(); + const projected = { + files: [...new Set(graph.files.map(dirOf))], + edges: [...pairs.keys()].map((pair) => { + const [from, to] = pair.split(' -> '); + return { from, to, specifier: to, typeOnly: false, line: 0 }; + }), + }; + // Named down to the import, because "a cycle exists" is not something a reader can + // act on: the actionable fact is which line to reconsider. Capped per leg — a leg + // can hold dozens of imports and any one of them locates the folder pair. + const cycles = runtimeCycles(projected).map((cycle) => + cycle + .map((dir, i) => { + const pair = `${dir} -> ${cycle[(i + 1) % cycle.length]}`; + const causes = describeEdges(pairs.get(pair) ?? []); + const shown = causes.slice(0, 3).join(', '); + return `${pair} via ${shown}${causes.length > 3 ? ` (+${causes.length - 3} more)` : ''}`; + }) + .join('\n '), + ); + expect(cycles).toEqual([]); + }); +}); + +describe('the seams that are already clean stay clean', () => { + // Three folders import NOTHING outside themselves, and a fourth — 7600 lines of + // parsers, the bulk of the package — imports exactly one module outside itself. + // Nothing forced that and nothing but this test keeps it. + // + // Why these four and not a rule for every folder: they are the seams a package split + // would cut FIRST, because for them it is nearly free. `datamodel/node/` is larger + // still (9400 lines) but is entangled with the session, the props and the schema, so + // bounding it would mean inventing interfaces; these four need only an `export`. + // + // When this fails, the new import is the thing to look at, not the test. Ask whether + // the caller can pass the value in instead — a parser being handed what it needs is + // usually the cheaper shape anyway. Widening the allowed set is a legitimate answer, + // but it should be a decision someone made, not a number someone updated. + const outboundFrom = (dir: string): Array => { + // A misspelled folder matches no file, so every filter here would return nothing + // and every assertion would pass on an empty list. Prove the folder is real first. + expect(graph.files.filter((f) => under(dir, f)).length, `${dir} holds modules`).toBeGreaterThan(0); + return runtimeEdges(graph).filter((e) => under(dir, e.from) && !under(dir, e.to)); + }; + + it('keeps datamodel/schema/ self-contained', () => { + // The schema is the DECLARATION of what a class's properties are and how they lay + // out; it answers from its own tables. An import here would mean a declaration had + // started asking a parser or a node what it should say. `schema/index.ts`'s own + // header already claims this ("the seed of a future standalone `dex-schema` + // package; dependencies point INTO it only") — this is that claim, checked. + expect(describeEdges(outboundFrom('datamodel/schema'))).toEqual([]); + }); + + it('keeps datamodel/display/ self-contained', () => { + // Formatting values for a column: total functions on data handed to them. Reaching + // out would mean a formatter had started fetching what it formats. + expect(describeEdges(outboundFrom('datamodel/display'))).toEqual([]); + }); + + it('keeps datamodel/parser/ reaching for nothing but blockIdentity', () => { + // The one allowed edge, twice: `MdlParser` and `SlxParser` both have to name what + // kind of block they just read, and `datamodel/blockIdentity.ts` is the shared + // table they name it against. Allowing it widens the seam by nothing measurable — + // that module imports nothing at all, so it travels alone. + const allowed = 'datamodel/blockIdentity.ts'; + const strays = outboundFrom('datamodel/parser').filter((e) => e.to !== allowed); + expect(describeEdges(strays)).toEqual([]); + // Not a count of them — a check that the exemption is still USED, so the test + // cannot start passing because the seam quietly stopped existing. + expect(outboundFrom('datamodel/parser').length, `and ${allowed} is still reached`).toBeGreaterThan(0); + }); +}); + +describe('the main barrel stays usable in a browser', () => { + // The consumer that matters: data-explorer-vscode ships a WEB extension bundle + // (`npm run build:web`) that runs in the browser, with this package inlined. Node + // builtins are separated by ENTRY POINT rather than by discipline — `./node` is a + // second export whose whole job is to be the one place `node:fs` may appear — so the + // separation is only real while nothing reachable from `.` reaches for a builtin. + const builtinImports = graph.edges.filter((e) => e.specifier.startsWith('node:')); + + it('confines every node: builtin to the ./node entry', () => { + expect(builtinImports.length, 'the ./node entry must still use some').toBeGreaterThan(0); + const strays = builtinImports.filter((e) => !under('node', e.from)); + expect(describeEdges(strays)).toEqual([]); + }); + + it('keeps ./node a leaf, so nothing drags it into the barrel', () => { + // The rule above is worth nothing if the barrel imports the Node entry: the + // builtins would arrive transitively, from a file that never names one. + const intoNode = runtimeEdges(graph).filter((e) => under('node', e.to) && !under('node', e.from)); + expect(describeEdges(intoNode)).toEqual([]); + expect(pkg.exports['./node'], 'and it is still published as its own entry').toBeTruthy(); + }); +}); + +describe('the data model does not need the session layer', () => { + it('never RUNS code from core/ inside datamodel/', () => { + // `datamodel/` is the file formats and the node classes; `core/` is the session, + // event bus, undo stack and ingest dispatch built ON them. The dependency is meant + // to point one way, and the barrel sells that: `buildUsageIndex` is documented as + // answering usage over a set of files "and needs no node trees to do it", so a + // consumer scanning a folder should not be loading a session. + // + // Type-only reaches upward are fine and one exists — `UsageIndex` returns + // `NodeUsage`, which `core/DataModel` publishes (declared in `core/sessionTypes.ts` + // and re-exported, so this edge kept its shape when the contract types moved out) — + // which is exactly why this test filters on erasure instead of on the import's text. + // Turning that one line into a value import would both fatten every folder-scan + // consumer and create the cycle the test above forbids, since `core/DataModel` + // imports `datamodel/` sixteen times. + const upward = runtimeEdges(graph).filter((e) => under('datamodel', e.from) && under('core', e.to)); + expect(describeEdges(upward)).toEqual([]); + }); + + it('and the type-only reach upward is still just the one, named', () => { + // Not a limit on the count — a check that the exemption above is being USED, so the + // test cannot start passing because the layering question stopped being asked. + const typed = graph.edges.filter((e) => e.typeOnly && under('datamodel', e.from) && e.to && under('core', e.to)); + expect(typed.map((e) => e.from)).toEqual(['datamodel/usage/UsageIndex.ts']); + }); +}); + +describe('every third-party import is a declared dependency', () => { + it('names nothing that a fresh install would not provide', () => { + // A stray import of a devDependency (or of a transitive dep that happens to be + // hoisted into node_modules) type-checks, bundles and tests green HERE, and then + // fails for the consumer, at install or at load. This package is consumed as a git + // dependency with prebuilt `dist/`, so the failure lands even further from the + // cause. `node:` builtins are covered by their own tests above. + const declared = new Set(Object.keys(pkg.dependencies ?? {})); + const bare = graph.edges.filter((e) => !e.specifier.startsWith('.') && !e.specifier.startsWith('node:')); + const packageOf = (spec: string) => (spec.startsWith('@') ? spec.split('/', 2).join('/') : spec.split('/')[0]); + const undeclared = bare.filter((e) => !declared.has(packageOf(e.specifier))); + expect(describeEdges(undeclared)).toEqual([]); + expect(bare.length, 'and the runtime deps are still actually used').toBeGreaterThan(0); + }); +}); diff --git a/test/mptClasses.test.ts b/test/mptClasses.test.ts index 8d146b4..69078b9 100644 --- a/test/mptClasses.test.ts +++ b/test/mptClasses.test.ts @@ -34,7 +34,7 @@ import ObjectNode from '../src/datamodel/node/data/ObjectNode.js'; import SlddNode from '../src/datamodel/node/container/SlddNode.js'; import type DataNode from '../src/datamodel/node/DataNode.js'; import type BaseNode from '../src/datamodel/node/BaseNode.js'; -import * as NodeClassMap from '../src/datamodel/node/NodeClassMap.js'; +import * as NodeClassMap from '../src/datamodel/node/data/NodeClassMap.js'; import { buildTypedNodeFromMcos } from '../src/datamodel/node/data/mcosTypedNode.js'; import { parseBinarySlddParts } from '../src/datamodel/parser/BinarySlddParser.js'; import { buildDataChunkXml } from '../src/datamodel/parser/BinarySlddSerializer.js'; diff --git a/test/nonFiniteRoundTrip.test.ts b/test/nonFiniteRoundTrip.test.ts index 97953ce..a2edf25 100644 --- a/test/nonFiniteRoundTrip.test.ts +++ b/test/nonFiniteRoundTrip.test.ts @@ -18,7 +18,7 @@ import { describe, it, expect } from 'vitest'; import ParameterNode from '../src/datamodel/node/data/ParameterNode.js'; import MatlabValueParser from '../src/datamodel/parser/MatlabValueParser.js'; import PropValue from '../src/datamodel/prop/PropValue.js'; -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; describe('a displayed non-finite value can be typed back in', () => { for (const [text, expected] of [ diff --git a/test/objectArrayExpansion.test.ts b/test/objectArrayExpansion.test.ts index ffa2691..30f1076 100644 --- a/test/objectArrayExpansion.test.ts +++ b/test/objectArrayExpansion.test.ts @@ -12,7 +12,7 @@ // tests and by objectExpansion.test.ts's authentic .mat fixtures. import { describe, it, expect } from 'vitest'; import * as NodeRegistry from '../src/datamodel/node/NodeRegistry.js'; -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; // A value object of N elements, exactly as every parser emits it. function arrayValue(arrayClass: string, dims: number[], elements: Record[]) { diff --git a/test/objectIcon.test.ts b/test/objectIcon.test.ts index 1b35b76..39e44a1 100644 --- a/test/objectIcon.test.ts +++ b/test/objectIcon.test.ts @@ -17,7 +17,7 @@ import { describe, it, expect } from 'vitest'; import { readFileSync } from 'node:fs'; import { fileURLToPath } from 'node:url'; // Importing the class map registers the NodeRegistry these paths dispatch through. -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; import { OBJECT_ICON } from '../src/datamodel/node/icons.js'; import ObjectNode from '../src/datamodel/node/data/ObjectNode.js'; import MatNode from '../src/datamodel/node/container/MatNode.js'; diff --git a/test/objectNode.test.ts b/test/objectNode.test.ts index 6275156..90f6c8d 100644 --- a/test/objectNode.test.ts +++ b/test/objectNode.test.ts @@ -9,7 +9,7 @@ import { describe, it, expect } from 'vitest'; // Importing the class map registers the NodeRegistry the element dispatch uses. -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; import ObjectNode from '../src/datamodel/node/data/ObjectNode.js'; // A top-level value object: { _array_class, _elements: [{ _properties }] }. diff --git a/test/parameterNode.test.ts b/test/parameterNode.test.ts index b5bb8a2..08c4b43 100644 --- a/test/parameterNode.test.ts +++ b/test/parameterNode.test.ts @@ -9,7 +9,7 @@ import { describe, it, expect } from 'vitest'; import ParameterNode from '../src/datamodel/node/data/ParameterNode.js'; import NodeRegistry from '../src/datamodel/node/NodeRegistry.js'; import { isMatCdata } from '../src/datamodel/parser/CdataCodec.js'; -import * as NodeClassMap from '../src/datamodel/node/NodeClassMap.js'; +import * as NodeClassMap from '../src/datamodel/node/data/NodeClassMap.js'; // The raw shape the sldd parsers hand ParameterNode.parse: a 1x1 // Simulink.Parameter whose _properties carry the on-disk values. diff --git a/test/parity/fidelity/roundTripHarness.ts b/test/parity/fidelity/roundTripHarness.ts index f842f1b..d4f9df2 100644 --- a/test/parity/fidelity/roundTripHarness.ts +++ b/test/parity/fidelity/roundTripHarness.ts @@ -21,7 +21,7 @@ import { fileURLToPath } from 'node:url'; import DataModel from '../../../src/core/DataModel.js'; import { parseBinarySldd } from '../../../src/datamodel/parser/BinarySlddParser.js'; import { serializeBinarySldd } from '../../../src/datamodel/parser/BinarySlddSerializer.js'; -import '../../../src/datamodel/node/NodeClassMap.js'; +import '../../../src/datamodel/node/data/NodeClassMap.js'; const HERE = fileURLToPath(new URL('.', import.meta.url)); // MATLAB launcher, configured out-of-band so no environment-specific path is diff --git a/test/parity/fidelity/structural.fidelity.test.ts b/test/parity/fidelity/structural.fidelity.test.ts index ab6a8ce..5707513 100644 --- a/test/parity/fidelity/structural.fidelity.test.ts +++ b/test/parity/fidelity/structural.fidelity.test.ts @@ -15,7 +15,7 @@ import { type SlddFormat, } from './roundTripHarness.js'; import { ServiceBusNode } from '../../../src/datamodel/node/data/ServiceBusNode.js'; -import '../../../src/datamodel/node/NodeClassMap.js'; +import '../../../src/datamodel/node/data/NodeClassMap.js'; const FORMATS: SlddFormat[] = ['json', 'binary']; const FIXTURE = 'params.sldd'; diff --git a/test/parity/fidelity/variable.fidelity.test.ts b/test/parity/fidelity/variable.fidelity.test.ts index 4d5e379..ab62d4d 100644 --- a/test/parity/fidelity/variable.fidelity.test.ts +++ b/test/parity/fidelity/variable.fidelity.test.ts @@ -22,7 +22,7 @@ import { } from './roundTripHarness.js'; import MatlabVariableNode from '../../../src/datamodel/node/data/MatlabVariableNode.js'; import ConstantNode from '../../../src/datamodel/node/data/ConstantNode.js'; -import '../../../src/datamodel/node/NodeClassMap.js'; +import '../../../src/datamodel/node/data/NodeClassMap.js'; const FORMATS: SlddFormat[] = ['json', 'binary']; const FIXTURE = 'params.sldd'; diff --git a/test/parity/loadFile.ts b/test/parity/loadFile.ts index 1ce7510..d3c6cab 100644 --- a/test/parity/loadFile.ts +++ b/test/parity/loadFile.ts @@ -7,7 +7,7 @@ import { readFileSync } from 'node:fs'; import { fileURLToPath } from 'node:url'; import { createSession } from '../../src/index.js'; import { ingest } from '../../src/core/ingest.js'; -import '../../src/datamodel/node/NodeClassMap.js'; +import '../../src/datamodel/node/data/NodeClassMap.js'; /** Read a file relative to THIS module and hand back a detached ArrayBuffer. */ export function bytesOf(rel: string): ArrayBuffer { diff --git a/test/parity/matlab/DESIGN.md b/test/parity/matlab/DESIGN.md index e037421..c333a8b 100644 --- a/test/parity/matlab/DESIGN.md +++ b/test/parity/matlab/DESIGN.md @@ -1777,6 +1777,72 @@ quietly become one. The suite is also checked for teeth the same way every other tier is: with `SlxParser.ts` reverted to its pre-phase version, 66 of its 193 tests fail. +## A defect found by using the extension, and its neighbour + +Not a phase. Defect 49 was reported by a user editing a value in the VS Code table, which +makes it the first entry here that no tier of this suite had asked about — and the reason +is worth as much as the fix: every tier reads or writes a value at the TOP level of an +entry, and this one only misbehaves one level down, inside a cell. + +49. **A shaped value typed into a cell lost its shape, on screen and in the file.** + `{[1;2]}` came back `{[1 2]}`: a 2x1 double read as a 1x2, and `saveChanges` wrote + the 1x2. `MatlabValueParser.tokenizeCellElements` read each element with its own + code per bracket kind rather than with the parser's own `parse`, and the `[` arm + pushed `parseArray(...).value` — the flat element list, with `dims` dropped. A bare + JSON list has nowhere to carry `[2,1]` and reads back as a row, which is precisely + what `MatlabVariableNode._serializeArray` says in the comment above its own typed + literal fallback, one directory away. The `{` arm had been right all along, because + a nested cell could only carry `nested.dims` in a wrapper. + + Five element kinds were affected, not one: a numeric column and matrix (reshaped), a + logical array (**retyped to double**, since a bare list says double), a char matrix + (flattened to the column-major text read back as a row, so the characters scrambled + rather than merely reshaped), a string array (retyped to char, then flattened) and a + 1x1 string (retyped to char). `{"a"}` displaying as `{'a'}` is the same defect as + `{[1;2]}` displaying as `{[1 2]}`. + + Fixed by parsing each element recursively — `parse(span)` for every span, then one + `cellElementRaw` converter to the raw form the readers produce — so an element of a + cell is now read exactly as a value of its own, and there is one path where there + were four. `probe_cell_shapes.m` is the new probe; every arm of the converter is a + line in its header, taken from a dictionary MATLAB wrote itself. Two of those + spellings are not choices: a double row is a bare list and a LOGICAL row is not, + because the bare form says double; a 1x1 string is a one-element list `["a"]` rather + than bare text, because bare text is a char. Held by `cellElementShape.test.ts` (24 + tests; 21 of them fail with the fix reverted), which asserts the raw spelling, the + display, and a round trip through the value's own displayed text in both `.sldd` + flavours. + +50. **A multi-row cell — and a multi-row string array — was transposed by the edit path. + Found by 49's tests.** `MatlabValueParser` assembled both element lists ROW-major, + while every reader in this repo delivers one COLUMN-major — **defect 14 above is this + same defect on the READ path**, fixed in Phase 5 and locked by + `cellElementOrder.test.ts`, whose own closing line warns against a future "make + everything column-major" fix. MATLAB's own file agrees with the readers: `{1 2; 3 4}` is + `"_elements": [1, 3, 2, 4]`, measured in `probe_cell_shapes.m`. So committing a 2x3 + cell wrote `{1, 4, 2; 5, 3, 6}` — every off-diagonal element moved — and retyping the + displayed text transposed it again, so the value never settled. Only a 1xN or an Nx1 + was unaffected, which is why it survived 49's own review: a vector flattens to the + same list in either order, and every editable cell fixture in the corpus is a vector. + + Fixed by giving the flatten a name and an ORDER argument — `flatten(matrix, cols, + 'row' | 'column')` — called `'column'` from the cell and string-array returns and + `'row'` from the numeric one. The numeric exception is not an inconsistency: + `formatMatrixSerial` re-transposes that list on the way out, so row-major is what the + numeric writer is owed, and "make them all the same for consistency" is a third + mutation the tests catch. `charFromRows` had the column-major rule right from the + start, one value type away. + + Held in `cellElementOrder.test.ts`, next to the read-path assertions it belongs + beside, and deliberately **stating no order of its own**: it retypes each fixture's + OWN displayed text and demands MATLAB's `truth.json` subscript→value pairs back, in + both `.sldd` flavours, with `mat2x3` as the row-major control. That makes the read + path the write path's expected answer, which is the shape a "one rule, two paths" + defect has to be pinned in — defect 14 fixed the read path and pinned *the read + path's answer*, which is exactly why the write path could still be wrong afterwards + with a green suite. Three mutations, all caught: cell back to row-major (6 failures), + string back to row-major (4), numeric to column-major (14, across seven files). + ## Known limitations, to verify and document - **Derived MCOS classes.** A customer class `MyParam < Simulink.Parameter` diff --git a/test/parity/matlab/PLAN.md b/test/parity/matlab/PLAN.md index bc532ba..d13bd68 100644 --- a/test/parity/matlab/PLAN.md +++ b/test/parity/matlab/PLAN.md @@ -3822,7 +3822,7 @@ import { readFileSync } from 'node:fs'; import { fileURLToPath } from 'node:url'; import { createSession } from '../../src/index.js'; import { ingest } from '../../src/core/ingest.js'; -import '../../src/datamodel/node/NodeClassMap.js'; +import '../../src/datamodel/node/data/NodeClassMap.js'; /** Read a file relative to THIS module and hand back a detached ArrayBuffer. */ export function bytesOf(rel: string): ArrayBuffer { @@ -3897,7 +3897,7 @@ exactly one definition of "the node for this name" in the test tree. **5. Imports.** `MatlabVariableNode` is a **default** export (`import MatlabVariableNode from '.../MatlabVariableNode.js'`), and it re-exports the `MatVariable` type. `StructNode`, `ObjectNode`, `DataModel` (the session singleton, `src/core/DataModel.js`) are default exports too. Check each import against the file before writing it — a named-vs-default mistake fails at typecheck, which is cheap, but it wastes a cycle. -**6. `NodeClassMap` must be imported for its side effect** before `NodeRegistry.parseValue` will dispatch: `import '../src/datamodel/node/NodeClassMap.js';` (see `test/parity/fidelity/roundTripHarness.ts:24`). A test that skips it gets bare nodes and confusing failures. +**6. `NodeClassMap` must be imported for its side effect** before `NodeRegistry.parseValue` will dispatch: `import '../src/datamodel/node/data/NodeClassMap.js';` (see `test/parity/fidelity/roundTripHarness.ts:24`). A test that skips it gets bare nodes and confusing failures. **7. MATLAB gating.** `DEX_MATLAB_CMD` (launcher + fixed args, e.g. `mw -using Bmain matlab`) and optional `DEX_MATLAB_CWD`. When unset, MATLAB-dependent assertions **skip**, never fail — that is how the suite stays green in CI and for external contributors. Reuse this convention exactly; do not invent a second env var. diff --git a/test/parity/matlab/probe_cell_shapes.m b/test/parity/matlab/probe_cell_shapes.m new file mode 100644 index 0000000..729f37e --- /dev/null +++ b/test/parity/matlab/probe_cell_shapes.m @@ -0,0 +1,130 @@ +% How does MATLAB spell a shaped value INSIDE a cell, in a text .sldd? +% +% The cell arm of MatlabValueParser used to read an element with its own bespoke +% code rather than with the parser's own `parse`, and the two disagreed: the `[` +% branch kept the flat element list and threw the DIMS away, so `{[1;2]}` became a +% 1x2 and was written back as `{[1 2]}` (defect 49). Fixing it means writing the +% element's shape down, and a cell element is the one place none of the existing +% probes had asked what that spelling is -- probe_matrix_serial.m answered it for a +% top-level value, probe_char_shape.m for a char, probe_typed_shapes.m for a struct +% field. +% +% The answers, and every one of them is now a line in cellElementRaw: +% +% {[1;2]} {"_type": "double", "_value": "Matrix(2,1)\n[1.0, 2.0]"} +% {[1 2;3 4]} {"_type": "double", "_value": "Matrix(2,2)\n[[1.0, 2.0]; [3.0, 4.0]]"} +% {[1 2]} [1, 2] <- a double ROW is bare, and it is the only array that is +% {[]} [] +% {[true;false]} {"_type": "logical", "_value": "Matrix(2,1)\n[1, 0]"} +% {[true false]} {"_type": "logical", "_value": "[1, 0]"} <- a logical row is NOT bare +% {true} true +% {['ab';'cd']} {"_type": "mxchar", "_value": "Matrix(2,2)\n[[97, 98]; [99, 100]]"} +% {'ab'} "ab" +% {["a";"b"]} {"_array_type": "String", "_dimensions": [2,1], "_elements": ["a","b"]} +% {["a" "b"]} {"_array_type": "String", "_dimensions": [1,2], ...} <- a string row IS wrapped +% {"a"} ["a"] <- a 1x1 string is a one-element LIST, not a wrapper +% {{1;2}} {"_array_type": "Cell", "_dimensions": [2,1], "_elements": [1,2]} +% {int32([1;2])} {"_type": "int32", "_value": "Matrix(2,1)\n[1, 2]"} +% {1+2i} {"_type": "cdata", "_value": ""} +% +% Two of those are not choices we could have made ourselves. A bare JSON list says +% DOUBLE, which is why a logical row keeps a typed envelope the double row does not +% need; and a bare JSON string says CHAR, which is why a scalar string is `["a"]`. +% Note also that MATLAB omits `_mw_element_type` from a nested wrapper. +% +% One more answer, about the cell's OWN element list rather than one element, and it +% is the evidence for defect 50 (found while fixing 49, fixed in the commit after it): +% +% {1 2; 3 4} "_dimensions": [2,2], "_elements": [1, 3, 2, 4] +% +% Column-major, as every reader in this repo already stores a cell list -- and as it +% stores a STRING array's list, which had the same defect. The parser assembled both +% ROW-major, so editing a multi-row one transposed it. A numeric list is the exception +% and stays row-major, because formatMatrixSerial re-transposes that one on the way out. +% +% Run: mw -using Bmain matlab -nodesktop -batch "run('test/parity/matlab/probe_cell_shapes.m')" + +outdir = getenv('CELL_SHAPES_OUT'); +if isempty(outdir), outdir = fullfile(tempdir, 'cellshapes'); end +if ~exist(outdir, 'dir'), mkdir(outdir); end + +% Each entry is a 1x1 cell holding one value, so the JSON printed below is the +% element spelling and nothing else. +C = { ... + 'cellCol', {[1;2]}; ... + 'cellRow', {[1 2]}; ... + 'cellMat', {[1 2; 3 4]}; ... + 'cellNum', {1}; ... + 'cellEmpty', {[]}; ... + 'cellLogCol', {[true; false]}; ... + 'cellLogRow', {[true false]}; ... + 'cellLogSc', {true}; ... + 'cellCharMat',{['ab'; 'cd']}; ... + 'cellCharRow',{'ab'}; ... + 'cellStrCol', {["a"; "b"]}; ... + 'cellStrRow', {["a" "b"]}; ... + 'cellStrSc', {"a"}; ... + 'cellNest', {{1;2}}; ... + 'cellInt', {int32([1;2])}; ... + 'cellCplx', {1+2i}; ... + % Not a 1x1: the ORDER a multi-row cell's own elements are written in. The + % values are asymmetric under transpose, so a column-major list reads + % [1, 3, 2, 4] and a row-major one [1, 2, 3, 4]. + 'cell2x2', {1 2; 3 4}}; + +Simulink.data.dictionary.closeAll('-discard'); +fn = fullfile(outdir, 'cells_text.sldd'); +if exist(fn, 'file'), delete(fn); end +dd = Simulink.data.dictionary.create(fn); +dd.FileFormat = 'uncompressed-text'; % the JSON flavour, which is the one with a spelling +ds = dd.getSection('Design Data'); +for i = 1:size(C, 1) + try + ds.addEntry(C{i,1}, C{i,2}); + catch e + fprintf('REJECTED %-12s %s\n', C{i,1}, e.message); + end +end +clear ds +dd.saveChanges(); +dd.close(); + +% ---- what MATLAB reads back out of its own file ------------------------------- +fprintf('\nREAD BACK\n'); +dd = Simulink.data.dictionary.open(fn); +ds = dd.getSection('Design Data'); +for i = 1:size(C, 1) + try + v = ds.getEntry(C{i,1}).getValue(); + el = v{1}; + fprintf(' %-12s element class=%-8s size=%s\n', C{i,1}, class(el), mat2str(size(el))); + catch e + fprintf(' %-12s UNREADABLE %s\n', C{i,1}, e.message); + end +end +clear ds +dd.close(); + +% ---- the bytes it wrote, one entry per line ----------------------------------- +% Whitespace-collapsed so each element spelling reads as one line, with a cdata +% body elided (a complex element carries a whole MAT stream). +fprintf('\nTEXT JSON\n'); +txt = fileread(fn); +for i = 1:size(C, 1) + k = strfind(txt, ['"name": "' C{i,1} '"']); + if isempty(k) + fprintf(' %-12s NOT FOUND\n', C{i,1}); + continue + end + seg = txt(k(1):min(numel(txt), k(1) + 1200)); + stop = strfind(seg, '"name":'); + if numel(stop) > 1 + seg = seg(1:stop(2) - 1); + end + seg = regexprep(seg, '\s+', ' '); + seg = regexprep(seg, '("_type": "cdata", "_value": ")[^"]*"', '$1"'); + fprintf(' %s\n', seg); +end +fprintf('FILE %s\n', fn); + +disp('CELLSHAPES OK'); diff --git a/test/parseWarnings.test.ts b/test/parseWarnings.test.ts index 9c56fd7..65c5a50 100644 --- a/test/parseWarnings.test.ts +++ b/test/parseWarnings.test.ts @@ -27,6 +27,7 @@ import { describe, it, expect } from 'vitest'; import { readFileSync, readdirSync } from 'node:fs'; import { join } from 'node:path'; +import { runInNewContext } from 'node:vm'; import { fileURLToPath } from 'node:url'; import { unzipSync, zipSync, strToU8, zlibSync } from 'fflate'; import { parseSlx } from '../src/datamodel/parser/SlxParser.js'; @@ -37,6 +38,7 @@ import { parseBinarySldd, parseBinarySlddParts } from '../src/datamodel/parser/B // SlddNode.parse builds a tree out of. A deep import of SlddNode alone leaves // NodeRegistry empty and parseEntry with nothing to route an entry to. import { SlddNode } from '../src/index.js'; +import { reasonOf } from '../src/datamodel/parser/ParseWarning.js'; import type { ParseWarning } from '../src/datamodel/parser/ParseWarning.js'; import { CLASS, @@ -1042,3 +1044,53 @@ describe('SlddNode.parse — the warnings channel', () => { expect(entryNamesOf(node)).toContain(first.name as string); }); }); + +// --------------------------------------------------------------------------- +// reasonOf — the cause every message above is built from +// --------------------------------------------------------------------------- +// +// Eight warning sites in this package quote `reasonOf(err)` inside their message, and +// every one of them is inside a `catch`, whose binding is `unknown` because a throw can +// carry anything. What comes back has to be a STRING, always: a warning is stored and +// handed across a worker boundary by structured clone or JSON, so an `Error` kept there +// arrives as `{}` (JSON) and an arbitrary object may not clone at all — which is why +// nothing here holds the Error itself. The tests above all throw real Errors; these two +// are the other arm, and the failure they guard against is a message that reads +// "the model part could not be read (undefined)". + +describe('reasonOf — a cause that is not an Error', () => { + it('reads the cause off an Error thrown in another realm, which instanceof cannot see', () => { + // The case this arm actually exists for, and the reason it is not dead code. `instanceof` + // compares against ONE realm's Error, so an error raised in a worker, a sandbox or a vm + // context fails the test while carrying a perfectly good message — and hosts of this + // package parse off-thread by design (see the header of ParseWarning.ts). Falling + // through to String() is what keeps the cause readable there. + const thrown = runInNewContext('new TypeError("the model part is not an mxarray")') as unknown; + expect(thrown instanceof Error, 'a cross-realm Error is what this arm is for').toBe(false); + // Error.prototype.toString, so the class name comes along with the message. More than + // the message alone, and all that is available without the type. + expect(reasonOf(thrown)).toContain('the model part is not an mxarray'); + expect(reasonOf(thrown)).toContain('TypeError'); + }); + + it('reduces a thrown non-Error to text, so a warning stays a value', () => { + // A host's `throw` need not be an Error at all, and reaching for `.message` on one of + // these is what puts the word "undefined" into the sentence a user reads. + expect(reasonOf('the sandbox refused to read the file')).toBe('the sandbox refused to read the file'); + expect(reasonOf(undefined)).toBe('undefined'); + expect(reasonOf(null)).toBe('null'); + // A thrown object keeps nothing but its shape. Asserted as "a string" rather than as + // that exact text: the floor this guarantees is the type, and a reader that learned to + // say more about an object would still be honouring it. + expect(typeof reasonOf({ code: 'ENOENT' })).toBe('string'); + // What the type is for. A warning built from any of them is a plain value that + // survives both crossings intact. + const warning: ParseWarning = { + code: 'source-unreadable', + message: `cases.slx could not be opened and was skipped (${reasonOf('EBUSY')})`, + }; + expect(warning.message).toContain('EBUSY'); + expect(() => structuredClone(warning)).not.toThrow(); + expect(JSON.parse(JSON.stringify(warning))).toEqual(warning); + }); +}); diff --git a/test/parser.test.ts b/test/parser.test.ts index 4194dc3..bc1c87a 100644 --- a/test/parser.test.ts +++ b/test/parser.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect } from 'vitest'; import { readFileSync } from 'node:fs'; import { fileURLToPath } from 'node:url'; -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; import DataModel from '../src/core/DataModel.js'; function loadFixture(name: string): Record { diff --git a/test/piOtherBusElement.test.ts b/test/piOtherBusElement.test.ts index d4dbcfa..4dd61ab 100644 --- a/test/piOtherBusElement.test.ts +++ b/test/piOtherBusElement.test.ts @@ -2,7 +2,7 @@ import { describe, it, expect } from 'vitest'; import { BusElementNode } from '../src/datamodel/node/data/BusNode.js'; import { ConnectionBusElementNode } from '../src/datamodel/node/data/ConnectionBusNode.js'; -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; // Regression: bus/connection elements store their name under the raw 'Name' key // and read type/min/max through '*_internal' aliased keys. The PI "Other" diff --git a/test/piOtherGroup.test.ts b/test/piOtherGroup.test.ts index 8032ced..b313454 100644 --- a/test/piOtherGroup.test.ts +++ b/test/piOtherGroup.test.ts @@ -1,7 +1,7 @@ // Copyright 2026 The MathWorks, Inc. import { describe, it, expect } from 'vitest'; import ParameterNode from '../src/datamodel/node/data/ParameterNode.js'; -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; // Build a Parameter whose raw _properties carry an EXTRA unmodeled key on top of // the seeded default, so the PI "Other" catch-all has something to surface. diff --git a/test/projectNode.test.ts b/test/projectNode.test.ts index d506501..161223d 100644 --- a/test/projectNode.test.ts +++ b/test/projectNode.test.ts @@ -83,6 +83,33 @@ describe('ProjectNode.fromParsed', () => { expect([folder.name, (folder as any).location]).toEqual(['helpers', 'utils/helpers/']); }); + it('never leaves an entry nameless, whatever shape the recorded path has', () => { + // Both sections name an entry by the last segment of its path, and a `.prj` is not + // required to hand over a path that HAS a last segment: a folder member recorded with + // a trailing separator, or a path entry that is a bare root, leaves the split with + // nothing to take. The Name column is the only thing identifying a row here — a + // project is read-only, so there is no editing the blank away — and a nameless row is + // also unselectable-looking and indistinguishable from its neighbours. So the rule for + // both is the same: when there is no basename to show, show the path itself. + // + // MATLAB does not normally write either shape; a Windows-authored or hand-edited + // project can, which is also why the separator match takes `\` as well as `/`. + const parsed = makeParsed(); + parsed.files = [ + { path: 'models/', isFolder: true, labels: [] }, + { path: 'code\\utils\\a.m', isFolder: false, labels: [] }, + ]; + parsed.pathFolders = ['/']; + const node = ProjectNode.fromParsed(parsed, 'p.prj'); + const named = (n: { name: string; location?: string }) => [n.name, (n as any).location]; + expect(node.getSection('files')!.children.map((c) => named(c as any))).toEqual([ + ['models/', 'models/'], + // A backslash counts as a separator, so a Windows path is not shown whole. + ['a.m', 'code\\utils\\a.m'], + ]); + expect(named(node.getSection('path')!.children[0] as any)).toEqual(['/', '/']); + }); + it('falls back to the reference id when it has no name', () => { const parsed = makeParsed(); parsed.references = [{ id: 'ref-uuid-2' }]; diff --git a/test/schema/kindClassAtoms.test.ts b/test/schema/kindClassAtoms.test.ts index 829ae11..6a99c1c 100644 --- a/test/schema/kindClassAtoms.test.ts +++ b/test/schema/kindClassAtoms.test.ts @@ -12,7 +12,7 @@ import PropClass from '../../src/datamodel/prop/PropClass.js'; import ParameterNode from '../../src/datamodel/node/data/ParameterNode.js'; import ConstantNode from '../../src/datamodel/node/data/ConstantNode.js'; import { BusNode } from '../../src/datamodel/node/data/BusNode.js'; -import '../../src/datamodel/node/NodeClassMap.js'; +import '../../src/datamodel/node/data/NodeClassMap.js'; describe('PropKind / PropClass atoms', () => { it('Parameter: Kind is human-readable, Class is the raw identity, and they differ', () => { diff --git a/test/schema/piGeneralAllNodes.test.ts b/test/schema/piGeneralAllNodes.test.ts index cdc32ac..65d806d 100644 --- a/test/schema/piGeneralAllNodes.test.ts +++ b/test/schema/piGeneralAllNodes.test.ts @@ -27,7 +27,7 @@ import { ConnectionBusNode } from '../../src/datamodel/node/data/ConnectionBusNo import { ServiceBusNode } from '../../src/datamodel/node/data/ServiceBusNode.js'; import { EnumTypeNode } from '../../src/datamodel/node/data/EnumTypeNode.js'; import NodeRegistry from '../../src/datamodel/node/NodeRegistry.js'; -import '../../src/datamodel/node/NodeClassMap.js'; +import '../../src/datamodel/node/data/NodeClassMap.js'; function groupsOf(node: any): { name: string; items: string[] }[] { const pi = node.toPIObject(); diff --git a/test/schema/piLayoutParity.test.ts b/test/schema/piLayoutParity.test.ts index e49a035..549255b 100644 --- a/test/schema/piLayoutParity.test.ts +++ b/test/schema/piLayoutParity.test.ts @@ -7,7 +7,7 @@ import { EnumTypeNode } from '../../src/datamodel/node/data/EnumTypeNode.js'; import { BusNode } from '../../src/datamodel/node/data/BusNode.js'; import { ConnectionBusNode } from '../../src/datamodel/node/data/ConnectionBusNode.js'; import { ServiceBusNode } from '../../src/datamodel/node/data/ServiceBusNode.js'; -import '../../src/datamodel/node/NodeClassMap.js'; +import '../../src/datamodel/node/data/NodeClassMap.js'; // Every schema-driven class opens with a common, fixed-name "General" identity // group [Name, (Value,) (DataType/BaseType,) Kind, Class] — a deliberate diff --git a/test/schema/piWiring.test.ts b/test/schema/piWiring.test.ts index 70fe140..4f4027d 100644 --- a/test/schema/piWiring.test.ts +++ b/test/schema/piWiring.test.ts @@ -12,7 +12,7 @@ import ParameterNode from '../../src/datamodel/node/data/ParameterNode.js'; import SignalNode from '../../src/datamodel/node/data/SignalNode.js'; import DataModel from '../../src/core/DataModel.js'; import { parseBinarySldd } from '../../src/datamodel/parser/BinarySlddParser.js'; -import '../../src/datamodel/node/NodeClassMap.js'; +import '../../src/datamodel/node/data/NodeClassMap.js'; describe('Parameter/Signal PI includes hydrated schema groups', () => { it('ParameterNode PI opens with the common General group, then Value Properties/Code Generation/Custom Attributes', () => { diff --git a/test/sectionNode.test.ts b/test/sectionNode.test.ts index 6e8a308..3cd21c9 100644 --- a/test/sectionNode.test.ts +++ b/test/sectionNode.test.ts @@ -20,7 +20,7 @@ import SectionNode from '../src/datamodel/node/container/SectionNode.js'; import SlddNode from '../src/datamodel/node/container/SlddNode.js'; import { generateUuid } from '../src/datamodel/node/container/SectionNode.js'; import { NS_DESIGN, NS_CONFIGURATIONS, NS_OTHER } from '../src/datamodel/SectionConstants.js'; -import { getClass, getRegisteredClasses } from '../src/datamodel/node/NodeClassMap.js'; +import { getClass, getRegisteredClasses } from '../src/datamodel/node/data/NodeClassMap.js'; // A real SlddNode already builds the four sections wired to a parent, which is // what the namespace and dirty-flag logic reads. diff --git a/test/serializeNdCdata.test.ts b/test/serializeNdCdata.test.ts index 829d5de..452d259 100644 --- a/test/serializeNdCdata.test.ts +++ b/test/serializeNdCdata.test.ts @@ -43,7 +43,7 @@ import { loadFile, findEntry } from './parity/loadFile.js'; import DataNode from '../src/datamodel/node/DataNode.js'; import NodeRegistry from '../src/datamodel/node/NodeRegistry.js'; import { isMatCdata } from '../src/datamodel/parser/CdataCodec.js'; -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; const truth = JSON.parse( readFileSync(fileURLToPath(new URL('./parity/artifacts/truth.json', import.meta.url)), 'utf8'), diff --git a/test/serializeShape.test.ts b/test/serializeShape.test.ts index bf45efb..94073c1 100644 --- a/test/serializeShape.test.ts +++ b/test/serializeShape.test.ts @@ -21,7 +21,7 @@ import { describe, it, expect } from 'vitest'; import { loadFile, findEntry } from './parity/loadFile.js'; import NodeRegistry from '../src/datamodel/node/NodeRegistry.js'; import DataNode from '../src/datamodel/node/DataNode.js'; -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; // loadFile resolves relative to test/parity/loadFile.ts. const MAT = ['./artifacts/mat/cases.mat', 'cases.mat'] as const; diff --git a/test/signalNode.test.ts b/test/signalNode.test.ts index c134c5a..15aaa67 100644 --- a/test/signalNode.test.ts +++ b/test/signalNode.test.ts @@ -51,3 +51,42 @@ describe('SignalNode serializeValue — Unit/Description overrides', () => { expect('Unit' in props).toBe(false); }); }); + +describe('the Data Type a Signal shows', () => { + // `DataType` has the same two-spelling problem the unit key has: a dictionary may + // store a Signal's declared type as `DataType` or as the resolved `DataType_internal`, + // and this column was blank for every Signal in every format until the node read both + // (DESIGN.md item 37). One spelling working and the other not is invisible until a + // dictionary written by a different release shows a whole column of blanks, so both + // spellings are pinned, along with which one wins when a file carries the two. + const dataTypeCell = (props: Record) => + SignalNode.parse(rawVal(props), 'sig', null).toRow()!.DataType; + + it('reads the type out of either spelling the file may have used', () => { + expect(dataTypeCell({ DataType: 'single' })).toBe('single'); + expect(dataTypeCell({ DataType_internal: 'int32' })).toBe('int32'); + }); + + it('prefers the resolved DataType_internal when the file carries both', () => { + // The two disagree in a dictionary where a type alias was resolved on save; + // `_internal` is the answer Simulink itself computed, so it is the one to show. + expect(dataTypeCell({ DataType_internal: 'int32', DataType: 'single' })).toBe('int32'); + }); + + it("says 'auto' rather than nothing when the file declares no type", () => { + // Not a missing value: a Signal with no DataType key IS auto, and MATLAB shows it + // that way. A blank cell would read as "unknown" for the commonest Signal there is. + expect(dataTypeCell({})).toBe('auto'); + expect(dataTypeCell({ DataType: '' })).toBe('auto'); + }); + + it('does not write that default back into a file that never declared a type', () => { + // The default is a display answer only. Writing `DataType: "auto"` into a dictionary + // that omitted the key would turn opening and saving a file into a diff, and both + // save paths have to agree about staying quiet. + const node = SignalNode.parse(rawVal({}), 'sig', null); + expect(node._getSerializedProperties()).not.toHaveProperty('DataType'); + const sv = node.serializeValue() as { _elements: { _properties: Record }[] }; + expect(sv._elements[0]._properties).not.toHaveProperty('DataType'); + }); +}); diff --git a/test/slddNdWriteBack.test.ts b/test/slddNdWriteBack.test.ts index 19e4b86..403c7b4 100644 --- a/test/slddNdWriteBack.test.ts +++ b/test/slddNdWriteBack.test.ts @@ -17,7 +17,7 @@ import { readFileSync } from 'node:fs'; import { fileURLToPath } from 'node:url'; import { unzipSync } from 'fflate'; import DataModel from '../src/core/DataModel.js'; -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; import { parseBinarySlddParts } from '../src/datamodel/parser/BinarySlddParser.js'; import { buildDataChunkXml } from '../src/datamodel/parser/BinarySlddSerializer.js'; import { loadFile, findEntry } from './parity/loadFile.js'; diff --git a/test/slddNode.test.ts b/test/slddNode.test.ts new file mode 100644 index 0000000..71f6e33 --- /dev/null +++ b/test/slddNode.test.ts @@ -0,0 +1,277 @@ +// Copyright 2026 The MathWorks, Inc. +// +// THE DICTIONARY ROOT: WHAT IT SAYS ABOUT THE FILE, AND WHAT IT DOES WITH A PART THAT +// ARRIVED SHORT. +// +// `SlddNode` is the root row of an open `.sldd` and the whole reader for the textual +// flavour of one, so it answers two quite different kinds of question and both are +// user-visible. +// +// The first is what the root row and the property inspector say about the file itself: +// its name (with the asterisk that is the only sign an edit has not been saved), its +// icon, and the FileFormat row that tells a user which of the two `.sldd` flavours they +// have open — because that decides what a save will write. All three read off the same +// recorded fact, `sourceFormat`, which is set from the presence of a `__rawXml` part +// rather than guessed from the filename, since both flavours use the same extension. +// +// The second is what happens when a piece of the file is missing. A dictionary is a bag +// of parts, and MATLAB — or a partial write, or a host that rebuilt one — can hand over +// a content part with no entry list, an entry with no metadata, or a System Composer +// catalog whose records are half there. Every one of those has a defined answer that is +// NOT "throw": the parse walks the entry list with a plain `forEach`, so anything that +// throws inside it costs the whole dictionary rather than the one piece that was short. +// What each of those answers is, is the second half of this file. +// +// The catalog case is the one with teeth. The catalog is what tells a StructType from a +// DataInterface — both are a `Simulink.Bus` on disk — so a record that is present but +// unusable does not produce a visible error, it produces a WRONG Kind that looks exactly +// like a right one. That degradation is pinned here deliberately, so that a change to +// how partial records are handled shows up as a failing test naming the entry it +// mislabels rather than as a quietly reclassified dictionary. +// +// Related: parseWarnings.test.ts owns the diagnostics a short dictionary raises +// (`source-empty`, `part-unreadable`); scCatalog.test.ts owns the equality of the two +// formats' catalogs; slddContent.test.ts owns the content unwrap. This file is about the +// answers the root itself gives. + +import { describe, it, expect } from 'vitest'; +import { readFileSync } from 'node:fs'; +import { fileURLToPath } from 'node:url'; +import SlddNode from '../src/datamodel/node/container/SlddNode.js'; +import type SectionNode from '../src/datamodel/node/container/SectionNode.js'; +import { parseBinarySldd } from '../src/datamodel/parser/BinarySlddParser.js'; +import { serializeBinarySldd } from '../src/datamodel/parser/BinarySlddSerializer.js'; +import { DATA_PART_KEY, TEXT_CONTENT, TEXT_PARTS } from '../src/datamodel/parser/SlddParts.js'; +import { SC_PART } from '../src/datamodel/parser/ScCatalog.js'; +import type { ParseWarning } from '../src/datamodel/parser/ParseWarning.js'; +// Registers the node classes the entry parser resolves values with; without it every +// entry would fall through to the generic object node and no Kind would be right. +import '../src/datamodel/node/data/NodeClassMap.js'; + +const fixture = (name: string) => fileURLToPath(new URL(`./fixtures/${name}`, import.meta.url)); +const jsonFixture = (name: string) => JSON.parse(readFileSync(fixture(name), 'utf8')) as Record; + +function binaryFixtureJson(name: string): Record { + const u8 = new Uint8Array(readFileSync(fixture(name))); + const buf = u8.buffer.slice(u8.byteOffset, u8.byteOffset + u8.byteLength) as ArrayBuffer; + return parseBinarySldd(buf) as unknown as Record; +} + +// A dictionary bag holding exactly the content part, so the reader has something to read +// and nothing else to lean on. +function dictionaryWith(content: Record): Record { + return { [TEXT_PARTS]: { [DATA_PART_KEY]: { [TEXT_CONTENT]: content } } }; +} + +const doubleEntry = (name: string, metadata?: Record) => ({ + name, + value: { _type: 'double', _value: '1' }, + ...(metadata ? { metadata } : {}), +}); + +const entryNames = (node: SlddNode) => + node.children.flatMap((s) => s.children.map((e) => e.name)).sort(); + +function kindsOf(node: SlddNode): Record { + const out: Record = {}; + node.children.forEach((section) => { + section.children.forEach((entry) => { + out[entry.name] = (entry as unknown as { kind: string }).kind; + }); + }); + return out; +} + +describe('what the dictionary root says about the file it came from', () => { + it('marks its name with an asterisk as soon as an entry has been edited', () => { + // The asterisk is the only thing in the tree that says an edit is unsaved, and it is + // put there by the mutation walking up to the source root — not by the host, which + // would have to remember to. An edit deep in an entry has to reach it. + const node = SlddNode.parse(jsonFixture('arch.sldd'), 'arch.sldd'); + expect(node.displayName).toBe('arch.sldd'); + + const entry = (node.getSection('arch') as SectionNode).children.find((c) => c.name === 'NumericType')!; + expect((entry as unknown as { setProperty(k: string, v: string): boolean }) + .setProperty('Description', 'edited')).toBe(true); + expect(node.displayName).toBe('arch.sldd *'); + }); + + it('shows a compressed-binary dictionary as a package and a textual one as text', () => { + // Both flavours are `.sldd`, so this cannot come from the name. It decides the icon a + // user picks the file out by and the FileFormat row they read to know what a save + // will write — a textual dictionary reported as compressed-binary is a promise to + // write a zip over a JSON file. + const binary = SlddNode.parse(binaryFixtureJson('arch_binary.sldd'), 'arch_binary.sldd'); + expect([binary.sourceFormat, binary.icon, binary.FileFormat]) + .toEqual(['xml', 'simulink_server', 'compressed-binary']); + + const text = SlddNode.parse(jsonFixture('arch.sldd'), 'arch.sldd'); + expect([text.sourceFormat, text.icon, text.FileFormat]) + .toEqual(['json', 'simulink_database', 'uncompressed-text']); + }); + + it('still reads as a package when only the chunk XML came with it, and still saves one', () => { + // The zip members this reader does not understand are carried through untouched so a + // save does not drop them, and the DataSource attributes are copied so the written + // package claims the release the original did. A dictionary that arrived with the + // chunk and nothing else has neither — it must still be a compressed-binary + // dictionary, and saving it must still produce a package that opens, on the + // serializer's stated defaults rather than on `undefined` leaking into the XML. + const node = SlddNode.parse( + { ...dictionaryWith({ entries: [doubleEntry('Kp')] }), __rawXml: '' }, + 'thin.sldd', + ); + expect([node.sourceFormat, node.icon, node.FileFormat]) + .toEqual(['xml', 'simulink_server', 'compressed-binary']); + // Recorded as "nothing carried" rather than left undefined, which is what the + // serializer's fallbacks are written against. + expect(node._zipMetadata).toBeNull(); + expect(node._dataSourceAttrs).toBeNull(); + + const reopened = SlddNode.parse( + parseBinarySldd(serializeBinarySldd(node)) as unknown as Record, + 'thin.sldd', + ); + expect(entryNames(reopened)).toEqual(['Kp']); + expect(reopened.FileFormat).toBe('compressed-binary'); + }); +}); + +describe('a content part that arrived without the pieces around its entries', () => { + it('opens a dictionary whose content part lists no entries as an empty one, and says nothing', () => { + // MATLAB writes a content part with an empty entry list for a dictionary a user has + // created and not filled in; a partial write can leave the key off altogether. Both + // are complete-enough files read correctly, so they open as the four empty sections + // and raise nothing — `source-empty` is for a dictionary with no content part at all, + // and spending it here would put a warning banner in front of every new dictionary. + for (const content of [{}, { entries: [] }]) { + const warnings: ParseWarning[] = []; + const node = SlddNode.parse(dictionaryWith(content), 'fresh.sldd', warnings); + expect(node.NumberOfEntries).toBe(0); + expect(node.children.map((c) => c.name)).toEqual(['design', 'arch', 'config', 'other']); + expect(warnings).toEqual([]); + } + }); + + it('reads a content part with no reference list as a dictionary that references nothing', () => { + // `dictionaryReferences` is written straight back out on save, so an absent list has + // to become an empty one here: `undefined` would be written into the file's + // "Dictionary References" and a dictionary that referenced nothing would come back + // claiming it could not be read. + const node = SlddNode.parse(dictionaryWith({ entries: [doubleEntry('Kp')] }), 'plain.sldd'); + expect(node.dictionaryReferences).toEqual([]); + expect(node.allowAccessBWS).toBe(false); + + const saved = node.serializeJson(); + const content = (saved[TEXT_PARTS] as Record>>) + [DATA_PART_KEY][TEXT_CONTENT]; + expect(content['Dictionary References']).toEqual([]); + expect(content.AllowAccessBWS).toBe(false); + }); + + it('files an entry that carries no metadata under Design Data', () => { + // The section an entry belongs in is read out of its metadata, and an entry with none + // still has to land somewhere a user can see it. Design Data is the answer because it + // is where an ordinary workspace variable lives — dropping the entry, or putting it in + // Other Data, would hide or misfile a definition the file does hold. + const node = SlddNode.parse( + dictionaryWith({ entries: [doubleEntry('Kp'), doubleEntry('Ki', { namespace: '', isderived: '0' })] }), + 'plain.sldd', + ); + expect((node.getSection('design') as SectionNode).children.map((c) => c.name)).toEqual(['Kp', 'Ki']); + expect(node.NumberOfEntries).toBe(2); + }); +}); + +describe('a System Composer catalog whose records arrived incomplete', () => { + // The catalog part of the real architectural fixture, with broken records spliced in + // beside the good ones. Each break is a shape MF0 JSON can legitimately produce — a + // null reference where a record was expected, a record with no name, a record with no + // type — and each is a separate chance for the walk to throw and take the dictionary + // with it. + type Rec = Record; + const catalogPartOf = (json: Record) => + ((json[TEXT_PARTS] as Record)[`__MW_TEXT_PART__/${SC_PART}`])[TEXT_CONTENT] as Rec; + + function archWithCatalog(edit: (records: Rec[]) => void): { node: SlddNode; warnings: ParseWarning[] } { + const json = jsonFixture('arch.sldd'); + const records = catalogPartOf(json).entries as Rec[]; + edit(records); + const warnings: ParseWarning[] = []; + return { node: SlddNode.parse(json, 'arch.sldd', warnings), warnings }; + } + + const interfacesOf = (records: Rec[]) => + ((records.find((r) => (r.content as Rec)?.p_PortInterfaceCatalog)!.content as Rec) + .p_PortInterfaceCatalog as Rec).content as Rec; + const modeledOf = (records: Rec[]) => + (records.find((r) => (r.content as Rec)?.p_ModeledDataTypes)!.content as Rec); + + const PRISTINE_KINDS = kindsOf(SlddNode.parse(jsonFixture('arch.sldd'), 'arch.sldd')); + + it('classifies every well-formed record even with broken ones sitting beside them', () => { + // The consequence that matters: one unusable record must cost that record, not the + // dictionary. Every Kind in the file is compared against the same file read clean. + const { node, warnings } = archWithCatalog((records) => { + // A record whose content is a null reference rather than an object — the shape MF0 + // JSON writes for an empty one, and the fixture is full of them one level down. + records.push({ type: 'systemcomposer.property.TypeCatalog', content: null }); + // An interface and a modeled type whose own records are null. + (interfacesOf(records).p_Interfaces as Rec[]).push({ content: null, type: 'x' }); + (modeledOf(records).p_ModeledDataTypes as Rec[]).push({ content: null, type: 'y' }); + }); + + expect(kindsOf(node)).toEqual(PRISTINE_KINDS); + // The part was present and readable, so nothing is reported about it. + expect(warnings).toEqual([]); + }); + + it('skips a definition whose record does not name it, rather than cataloguing an empty name', () => { + // The catalog is keyed by NAME — it is the only link between the part and an entry — + // so a record with no name classifies nothing. Storing it under '' would be worse + // than skipping it: the next nameless record would overwrite the first, and an entry + // whose own name somehow read as empty would pick up the type of whichever record + // happened to land there. + const { node } = archWithCatalog((records) => { + (interfacesOf(records).p_Interfaces as Rec[]).push({ + content: { p_Name: '' }, + type: 'systemcomposer.architecture.model.interface.CompositeDataInterface', + }); + (modeledOf(records).p_ModeledDataTypes as Rec[]).push({ + content: {}, + type: 'systemcomposer.property.StructDataType', + }); + }); + + expect(Object.keys(node.systemComposer!.interfaces)).not.toContain(''); + expect(Object.keys(node.systemComposer!.modeledDataTypes)).not.toContain(''); + expect(kindsOf(node)).toEqual(PRISTINE_KINDS); + }); + + it("degrades a definition whose record lost its type to the entry's raw Simulink class", () => { + // The nastiest partial in the reader, pinned rather than fixed. `StructType` is a + // `Simulink.Bus` and reads as a struct type ONLY because the catalog says + // StructDataType; with the type gone it reads as a Data Interface — the same thing + // the Bus beside it reads, which is a wrong answer that looks exactly like a right + // one. It is recorded as the empty string, not dropped, so the catalog still shows + // the file listed the definition. + const { node, warnings } = archWithCatalog((records) => { + const modeled = modeledOf(records).p_ModeledDataTypes as Rec[]; + delete modeled.find((d) => (d.content as Rec)?.p_Name === 'StructType')!.type; + const ifaces = interfacesOf(records).p_Interfaces as Rec[]; + delete ifaces.find((d) => (d.content as Rec)?.p_Name === 'DataInterface')!.type; + }); + + expect(node.systemComposer!.modeledDataTypes.StructType).toBe(''); + expect(node.systemComposer!.interfaces.DataInterface).toBe(''); + expect(kindsOf(node)).toMatchObject({ + StructType: 'Data Interface', + DataInterface: 'Data Interface', + // Everything the catalog still classifies is unaffected. + ValueType: 'Value Type', + EnumType: 'Enumerated Type', + AliasType: 'Alias Type', + }); + expect(warnings).toEqual([]); + }); +}); diff --git a/test/slddParts.test.ts b/test/slddParts.test.ts new file mode 100644 index 0000000..68a0a7f --- /dev/null +++ b/test/slddParts.test.ts @@ -0,0 +1,158 @@ +// Copyright 2026 The MathWorks, Inc. +// +// The names of the one part a `.sldd` keeps its entries in, and the agreements between the +// code that writes them and the code that reads them back. +// +// Both spellings — the zip member `data/chunk0.xml` and the JSON key path +// `__MW_TEXT_PARTS__` -> `__MW_TEXT_PART__/data/chunk0` -> `__MW_TEXT_content` — were +// literals at seven sites in this package and six more in its vscode host. Nothing checked +// that the sites agreed, and none of the disagreements would have thrown: +// +// * the reader EXCLUDES the data part from its pass-through bag and the writer PUTS IT +// BACK. Two spellings there means a save that carries a stale copy of the entries +// alongside the new one, in a zip that opens perfectly. +// * two writers build the JSON path (the binary reader and `SlddNode.serializeJson`) and +// one function reads it (`slddChunkContent`). A drifted writer yields `null`, which +// SlddNode reports as `source-empty` — indistinguishable from a dictionary a user had +// just created. +// +// So these tests do two things the constants cannot do for themselves. They spell the +// strings out as LITERALS, because a test that asked `DATA_PART_XML` what `DATA_PART_XML` +// is would pass for any value; and they check writer against reader over real MATLAB-written +// fixtures, which is the only place the agreement is observable. +import { describe, it, expect } from 'vitest'; +import { readFileSync } from 'node:fs'; +import { fileURLToPath } from 'node:url'; +import { unzipSync } from 'fflate'; +import { + DATA_PART, + DATA_PART_KEY, + DATA_PART_XML, + TEXT_CONTENT, + TEXT_PARTS, + createSession, + ingest, + parseBinarySldd, + readSlddContent, + serializeBinarySldd, + slddChunkContent, +} from '../src/index.js'; +import type SlddNode from '../src/datamodel/node/container/SlddNode.js'; + +const BINARY = 'compressed.sldd'; +const TEXTUAL = 'object_array_text.sldd'; + +function fixture(name: string): Uint8Array { + return new Uint8Array(readFileSync(fileURLToPath(new URL(`./fixtures/${name}`, import.meta.url)))); +} + +function buffer(name: string): ArrayBuffer { + const u8 = fixture(name); + return u8.buffer.slice(u8.byteOffset, u8.byteOffset + u8.byteLength) as ArrayBuffer; +} + +describe('the two spellings of one part', () => { + it('are the strings MATLAB writes, written out', () => { + // The literals, once, so every derivation below is anchored to the bytes on disk + // rather than to itself. + expect(DATA_PART).toBe('data/chunk0'); + expect(DATA_PART_XML).toBe('data/chunk0.xml'); + expect(TEXT_PARTS).toBe('__MW_TEXT_PARTS__'); + expect(DATA_PART_KEY).toBe('__MW_TEXT_PART__/data/chunk0'); + expect(TEXT_CONTENT).toBe('__MW_TEXT_content'); + }); + + it('share a stem, which is why they are derived and not typed twice', () => { + expect(DATA_PART_XML).toBe(`${DATA_PART}.xml`); + expect(DATA_PART_KEY.endsWith(DATA_PART)).toBe(true); + }); + + it('do not confuse the member name with the JSON key', () => { + // The one plausible "cleanup" that would break both formats at once: the prefix + // already ends in a separator, so the key looks like a path join with the member name + // — but the JSON key carries no `.xml`, and adding one makes every textual dictionary + // read as empty. + expect(DATA_PART_KEY).not.toContain('.xml'); + expect(new Set([DATA_PART, DATA_PART_XML, DATA_PART_KEY, TEXT_PARTS, TEXT_CONTENT]).size).toBe(5); + }); +}); + +describe('the zip member the reader excludes is the one the writer puts back', () => { + it('keeps the data part out of the pass-through bag, and everything else in', () => { + const zip = unzipSync(fixture(BINARY)); + const content = parseBinarySldd(buffer(BINARY)) as { __zipMetadata: Record }; + // The bag is the WRITER's input, so what is missing from it is what the writer must + // supply — and what is in it is what the writer must not touch. + expect(Object.keys(content.__zipMetadata)).not.toContain(DATA_PART_XML); + expect(Object.keys(content.__zipMetadata).sort()).toEqual( + Object.keys(zip) + .filter((n) => n !== DATA_PART_XML) + .sort(), + ); + expect(Object.keys(content.__zipMetadata).length, 'the fixture has other members to carry').toBeGreaterThan(0); + }); + + it('re-serializes to the same member set, with the data part present exactly once', () => { + // The failure this pins is not a throw. If the exclusion and the insertion named + // different strings, this would still produce a valid zip — one carrying the OLD + // entries under the name a reader looks up and the new ones under a name nothing + // reads. Comparing member sets is what sees it. + const s = createSession(); + const src = ingest(s, buffer(BINARY), { filename: BINARY }); + const out = unzipSync(new Uint8Array(serializeBinarySldd(src as unknown as SlddNode))); + expect(Object.keys(out)).toContain(DATA_PART_XML); + expect(Object.keys(out).sort()).toEqual(Object.keys(unzipSync(fixture(BINARY))).sort()); + // And it is the rebuilt part, not a carried-through copy of the original. + expect(new TextDecoder().decode(out[DATA_PART_XML])).toContain(' { + const walk = (json: Record) => { + const parts = json[TEXT_PARTS] as Record | undefined; + const chunk = parts?.[DATA_PART_KEY] as Record | undefined; + return chunk?.[TEXT_CONTENT] as Record | undefined; + }; + + it('reaches the entries of a dictionary MATLAB wrote as text', () => { + // The strongest anchor available: the path is walked by hand over the RAW JSON of a + // real textual `.sldd`, so this fails if the constants describe a shape only this + // package's own writers produce. + const raw = JSON.parse(new TextDecoder().decode(fixture(TEXTUAL))) as Record; + const byHand = walk(raw); + expect(byHand, 'the fixture must carry a content part').toBeTruthy(); + expect(Array.isArray(byHand?.entries)).toBe(true); + expect(slddChunkContent(raw)).toBe(byHand); + }); + + it('reaches the entries of one MATLAB wrote as a zip, through the binary reader', () => { + const content = readSlddContent(buffer(BINARY)); + expect(slddChunkContent(content)).toBe(walk(content)); + expect(Array.isArray(slddChunkContent(content)?.entries)).toBe(true); + }); + + it('is the same path SlddNode writes back, which is the agreement that had no test', () => { + // Two writers, one reader: the binary parser builds this object out of XML and + // `serializeJson` builds it out of the node tree, and `slddChunkContent` is the only + // thing that unwraps either. Pinning the reader against ONE writer would leave the + // other free to drift, so the round trip goes through both. + const s = createSession(); + const src = ingest(s, buffer(BINARY), { filename: BINARY }) as unknown as SlddNode; + const written = src.serializeJson(); + const readBack = slddChunkContent(written); + expect(readBack).toBeTruthy(); + expect((readBack?.entries as unknown[]).length).toBe( + (slddChunkContent(readSlddContent(buffer(BINARY)))?.entries as unknown[]).length, + ); + }); + + it('answers null when the part sits under any other key', () => { + // What a drifted writer actually produces, and the reason the drift is quiet: not a + // throw, but the same answer a dictionary with no content part gives — which SlddNode + // reports as `source-empty`. + const wrong = { [TEXT_PARTS]: { [`${DATA_PART_KEY}.xml`]: { [TEXT_CONTENT]: { entries: [] } } } }; + expect(slddChunkContent(wrong)).toBe(null); + expect(slddChunkContent({ [TEXT_PARTS]: { [DATA_PART_KEY]: { __MW_content: { entries: [] } } } })).toBe(null); + expect(slddChunkContent({})).toBe(null); + }); +}); diff --git a/test/sourceFormat.test.ts b/test/sourceFormat.test.ts index 93dce79..ef042ff 100644 --- a/test/sourceFormat.test.ts +++ b/test/sourceFormat.test.ts @@ -87,6 +87,20 @@ describe('sourceFormat — every source root names its own format', () => { expect(format).not.toBe('slx'); }); + it('decides the package flavour on the EXTENSION, not on the name containing "mdl"', () => { + // The `.slx` and the package `.mdl` are the same bytes read the same way, so the only + // thing separating their two tokens is a test on the name — and the name is a user's, + // so `mdl_library.slx` and `MdlUtils.slx` are ordinary. A test that matched anywhere in + // the name would call those packages `mdl-package`, and `serializeSource` picks a + // WRITER by this field: the file would be offered to Simulink as the wrong container, + // from a model that opens and reads perfectly. + const s = createSession(); + expect((toDTO(s.addModelSource('mdl_library.slx', bytes(SLX))) as SourceDTO).sourceFormat).toBe('slx'); + expect((toDTO(s.addModelSource('notes.mdl.slx', bytes(SLX))) as SourceDTO).sourceFormat).toBe('slx'); + // And the other direction, in the case MATLAB and Windows actually write. + expect((toDTO(s.addModelSource('SHOUTED.MDL', bytes(MDL_PACKAGE))) as SourceDTO).sourceFormat).toBe('mdl-package'); + }); + it('a .mat says mat', () => { const s = createSession(); const src = s.addMatSource('v.mat', bytes(MAT)); diff --git a/test/structNode.test.ts b/test/structNode.test.ts index b6ed2bd..2659b89 100644 --- a/test/structNode.test.ts +++ b/test/structNode.test.ts @@ -7,7 +7,7 @@ // data corruption in the user's .sldd file. import { describe, it, expect } from 'vitest'; import StructNode from '../src/datamodel/node/data/StructNode.js'; -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; // --- helpers --------------------------------------------------------------- diff --git a/test/tools/moduleGraph.ts b/test/tools/moduleGraph.ts new file mode 100644 index 0000000..6df72e3 --- /dev/null +++ b/test/tools/moduleGraph.ts @@ -0,0 +1,198 @@ +// Copyright 2026 The MathWorks, Inc. +// +// Reads a source tree's import graph, keeping the ONE distinction the boundary tests +// are about: whether an edge survives compilation. +// +// `import type { X } from './y.js'` is erased by tsc — it constrains nothing at +// runtime, creates no load-order dependency, and pulls no bytes into a bundle. +// `import { x } from './y.js'` does all three. This package leans on that difference +// deliberately and heavily: the node layer is a deep class hierarchy in which +// `BaseNode` needs `schemaBridge`'s layout builder as a VALUE while `schemaBridge` +// and fifteen `Prop*` atoms need `BaseNode` only as a TYPE. Written the other way +// round, `class PropName extends ...` would evaluate against a half-initialised +// module and throw at load — a total failure, not a subtle one. A graph walker that +// cannot see the `type` keyword reports a dozen cycles here that do not exist, so +// this one is built around it. +import { readdirSync, readFileSync, statSync } from 'node:fs'; +import { dirname, join, relative, resolve, sep } from 'node:path'; + +export interface ModuleEdge { + /** Importing file, tree-relative, `/`-separated. */ + from: string; + /** The specifier exactly as written. */ + specifier: string; + /** Tree-relative path the specifier resolves to, or null when it leaves the tree. */ + to: string | null; + /** True when tsc erases this edge: `import type`/`export type`. */ + typeOnly: boolean; + /** 1-based line of the statement, so a failure names a place to look. */ + line: number; +} + +export interface ModuleGraph { + /** Every `.ts` file under the root, tree-relative. */ + files: string[]; + edges: ModuleEdge[]; +} + +// Comments have to go before anything is matched. This package's comments explain +// rules by QUOTING code, `export { a } from './b.js'` included, so a walker that reads +// raw text invents edges that no build ever sees. Blanking rather than deleting keeps +// every line number pointing at the real line. +export function blankCommentsAndKeepLines(src: string): string { + const out = src.split(''); + let mode: 'code' | 'line' | 'block' | "'" | '"' | '`' = 'code'; + for (let i = 0; i < src.length; ) { + const c = src[i]; + const d = src[i + 1]; + if (mode === 'code') { + // `\/\/` inside a regex literal is not a comment. Tracking regex literals + // properly needs a parser; refusing an escaped slash costs nothing and is the + // only way this misfires in practice. + if (c === '/' && d === '/' && src[i - 1] !== '\\') { + mode = 'line'; + out[i] = out[i + 1] = ' '; + i += 2; + continue; + } + if (c === '/' && d === '*') { + mode = 'block'; + out[i] = out[i + 1] = ' '; + i += 2; + continue; + } + if (c === "'" || c === '"' || c === '`') mode = c; + i += 1; + continue; + } + if (mode === 'line') { + if (c === '\n') mode = 'code'; + else out[i] = ' '; + i += 1; + continue; + } + if (mode === 'block') { + if (c === '*' && d === '/') { + out[i] = out[i + 1] = ' '; + mode = 'code'; + i += 2; + continue; + } + if (c !== '\n') out[i] = ' '; + i += 1; + continue; + } + // Inside a string literal: only the matching quote closes it, and a backslash + // escapes whatever follows (including that quote). + if (c === '\\') { + i += 2; + continue; + } + if (c === mode) mode = 'code'; + i += 1; + } + return out.join(''); +} + +// An import/export statement, cut at the first `;`. The cut is what makes this safe +// without a parser: a clause can span lines but never contains a semicolon, so a +// statement can never absorb the one after it and misattribute its specifier. +const STATEMENT = /(^|\n)[ \t]*(?:import|export)\b[^;]*;/g; +// A module specifier is only a specifier when a `from` introduces it, or when the whole +// statement is a bare side-effect `import`. Matching any trailing string literal instead +// reads `export default class PropName { static key = 'Name'` — cut at its first `;` — +// as an import of a package called `Name`, and then every "is this dependency declared" +// answer is noise. +const FROM_IMPORT = /^(?:import|export)\b([\s\S]*?)\bfrom\s*(['"])([^'"]+)\2\s*$/; +const BARE_IMPORT = /^import\s*(['"])([^'"]+)\1\s*$/; + +function toPosix(p: string): string { + return sep === '/' ? p : p.split(sep).join('/'); +} + +/** Every `.ts` file under `root`, excluding declaration files, tree-relative. */ +export function sourceFiles(root: string): string[] { + const found: string[] = []; + const walk = (dir: string): void => { + for (const entry of readdirSync(dir).sort()) { + const full = join(dir, entry); + if (statSync(full).isDirectory()) walk(full); + else if (entry.endsWith('.ts') && !entry.endsWith('.d.ts')) found.push(toPosix(relative(root, full))); + } + }; + walk(root); + return found; +} + +export function readModuleGraph(root: string): ModuleGraph { + const files = sourceFiles(root); + const known = new Set(files); + const edges: ModuleEdge[] = []; + + for (const file of files) { + const abs = join(root, file); + const text = blankCommentsAndKeepLines(readFileSync(abs, 'utf8')); + STATEMENT.lastIndex = 0; + for (const match of text.matchAll(STATEMENT)) { + const statement = match[0].trim().replace(/;$/, ''); + const withFrom = FROM_IMPORT.exec(statement); + const bare = withFrom ? null : BARE_IMPORT.exec(statement); + if (!withFrom && !bare) continue; + const specifier = withFrom ? withFrom[3] : bare![2]; + // `type` LEADING the clause erases the whole statement. `import { type A, b }` + // does not — `b` is a value, so the module is still loaded at runtime. A bare + // side-effect import is always a runtime edge; that is all it is for. + const typeOnly = withFrom !== null && /^type\b/.test(withFrom[1].trim()); + let to: string | null = null; + if (specifier.startsWith('.')) { + // TS writes `.js` in the specifier and means the `.ts` beside it. + const base = toPosix(relative(root, resolve(dirname(abs), specifier))).replace(/\.js$/, ''); + to = [`${base}.ts`, `${base}/index.ts`].find((candidate) => known.has(candidate)) ?? null; + } + const line = text.slice(0, match.index).split('\n').length + (match[1] === '\n' ? 1 : 0); + edges.push({ from: file, specifier, to, typeOnly, line }); + } + } + return { files, edges }; +} + +/** Edges that survive compilation and stay inside the tree. */ +export function runtimeEdges(graph: ModuleGraph): Array { + return graph.edges.filter((e): e is ModuleEdge & { to: string } => !e.typeOnly && e.to !== null); +} + +/** + * Every distinct cycle in the runtime graph, each as the list of files in it. A cycle + * here is a load-order hazard, not a style problem: whichever module the bundler + * evaluates first sees the other's bindings uninitialised. + */ +export function runtimeCycles(graph: ModuleGraph): string[][] { + const out = new Map(); + for (const e of runtimeEdges(graph)) { + const list = out.get(e.from) ?? []; + list.push(e.to); + out.set(e.from, list); + } + const cycles = new Map(); + const state = new Map(); + const stack: string[] = []; + const visit = (node: string): void => { + state.set(node, 1); + stack.push(node); + for (const next of out.get(node) ?? []) { + if (state.get(next) === 1) { + const cycle = stack.slice(stack.indexOf(next)); + cycles.set([...cycle].sort().join('|'), cycle); + } else if (!state.has(next)) visit(next); + } + stack.pop(); + state.set(node, 2); + }; + for (const file of graph.files) if (!state.has(file)) visit(file); + return [...cycles.values()]; +} + +/** `path/to/file.ts:12` for every edge, so an assertion failure is actionable. */ +export function describeEdges(edges: ModuleEdge[]): string[] { + return edges.map((e) => `${e.from}:${e.line} -> ${e.specifier}`); +} diff --git a/test/typedShapes.test.ts b/test/typedShapes.test.ts index e8be3ab..917aefe 100644 --- a/test/typedShapes.test.ts +++ b/test/typedShapes.test.ts @@ -34,7 +34,7 @@ import { describe, it, expect } from 'vitest'; import { readFileSync } from 'node:fs'; import { fileURLToPath } from 'node:url'; import { loadFile, findEntry } from './parity/loadFile.js'; -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; const RAW: { name: string; value: unknown }[] = JSON.parse( readFileSync(fileURLToPath(new URL('./fixtures/typed_text.sldd', import.meta.url)), 'utf8'), diff --git a/test/usageIndex.test.ts b/test/usageIndex.test.ts index 4bf590d..99fcf90 100644 --- a/test/usageIndex.test.ts +++ b/test/usageIndex.test.ts @@ -22,7 +22,7 @@ import { describe, it, expect } from 'vitest'; import { readFileSync } from 'node:fs'; import { fileURLToPath } from 'node:url'; -import { strToU8, zipSync } from 'fflate'; +import { strToU8, unzipSync, zipSync } from 'fflate'; import { buildUsageIndex, summarizeFiles, resolveName } from '../src/index.js'; import type { UsageFile, ModelSummary, DataSummary } from '../src/index.js'; @@ -81,11 +81,20 @@ function slxModel(opts: { return zipped.buffer.slice(zipped.byteOffset, zipped.byteOffset + zipped.byteLength) as ArrayBuffer; } +// Any JSON object, as the bytes of a textual `.sldd`. A textual dictionary has no parser +// between the bytes and the reader — `readSlddContent` is `JSON.parse` and nothing else — +// so a file that is valid JSON and short of the shape a dictionary has is expressible +// only this way, and it is a shape a partial write really produces. +function jsonBytes(json: unknown): ArrayBuffer { + const u8 = strToU8(JSON.stringify(json)); + return u8.buffer.slice(u8.byteOffset, u8.byteOffset + u8.byteLength) as ArrayBuffer; +} + // A textual `.sldd` defining `names` and referencing `refs`. The summariser reads only an // entry's `name` and the reference list, so this is the whole of what a dictionary is from // here — and building it by hand is what makes a chain of four dictionaries expressible. function slddBytes(names: string[], refs: unknown[] = []): ArrayBuffer { - const json = { + return jsonBytes({ __MW_TEXT_PARTS__: { '__MW_TEXT_PART__/data/chunk0': { __MW_TEXT_content: { @@ -95,9 +104,39 @@ function slddBytes(names: string[], refs: unknown[] = []): ArrayBuffer { }, }, }, - }; - const u8 = strToU8(JSON.stringify(json)); - return u8.buffer.slice(u8.byteOffset, u8.byteOffset + u8.byteLength) as ArrayBuffer; + }); +} + +// The one data part of a compressed-binary `.sldd`, and two entries for it: one the file +// names and one it does not. +const CHUNK_PART = 'data/chunk0.xml'; + +const NAMED_ENTRY = + ' \n' + + '

aParam

\n' + + '

42

\n' + + '
'; + +const UNNAMED_ENTRY = + ' \n' + + '

1

\n' + + '
'; + +/** + * A real compressed `.sldd`, unzipped, its data part replaced, rezipped — the technique + * parseWarnings.test.ts uses, and for the same reason: the bytes under test then differ + * from a file MATLAB wrote in exactly the one way the test is about, and the entries come + * back through the REAL binary reader rather than out of a literal written here. + */ +function binarySlddWithChunk(body: string): ArrayBuffer { + const entries = unzipSync(new Uint8Array(fixtureBytes('compressed.sldd'))); + expect(Object.keys(entries)).toContain(CHUNK_PART); // the fixture really holds it + entries[CHUNK_PART] = strToU8( + '\n' + + `\n${body}\n`, + ); + const zipped = zipSync(entries); + return zipped.buffer.slice(zipped.byteOffset, zipped.byteOffset + zipped.byteLength) as ArrayBuffer; } const file = (name: string, bytes: ArrayBuffer, srcId = name): UsageFile => ({ srcId, filename: name, bytes }); @@ -156,6 +195,23 @@ describe('summarizeFiles — one summary per file, dispatched on the filename', expect(matByName.has('numeric.mat')).toBe(true); }); + it('keeps a dictionary and a MAT-file that share a STEM, because they are two files', () => { + // `params.sldd` and `params.mat` sit side by side in real projects — a dictionary and the + // MAT-file a model workspace loads — and a model may reference both. Every key in both + // maps, and every lookup against them, is a basename WITH its extension, so the two are + // separate entries that never contend: nothing here needs to choose a winner per stem. + // Keying on the stem instead would make the second file read seem to replace the first, + // and the loser's definitions would report as used by nothing. + // The MAT-file FIRST and the dictionary second, deliberately: that is the order in which + // a per-stem eviction would take the MAT-file's summary back out again. + const { slddByName, matByName } = summarizeFiles([ + file('params.mat', fixtureBytes('mcos/Numeric.mat')), + file('params.sldd', slddBytes(['Kp'])), + ]); + expect([...(slddByName.get('params.sldd')?.names ?? [])]).toEqual(['Kp']); + expect([...(matByName.get('params.mat')?.names ?? [])]).toEqual(['Numeric']); + }); + it('accepts a full path as the filename, and an opaque srcId beside it', () => { // A host's srcId is its own key — a URI, a document handle — and is never parsed. The // FILENAME is what decides the kind, which is why they are separate fields. @@ -184,6 +240,42 @@ describe('summarizeFiles — one summary per file, dispatched on the filename', expect([...slddByName.keys()]).toEqual(['params.sldd']); }); + it('summarises a dictionary with no content part as one that DEFINES nothing', () => { + // Not the corrupt case above: this file opens. A textual `.sldd` is handed to + // JSON.parse and passed straight through, so valid JSON that is not a dictionary is a + // dictionary with no content part — the shape a partial write leaves, and the one + // SlddNode reports as `source-empty` (parseWarnings.test.ts hands it the same content + // object). The summary has to reach the same conclusion: it defines nothing, and + // it is STILL IN THE MAP. A throw here would be swallowed by the per-file catch and + // the dictionary would be absent altogether, which is how a caller tells "indexed, + // defines nothing" from "never indexed" — the second sends a host looking for a file + // it already handed over. + const { slddByName } = summarizeFiles([ + file('notes.sldd', jsonBytes({ hello: 'not a dictionary' })), + file('params.sldd', slddBytes(['Kp'])), + ]); + expect(slddByName.has('notes.sldd')).toBe(true); + expect([...(slddByName.get('notes.sldd')?.names ?? [])]).toEqual([]); + expect(slddByName.get('notes.sldd')?.slddRefs).toEqual([]); + // And the dictionary beside it still answers, which is the folder-scan policy again. + expect([...(slddByName.get('params.sldd')?.names ?? [])]).toEqual(['Kp']); + }); + + it('leaves an entry the bytes never named out of the summary', () => { + // Real bytes through the real binary reader: a `DD.ENTRY` with no `

` + // reads back with an EMPTY name — the reader's default, and not a loss it warns about, + // both pinned by parseWarnings.test.ts — and an empty name is not a name a block + // parameter can refer to. So it is not a definition, and it is not in the summary — + // the same rule matSummary applies to the MAT-file's unnamed variable in the first + // test in this file, spelled in a second place. Admitting it puts a nameless + // definition in a published summary, which a host draws as a blank row that links + // nowhere. + const { slddByName } = summarizeFiles([ + file('edited.sldd', binarySlddWithChunk(`${NAMED_ENTRY}\n${UNNAMED_ENTRY}`)), + ]); + expect([...(slddByName.get('edited.sldd')?.names ?? [])]).toEqual(['aParam']); + }); + it('ignores a file of no interest rather than failing on it', () => { // A caller handing over a whole folder listing is the ordinary case. const { models, slddByName, matByName } = summarizeFiles([ @@ -392,6 +484,50 @@ describe('buildUsageIndex — the reverse direction, which fills a Usage cell', expect(index.usagesOf('mid.sldd', 'deep')).toEqual([]); }); + it('follows the chain through a dictionary whose content part carries no entries list', () => { + // The content part is THERE — so this is not the "no content part" case — and its + // `entries` key is not, which is what a partial write of that one part leaves behind. + // The reference list beside it is still read, so a dictionary that has lost its own + // entries still passes the INHERITANCE through to the file that defines the name. + // Reading the absent list instead throws, the per-file catch drops `mid.sldd` + // entirely, and the chain through it breaks: `deep` then reads as used by nothing, + // which is a user deleting a parameter that a block does read. + const index = buildUsageIndex([ + file('m.slx', slxModel({ dictionary: 'mid.sldd', blocks: block('G', 'Gain', 'Gain', 'deep') })), + file( + 'mid.sldd', + jsonBytes({ + __MW_TEXT_PARTS__: { + '__MW_TEXT_PART__/data/chunk0': { __MW_TEXT_content: { 'Dictionary References': ['leaf.sldd'] } }, + }, + }), + ), + file('leaf.sldd', slddBytes(['deep'])), + ]); + expect(index.usagesOf('leaf.sldd', 'deep').map((u) => u.blockName)).toEqual(['G']); + }); + + it('moves a usage DOWN the order when the file that shadowed it is not in the set', () => { + // The resolution order, and what depends on it, over two files that both define `Kp`: + // `m.slx` links `first.sldd` and lists `second.sldd` as an external, so the block + // reads the first one's value and only the first one collects the usage. A link on + // `second.sldd` would point at an entry whose value never reaches that block. + // + // Then the same model with the winner NOT handed over, which is an ordinary folder + // scan — the file is elsewhere, or the host has not read it. The usage moves down the + // order rather than vanishing: an entry that a block does read must not report as + // unused because a file that shadowed it was missing from the set. + const model = file( + 'm.slx', + slxModel({ dictionary: 'first.sldd', externals: ['second.sldd'], blocks: block('G', 'Gain', 'Gain', 'Kp') }), + ); + const both = buildUsageIndex([model, file('first.sldd', slddBytes(['Kp'])), file('second.sldd', slddBytes(['Kp']))]); + expect(both.usagesOf('first.sldd', 'Kp').map((u) => u.blockName)).toEqual(['G']); + expect(both.usagesOf('second.sldd', 'Kp')).toEqual([]); + const without = buildUsageIndex([model, file('second.sldd', slddBytes(['Kp']))]); + expect(without.usagesOf('second.sldd', 'Kp').map((u) => u.blockName)).toEqual(['G']); + }); + it('reads a reference in the object form as well as the bare-string form', () => { // Which form a dictionary uses is a property of its WRITER. A reader that took only // strings followed the chain of one flavour and reported the other as having no @@ -415,6 +551,33 @@ describe('buildUsageIndex — the reverse direction, which fills a Usage cell', expect(index.usagesOf('Numeric.mat', 'Numeric').map((u) => u.blockName)).toEqual(['G']); }); + it('resolves each name to the right file when a dictionary and a MAT-file share a stem', () => { + // Same-stem pair, both linked by one model, one block reading a name from each. The two + // are different files and resolve independently — the extension is part of every key and + // every lookup — so neither shadows the other and neither collects the other's usage. + // A cell that answered `params.mat` for a dictionary entry sends a user to edit the + // wrong file, and the block does not read the value they would change. + const index = buildUsageIndex([ + file( + 'm.slx', + slxModel({ + dictionary: 'params.sldd', + externals: ['params.mat'], + blocks: + block('Kpath', 'Gain', 'Gain', 'Kp', '1') + block('Npath', 'Gain', 'Gain', 'Numeric', '2'), + }), + ), + file('params.mat', fixtureBytes('mcos/Numeric.mat')), + file('params.sldd', slddBytes(['Kp'])), + ]); + expect(index.usagesOf('params.sldd', 'Kp').map((u) => u.blockName)).toEqual(['Kpath']); + expect(index.usagesOf('params.mat', 'Numeric').map((u) => u.blockName)).toEqual(['Npath']); + // And neither file answers for the other's name, which is what "resolve independently" + // costs if the pair is ever collapsed to one entry per stem. + expect(index.usagesOf('params.mat', 'Kp')).toEqual([]); + expect(index.usagesOf('params.sldd', 'Numeric')).toEqual([]); + }); + it('resolves an external dictionary listed in the settings part', () => { const index = buildUsageIndex([ file('m.slx', slxModel({ externals: ['extra.sldd'], blocks: block('G', 'Gain', 'Gain', 'Kx') })), diff --git a/test/valuePropColumns.test.ts b/test/valuePropColumns.test.ts index e5b6d96..ceb5b52 100644 --- a/test/valuePropColumns.test.ts +++ b/test/valuePropColumns.test.ts @@ -8,7 +8,7 @@ import { describe, it, expect } from 'vitest'; import ParameterNode from '../src/datamodel/node/data/ParameterNode.js'; import SignalNode from '../src/datamodel/node/data/SignalNode.js'; -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; // An editable generic cell is the object shape { text, editable, editor }; a // skipped/absent column is simply not a key on the row. diff --git a/test/variantControlNode.test.ts b/test/variantControlNode.test.ts index dd7cde3..8394239 100644 --- a/test/variantControlNode.test.ts +++ b/test/variantControlNode.test.ts @@ -9,7 +9,7 @@ import { describe, it, expect } from 'vitest'; import VariantControlNode from '../src/datamodel/node/data/VariantControlNode.js'; -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; function wrap(props: Record = {}) { return { diff --git a/test/variantLeafNodes.test.ts b/test/variantLeafNodes.test.ts index c64d02b..c2b1d2c 100644 --- a/test/variantLeafNodes.test.ts +++ b/test/variantLeafNodes.test.ts @@ -9,7 +9,7 @@ // the per-class differences get their own cases. import { describe, it, expect } from 'vitest'; -import '../src/datamodel/node/NodeClassMap.js'; +import '../src/datamodel/node/data/NodeClassMap.js'; import VariantBankNode from '../src/datamodel/node/data/VariantBankNode.js'; import VariantBankCoderInfoNode from '../src/datamodel/node/data/VariantBankCoderInfoNode.js'; import VariantExpressionNode from '../src/datamodel/node/data/VariantExpressionNode.js';