{"_id":"@botfather/units-ui-ir","name":"@botfather/units-ui-ir","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.1":{"name":"@botfather/units-ui-ir","version":"0.1.1","description":"Host-agnostic UiNode IR schema and normalization adapters for Units pipelines.","license":"MIT","type":"module","repository":{"type":"git","url":"git+https://github.com/Botfather/units.git","directory":"packages/units-ui-ir"},"homepage":"https://github.com/Botfather/units/tree/main/packages/units-ui-ir","bugs":{"url":"https://github.com/Botfather/units/issues"},"main":"./index.js","types":"./index.d.ts","publishConfig":{"access":"public"},"_id":"@botfather/units-ui-ir@0.1.1","_integrity":"sha512-bpPIRuEvbwPLVnbYABrYrg+2l7NPlAZaIxNi9Ca9bevss4wMpMWIsiVvHJ+pmew+0hQCBVWD61Th4Q9jYuLcxQ==","_resolved":"/tmp/fedeed79f25c3771833708e60c30b025/botfather-units-ui-ir-0.1.1.tgz","_from":"file:botfather-units-ui-ir-0.1.1.tgz","_nodeVersion":"22.14.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-bpPIRuEvbwPLVnbYABrYrg+2l7NPlAZaIxNi9Ca9bevss4wMpMWIsiVvHJ+pmew+0hQCBVWD61Th4Q9jYuLcxQ==","shasum":"adc35416945f6e6f183b867b0d60f67da6e21c18","tarball":"https://registry.npmjs.org/@botfather/units-ui-ir/-/units-ui-ir-0.1.1.tgz","fileCount":5,"unpackedSize":30586,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@botfather%2funits-ui-ir@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDQPLm8hdY5JrCNP/osaiBsdmMaM0vOjKQnNkm0ZUaZQAIhAJscP9fw9+j4BTFcZgHoAnx3B1s1xAOYxWRgpFPRRu3y"}]},"_npmUser":{"name":"botfather","email":"mohan.tushar.11@gmail.com"},"directories":{},"maintainers":[{"name":"botfather","email":"mohan.tushar.11@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/units-ui-ir_0.1.1_1782196782515_0.21863872078799096"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-23T06:39:42.372Z","0.1.1":"2026-06-23T06:39:42.636Z","modified":"2026-06-23T06:39:42.988Z"},"maintainers":[{"name":"botfather","email":"mohan.tushar.11@gmail.com"}],"description":"Host-agnostic UiNode IR schema and normalization adapters for Units pipelines.","homepage":"https://github.com/Botfather/units/tree/main/packages/units-ui-ir","repository":{"type":"git","url":"git+https://github.com/Botfather/units.git","directory":"packages/units-ui-ir"},"bugs":{"url":"https://github.com/Botfather/units/issues"},"license":"MIT","readme":"# @botfather/units-ui-ir\n\nHost-agnostic UiNode IR schema and normalization adapters for Units transform/compiler pipelines.\n\n## Install\n\n```sh\nnpm install @botfather/units-ui-ir\n```\n\n## Usage\n\n```js\nimport {\n  normalizeDomUiTree,\n  normalizeA11yUiTree,\n  normalizeSlackBlockKitTree,\n  normalizeUiNode,\n  serializeCompactUiTree,\n} from \"@botfather/units-ui-ir\";\n\nconst domIr = normalizeDomUiTree(domSnapshot);\nconst a11yIr = normalizeA11yUiTree(axTree);\nconst slackIr = normalizeSlackBlockKitTree(blockKitPayload);\nconst ir = normalizeUiNode(rawIrLikeTree);\n\nconst compact = serializeCompactUiTree(ir, {\n  includeIds: false,\n});\n```\n\nSlack Block Kit payloads may be passed as a full message (`{ blocks: [...] }`), a `blocks` array, a single block, a Slack text object, or a raw `mrkdwn` string. `mrkdwn` text is normalized into IR roles for styles, links, mentions, channels, user groups, special mentions, dates, quotes, and code spans.\n\nFor token efficiency, compact serialization deduplicates redundant `name`/`text` pairs, omits role-implicit actions (for example `button -> click`), drops empty text leaf nodes, and omits text-node ids by default. Set `includeRedundantNameText: true`, `includeImplicitActions: true`, and/or `includeTextIds: true` to preserve extra fields when needed.\n\n## Exports\n\n- `inferRoleFromTag(tagName, explicitRole?)`\n- `normalizeUiNode(node, defaults?)`\n- `normalizeDomUiTree(input)`\n- `normalizeA11yUiTree(input)`\n- `normalizeSlackBlockKitTree(input, options?)`\n- `parseSlackMrkdwn(text, options?)`\n- `normalizeUiTree(input, sourceType?)`\n- `serializeCompactUiTree(uiTree, options?)`\n- Alias exports: `normalizeIrNode`, `normalizeDomTree`, `normalizeA11yTree`, `normalizeSlackTree`, `serializeAgentTree`\n","readmeFilename":"README.md","_rev":"1-157796fa439aba52a0c0625aac12e9d6"}