@atom63/ui-react 0.2.0-beta.2 → 0.2.0-beta.6

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.
Files changed (35) hide show
  1. package/README.md +54 -50
  2. package/dist/{button-sktq-nvV.d.ts → button-CfLIHg-R.d.ts} +1 -1
  3. package/dist/{chunk-MXNO63TC.js → chunk-DSHR3IVC.js} +4 -3
  4. package/dist/chunk-DSHR3IVC.js.map +1 -0
  5. package/dist/{chunk-STCXERLM.js → chunk-FGM3BFIX.js} +6 -132
  6. package/dist/chunk-FGM3BFIX.js.map +1 -0
  7. package/dist/chunk-JREAUE3E.js +2667 -0
  8. package/dist/chunk-JREAUE3E.js.map +1 -0
  9. package/dist/chunk-NFEMEDV3.js +135 -0
  10. package/dist/chunk-NFEMEDV3.js.map +1 -0
  11. package/dist/{chunk-7VSPECOH.js → chunk-R67OZVA2.js} +4 -14
  12. package/dist/chunk-R67OZVA2.js.map +1 -0
  13. package/dist/chunk-UPPHQLZ2.js +18 -0
  14. package/dist/chunk-UPPHQLZ2.js.map +1 -0
  15. package/dist/{destination-link-C9NKeKLe.d.ts → destination-link-DMLeR-oF.d.ts} +1 -1
  16. package/dist/index-Be9vd-R4.d.ts +436 -0
  17. package/dist/index.d.ts +49 -447
  18. package/dist/index.js +436 -3058
  19. package/dist/index.js.map +1 -1
  20. package/dist/media/index.js +4 -3
  21. package/dist/media/index.js.map +1 -1
  22. package/dist/media/media-lightbox/parts/index.d.ts +1 -1
  23. package/dist/media/media-lightbox/parts/index.js +3 -2
  24. package/dist/preview/index.d.ts +16 -0
  25. package/dist/preview/index.js +6 -0
  26. package/dist/preview/index.js.map +1 -0
  27. package/dist/theme/index.d.ts +1 -1
  28. package/dist/theme/index.js +2 -1
  29. package/dist/theme/index.js.map +1 -1
  30. package/package.json +21 -17
  31. package/src/styles/index.css +1 -0
  32. package/src/styles/utilities.css +2243 -0
  33. package/dist/chunk-7VSPECOH.js.map +0 -1
  34. package/dist/chunk-MXNO63TC.js.map +0 -1
  35. package/dist/chunk-STCXERLM.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/destination-link/destination-link.tsx","../src/components/portal-container/portal-container.tsx"],"names":["jsx"],"mappings":";;;;;;;;AAmBO,SAAS,eAAA,CAAgB;AAAA,EAC9B,YAAA,EAAc,SAAA;AAAA,EACd,QAAA;AAAA,EACA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,GAAG;AACL,CAAA,EAA6C;AAC3C,EAAA,MAAM,WAAW,IAAA,KAAS,UAAA;AAC1B,EAAA,MAAM,iBAAA,GAAoB,QAAA,IAAY,SAAA,GAAY,CAAA,EAAG,SAAS,CAAA,mBAAA,CAAA,GAAwB,SAAA;AACtF,EAAA,MAAM,gBAAA,GACJ,QAAA,IAAY,CAAC,SAAA,mBACX,IAAA,CAAA,QAAA,EAAA,EACG,QAAA,EAAA;AAAA,IAAA,QAAA;AAAA,IAAS,GAAA;AAAA,oBAAC,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,SAAA,EAAU,QAAA,EAAA,oBAAA,EAAkB;AAAA,GAAA,EACzD,CAAA,GAEA,QAAA;AAGJ,EAAA,OAAO,SAAA,CAAU;AAAA,IACf,cAAA,EAAgB,GAAA;AAAA,IAChB,KAAA,EAAO,UAAA;AAAA,MACL;AAAA,QACE,YAAA,EAAc,iBAAA;AAAA,QACd,QAAA,EAAU,gBAAA;AAAA,QACV,GAAA,EAAK,WAAW,qBAAA,GAAwB,MAAA;AAAA,QACxC,MAAA,EAAQ,WAAW,QAAA,GAAW;AAAA,OAChC;AAAA,MACA,KAAA;AAAA,MACA;AAAA,QACE,uBAAA,EAAyB,IAAA;AAAA,QACzB,WAAA,EAAa,uBAAA,CAAwB,KAAA,CAAM,CAAC;AAAA;AAC9C,KACF;AAAA,IACA,MAAA,EAAQ,WAAW,MAAA,GAAY,MAAA;AAAA,IAC/B,KAAA,EAAO;AAAA,MACL,IAAA,EAAM;AAAA;AACR,GACD,CAAA;AACH;AAkBO,SAAS,oBAAA,CAAqB;AAAA,EACnC,SAAA;AAAA,EACA;AACF,CAAA,EAGuB;AACrB,EAAA,MAAM,IAAA,GAAO,IAAA,KAAS,UAAA,GAAa,YAAA,GAAe,GAAA;AAClD,EAAA,uBACE,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,aAAA,EAAW,IAAA;AAAA,MACX,SAAA,EAAW,EAAA,CAAG,sBAAA,EAAwB,SAAS,CAAA;AAAA,MAC/C,uBAAA,EAAuB,IAAA;AAAA,MACvB,WAAA,EAAW,uBAAA,CAAwB,KAAA,CAAM,CAAC,CAAA;AAAA,MAE1C,QAAA,kBAAA,GAAA,CAAC,IAAA,EAAA,EAAK,aAAA,EAAW,IAAA,EAAC,WAAU,WAAA,EAAY;AAAA;AAAA,GAC1C;AAEJ;AC9EA,IAAM,sBAAA,GAA+B,qBAA+B,MAAS,CAAA;AAO7E,SAAS,uBAAA,CAAwB;AAAA,EAC/B,QAAA;AAAA,EACA;AACF,CAAA,EAAqD;AACnD,EAAA,uBACEA,GAAAA,CAAC,sBAAA,CAAuB,UAAvB,EAAgC,KAAA,EAAO,WAAY,QAAA,EAAS,CAAA;AAEjE;AAEA,SAAS,kBAAA,GAAsC;AAC7C,EAAA,OAAa,kBAAW,sBAAsB,CAAA;AAChD","file":"chunk-7VSPECOH.js","sourcesContent":["'use client'\n\nimport { type DestinationKind, destinationLinkContract } from '@atom63/ui-foundation'\nimport { mergeProps } from '@base-ui/react/merge-props'\nimport { useRender } from '@base-ui/react/use-render'\nimport { ExternalLink, Eye } from 'lucide-react'\nimport * as React from 'react'\nimport { cn } from '../../lib/cn'\n\nexport type { DestinationKind }\n\nexport type DestinationLinkProps = Omit<useRender.ComponentProps<'a'>, 'rel' | 'target'> & {\n kind: DestinationKind\n}\n\n/**\n * Router-neutral link semantics. Internal destinations may supply a router link\n * through `render`; external destinations always use a native new-tab anchor.\n */\nexport function DestinationLink({\n 'aria-label': ariaLabel,\n children,\n kind,\n render,\n ...props\n}: DestinationLinkProps): React.ReactElement {\n const external = kind === 'external'\n const resolvedAriaLabel = external && ariaLabel ? `${ariaLabel} (opens in new tab)` : ariaLabel\n const resolvedChildren =\n external && !ariaLabel ? (\n <>\n {children} <span className=\"sr-only\">(opens in new tab)</span>\n </>\n ) : (\n children\n )\n\n return useRender({\n defaultTagName: 'a',\n props: mergeProps<'a'>(\n {\n 'aria-label': resolvedAriaLabel,\n children: resolvedChildren,\n rel: external ? 'noopener noreferrer' : undefined,\n target: external ? '_blank' : undefined,\n },\n props,\n {\n 'data-destination-kind': kind,\n 'data-slot': destinationLinkContract.slots[0],\n } as React.ComponentProps<'a'>\n ),\n render: external ? undefined : render,\n state: {\n slot: 'destination-link',\n },\n })\n}\n\n/**\n * The glyph that names a destination: it opens a new tab, or it stays in the app.\n *\n * External is `open-in-new`, not a bare diagonal arrow. Measured by rasterising\n * each candidate and taking the alpha-weighted centroid, every bare arrow in the\n * set is ~12% ink with nearly all of it in the head, so its mass sits 1.3+ units\n * off the viewBox centre and it reads as crooked in a centred box unless each\n * call site carries a magic nudge (`north-east` needs 1.24px at 16px;\n * `arrow-outward-rounded`, 1.42px). `open-in-new` needs 0.14px — under a\n * rasterised pixel — so it is self-centring wherever it is used.\n *\n * It also pairs with `eye`: 25% ink in an 18×18 square against the eye's 35%,\n * rather than a wispy 15×15 diagonal beside a solid one. And it states what the\n * link actually does, matching the \"(opens in new tab)\" that `DestinationLink`\n * appends to the accessible name.\n */\nexport function DestinationIndicator({\n className,\n kind,\n}: {\n className?: string\n kind: DestinationKind\n}): React.ReactElement {\n const Icon = kind === 'external' ? ExternalLink : Eye\n return (\n <span\n aria-hidden\n className={cn('inline-flex shrink-0', className)}\n data-destination-kind={kind}\n data-slot={destinationLinkContract.slots[1]}\n >\n <Icon aria-hidden className=\"size-full\" />\n </span>\n )\n}\n","'use client'\n\nimport * as React from 'react'\n\n/*\n * PortalContainer — a tiny context that carries the DOM node (or ShadowRoot)\n * that portalled overlays (popovers, tooltips, dialogs) should render into.\n * Faithful port of prod @atom63/ui portal-container.tsx: same API\n * (PortalContainerProvider + usePortalContainer) and the same\n * HTMLElement | ShadowRoot | null | undefined value type. Purely behavioral —\n * no chrome, so there is no recipe CSS.\n */\n\nexport type PortalContainer = HTMLElement | ShadowRoot | null | undefined\n\nconst PortalContainerContext = React.createContext<PortalContainer>(undefined)\n\nexport interface PortalContainerProviderProps {\n children: React.ReactNode\n container: PortalContainer\n}\n\nfunction PortalContainerProvider({\n children,\n container,\n}: PortalContainerProviderProps): React.ReactElement {\n return (\n <PortalContainerContext.Provider value={container}>{children}</PortalContainerContext.Provider>\n )\n}\n\nfunction usePortalContainer(): PortalContainer {\n return React.useContext(PortalContainerContext)\n}\n\nexport { PortalContainerProvider, usePortalContainer }\n"]}