@hozo/semantics 0.1.0

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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 iray-tno
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,96 @@
1
+ # @hozo/semantics
2
+
3
+ Universal landmarks, document sectioning, forms, disclosures, and semantic page structure primitives for Hozo.
4
+
5
+ ```tsx
6
+ import {
7
+ Main,
8
+ Header,
9
+ Footer,
10
+ Aside,
11
+ Search,
12
+ Section,
13
+ Article,
14
+ Nav,
15
+ Figure,
16
+ Figcaption,
17
+ Time,
18
+ Address,
19
+ Fieldset,
20
+ Legend,
21
+ Details,
22
+ Summary,
23
+ TermList,
24
+ Separator,
25
+ Progress,
26
+ } from '@hozo/semantics'
27
+
28
+ export function Layout({ children }) {
29
+ return (
30
+ <>
31
+ <Header>
32
+ <Nav accessibilityLabel="Main Navigation" />
33
+ </Header>
34
+ <Main>
35
+ <Article>
36
+ <Time dateTime="2026-09-02">September 2, 2026</Time>
37
+ <Figure>
38
+ <Figcaption>Documentation overview</Figcaption>
39
+ </Figure>
40
+ {children}
41
+ </Article>
42
+ <Aside>
43
+ <Search />
44
+ </Aside>
45
+ </Main>
46
+ <Footer>
47
+ <Address>support@hozo.dev</Address>
48
+ </Footer>
49
+ </>
50
+ )
51
+ }
52
+ ```
53
+
54
+ ## Component Catalog
55
+
56
+ ### 1. Landmarks & Sectioning
57
+ - **`Main`**: The primary content landmark. Web lowers to `<main>`; Native lowers to `<View role="main">`.
58
+ - **`Header`**: Page or section header. Web lowers to `<header>`; Native lowers to `<View role="banner">`.
59
+ - **`Footer`**: Page or section footer. Web lowers to `<footer>`; Native lowers to `<View role="contentinfo">`.
60
+ - **`Aside`**: Complementary content / sidebar. Web lowers to `<aside>`; Native lowers to `<View role="complementary">`.
61
+ - **`Search`**: Search landmark container. Web lowers to `<search>`; Native lowers to `<View role="search">`.
62
+ - **`Nav`**: Navigation landmark. Web lowers to `<nav>`; Native lowers to `<View role="navigation">`.
63
+ - **`Section`**: Thematic section of a document. Web lowers to `<section>`; Native lowers to `<View>`.
64
+ - **`Article`**: Self-contained composition. Web lowers to `<article>`; Native lowers to `<View role="article">`.
65
+
66
+ ### 2. Informational & Figures
67
+ - **`Figure` / `Figcaption`**: Annotated figure and caption. Web lowers to `<figure>` and `<figcaption>`; Native lowers to `<View role="figure">` and `<Text>`.
68
+ - **`Time`**: Machine-readable time (`dateTime`). Web lowers to `<time dateTime="...">`; Native lowers to `<Text>`.
69
+ - **`Address`**: Contact information container. Web lowers to `<address>`; Native lowers to `<View>`.
70
+
71
+ ### 3. Forms & Grouping
72
+ - **`Fieldset` / `Legend`**: Grouping form controls with a caption. Web lowers to `<fieldset>` and `<legend>`; Native lowers to `<View role="group">` and `<Text>`.
73
+
74
+ ### 4. Disclosures
75
+ - **`Details` / `Summary`**: Native HTML disclosure element. Web lowers to `<details>` and `<summary>`; Native maps to an accessible disclosure container.
76
+
77
+ ### 5. Description Lists
78
+ - **`TermList` / `Term` / `Description`**: Definition lists (`<dl>`, `<dt>`, `<dd>`). Accessible via `TermList.Term` and `TermList.Description` or standalone imports.
79
+
80
+ ### 6. Separators & Progress
81
+ - **`Separator`**: Content divider. Supports `orientation="horizontal" | "vertical"` and `decorative`. Web lowers to `<hr>`; Native lowers to an accessible separator view with `accessibilityRole="separator"`.
82
+ - **`Progress`**: Completion indicator (`value`, `max`). Web lowers to `<progress>`; Native lowers to an accessible bar with `accessibilityRole="progressbar"`.
83
+
84
+ ## Features
85
+
86
+ - **Semantic HTML5 Web Output**: Direct compiler lowering to real HTML5 landmark and semantic elements, completely free of `react-native-web`.
87
+ - **Accessible React Native Output**: Automatically injects canonical accessibility roles (`role="main"`, `role="banner"`, `role="contentinfo"`, `role="complementary"`, `role="search"`, `role="figure"`) and maps captions to accessible `<Text>`.
88
+ - **Zero Runtime**: Direct compiler lowerings with working React component fallbacks when uncompiled.
89
+
90
+ <!-- generated: package-footer -->
91
+
92
+ ---
93
+
94
+ Part of [Hozo](https://iray-tno.github.io/hozo/), a Rust-powered universal UI compiler and accessibility-first layer for React Native. Most applications install [`@hozo/core`](https://www.npmjs.com/package/@hozo/core) and one build integration; see [Getting started](https://github.com/iray-tno/hozo#getting-started). Source and issues: [github.com/iray-tno/hozo](https://github.com/iray-tno/hozo).
95
+
96
+ <!-- /generated: package-footer -->
@@ -0,0 +1,47 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type StyleProp, type ViewStyle } from 'react-native';
3
+ export interface HozoDetailsProps {
4
+ /**
5
+ * Tailwind classes, the same prop the Web half takes.
6
+ *
7
+ * On a tag the compiler lowers it is gone by runtime, replaced by a
8
+ * `StyleSheet` entry. Anywhere else it is carried and ignored here --
9
+ * this side has no CSS engine to resolve a class list against -- and
10
+ * the type still has to accept it, because an app is type-checked
11
+ * against the source the compiler reads rather than its output.
12
+ */
13
+ className?: string;
14
+ children?: ReactNode;
15
+ /** Controlled. Without it the disclosure keeps its own state. */
16
+ open?: boolean;
17
+ defaultOpen?: boolean;
18
+ onToggle?: (open: boolean) => void;
19
+ style?: StyleProp<ViewStyle>;
20
+ testID?: string;
21
+ accessibilityLabel?: string;
22
+ }
23
+ export interface HozoSummaryProps {
24
+ /**
25
+ * Tailwind classes, the same prop the Web half takes.
26
+ *
27
+ * On a tag the compiler lowers it is gone by runtime, replaced by a
28
+ * `StyleSheet` entry. Anywhere else it is carried and ignored here --
29
+ * this side has no CSS engine to resolve a class list against -- and
30
+ * the type still has to accept it, because an app is type-checked
31
+ * against the source the compiler reads rather than its output.
32
+ */
33
+ className?: string;
34
+ children?: ReactNode;
35
+ style?: StyleProp<ViewStyle>;
36
+ testID?: string;
37
+ accessibilityLabel?: string;
38
+ }
39
+ /**
40
+ * The trigger, and the only child that survives being closed.
41
+ *
42
+ * Declared before `HozoDetails` because that one compares against it by
43
+ * identity to decide what to hide.
44
+ */
45
+ export declare function HozoSummary({ children, ...props }: HozoSummaryProps): import("react").JSX.Element;
46
+ export declare function HozoDetails({ children, open: controlled, defaultOpen, onToggle, ...props }: HozoDetailsProps): import("react").JSX.Element;
47
+ //# sourceMappingURL=disclosure.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"disclosure.native.d.ts","sourceRoot":"","sources":["../src/disclosure.native.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAIL,KAAK,SAAS,EAIf,MAAM,OAAO,CAAA;AACd,OAAO,EAAa,KAAK,SAAS,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AAY9E,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,iEAAiE;IACjE,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IAClC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,+BAYnE;AAED,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,IAAI,EAAE,UAAU,EAChB,WAAmB,EACnB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,gBAAgB,+BAuBlB"}
@@ -0,0 +1,51 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // A disclosure, which React Native has no element for.
3
+ //
4
+ // On the Web `<details>` is the whole feature: the browser opens and
5
+ // closes it, hides everything but the `<summary>` while closed, and puts
6
+ // the expanded state in the accessibility tree without being asked. So
7
+ // the Web backend lowers to the element and there is nothing here for it.
8
+ //
9
+ // React Native has none of that. The compiled output used to be a `View`
10
+ // holding a `Pressable` with a button role and then the body, always --
11
+ // no toggle on the button, and the body visible whether it was open or
12
+ // not. A disclosure that cannot close is not a disclosure, and a button
13
+ // that never says `expanded` tells a screen reader nothing about what it
14
+ // does.
15
+ //
16
+ // The pair here is what the compiler emits instead, for the reason it
17
+ // emits `HozoDialog`: the behaviour is React's, not the compiler's.
18
+ import { hozoTextChildren } from '@hozo/behaviors';
19
+ import { Children, createContext, isValidElement, useCallback, useContext, useState, } from 'react';
20
+ import { Pressable, View } from 'react-native';
21
+ const DisclosureContext = createContext({
22
+ open: false,
23
+ toggle: () => undefined,
24
+ });
25
+ /**
26
+ * The trigger, and the only child that survives being closed.
27
+ *
28
+ * Declared before `HozoDetails` because that one compares against it by
29
+ * identity to decide what to hide.
30
+ */
31
+ export function HozoSummary({ children, ...props }) {
32
+ const { open, toggle } = useContext(DisclosureContext);
33
+ return (_jsx(Pressable, { accessibilityRole: "button", accessibilityState: { expanded: open }, onPress: toggle, ...props, children: hozoTextChildren(children) }));
34
+ }
35
+ export function HozoDetails({ children, open: controlled, defaultOpen = false, onToggle, ...props }) {
36
+ const [uncontrolled, setUncontrolled] = useState(defaultOpen);
37
+ const open = controlled ?? uncontrolled;
38
+ const toggle = useCallback(() => {
39
+ const next = !open;
40
+ setUncontrolled(next);
41
+ onToggle?.(next);
42
+ }, [open, onToggle]);
43
+ // Everything but the summary goes away while it is closed, which is what
44
+ // the browser does with `<details>`. Recognised by identity rather than
45
+ // by position: HTML requires the summary to be the first child and Hozo
46
+ // does not check that, so a body written before it would otherwise be
47
+ // the thing that stayed.
48
+ const visible = Children.toArray(children).filter((child) => open || (isValidElement(child) && child.type === HozoSummary));
49
+ return (_jsx(DisclosureContext.Provider, { value: { open, toggle }, children: _jsx(View, { ...props, children: hozoTextChildren(visible) }) }));
50
+ }
51
+ //# sourceMappingURL=disclosure.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"disclosure.native.js","sourceRoot":"","sources":["../src/disclosure.native.tsx"],"names":[],"mappings":";AAAA,uDAAuD;AACvD,EAAE;AACF,qEAAqE;AACrE,yEAAyE;AACzE,uEAAuE;AACvE,0EAA0E;AAC1E,EAAE;AACF,yEAAyE;AACzE,wEAAwE;AACxE,uEAAuE;AACvE,wEAAwE;AACxE,yEAAyE;AACzE,QAAQ;AACR,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AAEpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBA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B,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CAC/C,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,WAAW,CAAC,CACzE,CAAA;IAED,OAAO,CACL,KAAC,iBAAiB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,YACjD,KAAC,IAAI,OAAK,KAAK,YAAG,gBAAgB,CAAC,OAAO,CAAC,GAAQ,GACxB,CAC9B,CAAA;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Details as HozoDetails, Summary as HozoSummary } from '../index.tsx';
2
+ //# sourceMappingURL=disclosure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"disclosure.d.ts","sourceRoot":"","sources":["../../src/generated/disclosure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,cAAc,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { Details as HozoDetails, Summary as HozoSummary } from '../index.js';
2
+ //# sourceMappingURL=disclosure.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"disclosure.js","sourceRoot":"","sources":["../../src/generated/disclosure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,aAAc,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { HozoDetails, type HozoDetailsProps, HozoSummary, type HozoSummaryProps, } from '../disclosure.native.tsx';
2
+ //# sourceMappingURL=disclosure.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"disclosure.native.d.ts","sourceRoot":"","sources":["../../src/generated/disclosure.native.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,EACrB,WAAW,EACX,KAAK,gBAAgB,GACtB,MAAM,0BAA0B,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { HozoDetails, HozoSummary, } from '../disclosure.native.js';
2
+ //# sourceMappingURL=disclosure.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"disclosure.native.js","sourceRoot":"","sources":["../../src/generated/disclosure.native.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAEX,WAAW,GAEZ,MAAM,yBAA0B,CAAA"}
@@ -0,0 +1,60 @@
1
+ import type { CSSProperties, ReactNode } from 'react';
2
+ export interface SemanticsUniversalProps {
3
+ className?: string;
4
+ children?: ReactNode;
5
+ style?: CSSProperties;
6
+ testID?: string;
7
+ nativeID?: string;
8
+ role?: string;
9
+ accessibilityLabel?: string;
10
+ accessibilityHint?: string;
11
+ 'aria-hidden'?: boolean;
12
+ 'aria-label'?: string;
13
+ }
14
+ export interface TimeProps extends SemanticsUniversalProps {
15
+ dateTime?: string;
16
+ datetime?: string;
17
+ }
18
+ export declare function Main({ className, children, style, ...props }: SemanticsUniversalProps): import("react").JSX.Element;
19
+ export declare function Header({ className, children, style, ...props }: SemanticsUniversalProps): import("react").JSX.Element;
20
+ export declare function Footer({ className, children, style, ...props }: SemanticsUniversalProps): import("react").JSX.Element;
21
+ export declare function Aside({ className, children, style, ...props }: SemanticsUniversalProps): import("react").JSX.Element;
22
+ export declare function Search({ className, children, style, ...props }: SemanticsUniversalProps): import("react").JSX.Element;
23
+ export declare function Section({ className, children, style, ...props }: SemanticsUniversalProps): import("react").JSX.Element;
24
+ export declare function Article({ className, children, style, ...props }: SemanticsUniversalProps): import("react").JSX.Element;
25
+ export declare function Nav({ className, children, style, ...props }: SemanticsUniversalProps): import("react").JSX.Element;
26
+ export interface ListProps extends SemanticsUniversalProps {
27
+ ordered?: boolean;
28
+ }
29
+ export declare function List({ ordered, className, children, style, ...props }: ListProps): import("react").JSX.Element;
30
+ export declare function ListItem({ className, children, style, ...props }: SemanticsUniversalProps): import("react").JSX.Element;
31
+ export declare function Figure({ className, children, style, ...props }: SemanticsUniversalProps): import("react").JSX.Element;
32
+ export declare function Figcaption({ className, children, style, ...props }: SemanticsUniversalProps): import("react").JSX.Element;
33
+ export declare function Time({ className, children, style, dateTime, datetime, ...props }: TimeProps): import("react").JSX.Element;
34
+ export declare function Address({ className, children, style, ...props }: SemanticsUniversalProps): import("react").JSX.Element;
35
+ export declare function Fieldset({ className, children, style, ...props }: SemanticsUniversalProps): import("react").JSX.Element;
36
+ export declare function Legend({ className, children, style, ...props }: SemanticsUniversalProps): import("react").JSX.Element;
37
+ export interface DetailsProps extends SemanticsUniversalProps {
38
+ open?: boolean;
39
+ }
40
+ export declare function Details({ className, children, style, open, ...props }: DetailsProps): import("react").JSX.Element;
41
+ export declare function Summary({ className, children, style, ...props }: SemanticsUniversalProps): import("react").JSX.Element;
42
+ export declare function Term({ className, children, style, ...props }: SemanticsUniversalProps): import("react").JSX.Element;
43
+ export declare function Description({ className, children, style, ...props }: SemanticsUniversalProps): import("react").JSX.Element;
44
+ export declare function TermList({ className, children, style, ...props }: SemanticsUniversalProps): import("react").JSX.Element;
45
+ export declare namespace TermList {
46
+ export { Term };
47
+ export { Description };
48
+ }
49
+ export interface SeparatorProps extends SemanticsUniversalProps {
50
+ orientation?: 'horizontal' | 'vertical';
51
+ decorative?: boolean;
52
+ }
53
+ export declare function Separator({ className, style, orientation, decorative, role, ...props }: SeparatorProps): import("react").JSX.Element;
54
+ export interface ProgressProps extends SemanticsUniversalProps {
55
+ value?: number;
56
+ max?: number;
57
+ children?: ReactNode;
58
+ }
59
+ export declare function Progress({ value, max, className, children, style, ...props }: ProgressProps): import("react").JSX.Element;
60
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAErD,MAAM,WAAW,uBAAuB;I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,
6
+ role: props.role,
7
+ 'aria-label': props['aria-label'] ?? props.accessibilityLabel,
8
+ 'aria-description': props.accessibilityHint,
9
+ 'aria-hidden': props['aria-hidden'],
10
+ };
11
+ }
12
+ export function Main({ className, children, style, ...props }) {
13
+ return (_jsx("main", { className: className, style: style, ...domProps(props), children: children }));
14
+ }
15
+ export function Header({ className, children, style, ...props }) {
16
+ return (_jsx("header", { className: className, style: style, ...domProps(props), children: children }));
17
+ }
18
+ export function Footer({ className, children, style, ...props }) {
19
+ return (_jsx("footer", { className: className, style: style, ...domProps(props), children: children }));
20
+ }
21
+ export function Aside({ className, children, style, ...props }) {
22
+ return (_jsx("aside", { className: className, style: style, ...domProps(props), children: children }));
23
+ }
24
+ export function Search({ className, children, style, ...props }) {
25
+ return (_jsx("search", { className: className, style: style, ...domProps(props), children: children }));
26
+ }
27
+ export function Section({ className, children, style, ...props }) {
28
+ return (_jsx("section", { className: className, style: style, ...domProps(props), children: children }));
29
+ }
30
+ export function Article({ className, children, style, ...props }) {
31
+ return (_jsx("article", { className: className, style: style, ...domProps(props), children: children }));
32
+ }
33
+ export function Nav({ className, children, style, ...props }) {
34
+ return (_jsx("nav", { className: className, style: style, ...domProps(props), children: children }));
35
+ }
36
+ export function List({ ordered = false, className, children, style, ...props }) {
37
+ const Tag = ordered ? 'ol' : 'ul';
38
+ return (_jsx(Tag, { className: className, style: style, ...domProps(props), children: children }));
39
+ }
40
+ export function ListItem({ className, children, style, ...props }) {
41
+ return (_jsx("li", { className: className, style: style, ...domProps(props), children: children }));
42
+ }
43
+ export function Figure({ className, children, style, ...props }) {
44
+ return (_jsx("figure", { className: className, style: style, ...domProps(props), children: children }));
45
+ }
46
+ export function Figcaption({ className, children, style, ...props }) {
47
+ return (_jsx("figcaption", { className: className, style: style, ...domProps(props), children: children }));
48
+ }
49
+ export function Time({ className, children, style, dateTime, datetime, ...props }) {
50
+ return (_jsx("time", { className: className, style: style, dateTime: dateTime ?? datetime, ...domProps(props), children: children }));
51
+ }
52
+ export function Address({ className, children, style, ...props }) {
53
+ return (_jsx("address", { className: className, style: style, ...domProps(props), children: children }));
54
+ }
55
+ export function Fieldset({ className, children, style, ...props }) {
56
+ return (_jsx("fieldset", { className: className, style: style, ...domProps(props), children: children }));
57
+ }
58
+ export function Legend({ className, children, style, ...props }) {
59
+ return (_jsx("legend", { className: className, style: style, ...domProps(props), children: children }));
60
+ }
61
+ export function Details({ className, children, style, open, ...props }) {
62
+ return (_jsx("details", { className: className, style: style, open: open, ...domProps(props), children: children }));
63
+ }
64
+ export function Summary({ className, children, style, ...props }) {
65
+ return (_jsx("summary", { className: className, style: style, ...domProps(props), children: children }));
66
+ }
67
+ export function Term({ className, children, style, ...props }) {
68
+ return (_jsx("dt", { className: className, style: style, ...domProps(props), children: children }));
69
+ }
70
+ export function Description({ className, children, style, ...props }) {
71
+ return (_jsx("dd", { className: className, style: style, ...domProps(props), children: children }));
72
+ }
73
+ export function TermList({ className, children, style, ...props }) {
74
+ return (_jsx("dl", { className: className, style: style, ...domProps(props), children: children }));
75
+ }
76
+ TermList.Term = Term;
77
+ TermList.Description = Description;
78
+ export function Separator({ className, style, orientation = 'horizontal', decorative = false, role, ...props }) {
79
+ const dom = domProps(props);
80
+ return (_jsx("hr", { className: className, style: style, "aria-orientation": orientation === 'vertical' ? 'vertical' : undefined, ...dom, role: role ?? (decorative ? 'none' : 'separator'), "aria-hidden": decorative ? true : dom['aria-hidden'] }));
81
+ }
82
+ export function Progress({ value, max, className, children, style, ...props }) {
83
+ return (_jsx("progress", { value: value, max: max, className: className, style: style, ...domProps(props), children: children ?? (value != null ? `${value}%` : undefined) }));
84
+ }
85
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";AAoBA,SAAS,QAAQ,CAAC,KAAwE;IACxF,OAAO;QACL,aAAa,EAAE,KAAK,CAAC,MAAM;QAC3B,EAAE,EAAE,KAAK,CAAC,QA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F,QAAQ,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,GAC7C,CACZ,CAAA;AACH,CAAC"}
@@ -0,0 +1,157 @@
1
+ import React, { type ReactNode } from 'react';
2
+ import { type AccessibilityRole, type Role, type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
3
+ export interface SemanticsNativeProps {
4
+ /**
5
+ * Tailwind classes, read by the compiler and gone by runtime.
6
+ *
7
+ * The Web half of this file has always declared it; this half never
8
+ * did, and nothing noticed because the `react-native` export condition
9
+ * carried no `types`, so a React Native app was type-checked against
10
+ * the Web declarations instead. Uncompiled, the prop is simply ignored
11
+ * here -- which is what the fallback components are for.
12
+ */
13
+ className?: string;
14
+ children?: ReactNode;
15
+ style?: StyleProp<ViewStyle>;
16
+ testID?: string;
17
+ nativeID?: string;
18
+ /**
19
+ * React Native's own unions rather than `string`.
20
+ *
21
+ * `any` and a bare `string` are the same mistake at different sizes: a
22
+ * prop that agrees with anything checks nothing. The Web half of this
23
+ * file has always said `CSSProperties`; this half said `any`, so a Web-only
24
+ * style or a role React Native has never heard of passed in silence.
25
+ *
26
+ * `Role` is the wider of the two and carries the landmark roles these
27
+ * components exist for. `AccessibilityRole` is the older prop and does
28
+ * not -- which is a difference this file had a bug in.
29
+ */
30
+ role?: Role;
31
+ accessibilityRole?: AccessibilityRole;
32
+ accessibilityLabel?: string;
33
+ accessibilityHint?: string;
34
+ accessible?: boolean;
35
+ }
36
+ export type SemanticsUniversalProps = SemanticsNativeProps;
37
+ /** The same, for the ones that render text rather than a box. */
38
+ export interface SemanticsTextNativeProps extends Omit<SemanticsNativeProps, 'style'> {
39
+ style?: StyleProp<TextStyle>;
40
+ }
41
+ export interface TimeNativeProps extends SemanticsTextNativeProps {
42
+ dateTime?: string;
43
+ datetime?: string;
44
+ }
45
+ export declare function Main({ role, children, ...props }: SemanticsNativeProps): React.FunctionComponentElement<Omit<import("react-native").ViewProps, "ref"> & {
46
+ ref?: React.Ref<import("react-native").ViewInstance> | undefined;
47
+ }>;
48
+ export declare function Header({ role, children, ...props }: SemanticsNativeProps): React.FunctionComponentElement<Omit<import("react-native").ViewProps, "ref"> & {
49
+ ref?: React.Ref<import("react-native").ViewInstance> | undefined;
50
+ }>;
51
+ export declare function Footer({ role, children, ...props }: SemanticsNativeProps): React.FunctionComponentElement<Omit<import("react-native").ViewProps, "ref"> & {
52
+ ref?: React.Ref<import("react-native").ViewInstance> | undefined;
53
+ }>;
54
+ export declare function Aside({ role, children, ...props }: SemanticsNativeProps): React.FunctionComponentElement<Omit<import("react-native").ViewProps, "ref"> & {
55
+ ref?: React.Ref<import("react-native").ViewInstance> | undefined;
56
+ }>;
57
+ /**
58
+ * The one landmark React Native has no word for.
59
+ *
60
+ * Its `Role` union carries every other role in this file -- banner,
61
+ * complementary, contentinfo, navigation, main, figure, group, list,
62
+ * separator -- and for search it has `searchbox`, which is the field
63
+ * rather than the region around it. `accessibilityRole: 'search'` means
64
+ * the field too.
65
+ *
66
+ * So this is a plain box here, and says so, rather than claiming a
67
+ * landmark by naming a widget. The Web half is a real `<search>`.
68
+ */
69
+ export declare function Search({ children, ...props }: SemanticsNativeProps): React.FunctionComponentElement<Omit<import("react-native").ViewProps, "ref"> & {
70
+ ref?: React.Ref<import("react-native").ViewInstance> | undefined;
71
+ }>;
72
+ export declare function Section({ children, ...props }: SemanticsNativeProps): React.FunctionComponentElement<Omit<import("react-native").ViewProps, "ref"> & {
73
+ ref?: React.Ref<import("react-native").ViewInstance> | undefined;
74
+ }>;
75
+ export declare function Article({ role, children, ...props }: SemanticsNativeProps): React.FunctionComponentElement<Omit<import("react-native").ViewProps, "ref"> & {
76
+ ref?: React.Ref<import("react-native").ViewInstance> | undefined;
77
+ }>;
78
+ export declare function Nav({ role, children, ...props }: SemanticsNativeProps): React.FunctionComponentElement<Omit<import("react-native").ViewProps, "ref"> & {
79
+ ref?: React.Ref<import("react-native").ViewInstance> | undefined;
80
+ }>;
81
+ export interface ListProps extends SemanticsNativeProps {
82
+ ordered?: boolean;
83
+ }
84
+ export declare function List({ ordered: _ordered, role, children, ...props }: ListProps): React.FunctionComponentElement<Omit<import("react-native").ViewProps, "ref"> & {
85
+ ref?: React.Ref<import("react-native").ViewInstance> | undefined;
86
+ }>;
87
+ export declare function ListItem({ role, children, ...props }: SemanticsNativeProps): React.FunctionComponentElement<Omit<import("react-native").ViewProps, "ref"> & {
88
+ ref?: React.Ref<import("react-native").ViewInstance> | undefined;
89
+ }>;
90
+ export declare function Figure({ role, children, ...props }: SemanticsNativeProps): React.FunctionComponentElement<Omit<import("react-native").ViewProps, "ref"> & {
91
+ ref?: React.Ref<import("react-native").ViewInstance> | undefined;
92
+ }>;
93
+ export declare function Figcaption(props: SemanticsTextNativeProps): React.FunctionComponentElement<Omit<import("react-native").TextProps, "ref"> & {
94
+ ref?: React.Ref<import("react-native").TextInstance> | undefined;
95
+ }>;
96
+ export declare function Time(props: TimeNativeProps): React.FunctionComponentElement<Omit<import("react-native").TextProps, "ref"> & {
97
+ ref?: React.Ref<import("react-native").TextInstance> | undefined;
98
+ }>;
99
+ export declare function Address({ children, ...props }: SemanticsNativeProps): React.FunctionComponentElement<Omit<import("react-native").ViewProps, "ref"> & {
100
+ ref?: React.Ref<import("react-native").ViewInstance> | undefined;
101
+ }>;
102
+ export declare function Fieldset({ role, children, ...props }: SemanticsNativeProps): React.FunctionComponentElement<Omit<import("react-native").ViewProps, "ref"> & {
103
+ ref?: React.Ref<import("react-native").ViewInstance> | undefined;
104
+ }>;
105
+ export declare function Legend({ style, ...props }: SemanticsTextNativeProps): React.FunctionComponentElement<Omit<import("react-native").TextProps, "ref"> & {
106
+ ref?: React.Ref<import("react-native").TextInstance> | undefined;
107
+ }>;
108
+ export interface DetailsNativeProps extends SemanticsNativeProps {
109
+ open?: boolean;
110
+ defaultOpen?: boolean;
111
+ onToggle?: (open: boolean) => void;
112
+ }
113
+ export declare function Details({ open, defaultOpen, onToggle, children, style, ...props }: DetailsNativeProps): React.JSX.Element;
114
+ export declare function Summary({ children, style, ...props }: SemanticsNativeProps): React.JSX.Element;
115
+ export declare function Term({ style, ...props }: SemanticsTextNativeProps): React.FunctionComponentElement<Omit<import("react-native").TextProps, "ref"> & {
116
+ ref?: React.Ref<import("react-native").TextInstance> | undefined;
117
+ }>;
118
+ export declare function Description({ children, ...props }: SemanticsNativeProps): React.FunctionComponentElement<Omit<import("react-native").ViewProps, "ref"> & {
119
+ ref?: React.Ref<import("react-native").ViewInstance> | undefined;
120
+ }>;
121
+ export declare function TermList({ role, children, ...props }: SemanticsNativeProps): React.FunctionComponentElement<Omit<import("react-native").ViewProps, "ref"> & {
122
+ ref?: React.Ref<import("react-native").ViewInstance> | undefined;
123
+ }>;
124
+ export declare namespace TermList {
125
+ export { Term };
126
+ export { Description };
127
+ }
128
+ export interface SeparatorProps extends SemanticsNativeProps {
129
+ orientation?: 'horizontal' | 'vertical';
130
+ decorative?: boolean;
131
+ }
132
+ export declare function Separator({ orientation, decorative, role, style, children, ...props }: SeparatorProps): React.FunctionComponentElement<Omit<import("react-native").ViewProps, "ref"> & {
133
+ ref?: React.Ref<import("react-native").ViewInstance> | undefined;
134
+ }>;
135
+ export interface ProgressProps extends SemanticsNativeProps {
136
+ value?: number;
137
+ max?: number;
138
+ accessibilityValue?: {
139
+ min?: number;
140
+ max?: number;
141
+ now?: number;
142
+ text?: string;
143
+ };
144
+ }
145
+ export declare function Progress({ value, max, role, accessibilityValue, style, children, ...props }: ProgressProps): React.FunctionComponentElement<Omit<import("react-native").ViewProps, "ref"> & {
146
+ ref?: React.Ref<import("react-native").ViewInstance> | undefined;
147
+ }>;
148
+ /**
149
+ * The names `@hozo/core` re-exports on the Web.
150
+ *
151
+ * The interfaces here are spelled `…NativeProps` because they are not the
152
+ * DOM ones, but a caller importing `DetailsProps` from `@hozo/core` should
153
+ * get a type on both platforms rather than one.
154
+ */
155
+ export type DetailsProps = DetailsNativeProps;
156
+ export type TimeProps = TimeNativeProps;
157
+ //# sourceMappingURL=index.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../src/index.native.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAuB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AASlE,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,IAAI,EACT,KAAK,SAAS,EAEd,KAAK,SAAS,EAEd,KAAK,SAAS,EACf,MAAM,cAAc,CAAA;AAGrB,MAAM,WAAW,oBAAoB;IACnC;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;IACrC,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAID,MAAM,MAAM,uBAAuB,GAAG,oBAAoB,CAAA;AAE1D,iEAAiE;AACjE,MAAM,WAAW,wBAAyB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC;IACnF,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC7B;AAED,MAAM,WAAW,eAAgB,SAAQ,wBAAwB;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,wBAAgB,IAAI,CAAC,EAAE,IAAa,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB;;GAE/E;AAED,wBAAgB,MAAM,CAA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