{"version":3,"sources":["../../src/utils/ods-spacing.ts"],"names":[],"mappings":";;;AAmBO,IAAM,kBAAA,GAAqB;AAAA,EAChC,MAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AAAA,EACA,KAAA;AAAA,EACA,GAAA;AAAA,EACA,IAAA;AAAA,EACA,GAAA;AAAA,EACA,IAAA;AAAA,EACA,GAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF;AAKO,IAAM,yBAAA,GAA4B;AAQlC,IAAM,iBAAA,GAAoB;AAAA,EAC/B,KAAA;AAAA,EACA,GAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,GAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF;AAWO,IAAM,0BAAA,GAA6B;AAAA,EACxC,CAAA,EAAG,KAAA;AAAA,EACH,CAAA,EAAG,KAAA;AAAA,EACH,CAAA,EAAG,IAAA;AAAA,EACH,CAAA,EAAG,IAAA;AAAA,EACH,CAAA,EAAG,IAAA;AAAA,EACH,EAAA,EAAI;AACN","file":"ods-spacing.cjs","sourcesContent":["/**\n * ODS spacing tokens + the ONE Tailwind-step → token conversion table.\n *\n * The ODS preset deliberately ships NO Tailwind `spacing` scale, so `gap-lf` is\n * not a class — spacing is written in the ARBITRARY-VALUE form\n * `gap-[var(--spacing-system-lf)]`.\n *\n * THAT FORM MUST BE WRITTEN AS A LITERAL IN JSX. Tailwind generates CSS only\n * for class strings its scanner can find verbatim in source, so a class NAME\n * assembled at runtime (`` `gap-[var(--spacing-system-${token})]` ``) produces\n * no rule at all and the spacing silently disappears — the variable resolves\n * fine, but no declaration ever references it. This module therefore exports\n * the token DATA (for tooling and tests) and deliberately NO class builder.\n *\n * JSX-free leaf with its own `exports` subpath so the hub's ODS allowlist script\n * (a plain node/tsx script) can import the token pattern without React.\n */\n\n/** Every `--spacing-system-*` token, in ascending order. */\nexport const ODS_SPACING_TOKENS = [\n  'zero',\n  'xxs',\n  'xs',\n  'xsf',\n  's',\n  'sf',\n  'm',\n  'mf',\n  'l',\n  'lf',\n  'xl',\n  'xlf',\n  'xxl',\n] as const;\n\nexport type OdsSpacingToken = (typeof ODS_SPACING_TOKENS)[number];\n\n/** Matches a `--spacing-system-<token>` reference (used by the hub's allowlist script). */\nexport const ODS_SPACING_TOKEN_PATTERN = /--spacing-system-([a-z]+)/g;\n\n/** Spacing properties the conversion covers (gap + every padding/margin edge). */\n/**\n * Every spacing property ODS tokenizes. A runtime TUPLE, not just a union, so\n * a consumer that has to scan source for untokenized spacing reads the list\n * from here instead of re-spelling it.\n */\nexport const ODS_SPACING_PROPS = [\n  'gap',\n  'p',\n  'px',\n  'py',\n  'pt',\n  'pb',\n  'pl',\n  'pr',\n  'm',\n  'mx',\n  'my',\n  'mt',\n  'mb',\n  'ml',\n  'mr',\n  'space-x',\n  'space-y',\n] as const;\n\nexport type OdsSpacingProp = (typeof ODS_SPACING_PROPS)[number];\n\n/**\n * THE conversion table: a Tailwind step whose pixel value has an EXACT ODS token.\n * Every entry is asserted against `ods-responsive-tokens.css` (4 x step px, and\n * fixed at every breakpoint) by this leaf's vitest. A step that is absent here\n * has no exact token and must be carried verbatim on a component's exported\n * \"untokenized spacing\" allowlist.\n */\nexport const TAILWIND_STEP_TO_ODS_TOKEN = {\n  1: 'xxs',\n  2: 'xsf',\n  3: 'sf',\n  4: 'mf',\n  6: 'lf',\n  10: 'xlf',\n} as const satisfies Record<number, OdsSpacingToken>;\n\nexport type TailwindSpacingStep = keyof typeof TAILWIND_STEP_TO_ODS_TOKEN;\n"]}