@xyd-js/plugin-xspec 0.0.0-build-83b15db-20251213220910

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ import { Plugin } from '@xyd-js/plugins';
2
+ export { S as XSpecBoxProps, a as XSpecHeaderProps, N as XSpecNavItemType, P as XSpecProductionItem, b as XSpecSectionProps } from './types-CqkxD8ad.js';
3
+ import 'react';
4
+
5
+ declare function XspecPlugin(): Plugin;
6
+
7
+ export { XspecPlugin as default };
package/dist/index.js ADDED
@@ -0,0 +1,230 @@
1
+ import React from "react";
2
+ // src/index.ts
3
+ import { remarkDefinitionList, defListHastHandlers } from "remark-definition-list";
4
+
5
+ // src/styles/index.css
6
+ var styles_default = 'xyd-layout-primary {\n @media (min-width: 1024px) {\n &:not([data-layout="page"]):not([data-layout="wide"]):has(.xspec) {\n [part=page-article] {\n --xyd-layout-width-small: 900px;\n }\n }\n }\n}\n\n@media (prefers-color-scheme: light) {\n .xspec {\n --color-foreground: #333333;\n --color-background: #var(--white);\n\n --color-light-grey: #ccc;\n --color-grey: #666666;\n --color-white: #var(--white);\n --color-link: #3b5998;\n\n --color-subsection-link: var(--color-foreground);\n --color-toc-link: var(--color-foreground);\n --color-toc-id: var(--color-link);\n --color-toggle-border: #bbc;\n\n --color-sidebar-background: #f0f0f0;\n --color-sidebar-viewing-link: #8b9;\n --color-sidebar-toggle-button: rgba(0, 0, 0, 0.7);\n --color-sidebar-shadow-inset: rgba(0, 0, 0, 0.05);\n --color-sidebar-shadow: rgba(0, 0, 0, 0.04);\n --color-sidebar-large-shadow: rgba(0, 0, 0, 0.08);\n\n --color-pre-background: #fafafa;\n --color-pre-border: #e9e9e9;\n --color-code-background: rgba(0, 0, 0, 0.03);\n\n --color-spec-todo: var(--color-grey);\n --color-spec-example: #fafaff;\n --color-spec-example-border: #bbbbff;\n --color-spec-counter-example: #var(--white)afa;\n --color-spec-counter-border: #ffbbbb;\n --color-spec-counter-example-link: #98593b;\n --color-spec-added-border: #396;\n --color-spec-removed-border: #933;\n --color-spec-prose: var(--color-grey);\n --color-spec-quantifier-list: var(--color-link);\n --color-spec-quantifier-optional: #83238e;\n --color-spec-condition: #1c7758;\n --color-spec-param: var(--color-grey);\n --color-spec-rx: var(--color-foreground);\n --color-spec-note-border: #f4e925;\n --color-spec-note-background: #fefef3;\n --color-spec-note-first-link: #6c6613;\n\n --color-source-link: var(--color-light-grey);\n\n --color-table-header: #f9f9f9;\n --color-table-header-border: #d0d0d0;\n\n --color-token-inserted: hsla(241, 71%, 34%, 0.69);\n --color-token-deleted: hsla(324, 92%, 33%, 0.74);\n\n --color-inserts-background: rgba(0, 200, 30, 0.08);\n --color-deletions-background: rgba(200, 0, 0, 0.08);\n\n --selection-background-color: #cacee0;\n --selection-background-color-link: #f0babe;\n }\n\n .xspec .selection-link:hover {\n --selection-background-color: #3b5998;\n }\n}\n\n@media (prefers-color-scheme: dark) {\n .xspec {\n --color-foreground: #b6b6b6;\n --color-background: #262626;\n\n --color-light-grey: #373737;\n --color-grey: #828282;\n --color-white: rgb(29, 29, 29);\n --color-link: #89b7da;\n\n --color-subsection-link: var(--color-foreground);\n --color-toc-link: var(--color-foreground);\n --color-toc-id: var(--color-link);\n --color-toggle-border: #bbc;\n\n --color-sidebar-background: #323232;\n --color-sidebar-viewing-link: #8b9;\n --color-sidebar-toggle-button: rgba(220, 220, 220, 0.7);\n --color-sidebar-shadow-inset: rgba(0, 0, 0, 0.05);\n --color-sidebar-shadow: rgba(0, 0, 0, 0.04);\n --color-sidebar-large-shadow: rgba(0, 0, 0, 0.08);\n\n --color-pre-background: #2e2e2e;\n --color-pre-border: #3a3a3a;\n --color-code-background: rgba(41, 41, 41, 0.03);\n\n --color-spec-todo: var(--color-grey);\n --color-spec-example: #2b2b35;\n --color-spec-example-border: #4d4d6d;\n --color-spec-counter-example: #322828;\n --color-spec-counter-border: #664040;\n --color-spec-counter-example-link: #ff702d;\n --color-spec-added-border: #396;\n --color-spec-removed-border: #933;\n --color-spec-prose: var(--color-grey);\n --color-spec-quantifier-list: var(--color-link);\n --color-spec-quantifier-optional: #c689ce;\n --color-spec-condition: #6fa889;\n --color-spec-param: var(--color-grey);\n --color-spec-rx: var(--color-foreground);\n --color-spec-note-border: #605e39;\n --color-spec-note-background: #303028;\n --color-spec-note-first-link: #f0e330;\n\n --color-source-link: var(--color-grey);\n\n --color-table-header: #373737;\n --color-table-header-border: #525252;\n\n --color-token-inserted: hsla(241, 63%, 70%, 0.69);\n --color-token-deleted: hsla(325, 64%, 67%, 0.74);\n\n --color-inserts-background: rgba(0, 200, 30, 0.08);\n --color-deletions-background: rgba(200, 0, 0, 0.08);\n\n --selection-background-color: #656565;\n --selection-background-color-link: #f0babe;\n }\n\n .xspec .selection-link:hover {\n --selection-background-color: #829edb;\n }\n}\n\n.xspec {\n color: var(--color-foreground);\n background-color: var(--color-background);\n font-family: var(--font-family);\n font-size: 15px;\n line-height: 1.5;\n \n --mono-font-size: 13px;\n --indent: 1rem;\n --list-indent: 1.5rem;\n --dfn-indent: 0rem;\n\n --font-family: Cambria, "Palatino Linotype", Palatino, "Liberation Serif",\n serif;\n --font-family-monospace: Consolas, Monaco, "Andale Mono", "Ubuntu Mono",\n monospace;\n\n border: 1px solid #6c575757;\n padding-inline: 50px;\n border-radius: 5px;\n border-color: var(--dark32);\n --dot-color: #6e6e6e88;\n --dot-size: 1px;\n --dot-step: 58px;\n --device-pixel-ratio: 2;\n --dot-stop: calc(var(--dot-size) - min(.5px, 1px / var(--device-pixel-ratio)));\n /* background: #f2f5fa; */\n background-size: var(--dot-step) var(--dot-step);\n background-position: calc(50% + var(--dot-step) / 2) 0;\n background-image: radial-gradient(var(--dot-step) circle, var(--dot-color) var(--dot-stop), transparent var(--dot-size));\n}\n\n@media (min-width: 720px) {\n .xspec {\n font-size: 17px;\n --mono-font-size: 15px;\n --indent: 2rem;\n --list-indent: 2rem;\n --dfn-indent: 2rem;\n }\n}\n\n.xspec body {\n margin: 3rem 0 3rem;\n}\n\n.xspec article {\n margin: 0 1rem;\n}\n\n/* @media (min-width: 720px) {\n body {\n margin: 6rem auto 3rem;\n max-width: 800px;\n padding-left: 75px;\n padding-right: clamp(0px, calc((100vw - 800px) * 0.25), 75px);\n }\n} */\n\n.xspec\n/* Source Links */\n\n.source-link {\n display: none;\n}\n\n@media screen and (min-width: 720px) {\n .source-link {\n display: block;\n position: absolute;\n width: 18px;\n fill: var(--color-source-link);\n opacity: 0.3;\n }\n\n .xspec .source-link:hover {\n opacity: 1;\n }\n}\n\n.xspec\n/* Selections */\n\n.outdated-selection-link,\n.xspec .selection-link {\n position: absolute;\n display: block;\n color: var(--color-white);\n background: var(--selection-background-color);\n border-radius: 4px;\n font-size: 36px;\n height: 23px;\n line-height: 48px;\n text-align: center;\n text-decoration: none;\n width: 25px;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n}\n\n.xspec .outdated-selection-link:hover,\n.xspec .selection-link:hover {\n text-decoration: none;\n}\n\n.xspec .outdated-selection-link:before,\n.xspec .selection-link:before {\n border: 5px solid transparent;\n content: "";\n height: 0;\n margin-top: -5px;\n margin-right: -5px;\n position: absolute;\n right: 1px;\n top: 50%;\n width: 0;\n}\n\n@media (max-width: 719px) {\n\n .outdated-selection-link:before,\n .selection-link:before {\n border-bottom-color: var(--selection-background-color);\n border-top: 0;\n right: 50%;\n top: 1px;\n }\n}\n\n@media (min-width: 720px) {\n\n .outdated-selection-link:before,\n .selection-link:before {\n border-left-color: var(--selection-background-color);\n border-right: 0;\n right: 1px;\n top: 50%;\n }\n}\n\n.xspec .outdated-selection-link {\n background: var(--selection-background-color-link);\n font-size: 21px;\n font-weight: 800;\n line-height: 27px;\n}\n\n.xspec .outdated-selection-link:hover:after {\n content: "This selection content has changed since this link was created.";\n font: 9pt/11pt var(--font-family);\n position: absolute;\n display: block;\n white-space: nowrap;\n padding: 2px 5px 1px;\n top: -20px;\n background: black;\n color: var(--color-white);\n}\n\n.xspec\n/* Links */\n\na {\n color: var(--color-link);\n text-decoration: none;\n}\n\n.xspec a:hover {\n text-decoration: underline;\n}\n\n.xspec\n/* Images */\n\nimg {\n max-width: 100%;\n}\n\n.xspec\n/* Definitions */\n\ndl {\n margin: 1rem 0 1rem var(--dfn-indent);\n}\n\n.xspec dd {\n margin: 0.25em 0 0.5em var(--indent);\n}\n\n.xspec dd+dd {\n margin-top: 1rem;\n}\n\n.xspec dfn,\n.xspec .spec-ref {\n font-style: italic;\n}\n\n.xspec dfn>a,\n.xspec .spec-ref>a {\n color: inherit;\n}\n\n.xspec\n/* Section headers */\n\nh1,\n.xspec h2,\n.xspec h3,\n.xspec h4,\n.xspec h5,\n.xspec h6 {\n font-weight: bold;\n margin: 3em 0 1em;\n position: relative;\n}\n\n@media (min-width: 720px) {\n header>h1 {\n margin: 6em 0 3em;\n }\n}\n\n.xspec h1 {\n font-size: 1.5em;\n margin-top: 5em;\n}\n\n.xspec h2,\n.xspec h3 {\n font-size: 1.25em;\n}\n\n.xspec h4,\n.xspec h5,\n.xspec h6 {\n font-size: 1em;\n}\n\n.xspec section {\n padding-top: 1rem;\n margin-top: -1rem;\n}\n\n.xspec section.subsec>h6 {\n margin-top: 2em;\n}\n\n.xspec section.subsec>h6>a {\n color: var(--color-subsection-link);\n}\n\n.xspec section .spec-secid {\n margin-right: 1ex;\n}\n\n@media (min-width: 720px) {\n section .spec-secid {\n position: absolute;\n right: 100%;\n text-align: right;\n white-space: nowrap;\n }\n}\n\n.xspec footer {\n font-size: 75%;\n opacity: 0.5;\n text-align: center;\n margin-top: 12rem;\n}\n\n.xspec\n/* Table of contents */\n\n.spec-toc {\n margin: 1rem 0 3rem;\n}\n\n.xspec .spec-toc .title {\n content: "Contents";\n display: block;\n font-weight: bold;\n margin: 5em 0 1em;\n}\n\n.xspec .spec-toc .spec-secid {\n margin-right: 1ex;\n}\n\n.xspec .spec-toc ol {\n list-style: none;\n padding-left: 0;\n margin-top: 0;\n margin-bottom: 0;\n}\n\n.xspec .spec-toc ol ol {\n list-style: none;\n padding-left: 2ex;\n margin-bottom: 0.25em;\n}\n\n.xspec .spec-toc li {\n position: relative;\n padding: 5px 0 0 30px;\n margin: -5px 0 0 -30px;\n}\n\n.xspec .spec-toc a {\n color: var(--color-toc-link);\n}\n\n.xspec .spec-toc a:hover {\n text-decoration: none;\n}\n\n.xspec .spec-toc a .spec-secid {\n color: var(--color-toc-id);\n}\n\n.xspec .spec-toc a:hover .spec-secid {\n text-decoration: underline;\n}\n\n.xspec .spec-toc .toggle {\n display: none;\n}\n\n.xspec .spec-toc .toggle+label {\n cursor: pointer;\n left: 6px;\n opacity: 1;\n padding: 5px 6px 5px 7px;\n position: absolute;\n top: 6px;\n transform: rotate(0deg);\n transition: all 0.18s ease-in-out;\n}\n\n.xspec .spec-toc .toggle+label:after {\n border-color: transparent transparent transparent var(--color-toggle-border);\n border-style: solid;\n border-width: 6px 0 6px 7px;\n content: " ";\n display: block;\n height: 0;\n width: 0;\n}\n\n@media (pointer: fine) {\n .spec-toc .toggle+label {\n left: 10px;\n padding: 3px 5px 3px 6px;\n top: 8px;\n }\n}\n\n.xspec .spec-toc .toggle:checked+label {\n transform: rotate(90deg);\n}\n\n@media (hover: hover) {\n .spec-toc li:not(:hover)>.toggle:checked+label {\n opacity: 0;\n }\n}\n\n.xspec .spec-toc .toggle:not(:checked)~ol {\n max-height: 0;\n overflow: hidden;\n margin: 0;\n}\n\n.xspec\n/* Sidebar */\n\n.spec-sidebar-toggle {\n display: none;\n}\n\n.xspec .spec-sidebar-toggle+label>.spec-sidebar-button {\n position: fixed;\n right: 0;\n top: 0;\n padding: 10px 15px;\n font-size: 30px;\n color: var(--color-sidebar-toggle-button);\n z-index: 2;\n cursor: pointer;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n}\n\n.xspec .spec-sidebar-toggle:checked+label:after {\n content: "";\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n z-index: 0;\n}\n\n.xspec .spec-sidebar {\n display: none;\n position: fixed;\n right: 0;\n top: 0;\n width: min(320px, calc(100vw - 48px));\n font-size: 14px;\n line-height: 1.75;\n overflow-y: scroll;\n height: 100%;\n padding: 0 0 5rem 30px;\n box-sizing: border-box;\n background: var(--color-sidebar-background);\n box-shadow: inset 1px 0 var(--color-sidebar-shadow-inset),\n -4px 0 8px -2px var(--color-sidebar-shadow);\n overscroll-behavior: contain;\n}\n\n.xspec .spec-sidebar {\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n}\n\n.xspec .spec-sidebar-toggle:checked~.spec-sidebar {\n display: block;\n}\n\n.xspec .spec-sidebar .viewing>a:after {\n color: var(--color-sidebar-viewing-link);\n content: "\\2022";\n margin-left: 1ex;\n}\n\n@media (min-width: 1220px) {\n .spec-sidebar-toggle+label {\n display: none;\n }\n\n .xspec .spec-sidebar {\n display: block;\n box-shadow: inset 1px 0 var(--color-sidebar-shadow-inset),\n inset 4px 0 8px -2px var(--color-sidebar-large-shadow) !important;\n }\n\n .xspec body {\n padding-right: 345px;\n }\n}\n\n.xspec\n/* Notes */\n\n.spec-note {\n background: var(--color-spec-note-background);\n border-left: solid 4px var(--color-spec-note-border);\n margin: 1rem -1rem;\n /* min-width: 70vw; */\n min-width: 100%;\n padding: 8px 1rem 12px calc(1rem - 4px);\n width: -moz-fit-content;\n width: -webkit-fit-content;\n width: fit-content;\n}\n\n@media (min-width: 720px) {\n .spec-note {\n min-width: 416px;\n }\n}\n\n.xspec .spec-note>a:first-child {\n color: var(--color-spec-note-first-link);\n display: block;\n font: italic 11pt/18pt var(--font-family);\n opacity: 0.6;\n user-select: none;\n}\n\n.xspec\n/* Todos */\n\n.spec-todo {\n color: var(--color-spec-todo);\n margin: 1em 0 1em 5em;\n min-height: 1em;\n}\n\n.xspec .spec-todo::before {\n content: "todo";\n display: block;\n float: left;\n margin-left: -5em;\n text-transform: uppercase;\n}\n\n.xspec\n/* Index table */\n\n.spec-index ol {\n list-style-type: none;\n margin: 0 0 0 var(--indent);\n padding: 0;\n column-width: 210px;\n column-gap: var(--indent);\n}\n\n.xspec .spec-index ol li {\n width: min-content;\n white-space: nowrap;\n}\n\n.xspec\n/* Code */\n\npre,\n.xspec code {\n font-family: var(--font-family-monospace);\n font-size: var(--mono-font-size);\n font-weight: inherit;\n}\n\n.xspec code {\n background: var(--color-code-background);\n margin: -2px -1px;\n padding: 3px 3px;\n white-space: pre-wrap;\n}\n\n.xspec pre>code {\n background: none;\n font-weight: inherit;\n margin: 0;\n padding: 0;\n white-space: pre;\n}\n\n.xspec pre {\n background: var(--color-pre-background);\n border-left: solid 4px var(--color-pre-border);\n margin: 1rem -1rem;\n /* min-width: 70vw; */\n min-width: 100%;\n padding: 12px 1rem 12px calc(1rem - 4px);\n width: -moz-fit-content;\n width: -webkit-fit-content;\n width: fit-content;\n max-width: calc(100vw - 2rem);\n overflow-y: auto;\n}\n\n@media (min-width: 720px) {\n pre {\n min-width: 40ch;\n }\n}\n\n.xspec .spec-example {\n background: var(--color-spec-example);\n border-left: solid 4px var(--color-spec-example-border);\n padding-top: 8px;\n}\n\n.xspec .spec-counter-example {\n background: var(--color-spec-counter-example);\n border-left: solid 4px var(--color-spec-counter-border);\n padding-top: 8px;\n}\n\n.xspec .spec-example>a,\n.xspec .spec-counter-example>a {\n display: block;\n font: italic 11pt/18pt var(--font-family);\n opacity: 0.6;\n user-select: none;\n}\n\n.xspec .spec-counter-example>a {\n color: var(--color-spec-counter-example-link);\n}\n\n.xspec\n/* Tables */\n\ntable {\n border-collapse: collapse;\n}\n\n.xspec th {\n background-color: var(--color-table-header);\n}\n\n.xspec td,\n.xspec th {\n border: 1px solid var(--color-table-header-border);\n padding: 0.4em;\n vertical-align: baseline;\n}\n\n.xspec\n/* Lists */\n\nol,\n.xspec ul {\n padding-left: var(--list-indent);\n}\n\n.xspec li>ol,\n.xspec li>ul {\n margin-top: 0.25em;\n margin-bottom: 0.5em;\n}\n\n.xspec li+li {\n margin-top: 0.25em;\n}\n\n.xspec li.task {\n list-style-type: none;\n position: relative;\n}\n\n.xspec li.task>input:first-child {\n margin-left: 0;\n position: absolute;\n transform: translateX(calc(-100% - 1ch));\n}\n\n.xspec\n/* Edits */\n\nins {\n background-color: var(--color-inserts-background);\n text-decoration: none;\n}\n\n.xspec del {\n background-color: var(--color-deletions-background);\n}\n\n.xspec .spec-added,\n.xspec .spec-removed {\n border-left: 4px solid;\n margin-left: -18px;\n padding-left: 14px;\n}\n\n.xspec .spec-added {\n border-color: var(--color-spec-added-border);\n}\n\n.xspec .spec-removed {\n border-color: var(--color-spec-removed-border);\n text-decoration: line-through;\n}\n\n.xspec\n/* Values */\n\n.spec-keyword {\n font-weight: bold;\n}\n\n.xspec .spec-string {\n font-family: var(--font-family-monospace);\n font-size: 85%;\n white-space: pre;\n}\n\n.xspec var {\n font-style: italic;\n}\n\n.xspec *[data-name] {\n transition: 0.15s background ease-out;\n border-radius: 2px;\n padding: 0 3px;\n margin: 0 -3px;\n}\n\n.xspec\n/* Grammar semantics, .xspec algorithms and calls */\n\n.spec-semantic,\n.xspec .spec-algo {\n margin: 1rem 0 1rem var(--dfn-indent);\n}\n\n.xspec .spec-semantic>.spec-nt::after,\n.xspec .spec-algo>.spec-call:first-child::after {\n content: ":";\n font-style: normal;\n font-weight: bold;\n margin-left: 1ex;\n}\n\n.xspec .spec-semantic ol,\n.xspec .spec-semantic ol ol ol ol,\n.xspec .spec-algo ol,\n.xspec .spec-algo ol ol ol ol {\n list-style-type: decimal;\n}\n\n.xspec .spec-semantic ol ol,\n.xspec .spec-semantic ol ol ol ol ol,\n.xspec .spec-algo ol ol,\n.xspec .spec-algo ol ol ol ol ol {\n list-style-type: lower-alpha;\n}\n\n.xspec .spec-semantic ol ol ol,\n.xspec .spec-semantic ol ol ol ol ol ol,\n.xspec .spec-algo ol ol ol,\n.xspec .spec-algo ol ol ol ol ol ol {\n list-style-type: lower-roman;\n}\n\n.xspec .spec-call>a {\n color: inherit;\n}\n\n.xspec\n/* Grammar productions */\n\n.spec-production {\n margin: 1rem 0 1rem var(--dfn-indent);\n}\n\n.xspec .spec-production>.spec-nt::after {\n content: ":";\n font-style: normal;\n font-weight: bold;\n margin: 0 1ex;\n}\n\n.xspec .spec-semantic.d2>.spec-nt::after,\n.xspec .spec-production.d2>.spec-nt::after {\n content: "::";\n}\n\n.xspec .spec-semantic.d3>.spec-nt::after,\n.xspec .spec-production.d3>.spec-nt::after {\n content: ":::";\n}\n\n.xspec .spec-production>.spec-rhs {\n line-height: 1.1;\n margin: 0.25em 0 0.5em calc(2 * var(--indent));\n text-indent: calc(-1 * var(--indent));\n}\n\n.xspec .spec-semantic>.spec-rhs {\n display: inline-block;\n text-indent: calc(-1 * var(--indent));\n margin-left: calc(1ex + var(--indent));\n}\n\n.xspec .spec-rhs>* {\n text-indent: 0;\n}\n\n.xspec .spec-oneof {\n display: inline;\n}\n\n.xspec .spec-oneof::before {\n content: "one of";\n font-style: normal;\n font-weight: bold;\n}\n\n.xspec .spec-oneof-grid {\n max-width: calc(100vw - 2rem);\n overflow: auto;\n margin: -1ex -1rem;\n padding: 1ex 1rem;\n}\n\n.xspec .spec-oneof-grid>table {\n margin-left: var(--indent);\n}\n\n.xspec .spec-oneof .spec-rhs {\n border: none;\n margin: 0;\n padding: 0 0 0 1rem;\n vertical-align: baseline;\n white-space: pre;\n}\n\n.xspec .spec-oneof .spec-rhs:first-child {\n padding: 0;\n}\n\n.xspec .spec-rhs .spec-constrained:not(:first-child),\n.xspec .spec-rhs .spec-quantified:not(:first-child),\n.xspec .spec-rhs .spec-nt:not(:first-child),\n.xspec .spec-rhs .spec-t:not(:first-child),\n.xspec .spec-rhs .spec-rx:not(:first-child),\n.xspec .spec-rhs .spec-prose:not(:first-child),\n.xspec .spec-rhs .spec-empty:not(:first-child),\n.xspec .spec-rhs .spec-lookahead:not(:first-child) {\n margin-left: 1ex;\n display: inline-block;\n}\n\n.xspec .spec-condition {\n font-size: 85%;\n}\n\n.xspec .spec-condition::before {\n content: "[if ";\n}\n\n.xspec .spec-condition.not::before {\n content: "[if not ";\n}\n\n.xspec .spec-condition::after {\n content: "]";\n}\n\n.xspec .spec-empty,\n.xspec .spec-prose {\n color: var(--color-spec-prose);\n}\n\n.xspec .spec-nt {\n font-style: italic;\n}\n\n.xspec .spec-nt>a {\n color: inherit;\n}\n\n.xspec .spec-quantifiers,\n.xspec .spec-params {\n font-size: 65%;\n font-style: normal;\n vertical-align: sub;\n}\n\n.xspec .spec-quantifier.list {\n color: var(--color-spec-quantifier-list);\n}\n\n.xspec .spec-quantifier.optional {\n color: var(--color-spec-quantifier-optional);\n}\n\n.xspec .spec-params,\n.xspec .spec-condition {\n color: var(--color-spec-condition);\n}\n\n.xspec .spec-params::before {\n content: "[";\n}\n\n.xspec .spec-params::after {\n content: "]";\n}\n\n.xspec .spec-quantifier:not(:last-child)::after,\n.xspec .spec-param:not(:last-child)::after {\n color: var(--color-spec-param);\n content: ", ";\n}\n\n.xspec .spec-param.conditional::before {\n content: "?";\n}\n\n.xspec .spec-param.negated::before {\n content: "!";\n}\n\n.xspec .spec-t,\n.xspec .spec-rx {\n color: var(--color-spec-rx);\n font-family: var(--font-family-monospace);\n font-weight: bold;\n}\n\n.xspec .spec-butnot::before {\n color: var(--color-grey);\n content: "but not";\n font-family: var(--font-family);\n font-weight: normal;\n margin-right: 1ex;\n}\n\n.xspec .spec-butnot>*:not(:first-child)::before {\n color: var(--color-grey);\n content: "or";\n font-family: var(--font-family);\n font-weight: normal;\n margin-right: 1ex;\n}\n\n.xspec .spec-rhs .spec-oneof::before,\n.xspec .spec-rhs .spec-butnot::before {\n margin-left: 1ex;\n}\n\n.xspec .spec-lookahead>* {\n margin: 0 !important;\n}\n\n.xspec .spec-lookahead>*:not(:first-child)::before {\n color: var(--color-grey);\n content: ", ";\n font-family: var(--font-family);\n font-style: normal;\n font-weight: normal;\n}\n\n.xspec .spec-lookahead::before {\n color: var(--color-grey);\n content: "[lookahead = ";\n font-family: var(--font-family);\n font-style: normal;\n font-weight: normal;\n}\n\n.xspec .spec-lookahead.not::before {\n content: "[lookahead \\2260 ";\n}\n\n.xspec .spec-lookahead.set::before {\n content: "[lookahead \\2208 {";\n margin-right: 0;\n}\n\n.xspec .spec-lookahead.set.not::before {\n content: "[lookahead \\2209 {";\n}\n\n.xspec .spec-lookahead.ntset::before {\n content: "[lookahead \\2208 ";\n margin-right: 0;\n}\n\n.xspec .spec-lookahead.ntset.not::before {\n content: "[lookahead \\2209 ";\n}\n\n.xspec .spec-lookahead::after {\n color: var(--color-grey);\n content: "]";\n}\n\n.xspec .spec-lookahead.set::after {\n content: "}]";\n}\n\n.xspec\n/* Prism color scheme */\n\ncode[class*="language-"],\n.xspec pre[class*="language-"] {\n color: var(--color-prism-foreground);\n background: none;\n text-shadow: 0 1px var(--color-prism-text-shadow);\n font-family: var(--font-family-monospace);\n font-size: 1em;\n text-align: left;\n white-space: pre;\n word-spacing: normal;\n word-break: normal;\n word-wrap: normal;\n line-height: 1.5;\n\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n\n -webkit-hyphens: none;\n -moz-hyphens: none;\n -ms-hyphens: none;\n hyphens: none;\n}\n\n.xspec pre[class*="language-"]::-moz-selection,\n.xspec pre[class*="language-"] ::-moz-selection,\n.xspec code[class*="language-"]::-moz-selection,\n.xspec code[class*="language-"] ::-moz-selection {\n text-shadow: none;\n background: var(--color-prism-background);\n}\n\n.xspec pre[class*="language-"]::selection,\n.xspec pre[class*="language-"] ::selection,\n.xspec code[class*="language-"]::selection,\n.xspec code[class*="language-"] ::selection {\n text-shadow: none;\n background: var(--color-prism-background);\n}\n\n@media print {\n\n code[class*="language-"],\n pre[class*="language-"] {\n text-shadow: none;\n }\n}\n\n.xspec\n\n/* Code blocks */\npre[class*="language-"] {\n padding: 1em;\n margin: 0.5em 0;\n overflow: auto;\n}\n\n.xspec :not(pre)>code[class*="language-"],\n.xspec pre[class*="language-"] {\n background: var(--color-prism-block-background);\n}\n\n.xspec\n\n/* Inline code */\n:not(pre)>code[class*="language-"] {\n padding: 0.1em;\n border-radius: 0.3em;\n white-space: normal;\n}\n\n.xspec .token.atrule,\n.xspec .token.attr-value,\n.xspec .token.keyword,\n.xspec .token.property,\n.xspec .token.selector,\n.xspec .token.attr-name,\n.xspec .token.builtin,\n.xspec .token.entity,\n.xspec .token.url,\n.xspec .token.inserted {\n color: var(--color-token-inserted);\n background: none;\n}\n\n.xspec .token.tag,\n.xspec .token.boolean,\n.xspec .token.number,\n.xspec .token.string,\n.xspec .token.char,\n.xspec .token.constant,\n.xspec .token.symbol,\n.xspec .token.regex,\n.xspec .token.important,\n.xspec .token.variable,\n.xspec .token.function,\n.xspec .token.class-name,\n.xspec .token.deleted {\n color: var(--color-token-deleted);\n}\n\n.xspec .token.comment,\n.xspec .token.prolog,\n.xspec .token.doctype,\n.xspec .token.cdata,\n.xspec .token.description {\n color: inherit;\n opacity: 0.3;\n}\n\n.xspec .token.punctuation {\n color: inherit;\n opacity: 0.5;\n}\n\n.xspec .token.operator,\n.xspec .token.namespace {\n color: inherit;\n opacity: 0.7;\n}';
7
+
8
+ // src/components/XSpecPre.tsx
9
+ import { Pre } from "codehike/code";
10
+ function XSpecPre({ ...props }) {
11
+ let highlighted = null;
12
+ if (props.highlighted) {
13
+ if (typeof props.highlighted === "string") {
14
+ try {
15
+ highlighted = JSON.parse(props.highlighted);
16
+ } catch (e) {
17
+ }
18
+ } else {
19
+ highlighted = props.highlighted;
20
+ }
21
+ }
22
+ const preProps = {
23
+ code: highlighted
24
+ };
25
+ if (typeof props?.attributes === "string") {
26
+ try {
27
+ const attrs = JSON.parse(props?.attributes);
28
+ if (attrs.class) {
29
+ preProps.className = attrs.class;
30
+ }
31
+ } catch (e) {
32
+ }
33
+ }
34
+ if (highlighted) {
35
+ return /* @__PURE__ */ React.createElement(Pre, { ...preProps });
36
+ }
37
+ return null;
38
+ }
39
+
40
+ // src/components/XSpec.tsx
41
+
42
+ // src/components/XSpecBox.tsx
43
+ function XSpecBox({ type, id, children, source }) {
44
+ const classNames = {
45
+ note: "spec-note",
46
+ todo: "spec-todo",
47
+ example: "spec-example",
48
+ "counter-example": "spec-counter-example"
49
+ };
50
+ const labels = {
51
+ note: "Note",
52
+ todo: "Todo",
53
+ example: "Example",
54
+ "counter-example": "Counter Example"
55
+ };
56
+ return /* @__PURE__ */ React.createElement("div", { id, className: classNames[type], "data-source": source }, /* @__PURE__ */ React.createElement("a", { href: `#${id}` }, labels[type]), children);
57
+ }
58
+
59
+ // src/components/XSpecHeader.tsx
60
+ function XSpecHeader({
61
+ id,
62
+ secid,
63
+ title,
64
+ level = "h1",
65
+ dataSource
66
+ }) {
67
+ const HeadingTag = level;
68
+ return /* @__PURE__ */ React.createElement(HeadingTag, { "data-source": dataSource }, /* @__PURE__ */ React.createElement("span", { className: "spec-secid", title: "link to this section" }, /* @__PURE__ */ React.createElement("a", { href: `#${id}` }, secid)), title);
69
+ }
70
+
71
+ // src/components/XSpecSection.tsx
72
+ function XSpecSection({
73
+ id,
74
+ secid,
75
+ title,
76
+ headingLevel = "h1",
77
+ dataSource,
78
+ children,
79
+ className,
80
+ indexSpec = false
81
+ }) {
82
+ return /* @__PURE__ */ React.createElement(
83
+ "section",
84
+ {
85
+ id,
86
+ ...{ secid },
87
+ className: `${className || ""} ${indexSpec ? "spec-index" : ""}`
88
+ },
89
+ /* @__PURE__ */ React.createElement(
90
+ XSpecHeader,
91
+ {
92
+ id,
93
+ secid,
94
+ title,
95
+ level: headingLevel,
96
+ dataSource
97
+ }
98
+ ),
99
+ children
100
+ );
101
+ }
102
+ var XSpecSection_default = XSpecSection;
103
+
104
+ // src/components/XSpecNavItem.tsx
105
+ function XSpecNavItem({ item }) {
106
+ const hasChildren = item.children && item.children.length > 0;
107
+ return /* @__PURE__ */ React.createElement("li", null, /* @__PURE__ */ React.createElement("a", { href: item.href }, /* @__PURE__ */ React.createElement("span", { className: "spec-secid" }, item.secid), item.label), hasChildren && /* @__PURE__ */ React.createElement("ol", null, item.children.map((child) => /* @__PURE__ */ React.createElement(XSpecNavItem, { key: child.id, item: child }))));
108
+ }
109
+
110
+ // src/components/XSpecSidebarItem.tsx
111
+ function XSpecSidebarItem({ item }) {
112
+ const hasChildren = item.children && item.children.length > 0;
113
+ return /* @__PURE__ */ React.createElement("li", { id: `_sidebar_${item.secid}`, className: "" }, /* @__PURE__ */ React.createElement("a", { href: item.href }, /* @__PURE__ */ React.createElement("span", { className: "spec-secid" }, item.secid), item.label), hasChildren && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
114
+ "input",
115
+ {
116
+ ...{ hidden: "" },
117
+ className: "toggle",
118
+ type: "checkbox",
119
+ id: `_toggle_${item.secid}`
120
+ }
121
+ ), /* @__PURE__ */ React.createElement("label", { htmlFor: `_toggle_${item.secid}` }), /* @__PURE__ */ React.createElement("ol", null, item.children.map((child) => /* @__PURE__ */ React.createElement(XSpecSidebarItem, { key: child.id, item: child })))));
122
+ }
123
+
124
+ // src/components/XSpecSidebar.tsx
125
+ function XSpecSidebar({ items }) {
126
+ return /* @__PURE__ */ React.createElement("div", { className: "spec-sidebar", "aria-hidden": "true" }, /* @__PURE__ */ React.createElement("div", { className: "spec-toc" }, /* @__PURE__ */ React.createElement("div", { className: "title" }, /* @__PURE__ */ React.createElement("a", { href: "#" }, "Spec Markdown")), /* @__PURE__ */ React.createElement("ol", null, items.map((item) => /* @__PURE__ */ React.createElement(XSpecSidebarItem, { key: item.id, item })), /* @__PURE__ */ React.createElement("li", { id: "_sidebar_index" }, /* @__PURE__ */ React.createElement("a", { href: "#index" }, /* @__PURE__ */ React.createElement("span", { className: "spec-secid" }, "\xA7"), "Index")))));
127
+ }
128
+
129
+ // src/components/XSpecProductionRule.tsx
130
+ function XSpecProductionRule({ production }) {
131
+ if (production.useGrid && production.gridItems) {
132
+ const columns = production.columns || 5;
133
+ const rows = [];
134
+ for (let i = 0; i < production.gridItems.length; i += columns) {
135
+ rows.push(production.gridItems.slice(i, i + columns));
136
+ }
137
+ return /* @__PURE__ */ React.createElement("div", { className: "spec-production", id: production.name }, /* @__PURE__ */ React.createElement("span", { className: "spec-nt" }, /* @__PURE__ */ React.createElement("a", { href: `#${production.name}`, "data-name": production.name }, production.name)), /* @__PURE__ */ React.createElement("div", { className: "spec-oneof" }, /* @__PURE__ */ React.createElement("div", { className: "spec-oneof-grid" }, /* @__PURE__ */ React.createElement("table", null, /* @__PURE__ */ React.createElement("tbody", null, rows.map((row, rowIndex) => /* @__PURE__ */ React.createElement("tr", { key: rowIndex }, row.map((item, cellIndex) => /* @__PURE__ */ React.createElement("td", { key: cellIndex, className: "spec-rhs" }, /* @__PURE__ */ React.createElement("span", { className: "spec-t" }, item))))))))));
138
+ }
139
+ return /* @__PURE__ */ React.createElement("div", { className: "spec-production", id: production.name }, /* @__PURE__ */ React.createElement("span", { className: "spec-nt" }, /* @__PURE__ */ React.createElement("a", { href: `#${production.name}`, "data-name": production.name }, production.name)), production.alternatives && production.alternatives.map((alt, altIndex) => /* @__PURE__ */ React.createElement("div", { key: altIndex, className: "spec-rhs" }, alt.map((token, tokenIndex) => /* @__PURE__ */ React.createElement("span", { key: tokenIndex, className: "spec-nt" }, /* @__PURE__ */ React.createElement("span", { "data-name": token }, token))))));
140
+ }
141
+
142
+ // src/components/XSpecTableOfContents.tsx
143
+ function XSpecTableOfContents({ items }) {
144
+ return /* @__PURE__ */ React.createElement("nav", { className: "spec-toc" }, /* @__PURE__ */ React.createElement("div", { className: "title" }, "Contents"), /* @__PURE__ */ React.createElement("ol", null, items.map((item) => /* @__PURE__ */ React.createElement(XSpecNavItem, { key: item.id, item }))));
145
+ }
146
+
147
+ // src/components/XSpec.tsx
148
+ function XSpec({ children }) {
149
+ return /* @__PURE__ */ React.createElement("div", { className: "xspec" }, children);
150
+ }
151
+ XSpec.Box = XSpecBox;
152
+ XSpec.Header = XSpecHeader;
153
+ XSpec.Section = XSpecSection;
154
+ XSpec.NavItem = XSpecNavItem;
155
+ XSpec.SidebarItem = XSpecSidebarItem;
156
+ XSpec.Sidebar = XSpecSidebar;
157
+ XSpec.ProductionRule = XSpecProductionRule;
158
+ XSpec.TableOfContents = XSpecTableOfContents;
159
+
160
+ // src/components/XSpecWrapper.tsx
161
+ function XSpecWrapper({ children }) {
162
+ return /* @__PURE__ */ React.createElement(XSpec, null, /* @__PURE__ */ React.createElement("article", null, children));
163
+ }
164
+
165
+ // src/components.tsx
166
+ var components = {
167
+ XSpec,
168
+ h1: ({ children, ...props }) => /* @__PURE__ */ React.createElement("h1", { ...props }, children),
169
+ h2: ({ children, ...props }) => /* @__PURE__ */ React.createElement("h2", { ...props }, children),
170
+ h3: ({ children, ...props }) => /* @__PURE__ */ React.createElement("h3", { ...props }, children),
171
+ h4: ({ children, ...props }) => /* @__PURE__ */ React.createElement("h4", { ...props }, children),
172
+ h5: ({ children, ...props }) => /* @__PURE__ */ React.createElement("h5", { ...props }, children),
173
+ h6: ({ children, ...props }) => /* @__PURE__ */ React.createElement("h6", { ...props }, children),
174
+ p: ({ children, ...props }) => /* @__PURE__ */ React.createElement("p", { ...props }, children),
175
+ a: ({ children, ...props }) => /* @__PURE__ */ React.createElement("a", { ...props }, children),
176
+ dt: ({ children, ...props }) => /* @__PURE__ */ React.createElement("dfn", null, /* @__PURE__ */ React.createElement("dt", { ...props }, /* @__PURE__ */ React.createElement("dfn", null, children))),
177
+ dl: ({ children, ...props }) => /* @__PURE__ */ React.createElement("dl", { ...props }, children),
178
+ dd: ({ children, ...props }) => /* @__PURE__ */ React.createElement("dd", { ...props }, children),
179
+ dfn: ({ children, ...props }) => /* @__PURE__ */ React.createElement("dfn", { ...props }, children),
180
+ img: ({ children, ...props }) => /* @__PURE__ */ React.createElement("img", { ...props }),
181
+ ul: ({ children, ...props }) => /* @__PURE__ */ React.createElement("ul", { ...props }, children),
182
+ ol: ({ children, ...props }) => /* @__PURE__ */ React.createElement("ol", { ...props }, children),
183
+ li: ({ children, ...props }) => /* @__PURE__ */ React.createElement("li", { ...props }, children),
184
+ header: ({ children, ...props }) => /* @__PURE__ */ React.createElement("header", { ...props }, children),
185
+ section: XSpec.Section,
186
+ Section: XSpecSection_default,
187
+ article: ({ children, ...props }) => /* @__PURE__ */ React.createElement("article", { ...props }, children),
188
+ footer: ({ children, ...props }) => /* @__PURE__ */ React.createElement("footer", { ...props }, children),
189
+ table: ({ children, ...props }) => /* @__PURE__ */ React.createElement("table", { ...props }, children),
190
+ pre: XSpecPre,
191
+ code: ({ children, ...props }) => /* @__PURE__ */ React.createElement("code", { ...props }, children),
192
+ wrapper: XSpecWrapper,
193
+ Callout: XSpec.Box
194
+ };
195
+
196
+ // src/index.ts
197
+ function XspecPlugin() {
198
+ return () => {
199
+ const head = [
200
+ ["style", {}, styles_default]
201
+ ];
202
+ const remarkPlugins = [remarkDefinitionList];
203
+ return {
204
+ name: "plugin-xspec",
205
+ vite: [],
206
+ head,
207
+ components,
208
+ markdown: {
209
+ remark: remarkPlugins,
210
+ remarkRehypeHandlers: {
211
+ ...defListHastHandlers
212
+ }
213
+ },
214
+ hooks: {
215
+ // TODO: hooks should not override entire SYSTEM IT SHOULD ONLY EXCLUDE COMPONENTS FOR THIS !!! PLUGIN !!!
216
+ applyComponents(cfg) {
217
+ const component = cfg?.metadata?.component;
218
+ if (component === "xspec") {
219
+ return true;
220
+ }
221
+ return false;
222
+ }
223
+ }
224
+ };
225
+ };
226
+ }
227
+ export {
228
+ XspecPlugin as default
229
+ };
230
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/styles/index.css","../src/components/XSpecPre.tsx","../src/components/XSpec.tsx","../src/components/XSpecBox.tsx","../src/components/XSpecHeader.tsx","../src/components/XSpecSection.tsx","../src/components/XSpecNavItem.tsx","../src/components/XSpecSidebarItem.tsx","../src/components/XSpecSidebar.tsx","../src/components/XSpecProductionRule.tsx","../src/components/XSpecTableOfContents.tsx","../src/components/XSpecWrapper.tsx","../src/components.tsx"],"sourcesContent":["import { remarkDefinitionList, defListHastHandlers } from \"remark-definition-list\";\n\nimport type { Plugin, PluginComponents, PluginConfig } from \"@xyd-js/plugins\";\n\nimport styles from \"./styles/index.css\";\n\nimport { components } from \"./components\";\n\nexport type {\n NavItem as XSpecNavItemType,\n ProductionItem as XSpecProductionItem,\n SpecBoxProps as XSpecBoxProps,\n SpecHeaderProps as XSpecHeaderProps,\n SpecSectionProps as XSpecSectionProps,\n} from \"./types\";\n\nexport default function XspecPlugin(): Plugin {\n return () => {\n const head: [string, Record<string, any>, string?][] = [\n [\"style\", {}, styles],\n ];\n // Align with the host's unified types; the plugin dependency ships its own copy.\n const remarkPlugins =\n [remarkDefinitionList] as unknown as NonNullable<\n PluginConfig[\"markdown\"]\n >[\"remark\"];\n\n return {\n name: \"plugin-xspec\",\n vite: [],\n head,\n components,\n markdown: {\n remark: remarkPlugins,\n remarkRehypeHandlers: {\n ...defListHastHandlers,\n }\n },\n hooks: {\n // TODO: hooks should not override entire SYSTEM IT SHOULD ONLY EXCLUDE COMPONENTS FOR THIS !!! PLUGIN !!!\n applyComponents(cfg) {\n const component = cfg?.metadata?.component as string\n\n if (component === \"xspec\") {\n return true;\n }\n\n return false;\n },\n },\n };\n };\n}\n","xyd-layout-primary {\n @media (min-width: 1024px) {\n &:not([data-layout=\"page\"]):not([data-layout=\"wide\"]):has(.xspec) {\n [part=page-article] {\n --xyd-layout-width-small: 900px;\n }\n }\n }\n}\n\n@media (prefers-color-scheme: light) {\n .xspec {\n --color-foreground: #333333;\n --color-background: #var(--white);\n\n --color-light-grey: #ccc;\n --color-grey: #666666;\n --color-white: #var(--white);\n --color-link: #3b5998;\n\n --color-subsection-link: var(--color-foreground);\n --color-toc-link: var(--color-foreground);\n --color-toc-id: var(--color-link);\n --color-toggle-border: #bbc;\n\n --color-sidebar-background: #f0f0f0;\n --color-sidebar-viewing-link: #8b9;\n --color-sidebar-toggle-button: rgba(0, 0, 0, 0.7);\n --color-sidebar-shadow-inset: rgba(0, 0, 0, 0.05);\n --color-sidebar-shadow: rgba(0, 0, 0, 0.04);\n --color-sidebar-large-shadow: rgba(0, 0, 0, 0.08);\n\n --color-pre-background: #fafafa;\n --color-pre-border: #e9e9e9;\n --color-code-background: rgba(0, 0, 0, 0.03);\n\n --color-spec-todo: var(--color-grey);\n --color-spec-example: #fafaff;\n --color-spec-example-border: #bbbbff;\n --color-spec-counter-example: #var(--white)afa;\n --color-spec-counter-border: #ffbbbb;\n --color-spec-counter-example-link: #98593b;\n --color-spec-added-border: #396;\n --color-spec-removed-border: #933;\n --color-spec-prose: var(--color-grey);\n --color-spec-quantifier-list: var(--color-link);\n --color-spec-quantifier-optional: #83238e;\n --color-spec-condition: #1c7758;\n --color-spec-param: var(--color-grey);\n --color-spec-rx: var(--color-foreground);\n --color-spec-note-border: #f4e925;\n --color-spec-note-background: #fefef3;\n --color-spec-note-first-link: #6c6613;\n\n --color-source-link: var(--color-light-grey);\n\n --color-table-header: #f9f9f9;\n --color-table-header-border: #d0d0d0;\n\n --color-token-inserted: hsla(241, 71%, 34%, 0.69);\n --color-token-deleted: hsla(324, 92%, 33%, 0.74);\n\n --color-inserts-background: rgba(0, 200, 30, 0.08);\n --color-deletions-background: rgba(200, 0, 0, 0.08);\n\n --selection-background-color: #cacee0;\n --selection-background-color-link: #f0babe;\n }\n\n .xspec .selection-link:hover {\n --selection-background-color: #3b5998;\n }\n}\n\n@media (prefers-color-scheme: dark) {\n .xspec {\n --color-foreground: #b6b6b6;\n --color-background: #262626;\n\n --color-light-grey: #373737;\n --color-grey: #828282;\n --color-white: rgb(29, 29, 29);\n --color-link: #89b7da;\n\n --color-subsection-link: var(--color-foreground);\n --color-toc-link: var(--color-foreground);\n --color-toc-id: var(--color-link);\n --color-toggle-border: #bbc;\n\n --color-sidebar-background: #323232;\n --color-sidebar-viewing-link: #8b9;\n --color-sidebar-toggle-button: rgba(220, 220, 220, 0.7);\n --color-sidebar-shadow-inset: rgba(0, 0, 0, 0.05);\n --color-sidebar-shadow: rgba(0, 0, 0, 0.04);\n --color-sidebar-large-shadow: rgba(0, 0, 0, 0.08);\n\n --color-pre-background: #2e2e2e;\n --color-pre-border: #3a3a3a;\n --color-code-background: rgba(41, 41, 41, 0.03);\n\n --color-spec-todo: var(--color-grey);\n --color-spec-example: #2b2b35;\n --color-spec-example-border: #4d4d6d;\n --color-spec-counter-example: #322828;\n --color-spec-counter-border: #664040;\n --color-spec-counter-example-link: #ff702d;\n --color-spec-added-border: #396;\n --color-spec-removed-border: #933;\n --color-spec-prose: var(--color-grey);\n --color-spec-quantifier-list: var(--color-link);\n --color-spec-quantifier-optional: #c689ce;\n --color-spec-condition: #6fa889;\n --color-spec-param: var(--color-grey);\n --color-spec-rx: var(--color-foreground);\n --color-spec-note-border: #605e39;\n --color-spec-note-background: #303028;\n --color-spec-note-first-link: #f0e330;\n\n --color-source-link: var(--color-grey);\n\n --color-table-header: #373737;\n --color-table-header-border: #525252;\n\n --color-token-inserted: hsla(241, 63%, 70%, 0.69);\n --color-token-deleted: hsla(325, 64%, 67%, 0.74);\n\n --color-inserts-background: rgba(0, 200, 30, 0.08);\n --color-deletions-background: rgba(200, 0, 0, 0.08);\n\n --selection-background-color: #656565;\n --selection-background-color-link: #f0babe;\n }\n\n .xspec .selection-link:hover {\n --selection-background-color: #829edb;\n }\n}\n\n.xspec {\n color: var(--color-foreground);\n background-color: var(--color-background);\n font-family: var(--font-family);\n font-size: 15px;\n line-height: 1.5;\n \n --mono-font-size: 13px;\n --indent: 1rem;\n --list-indent: 1.5rem;\n --dfn-indent: 0rem;\n\n --font-family: Cambria, \"Palatino Linotype\", Palatino, \"Liberation Serif\",\n serif;\n --font-family-monospace: Consolas, Monaco, \"Andale Mono\", \"Ubuntu Mono\",\n monospace;\n\n border: 1px solid #6c575757;\n padding-inline: 50px;\n border-radius: 5px;\n border-color: var(--dark32);\n --dot-color: #6e6e6e88;\n --dot-size: 1px;\n --dot-step: 58px;\n --device-pixel-ratio: 2;\n --dot-stop: calc(var(--dot-size) - min(.5px, 1px / var(--device-pixel-ratio)));\n /* background: #f2f5fa; */\n background-size: var(--dot-step) var(--dot-step);\n background-position: calc(50% + var(--dot-step) / 2) 0;\n background-image: radial-gradient(var(--dot-step) circle, var(--dot-color) var(--dot-stop), transparent var(--dot-size));\n}\n\n@media (min-width: 720px) {\n .xspec {\n font-size: 17px;\n --mono-font-size: 15px;\n --indent: 2rem;\n --list-indent: 2rem;\n --dfn-indent: 2rem;\n }\n}\n\n.xspec body {\n margin: 3rem 0 3rem;\n}\n\n.xspec article {\n margin: 0 1rem;\n}\n\n/* @media (min-width: 720px) {\n body {\n margin: 6rem auto 3rem;\n max-width: 800px;\n padding-left: 75px;\n padding-right: clamp(0px, calc((100vw - 800px) * 0.25), 75px);\n }\n} */\n\n.xspec\n/* Source Links */\n\n.source-link {\n display: none;\n}\n\n@media screen and (min-width: 720px) {\n .source-link {\n display: block;\n position: absolute;\n width: 18px;\n fill: var(--color-source-link);\n opacity: 0.3;\n }\n\n .xspec .source-link:hover {\n opacity: 1;\n }\n}\n\n.xspec\n/* Selections */\n\n.outdated-selection-link,\n.xspec .selection-link {\n position: absolute;\n display: block;\n color: var(--color-white);\n background: var(--selection-background-color);\n border-radius: 4px;\n font-size: 36px;\n height: 23px;\n line-height: 48px;\n text-align: center;\n text-decoration: none;\n width: 25px;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n}\n\n.xspec .outdated-selection-link:hover,\n.xspec .selection-link:hover {\n text-decoration: none;\n}\n\n.xspec .outdated-selection-link:before,\n.xspec .selection-link:before {\n border: 5px solid transparent;\n content: \"\";\n height: 0;\n margin-top: -5px;\n margin-right: -5px;\n position: absolute;\n right: 1px;\n top: 50%;\n width: 0;\n}\n\n@media (max-width: 719px) {\n\n .outdated-selection-link:before,\n .selection-link:before {\n border-bottom-color: var(--selection-background-color);\n border-top: 0;\n right: 50%;\n top: 1px;\n }\n}\n\n@media (min-width: 720px) {\n\n .outdated-selection-link:before,\n .selection-link:before {\n border-left-color: var(--selection-background-color);\n border-right: 0;\n right: 1px;\n top: 50%;\n }\n}\n\n.xspec .outdated-selection-link {\n background: var(--selection-background-color-link);\n font-size: 21px;\n font-weight: 800;\n line-height: 27px;\n}\n\n.xspec .outdated-selection-link:hover:after {\n content: \"This selection content has changed since this link was created.\";\n font: 9pt/11pt var(--font-family);\n position: absolute;\n display: block;\n white-space: nowrap;\n padding: 2px 5px 1px;\n top: -20px;\n background: black;\n color: var(--color-white);\n}\n\n.xspec\n/* Links */\n\na {\n color: var(--color-link);\n text-decoration: none;\n}\n\n.xspec a:hover {\n text-decoration: underline;\n}\n\n.xspec\n/* Images */\n\nimg {\n max-width: 100%;\n}\n\n.xspec\n/* Definitions */\n\ndl {\n margin: 1rem 0 1rem var(--dfn-indent);\n}\n\n.xspec dd {\n margin: 0.25em 0 0.5em var(--indent);\n}\n\n.xspec dd+dd {\n margin-top: 1rem;\n}\n\n.xspec dfn,\n.xspec .spec-ref {\n font-style: italic;\n}\n\n.xspec dfn>a,\n.xspec .spec-ref>a {\n color: inherit;\n}\n\n.xspec\n/* Section headers */\n\nh1,\n.xspec h2,\n.xspec h3,\n.xspec h4,\n.xspec h5,\n.xspec h6 {\n font-weight: bold;\n margin: 3em 0 1em;\n position: relative;\n}\n\n@media (min-width: 720px) {\n header>h1 {\n margin: 6em 0 3em;\n }\n}\n\n.xspec h1 {\n font-size: 1.5em;\n margin-top: 5em;\n}\n\n.xspec h2,\n.xspec h3 {\n font-size: 1.25em;\n}\n\n.xspec h4,\n.xspec h5,\n.xspec h6 {\n font-size: 1em;\n}\n\n.xspec section {\n padding-top: 1rem;\n margin-top: -1rem;\n}\n\n.xspec section.subsec>h6 {\n margin-top: 2em;\n}\n\n.xspec section.subsec>h6>a {\n color: var(--color-subsection-link);\n}\n\n.xspec section .spec-secid {\n margin-right: 1ex;\n}\n\n@media (min-width: 720px) {\n section .spec-secid {\n position: absolute;\n right: 100%;\n text-align: right;\n white-space: nowrap;\n }\n}\n\n.xspec footer {\n font-size: 75%;\n opacity: 0.5;\n text-align: center;\n margin-top: 12rem;\n}\n\n.xspec\n/* Table of contents */\n\n.spec-toc {\n margin: 1rem 0 3rem;\n}\n\n.xspec .spec-toc .title {\n content: \"Contents\";\n display: block;\n font-weight: bold;\n margin: 5em 0 1em;\n}\n\n.xspec .spec-toc .spec-secid {\n margin-right: 1ex;\n}\n\n.xspec .spec-toc ol {\n list-style: none;\n padding-left: 0;\n margin-top: 0;\n margin-bottom: 0;\n}\n\n.xspec .spec-toc ol ol {\n list-style: none;\n padding-left: 2ex;\n margin-bottom: 0.25em;\n}\n\n.xspec .spec-toc li {\n position: relative;\n padding: 5px 0 0 30px;\n margin: -5px 0 0 -30px;\n}\n\n.xspec .spec-toc a {\n color: var(--color-toc-link);\n}\n\n.xspec .spec-toc a:hover {\n text-decoration: none;\n}\n\n.xspec .spec-toc a .spec-secid {\n color: var(--color-toc-id);\n}\n\n.xspec .spec-toc a:hover .spec-secid {\n text-decoration: underline;\n}\n\n.xspec .spec-toc .toggle {\n display: none;\n}\n\n.xspec .spec-toc .toggle+label {\n cursor: pointer;\n left: 6px;\n opacity: 1;\n padding: 5px 6px 5px 7px;\n position: absolute;\n top: 6px;\n transform: rotate(0deg);\n transition: all 0.18s ease-in-out;\n}\n\n.xspec .spec-toc .toggle+label:after {\n border-color: transparent transparent transparent var(--color-toggle-border);\n border-style: solid;\n border-width: 6px 0 6px 7px;\n content: \" \";\n display: block;\n height: 0;\n width: 0;\n}\n\n@media (pointer: fine) {\n .spec-toc .toggle+label {\n left: 10px;\n padding: 3px 5px 3px 6px;\n top: 8px;\n }\n}\n\n.xspec .spec-toc .toggle:checked+label {\n transform: rotate(90deg);\n}\n\n@media (hover: hover) {\n .spec-toc li:not(:hover)>.toggle:checked+label {\n opacity: 0;\n }\n}\n\n.xspec .spec-toc .toggle:not(:checked)~ol {\n max-height: 0;\n overflow: hidden;\n margin: 0;\n}\n\n.xspec\n/* Sidebar */\n\n.spec-sidebar-toggle {\n display: none;\n}\n\n.xspec .spec-sidebar-toggle+label>.spec-sidebar-button {\n position: fixed;\n right: 0;\n top: 0;\n padding: 10px 15px;\n font-size: 30px;\n color: var(--color-sidebar-toggle-button);\n z-index: 2;\n cursor: pointer;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n}\n\n.xspec .spec-sidebar-toggle:checked+label:after {\n content: \"\";\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n z-index: 0;\n}\n\n.xspec .spec-sidebar {\n display: none;\n position: fixed;\n right: 0;\n top: 0;\n width: min(320px, calc(100vw - 48px));\n font-size: 14px;\n line-height: 1.75;\n overflow-y: scroll;\n height: 100%;\n padding: 0 0 5rem 30px;\n box-sizing: border-box;\n background: var(--color-sidebar-background);\n box-shadow: inset 1px 0 var(--color-sidebar-shadow-inset),\n -4px 0 8px -2px var(--color-sidebar-shadow);\n overscroll-behavior: contain;\n}\n\n.xspec .spec-sidebar {\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n}\n\n.xspec .spec-sidebar-toggle:checked~.spec-sidebar {\n display: block;\n}\n\n.xspec .spec-sidebar .viewing>a:after {\n color: var(--color-sidebar-viewing-link);\n content: \"\\2022\";\n margin-left: 1ex;\n}\n\n@media (min-width: 1220px) {\n .spec-sidebar-toggle+label {\n display: none;\n }\n\n .xspec .spec-sidebar {\n display: block;\n box-shadow: inset 1px 0 var(--color-sidebar-shadow-inset),\n inset 4px 0 8px -2px var(--color-sidebar-large-shadow) !important;\n }\n\n .xspec body {\n padding-right: 345px;\n }\n}\n\n.xspec\n/* Notes */\n\n.spec-note {\n background: var(--color-spec-note-background);\n border-left: solid 4px var(--color-spec-note-border);\n margin: 1rem -1rem;\n /* min-width: 70vw; */\n min-width: 100%;\n padding: 8px 1rem 12px calc(1rem - 4px);\n width: -moz-fit-content;\n width: -webkit-fit-content;\n width: fit-content;\n}\n\n@media (min-width: 720px) {\n .spec-note {\n min-width: 416px;\n }\n}\n\n.xspec .spec-note>a:first-child {\n color: var(--color-spec-note-first-link);\n display: block;\n font: italic 11pt/18pt var(--font-family);\n opacity: 0.6;\n user-select: none;\n}\n\n.xspec\n/* Todos */\n\n.spec-todo {\n color: var(--color-spec-todo);\n margin: 1em 0 1em 5em;\n min-height: 1em;\n}\n\n.xspec .spec-todo::before {\n content: \"todo\";\n display: block;\n float: left;\n margin-left: -5em;\n text-transform: uppercase;\n}\n\n.xspec\n/* Index table */\n\n.spec-index ol {\n list-style-type: none;\n margin: 0 0 0 var(--indent);\n padding: 0;\n column-width: 210px;\n column-gap: var(--indent);\n}\n\n.xspec .spec-index ol li {\n width: min-content;\n white-space: nowrap;\n}\n\n.xspec\n/* Code */\n\npre,\n.xspec code {\n font-family: var(--font-family-monospace);\n font-size: var(--mono-font-size);\n font-weight: inherit;\n}\n\n.xspec code {\n background: var(--color-code-background);\n margin: -2px -1px;\n padding: 3px 3px;\n white-space: pre-wrap;\n}\n\n.xspec pre>code {\n background: none;\n font-weight: inherit;\n margin: 0;\n padding: 0;\n white-space: pre;\n}\n\n.xspec pre {\n background: var(--color-pre-background);\n border-left: solid 4px var(--color-pre-border);\n margin: 1rem -1rem;\n /* min-width: 70vw; */\n min-width: 100%;\n padding: 12px 1rem 12px calc(1rem - 4px);\n width: -moz-fit-content;\n width: -webkit-fit-content;\n width: fit-content;\n max-width: calc(100vw - 2rem);\n overflow-y: auto;\n}\n\n@media (min-width: 720px) {\n pre {\n min-width: 40ch;\n }\n}\n\n.xspec .spec-example {\n background: var(--color-spec-example);\n border-left: solid 4px var(--color-spec-example-border);\n padding-top: 8px;\n}\n\n.xspec .spec-counter-example {\n background: var(--color-spec-counter-example);\n border-left: solid 4px var(--color-spec-counter-border);\n padding-top: 8px;\n}\n\n.xspec .spec-example>a,\n.xspec .spec-counter-example>a {\n display: block;\n font: italic 11pt/18pt var(--font-family);\n opacity: 0.6;\n user-select: none;\n}\n\n.xspec .spec-counter-example>a {\n color: var(--color-spec-counter-example-link);\n}\n\n.xspec\n/* Tables */\n\ntable {\n border-collapse: collapse;\n}\n\n.xspec th {\n background-color: var(--color-table-header);\n}\n\n.xspec td,\n.xspec th {\n border: 1px solid var(--color-table-header-border);\n padding: 0.4em;\n vertical-align: baseline;\n}\n\n.xspec\n/* Lists */\n\nol,\n.xspec ul {\n padding-left: var(--list-indent);\n}\n\n.xspec li>ol,\n.xspec li>ul {\n margin-top: 0.25em;\n margin-bottom: 0.5em;\n}\n\n.xspec li+li {\n margin-top: 0.25em;\n}\n\n.xspec li.task {\n list-style-type: none;\n position: relative;\n}\n\n.xspec li.task>input:first-child {\n margin-left: 0;\n position: absolute;\n transform: translateX(calc(-100% - 1ch));\n}\n\n.xspec\n/* Edits */\n\nins {\n background-color: var(--color-inserts-background);\n text-decoration: none;\n}\n\n.xspec del {\n background-color: var(--color-deletions-background);\n}\n\n.xspec .spec-added,\n.xspec .spec-removed {\n border-left: 4px solid;\n margin-left: -18px;\n padding-left: 14px;\n}\n\n.xspec .spec-added {\n border-color: var(--color-spec-added-border);\n}\n\n.xspec .spec-removed {\n border-color: var(--color-spec-removed-border);\n text-decoration: line-through;\n}\n\n.xspec\n/* Values */\n\n.spec-keyword {\n font-weight: bold;\n}\n\n.xspec .spec-string {\n font-family: var(--font-family-monospace);\n font-size: 85%;\n white-space: pre;\n}\n\n.xspec var {\n font-style: italic;\n}\n\n.xspec *[data-name] {\n transition: 0.15s background ease-out;\n border-radius: 2px;\n padding: 0 3px;\n margin: 0 -3px;\n}\n\n.xspec\n/* Grammar semantics, .xspec algorithms and calls */\n\n.spec-semantic,\n.xspec .spec-algo {\n margin: 1rem 0 1rem var(--dfn-indent);\n}\n\n.xspec .spec-semantic>.spec-nt::after,\n.xspec .spec-algo>.spec-call:first-child::after {\n content: \":\";\n font-style: normal;\n font-weight: bold;\n margin-left: 1ex;\n}\n\n.xspec .spec-semantic ol,\n.xspec .spec-semantic ol ol ol ol,\n.xspec .spec-algo ol,\n.xspec .spec-algo ol ol ol ol {\n list-style-type: decimal;\n}\n\n.xspec .spec-semantic ol ol,\n.xspec .spec-semantic ol ol ol ol ol,\n.xspec .spec-algo ol ol,\n.xspec .spec-algo ol ol ol ol ol {\n list-style-type: lower-alpha;\n}\n\n.xspec .spec-semantic ol ol ol,\n.xspec .spec-semantic ol ol ol ol ol ol,\n.xspec .spec-algo ol ol ol,\n.xspec .spec-algo ol ol ol ol ol ol {\n list-style-type: lower-roman;\n}\n\n.xspec .spec-call>a {\n color: inherit;\n}\n\n.xspec\n/* Grammar productions */\n\n.spec-production {\n margin: 1rem 0 1rem var(--dfn-indent);\n}\n\n.xspec .spec-production>.spec-nt::after {\n content: \":\";\n font-style: normal;\n font-weight: bold;\n margin: 0 1ex;\n}\n\n.xspec .spec-semantic.d2>.spec-nt::after,\n.xspec .spec-production.d2>.spec-nt::after {\n content: \"::\";\n}\n\n.xspec .spec-semantic.d3>.spec-nt::after,\n.xspec .spec-production.d3>.spec-nt::after {\n content: \":::\";\n}\n\n.xspec .spec-production>.spec-rhs {\n line-height: 1.1;\n margin: 0.25em 0 0.5em calc(2 * var(--indent));\n text-indent: calc(-1 * var(--indent));\n}\n\n.xspec .spec-semantic>.spec-rhs {\n display: inline-block;\n text-indent: calc(-1 * var(--indent));\n margin-left: calc(1ex + var(--indent));\n}\n\n.xspec .spec-rhs>* {\n text-indent: 0;\n}\n\n.xspec .spec-oneof {\n display: inline;\n}\n\n.xspec .spec-oneof::before {\n content: \"one of\";\n font-style: normal;\n font-weight: bold;\n}\n\n.xspec .spec-oneof-grid {\n max-width: calc(100vw - 2rem);\n overflow: auto;\n margin: -1ex -1rem;\n padding: 1ex 1rem;\n}\n\n.xspec .spec-oneof-grid>table {\n margin-left: var(--indent);\n}\n\n.xspec .spec-oneof .spec-rhs {\n border: none;\n margin: 0;\n padding: 0 0 0 1rem;\n vertical-align: baseline;\n white-space: pre;\n}\n\n.xspec .spec-oneof .spec-rhs:first-child {\n padding: 0;\n}\n\n.xspec .spec-rhs .spec-constrained:not(:first-child),\n.xspec .spec-rhs .spec-quantified:not(:first-child),\n.xspec .spec-rhs .spec-nt:not(:first-child),\n.xspec .spec-rhs .spec-t:not(:first-child),\n.xspec .spec-rhs .spec-rx:not(:first-child),\n.xspec .spec-rhs .spec-prose:not(:first-child),\n.xspec .spec-rhs .spec-empty:not(:first-child),\n.xspec .spec-rhs .spec-lookahead:not(:first-child) {\n margin-left: 1ex;\n display: inline-block;\n}\n\n.xspec .spec-condition {\n font-size: 85%;\n}\n\n.xspec .spec-condition::before {\n content: \"[if \";\n}\n\n.xspec .spec-condition.not::before {\n content: \"[if not \";\n}\n\n.xspec .spec-condition::after {\n content: \"]\";\n}\n\n.xspec .spec-empty,\n.xspec .spec-prose {\n color: var(--color-spec-prose);\n}\n\n.xspec .spec-nt {\n font-style: italic;\n}\n\n.xspec .spec-nt>a {\n color: inherit;\n}\n\n.xspec .spec-quantifiers,\n.xspec .spec-params {\n font-size: 65%;\n font-style: normal;\n vertical-align: sub;\n}\n\n.xspec .spec-quantifier.list {\n color: var(--color-spec-quantifier-list);\n}\n\n.xspec .spec-quantifier.optional {\n color: var(--color-spec-quantifier-optional);\n}\n\n.xspec .spec-params,\n.xspec .spec-condition {\n color: var(--color-spec-condition);\n}\n\n.xspec .spec-params::before {\n content: \"[\";\n}\n\n.xspec .spec-params::after {\n content: \"]\";\n}\n\n.xspec .spec-quantifier:not(:last-child)::after,\n.xspec .spec-param:not(:last-child)::after {\n color: var(--color-spec-param);\n content: \", \";\n}\n\n.xspec .spec-param.conditional::before {\n content: \"?\";\n}\n\n.xspec .spec-param.negated::before {\n content: \"!\";\n}\n\n.xspec .spec-t,\n.xspec .spec-rx {\n color: var(--color-spec-rx);\n font-family: var(--font-family-monospace);\n font-weight: bold;\n}\n\n.xspec .spec-butnot::before {\n color: var(--color-grey);\n content: \"but not\";\n font-family: var(--font-family);\n font-weight: normal;\n margin-right: 1ex;\n}\n\n.xspec .spec-butnot>*:not(:first-child)::before {\n color: var(--color-grey);\n content: \"or\";\n font-family: var(--font-family);\n font-weight: normal;\n margin-right: 1ex;\n}\n\n.xspec .spec-rhs .spec-oneof::before,\n.xspec .spec-rhs .spec-butnot::before {\n margin-left: 1ex;\n}\n\n.xspec .spec-lookahead>* {\n margin: 0 !important;\n}\n\n.xspec .spec-lookahead>*:not(:first-child)::before {\n color: var(--color-grey);\n content: \", \";\n font-family: var(--font-family);\n font-style: normal;\n font-weight: normal;\n}\n\n.xspec .spec-lookahead::before {\n color: var(--color-grey);\n content: \"[lookahead = \";\n font-family: var(--font-family);\n font-style: normal;\n font-weight: normal;\n}\n\n.xspec .spec-lookahead.not::before {\n content: \"[lookahead \\2260 \";\n}\n\n.xspec .spec-lookahead.set::before {\n content: \"[lookahead \\2208 {\";\n margin-right: 0;\n}\n\n.xspec .spec-lookahead.set.not::before {\n content: \"[lookahead \\2209 {\";\n}\n\n.xspec .spec-lookahead.ntset::before {\n content: \"[lookahead \\2208 \";\n margin-right: 0;\n}\n\n.xspec .spec-lookahead.ntset.not::before {\n content: \"[lookahead \\2209 \";\n}\n\n.xspec .spec-lookahead::after {\n color: var(--color-grey);\n content: \"]\";\n}\n\n.xspec .spec-lookahead.set::after {\n content: \"}]\";\n}\n\n.xspec\n/* Prism color scheme */\n\ncode[class*=\"language-\"],\n.xspec pre[class*=\"language-\"] {\n color: var(--color-prism-foreground);\n background: none;\n text-shadow: 0 1px var(--color-prism-text-shadow);\n font-family: var(--font-family-monospace);\n font-size: 1em;\n text-align: left;\n white-space: pre;\n word-spacing: normal;\n word-break: normal;\n word-wrap: normal;\n line-height: 1.5;\n\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n\n -webkit-hyphens: none;\n -moz-hyphens: none;\n -ms-hyphens: none;\n hyphens: none;\n}\n\n.xspec pre[class*=\"language-\"]::-moz-selection,\n.xspec pre[class*=\"language-\"] ::-moz-selection,\n.xspec code[class*=\"language-\"]::-moz-selection,\n.xspec code[class*=\"language-\"] ::-moz-selection {\n text-shadow: none;\n background: var(--color-prism-background);\n}\n\n.xspec pre[class*=\"language-\"]::selection,\n.xspec pre[class*=\"language-\"] ::selection,\n.xspec code[class*=\"language-\"]::selection,\n.xspec code[class*=\"language-\"] ::selection {\n text-shadow: none;\n background: var(--color-prism-background);\n}\n\n@media print {\n\n code[class*=\"language-\"],\n pre[class*=\"language-\"] {\n text-shadow: none;\n }\n}\n\n.xspec\n\n/* Code blocks */\npre[class*=\"language-\"] {\n padding: 1em;\n margin: 0.5em 0;\n overflow: auto;\n}\n\n.xspec :not(pre)>code[class*=\"language-\"],\n.xspec pre[class*=\"language-\"] {\n background: var(--color-prism-block-background);\n}\n\n.xspec\n\n/* Inline code */\n:not(pre)>code[class*=\"language-\"] {\n padding: 0.1em;\n border-radius: 0.3em;\n white-space: normal;\n}\n\n.xspec .token.atrule,\n.xspec .token.attr-value,\n.xspec .token.keyword,\n.xspec .token.property,\n.xspec .token.selector,\n.xspec .token.attr-name,\n.xspec .token.builtin,\n.xspec .token.entity,\n.xspec .token.url,\n.xspec .token.inserted {\n color: var(--color-token-inserted);\n background: none;\n}\n\n.xspec .token.tag,\n.xspec .token.boolean,\n.xspec .token.number,\n.xspec .token.string,\n.xspec .token.char,\n.xspec .token.constant,\n.xspec .token.symbol,\n.xspec .token.regex,\n.xspec .token.important,\n.xspec .token.variable,\n.xspec .token.function,\n.xspec .token.class-name,\n.xspec .token.deleted {\n color: var(--color-token-deleted);\n}\n\n.xspec .token.comment,\n.xspec .token.prolog,\n.xspec .token.doctype,\n.xspec .token.cdata,\n.xspec .token.description {\n color: inherit;\n opacity: 0.3;\n}\n\n.xspec .token.punctuation {\n color: inherit;\n opacity: 0.5;\n}\n\n.xspec .token.operator,\n.xspec .token.namespace {\n color: inherit;\n opacity: 0.7;\n}","import React from \"react\";\n\nimport { Pre, type HighlightedCode } from \"codehike/code\";\n\nexport default function XSpecPre({ ...props }: any) {\n let highlighted: HighlightedCode | null = null;\n\n if (props.highlighted) {\n if (typeof props.highlighted === \"string\") {\n try {\n highlighted = JSON.parse(props.highlighted) as any as HighlightedCode;\n } catch (e) {}\n } else {\n highlighted = props.highlighted;\n }\n }\n\n const preProps = {\n code: highlighted,\n } as any;\n\n if (typeof props?.attributes === \"string\") {\n try {\n const attrs = JSON.parse(props?.attributes) as any;\n\n if (attrs.class) {\n preProps.className = attrs.class;\n }\n } catch (e) {}\n }\n\n if (highlighted) {\n return <Pre {...preProps} />;\n }\n\n return null;\n}\n","import React from \"react\";\n\nimport { XSpecBox } from \"./XSpecBox\";\nimport { XSpecHeader } from \"./XSpecHeader\";\nimport { XSpecSection } from \"./XSpecSection\";\nimport { XSpecNavItem } from \"./XSpecNavItem\";\nimport { XSpecSidebarItem } from \"./XSpecSidebarItem\";\nimport { XSpecSidebar } from \"./XSpecSidebar\";\nimport { XSpecProductionRule } from \"./XSpecProductionRule\";\nimport { XSpecTableOfContents } from \"./XSpecTableOfContents\";\n\ninterface XSpecProps {\n children: React.ReactNode;\n}\n\n// Styles are now scoped via `.xspec` prefix in CSS\nexport default function XSpec({ children }: XSpecProps) {\n return <div className=\"xspec\">{children}</div>;\n}\n\nXSpec.Box = XSpecBox;\nXSpec.Header = XSpecHeader;\nXSpec.Section = XSpecSection;\nXSpec.NavItem = XSpecNavItem;\nXSpec.SidebarItem = XSpecSidebarItem;\nXSpec.Sidebar = XSpecSidebar;\nXSpec.ProductionRule = XSpecProductionRule;\nXSpec.TableOfContents = XSpecTableOfContents;\n","import React from \"react\";\n\nimport type { SpecBoxProps } from \"../types\";\n\nexport function XSpecBox({ type, id, children, source }: SpecBoxProps) {\n const classNames = {\n note: \"spec-note\",\n todo: \"spec-todo\",\n example: \"spec-example\",\n \"counter-example\": \"spec-counter-example\",\n };\n\n const labels = {\n note: \"Note\",\n todo: \"Todo\",\n example: \"Example\",\n \"counter-example\": \"Counter Example\",\n };\n\n return (\n <div id={id} className={classNames[type]} data-source={source}>\n <a href={`#${id}`}>{labels[type]}</a>\n {children}\n </div>\n );\n}\n","import React from \"react\";\n\nimport type { SpecHeaderProps } from \"../types\";\n\nexport function XSpecHeader({\n id,\n secid,\n title,\n level = \"h1\",\n dataSource,\n}: SpecHeaderProps) {\n const HeadingTag = level;\n\n return (\n <HeadingTag data-source={dataSource}>\n <span className=\"spec-secid\" title=\"link to this section\">\n <a href={`#${id}`}>{secid}</a>\n </span>\n {title}\n </HeadingTag>\n );\n}\n","import React from \"react\";\n\nimport type { SpecSectionProps } from \"../types\";\nimport { XSpecHeader } from \"./XSpecHeader\";\n\nexport function XSpecSection({\n id,\n secid,\n title,\n headingLevel = \"h1\",\n dataSource,\n children,\n className,\n indexSpec = false,\n}: SpecSectionProps) {\n return (\n <section\n id={id}\n {...({ secid } as any)}\n className={`${className || ''} ${indexSpec ? \"spec-index\" : ''}`}\n >\n <XSpecHeader\n id={id}\n secid={secid}\n title={title}\n level={headingLevel}\n dataSource={dataSource}\n />\n {children}\n </section>\n );\n}\n\nexport default XSpecSection\n\n\n","import React from \"react\";\n\nimport type { NavItem as NavItemType } from \"../types\";\n\ninterface NavItemProps {\n item: NavItemType;\n}\n\nexport function XSpecNavItem({ item }: NavItemProps) {\n const hasChildren = item.children && item.children.length > 0;\n\n return (\n <li>\n <a href={item.href}>\n <span className=\"spec-secid\">{item.secid}</span>\n {item.label}\n </a>\n {hasChildren && (\n <ol>\n {item.children!.map((child) => (\n <XSpecNavItem key={child.id} item={child} />\n ))}\n </ol>\n )}\n </li>\n );\n}\n","import React from \"react\";\n\nimport type { NavItem as NavItemType } from \"../types\";\n\ninterface SidebarItemProps {\n item: NavItemType;\n}\n\nexport function XSpecSidebarItem({ item }: SidebarItemProps) {\n const hasChildren = item.children && item.children.length > 0;\n\n return (\n <li id={`_sidebar_${item.secid}`} className=\"\">\n <a href={item.href}>\n <span className=\"spec-secid\">{item.secid}</span>\n {item.label}\n </a>\n {hasChildren && (\n <>\n <input\n {...({ hidden: \"\" } as any)}\n className=\"toggle\"\n type=\"checkbox\"\n id={`_toggle_${item.secid}`}\n />\n <label htmlFor={`_toggle_${item.secid}`} />\n <ol>\n {item.children!.map((child) => (\n <XSpecSidebarItem key={child.id} item={child} />\n ))}\n </ol>\n </>\n )}\n </li>\n );\n}\n","import React from \"react\";\n\nimport { XSpecSidebarItem } from \"./XSpecSidebarItem\";\nimport type { NavItem } from \"../types\";\n\ninterface SidebarProps {\n items: NavItem[];\n}\n\nexport function XSpecSidebar({ items }: SidebarProps) {\n return (\n <div className=\"spec-sidebar\" aria-hidden=\"true\">\n <div className=\"spec-toc\">\n <div className=\"title\">\n <a href=\"#\">Spec Markdown</a>\n </div>\n <ol>\n {items.map((item) => (\n <XSpecSidebarItem key={item.id} item={item} />\n ))}\n <li id=\"_sidebar_index\">\n <a href=\"#index\">\n <span className=\"spec-secid\">§</span>Index\n </a>\n </li>\n </ol>\n </div>\n </div>\n );\n}\n","import React from \"react\";\n\nimport type { ProductionItem } from \"../types\";\n\ninterface ProductionRuleProps {\n production: ProductionItem;\n}\n\nexport function XSpecProductionRule({ production }: ProductionRuleProps) {\n if (production.useGrid && production.gridItems) {\n const columns = production.columns || 5;\n const rows: string[][] = [];\n\n for (let i = 0; i < production.gridItems.length; i += columns) {\n rows.push(production.gridItems.slice(i, i + columns));\n }\n\n return (\n <div className=\"spec-production\" id={production.name}>\n <span className=\"spec-nt\">\n <a href={`#${production.name}`} data-name={production.name}>\n {production.name}\n </a>\n </span>\n <div className=\"spec-oneof\">\n <div className=\"spec-oneof-grid\">\n <table>\n <tbody>\n {rows.map((row, rowIndex) => (\n <tr key={rowIndex}>\n {row.map((item, cellIndex) => (\n <td key={cellIndex} className=\"spec-rhs\">\n <span className=\"spec-t\">{item}</span>\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"spec-production\" id={production.name}>\n <span className=\"spec-nt\">\n <a href={`#${production.name}`} data-name={production.name}>\n {production.name}\n </a>\n </span>\n {production.alternatives && production.alternatives.map((alt, altIndex) => (\n <div key={altIndex} className=\"spec-rhs\">\n {alt.map((token, tokenIndex) => (\n <span key={tokenIndex} className=\"spec-nt\">\n <span data-name={token}>{token}</span>\n </span>\n ))}\n </div>\n ))}\n </div>\n );\n}\n","import React from \"react\";\n\nimport { XSpecNavItem } from \"./XSpecNavItem\";\nimport type { NavItem as NavItemType } from \"../types\";\n\ninterface TableOfContentsProps {\n items: NavItemType[];\n}\n\nexport function XSpecTableOfContents({ items }: TableOfContentsProps) {\n return (\n <nav className=\"spec-toc\">\n <div className=\"title\">Contents</div>\n <ol>\n {items.map((item) => (\n <XSpecNavItem key={item.id} item={item} />\n ))}\n </ol>\n </nav>\n );\n}\n","import React from \"react\";\n\nimport XSpec from \"./XSpec\";\n\nexport default function XSpecWrapper({children}) {\n return (\n <XSpec>\n <article>{children}</article>\n </XSpec>\n );\n}\n","import type { PluginComponents } from \"@xyd-js/plugins\";\n\nimport XSpecPre from \"./components/XSpecPre\";\nimport XSpec from \"./components/XSpec\";\nimport XSpecWrapper from \"./components/XSpecWrapper\";\nimport Section from \"./components/XSpecSection\";\n\nexport const components: PluginComponents = {\n XSpec,\n\n h1: ({ children, ...props }) => <h1 {...props}>{children}</h1>,\n h2: ({ children, ...props }) => <h2 {...props}>{children}</h2>,\n h3: ({ children, ...props }) => <h3 {...props}>{children}</h3>,\n h4: ({ children, ...props }) => <h4 {...props}>{children}</h4>,\n h5: ({ children, ...props }) => <h5 {...props}>{children}</h5>,\n h6: ({ children, ...props }) => <h6 {...props}>{children}</h6>,\n\n p: ({ children, ...props }) => <p {...props}>{children}</p>,\n\n a: ({ children, ...props }) => <a {...props}>{children}</a>,\n\n dt: ({ children, ...props }) => (\n <dfn>\n <dt {...props}>\n <dfn>{children}</dfn>\n </dt>\n </dfn>\n ),\n dl: ({ children, ...props }) => <dl {...props}>{children}</dl>,\n dd: ({ children, ...props }) => <dd {...props}>{children}</dd>,\n dfn: ({ children, ...props }) => <dfn {...props}>{children}</dfn>,\n\n img: ({ children, ...props }) => <img {...props} />,\n\n ul: ({ children, ...props }) => <ul {...props}>{children}</ul>,\n ol: ({ children, ...props }) => <ol {...props}>{children}</ol>,\n li: ({ children, ...props }) => <li {...props}>{children}</li>,\n\n header: ({ children, ...props }) => <header {...props}>{children}</header>,\n section: XSpec.Section,\n Section,\n article: ({ children, ...props }) => <article {...props}>{children}</article>,\n footer: ({ children, ...props }) => <footer {...props}>{children}</footer>,\n\n table: ({ children, ...props }) => <table {...props}>{children}</table>,\n\n pre: XSpecPre,\n code: ({ children, ...props }) => <code {...props}>{children}</code>,\n wrapper: XSpecWrapper,\n Callout: XSpec.Box,\n} as const;\n"],"mappings":";AAAA,SAAS,sBAAsB,2BAA2B;;;ACA1D;;;ACAA,OAAOA,YAAW;AAElB,SAAS,WAAiC;AAE3B,SAAR,SAA0B,EAAE,GAAG,MAAM,GAAQ;AAClD,MAAI,cAAsC;AAE1C,MAAI,MAAM,aAAa;AACrB,QAAI,OAAO,MAAM,gBAAgB,UAAU;AACzC,UAAI;AACF,sBAAc,KAAK,MAAM,MAAM,WAAW;AAAA,MAC5C,SAAS,GAAG;AAAA,MAAC;AAAA,IACf,OAAO;AACL,oBAAc,MAAM;AAAA,IACtB;AAAA,EACF;AAEA,QAAM,WAAW;AAAA,IACf,MAAM;AAAA,EACR;AAEA,MAAI,OAAO,OAAO,eAAe,UAAU;AACzC,QAAI;AACF,YAAM,QAAQ,KAAK,MAAM,OAAO,UAAU;AAE1C,UAAI,MAAM,OAAO;AACf,iBAAS,YAAY,MAAM;AAAA,MAC7B;AAAA,IACF,SAAS,GAAG;AAAA,IAAC;AAAA,EACf;AAEA,MAAI,aAAa;AACf,WAAO,gBAAAA,OAAA,cAAC,OAAK,GAAG,UAAU;AAAA,EAC5B;AAEA,SAAO;AACT;;;ACpCA,OAAOC,aAAW;;;ACAlB,OAAOC,YAAW;AAIX,SAAS,SAAS,EAAE,MAAM,IAAI,UAAU,OAAO,GAAiB;AACrE,QAAM,aAAa;AAAA,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AAG,SAAQ,QAAS;AAAA,EACzD,IAAI,CAAC,EAAE,UAAU,GAAG,MAAM,MAAM,oCAAC,QAAI,GAAG,SAAQ,QAAS;AAAA,EAEzD,QAAQ,CAAC,EAAE,UAAU,GAAG,MAAM,MAAM,oCAAC,YAAQ,GAAG,SAAQ,QAAS;AAAA,EACjE,SAAS,MAAM;AAAA,EACf;AAAA,EACA,SAAS,CAAC,EAAE,UAAU,GAAG,MAAM,MAAM,oCAAC,aAAS,GAAG,SAAQ,QAAS;AAAA,EACnE,QAAQ,CAAC,EAAE,UAAU,GAAG,MAAM,MAAM,oCAAC,YAAQ,GAAG,SAAQ,QAAS;AAAA,EAEjE,OAAO,CAAC,EAAE,UAAU,GAAG,MAAM,MAAM,oCAAC,WAAO,GAAG,SAAQ,QAAS;AAAA,EAE/D,KAAK;AAAA,EACL,MAAM,CAAC,EAAE,UAAU,GAAG,MAAM,MAAM,oCAAC,UAAM,GAAG,SAAQ,QAAS;AAAA,EAC7D,SAAS;AAAA,EACT,SAAS,MAAM;AACjB;;;AblCe,SAAR,cAAuC;AAC5C,SAAO,MAAM;AACX,UAAM,OAAiD;AAAA,MACrD,CAAC,SAAS,CAAC,GAAG,cAAM;AAAA,IACtB;AAEA,UAAM,gBACJ,CAAC,oBAAoB;AAIvB,WAAO;AAAA,MACL,MAAM;AAAA,MACN,MAAM,CAAC;AAAA,MACP;AAAA,MACA;AAAA,MACA,UAAU;AAAA,QACR,QAAQ;AAAA,QACR,sBAAsB;AAAA,UACpB,GAAG;AAAA,QACL;AAAA,MACF;AAAA,MACA,OAAO;AAAA;AAAA,QAEL,gBAAgB,KAAK;AACnB,gBAAM,YAAY,KAAK,UAAU;AAEjC,cAAI,cAAc,SAAS;AACzB,mBAAO;AAAA,UACT;AAEA,iBAAO;AAAA,QACT;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;","names":["React","React","React","React","React","React","React","React","React","React","React","React","React","React","React","React"]}
@@ -0,0 +1,42 @@
1
+ import React from 'react';
2
+
3
+ interface NavItem {
4
+ id: string;
5
+ label: string;
6
+ secid: string;
7
+ href: string;
8
+ children?: NavItem[];
9
+ hasToggle?: boolean;
10
+ }
11
+ interface SpecBoxProps {
12
+ type: "note" | "todo" | "example" | "counter-example";
13
+ id: string;
14
+ children: React.ReactNode;
15
+ source?: string;
16
+ }
17
+ interface ProductionItem {
18
+ name: string;
19
+ alternatives?: string[][];
20
+ useGrid?: boolean;
21
+ columns?: number;
22
+ gridItems?: string[];
23
+ }
24
+ interface SpecSectionProps {
25
+ id: string;
26
+ secid: number | string;
27
+ title: string;
28
+ headingLevel?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
29
+ dataSource?: string;
30
+ children: React.ReactNode;
31
+ className?: string;
32
+ indexSpec?: boolean;
33
+ }
34
+ interface SpecHeaderProps {
35
+ id: string;
36
+ secid: number | string;
37
+ title: string;
38
+ level?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
39
+ dataSource?: string;
40
+ }
41
+
42
+ export type { NavItem as N, ProductionItem as P, SpecBoxProps as S, SpecHeaderProps as a, SpecSectionProps as b };
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "@xyd-js/plugin-xspec",
3
+ "version": "0.0.0-build-83b15db-20251213220910",
4
+ "author": "",
5
+ "description": "",
6
+ "license": "MIT",
7
+ "main": "./dist/index.js",
8
+ "type": "module",
9
+ "exports": {
10
+ "./package.json": "./package.json",
11
+ ".": {
12
+ "import": "./dist/index.js"
13
+ },
14
+ "./XSpec": {
15
+ "import": "./dist/XSpec.js"
16
+ },
17
+ "./XSpecPre": {
18
+ "import": "./dist/XSpecPre.js"
19
+ },
20
+ "./XSpecWrapper": {
21
+ "import": "./dist/XSpecWrapper.js"
22
+ },
23
+ "./XSpecSection": {
24
+ "import": "./dist/XSpecSection.js"
25
+ },
26
+ "./Section": {
27
+ "import": "./dist/Section.js"
28
+ }
29
+ },
30
+ "files": [
31
+ "dist"
32
+ ],
33
+ "dependencies": {
34
+ "codehike": "^1.0.7",
35
+ "remark-definition-list": "^2.0.0"
36
+ },
37
+ "peerDependencies": {
38
+ "react": "^18.0.0 || ^19.0.0",
39
+ "@xyd-js/plugins": "0.0.0-build-83b15db-20251213220910"
40
+ },
41
+ "devDependencies": {
42
+ "@types/react": "^19.0.0",
43
+ "@vitest/coverage-v8": "^1.6.1",
44
+ "rimraf": "^3.0.2",
45
+ "tsup": "^8.4.0",
46
+ "vite": "^7.0.0",
47
+ "vitest": "^1.6.1"
48
+ },
49
+ "scripts": {
50
+ "clean": "rimraf build",
51
+ "prebuild": "pnpm clean",
52
+ "build": "tsup",
53
+ "test": "vitest",
54
+ "test:coverage": "vitest run --coverage"
55
+ }
56
+ }