{"_id":"@ai-path/lattica-data","_rev":"4-8f2325e5036c533821bc270af3cedd56","name":"@ai-path/lattica-data","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@ai-path/lattica-data","version":"0.1.0","license":"MIT","_id":"@ai-path/lattica-data@0.1.0","maintainers":[{"name":"fsakurai","email":"f-sakurai@ai-path.jp"}],"dist":{"shasum":"5cadf5147797f5d7b7543213d90922f58ca8b18b","tarball":"https://registry.npmjs.org/@ai-path/lattica-data/-/lattica-data-0.1.0.tgz","fileCount":8,"integrity":"sha512-3M0ce4Nd7xYxmlgYWJs+dJbkxKnoa6rwJcI17MayBeknJwOWTUahdOtYi/wbRWx1heset9aErrYVB+pjvgp+Zg==","signatures":[{"sig":"MEQCIBOf/SqCQYgsZnTvBLMzNtZLU1GjMCkpC7PzbULr5D7eAiAN4TsmXST66Rqk7DeYHT10xk4gNqwzFpP+EeYhf4m7oQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":240642},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"2e14dee9aa41d49bc8899cc2091f182e6f3dd349","scripts":{"build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"fsakurai","email":"f-sakurai@ai-path.jp"},"_npmVersion":"10.9.3","description":"Index mapping (physical<->visual) and data-source binding for Lattica: the foundation for hiding, moving, sorting, filtering, trimming, and grouping.","directories":{},"sideEffects":false,"_nodeVersion":"22.18.0","dependencies":{"@ai-path/lattica-core":"workspace:*"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/lattica-data_0.1.0_1783152242770_0.5600613253546962","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Renamed to @ai-path/tb-data (product: Taible). Install @ai-path/tb-data instead."},"0.1.1":{"name":"@ai-path/lattica-data","version":"0.1.1","license":"MIT","_id":"@ai-path/lattica-data@0.1.1","maintainers":[{"name":"fsakurai","email":"f-sakurai@ai-path.jp"}],"dist":{"shasum":"9ff20555cc5b7b31055c18c1c1a22099512fb820","tarball":"https://registry.npmjs.org/@ai-path/lattica-data/-/lattica-data-0.1.1.tgz","fileCount":9,"integrity":"sha512-U9MHTM+5KPIHnj/qUtQN85DpK5IL1NaUc1KSkQP9E2VUGMLmmGDm99a1pyC2csARiMPzG7UGR8LjyMcYQc4xuw==","signatures":[{"sig":"MEYCIQDuwqBFQymfdB3JbUnWTA2NE/AK67dY5hzlr36IJfqEvgIhAMeL715c9UMuIfk8yp+uNA7zxXe8clscbAViZJQrJimJ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":241774},"main":"./dist/index.cjs","type":"module","_from":"file:/tmp/lattica-publish/ai-path-lattica-data-0.1.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"fsakurai","email":"f-sakurai@ai-path.jp"},"_resolved":"/tmp/lattica-publish/ai-path-lattica-data-0.1.1.tgz","_integrity":"sha512-U9MHTM+5KPIHnj/qUtQN85DpK5IL1NaUc1KSkQP9E2VUGMLmmGDm99a1pyC2csARiMPzG7UGR8LjyMcYQc4xuw==","_npmVersion":"10.9.3","description":"Index mapping (physical<->visual) and data-source binding for Lattica: the foundation for hiding, moving, sorting, filtering, trimming, and grouping.","directories":{},"sideEffects":false,"_nodeVersion":"22.18.0","dependencies":{"@ai-path/lattica-core":"0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/lattica-data_0.1.1_1783159893037_0.5788798635057155","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Renamed to @ai-path/tb-data (product: Taible). Install @ai-path/tb-data instead."},"0.1.2":{"name":"@ai-path/lattica-data","version":"0.1.2","license":"MIT","_id":"@ai-path/lattica-data@0.1.2","maintainers":[{"name":"fsakurai","email":"f-sakurai@ai-path.jp"}],"dist":{"shasum":"1331a784761956e87e1509797328ed97c1539e95","tarball":"https://registry.npmjs.org/@ai-path/lattica-data/-/lattica-data-0.1.2.tgz","fileCount":9,"integrity":"sha512-xmRdWl3vEY+VxHrEINGgW6fD5VxqlnL0B5CLqr/CMr6NTFi0dN2qx7ae/FDEpIxsNRyF5WCucj0r10mLsi51TQ==","signatures":[{"sig":"MEUCIE1xv/Qpi8+FapPLhF9R8BBQOHA1nhx1uMP+IdRwvFJLAiEAtQc6nLJzzY2L93KjFeT9phhqTq7Y8ptb6Q0EUvnnB28=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":243816},"main":"./dist/index.cjs","type":"module","_from":"file:ai-path-lattica-data-0.1.2.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"fsakurai","email":"f-sakurai@ai-path.jp"},"_resolved":"/private/var/folders/tf/0c43660d4k1dg4ssxq0n63ww0000gn/T/4235fa7790cf19bc59fd88a8a1fae4e9/ai-path-lattica-data-0.1.2.tgz","_integrity":"sha512-xmRdWl3vEY+VxHrEINGgW6fD5VxqlnL0B5CLqr/CMr6NTFi0dN2qx7ae/FDEpIxsNRyF5WCucj0r10mLsi51TQ==","_npmVersion":"10.9.3","description":"Index mapping (physical<->visual) and data-source binding for Lattica: the foundation for hiding, moving, sorting, filtering, trimming, and grouping.","directories":{},"sideEffects":false,"_nodeVersion":"22.18.0","dependencies":{"@ai-path/lattica-core":"0.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/lattica-data_0.1.2_1783177106799_0.2936939678215529","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Renamed to @ai-path/tb-data (product: Taible). Install @ai-path/tb-data instead."}},"time":{"created":"2026-07-04T08:04:02.623Z","modified":"2026-07-04T16:08:44.581Z","0.1.0":"2026-07-04T08:04:02.933Z","0.1.1":"2026-07-04T10:11:33.198Z","0.1.2":"2026-07-04T14:58:26.961Z"},"license":"MIT","description":"Index mapping (physical<->visual) and data-source binding for Lattica: the foundation for hiding, moving, sorting, filtering, trimming, and grouping.","maintainers":[{"name":"fsakurai","email":"f-sakurai@ai-path.jp"}],"readme":"# @ai-path/lattica-data\n\nIndex-mapping and data-source binding for Lattica. This package decouples the\n*physical* order of rows/columns (how data is stored) from the *visual* order\n(how it is displayed) so that sorting, filtering, and nested-row grouping can be\napplied as a view transform without mutating the underlying data. The\n`DataView` ties an `IndexMapper` together for both axes; `SortModel` and\n`FilterModel` are the pure models that drive it.\n\n## Install\n\n```sh\npnpm add @ai-path/lattica-data\n```\n\n## API overview\n\n### DataView & IndexMapper\n\n`DataView` maps between visual and physical indices on both axes.\n\n```ts\nimport { DataView } from '@ai-path/lattica-data';\n\nconst view = new DataView(100, 10); // rowCount, colCount\nview.cols.getPhysicalIndex(0);      // physical column behind visual column 0\nview.rows.getPhysicalIndex(5);      // physical row behind visual row 5\n```\n\n### Sorting\n\n`SortModel` holds an ordered list of `SortConfig`s (each `{ col, direction }`);\n`sortPhysicalOrder` produces the resulting physical order. `defaultComparator`\nsorts numbers numerically and everything else lexicographically.\n\n```ts\nimport { SortModel, sortPhysicalOrder, type SortDirection } from '@ai-path/lattica-data';\n\nconst sort = new SortModel();\nsort.toggle(2);        // cycle column 2: asc -> desc -> cleared\nsort.toggle(0, true);  // additive: add column 0 as a secondary sort key\nconst configs = sort.getConfigs();\n```\n\n### Filtering\n\nA `ColumnFilter` targets one column with one or more `FilterCondition`s combined\nby a conjunction (default `'and'`). `matchesCondition` is the pure predicate;\n`filteredHiddenRows` computes which physical rows are hidden.\n\n```ts\nimport { FilterModel, matchesCondition, type FilterCondition } from '@ai-path/lattica-data';\n\nconst filter = new FilterModel();\nconst conditions: FilterCondition[] = [\n  { kind: 'gte', value: 18 },\n  { kind: 'lt', value: 65 },\n];\nfilter.set({ col: 3, conditions, conjunction: 'and' });\n\nmatchesCondition(42, { kind: 'between', min: 0, max: 100 }); // true\n```\n\nCondition kinds include `equals`, `notEquals`, `contains`, `notContains`,\n`gt`/`gte`/`lt`/`lte`, `between`, `empty`/`notEmpty`, and `in`.\n\n### Nested rows\n\n`NestedRowModel` (with `NestedRowNode`) models hierarchical, collapsible row\ntrees for grouped/outline views.\n","readmeFilename":"README.md"}