@vhyxui/react 0.1.0-alpha.1 → 0.1.1-alpha.2

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 @@
1
+ "use strict";const e=require("./jsx-runtime-BRMkMA8J.cjs"),d=require("@vhyxseal/react"),p=require("./Toast-ndaxbpcV.cjs"),x={"skip-link":"_skip-link_1u818_1"};function i({children:s,toastPosition:o="bottom-right",maxToasts:n=5,defaultDuration:r=4e3,domain:t}){const c=t??(typeof process<"u"?process.env.NEXT_PUBLIC_VHYX_DOMAIN??"":""),a=process.env.NODE_ENV!=="production";return e.jsxRuntimeExports.jsxs(d.SealProvider,{config:{domain:c,domainVerified:!1,verificationToken:""},dev:a,children:[e.jsxRuntimeExports.jsx("a",{href:"#vhyx-main",className:x["skip-link"],children:"Skip to main content"}),e.jsxRuntimeExports.jsx(p.ToastProvider,{position:o,maxToasts:n,defaultDuration:r,children:s})]})}i.displayName="VhyxUIProvider";exports.VhyxUIProvider=i;
@@ -0,0 +1,31 @@
1
+ import { j as o } from "./jsx-runtime-CL69jGNW.js";
2
+ import { SealProvider as p } from "@vhyxseal/react";
3
+ import { a as d } from "./Toast-0acAjZTB.js";
4
+ const m = {
5
+ "skip-link": "_skip-link_1u818_1"
6
+ };
7
+ function c({
8
+ children: i,
9
+ toastPosition: e = "bottom-right",
10
+ maxToasts: s = 5,
11
+ defaultDuration: r = 4e3,
12
+ domain: n
13
+ }) {
14
+ const t = n ?? (typeof process < "u" ? process.env.NEXT_PUBLIC_VHYX_DOMAIN ?? "" : ""), a = process.env.NODE_ENV !== "production";
15
+ return /* @__PURE__ */ o.jsxs(p, { config: { domain: t, domainVerified: !1, verificationToken: "" }, dev: a, children: [
16
+ /* @__PURE__ */ o.jsx("a", { href: "#vhyx-main", className: m["skip-link"], children: "Skip to main content" }),
17
+ /* @__PURE__ */ o.jsx(
18
+ d,
19
+ {
20
+ position: e,
21
+ maxToasts: s,
22
+ defaultDuration: r,
23
+ children: i
24
+ }
25
+ )
26
+ ] });
27
+ }
28
+ c.displayName = "VhyxUIProvider";
29
+ export {
30
+ c as V
31
+ };
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./VhyxUIProvider-C9NxI-tU.cjs"),d=require("./Button-CfYG4zkG.cjs"),l=require("./Input-OFmZxiHe.cjs"),T=require("./Textarea-H6evM8L4.cjs"),q=require("./Select-C9yB2B8M.cjs"),g=require("./Checkbox-DvkT6QP9.cjs"),u=require("./RadioItem-BfkTHBxQ.cjs"),m=require("./Switch-BU_Tcttb.cjs"),s=require("./Field-D6FSsUGj.cjs"),t=require("./Toast-ndaxbpcV.cjs"),P=require("./Alert-BJ1O0bnK.cjs"),f=require("./Badge-RM7n86Rq.cjs"),b=require("./Progress-FO-4WX0i.cjs"),S=require("./Spinner-DSHhLV-r.cjs"),v=require("./Dialog-gPT4noD8.cjs"),x=require("./Drawer-BygSIQQn.cjs"),I=require("./Tooltip-CCd6VRvZ.cjs"),h=require("./Popover-BPFkS4xn.cjs"),w=require("./Card-d5xrWgQS.cjs"),B=require("./Separator-C5lPGzes.cjs"),F=require("./Tabs-DuU02-UD.cjs"),C=require("./Breadcrumb-StitgXXx.cjs"),D=require("./Pagination-CmmcBPNz.cjs"),y=5e3;function o(i,r,e){const n={message:i,variant:r,duration:(e==null?void 0:e.duration)??y,dismissible:(e==null?void 0:e.dismissible)??!0};return(e==null?void 0:e.description)!==void 0&&(n.description=e.description),(e==null?void 0:e.action)!==void 0&&(n.action=e.action),n}function a(i,r){return t.addToast(o(i,"default",r))}a.success=function(r,e){return t.addToast(o(r,"success",e))};a.danger=function(r,e){return t.addToast(o(r,"danger",e))};a.warning=function(r,e){return t.addToast(o(r,"warning",e))};a.info=function(r,e){return t.addToast(o(r,"info",e))};a.dismiss=function(r){r!==void 0?t.dismissToast(r):t.dismissAllToasts()};const A=a;exports.VhyxUIProvider=c.VhyxUIProvider;exports.Button=d.Button;exports.Input=l.Input;exports.Textarea=T.Textarea;exports.Select=q.Select;exports.Checkbox=g.Checkbox;exports.RadioGroup=u.RadioGroup;exports.RadioItem=u.RadioItem;exports.Switch=m.Switch;exports.Field=s.Field;exports.Form=s.Form;exports.useFormContext=s.useFormContext;exports.Toast=t.Toast;exports.ToastProvider=t.ToastProvider;exports.Alert=P.Alert;exports.Badge=f.Badge;exports.Progress=b.Progress;exports.Spinner=S.Spinner;exports.Dialog=v.Dialog;exports.Drawer=x.Drawer;exports.Tooltip=I.Tooltip;exports.Popover=h.Popover;exports.Card=w.Card;exports.Separator=B.Separator;exports.Tabs=F.Tabs;exports.Breadcrumb=C.Breadcrumb;exports.Pagination=D.Pagination;exports.toast=A;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./VhyxUIProvider-C7ie8u2L.cjs"),d=require("./Button-CfYG4zkG.cjs"),l=require("./Input-OFmZxiHe.cjs"),T=require("./Textarea-H6evM8L4.cjs"),q=require("./Select-C9yB2B8M.cjs"),g=require("./Checkbox-DvkT6QP9.cjs"),u=require("./RadioItem-BfkTHBxQ.cjs"),m=require("./Switch-BU_Tcttb.cjs"),s=require("./Field-D6FSsUGj.cjs"),t=require("./Toast-ndaxbpcV.cjs"),P=require("./Alert-BJ1O0bnK.cjs"),f=require("./Badge-RM7n86Rq.cjs"),b=require("./Progress-FO-4WX0i.cjs"),S=require("./Spinner-DSHhLV-r.cjs"),v=require("./Dialog-gPT4noD8.cjs"),x=require("./Drawer-BygSIQQn.cjs"),I=require("./Tooltip-CCd6VRvZ.cjs"),h=require("./Popover-BPFkS4xn.cjs"),w=require("./Card-d5xrWgQS.cjs"),B=require("./Separator-C5lPGzes.cjs"),F=require("./Tabs-DuU02-UD.cjs"),C=require("./Breadcrumb-StitgXXx.cjs"),D=require("./Pagination-CmmcBPNz.cjs"),y=5e3;function o(i,r,e){const n={message:i,variant:r,duration:(e==null?void 0:e.duration)??y,dismissible:(e==null?void 0:e.dismissible)??!0};return(e==null?void 0:e.description)!==void 0&&(n.description=e.description),(e==null?void 0:e.action)!==void 0&&(n.action=e.action),n}function a(i,r){return t.addToast(o(i,"default",r))}a.success=function(r,e){return t.addToast(o(r,"success",e))};a.danger=function(r,e){return t.addToast(o(r,"danger",e))};a.warning=function(r,e){return t.addToast(o(r,"warning",e))};a.info=function(r,e){return t.addToast(o(r,"info",e))};a.dismiss=function(r){r!==void 0?t.dismissToast(r):t.dismissAllToasts()};const A=a;exports.VhyxUIProvider=c.VhyxUIProvider;exports.Button=d.Button;exports.Input=l.Input;exports.Textarea=T.Textarea;exports.Select=q.Select;exports.Checkbox=g.Checkbox;exports.RadioGroup=u.RadioGroup;exports.RadioItem=u.RadioItem;exports.Switch=m.Switch;exports.Field=s.Field;exports.Form=s.Form;exports.useFormContext=s.useFormContext;exports.Toast=t.Toast;exports.ToastProvider=t.ToastProvider;exports.Alert=P.Alert;exports.Badge=f.Badge;exports.Progress=b.Progress;exports.Spinner=S.Spinner;exports.Dialog=v.Dialog;exports.Drawer=x.Drawer;exports.Tooltip=I.Tooltip;exports.Popover=h.Popover;exports.Card=w.Card;exports.Separator=B.Separator;exports.Tabs=F.Tabs;exports.Breadcrumb=C.Breadcrumb;exports.Pagination=D.Pagination;exports.toast=A;
package/dist/index.d.ts CHANGED
@@ -1137,6 +1137,7 @@ export declare interface TooltipProps {
1137
1137
  */
1138
1138
  export declare function useFormContext(): FormContextValue | null;
1139
1139
 
1140
+ /** Default SealProvider config — domain and verification set by the consuming application. */
1140
1141
  /**
1141
1142
  * VhyxUIProvider — root provider for VhyxUI.
1142
1143
  *
@@ -1153,7 +1154,7 @@ export declare function useFormContext(): FormContextValue | null;
1153
1154
  * </main>
1154
1155
  * </VhyxUIProvider>
1155
1156
  */
1156
- export declare function VhyxUIProvider({ children, toastPosition, maxToasts, defaultDuration, }: VhyxUIProviderProps): default_2.ReactElement;
1157
+ export declare function VhyxUIProvider({ children, toastPosition, maxToasts, defaultDuration, domain, }: VhyxUIProviderProps): default_2.ReactElement;
1157
1158
 
1158
1159
  export declare namespace VhyxUIProvider {
1159
1160
  var displayName: string;
@@ -1179,6 +1180,12 @@ export declare interface VhyxUIProviderProps {
1179
1180
  * @default 4000
1180
1181
  */
1181
1182
  defaultDuration?: number;
1183
+ /**
1184
+ * Domain for VhyxSeal manifest generation.
1185
+ * Falls back to NEXT_PUBLIC_VHYX_DOMAIN env var, then empty string.
1186
+ * @example "myshop.platform.com"
1187
+ */
1188
+ domain?: string;
1182
1189
  }
1183
1190
 
1184
1191
  export { }
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { V as l } from "./VhyxUIProvider-D1vNoiIk.js";
1
+ import { V as l } from "./VhyxUIProvider-DVFSW4q-.js";
2
2
  import { B as T } from "./Button-B32xz0b5.js";
3
3
  import { I as P } from "./Input-Dqt5q33I.js";
4
4
  import { T as b } from "./Textarea-CLrctxHU.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./jsx-runtime-BRMkMA8J.cjs"),n=require("@testing-library/react"),o=require("./VhyxUIProvider-C9NxI-tU.cjs");function u(e,r){return n.render(e,{wrapper:({children:t})=>i.jsxRuntimeExports.jsx(o.VhyxUIProvider,{children:t}),...r})}exports.renderWithVhyxUI=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./jsx-runtime-BRMkMA8J.cjs"),n=require("@testing-library/react"),o=require("./VhyxUIProvider-C7ie8u2L.cjs");function u(e,r){return n.render(e,{wrapper:({children:t})=>i.jsxRuntimeExports.jsx(o.VhyxUIProvider,{children:t}),...r})}exports.renderWithVhyxUI=u;
@@ -1,6 +1,6 @@
1
1
  import { j as t } from "./jsx-runtime-CL69jGNW.js";
2
2
  import { render as i } from "@testing-library/react";
3
- import { V as m } from "./VhyxUIProvider-D1vNoiIk.js";
3
+ import { V as m } from "./VhyxUIProvider-DVFSW4q-.js";
4
4
  function s(r, o) {
5
5
  return i(r, {
6
6
  wrapper: ({ children: e }) => /* @__PURE__ */ t.jsx(m, { children: e }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vhyxui/react",
3
- "version": "0.1.0-alpha.1",
3
+ "version": "0.1.1-alpha.2",
4
4
  "description": "VhyxUI React components — accessible, motion-first, agent-ready",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -131,14 +131,19 @@
131
131
  },
132
132
  "./style.css": "./style.css"
133
133
  },
134
- "sideEffects": [
135
- "*.css",
136
- "dist/style.css"
137
- ],
134
+ "sideEffects": ["*.css", "dist/style.css"],
138
135
  "files": [
139
136
  "dist",
140
137
  "style.css"
141
138
  ],
139
+ "scripts": {
140
+ "build": "vite build",
141
+ "dev": "vite build --watch",
142
+ "test": "vitest run",
143
+ "test:watch": "vitest",
144
+ "typecheck": "tsc --project tsconfig.test.json --noEmit",
145
+ "lint": "eslint src"
146
+ },
142
147
  "dependencies": {
143
148
  "@vhyxseal/react": "1.0.0-rc.2",
144
149
  "@vhyxui/core": "0.1.0-alpha.1"
@@ -149,22 +154,12 @@
149
154
  "react-hook-form": ">=7"
150
155
  },
151
156
  "peerDependenciesMeta": {
152
- "react-hook-form": {
153
- "optional": true
154
- }
157
+ "react-hook-form": { "optional": true }
155
158
  },
156
159
  "devDependencies": {
157
160
  "@testing-library/react": "^14.0.0",
158
161
  "@types/react": "^18.0.0",
159
162
  "@types/react-dom": "^18.0.0",
160
163
  "react-hook-form": "^7.0.0"
161
- },
162
- "scripts": {
163
- "build": "vite build",
164
- "dev": "vite build --watch",
165
- "test": "vitest run",
166
- "test:watch": "vitest",
167
- "typecheck": "tsc --project tsconfig.test.json --noEmit",
168
- "lint": "eslint src"
169
164
  }
170
- }
165
+ }
@@ -1 +0,0 @@
1
- "use strict";const i=require("./jsx-runtime-BRMkMA8J.cjs"),c=require("@vhyxseal/react"),a=require("./Toast-ndaxbpcV.cjs"),x={"skip-link":"_skip-link_1u818_1"},d={domain:"",domainVerified:!1,verificationToken:""};function e({children:s,toastPosition:o="bottom-right",maxToasts:r=5,defaultDuration:n=4e3}){const t=process.env.NODE_ENV!=="production";return i.jsxRuntimeExports.jsxs(c.SealProvider,{config:d,dev:t,children:[i.jsxRuntimeExports.jsx("a",{href:"#vhyx-main",className:x["skip-link"],children:"Skip to main content"}),i.jsxRuntimeExports.jsx(a.ToastProvider,{position:o,maxToasts:r,defaultDuration:n,children:s})]})}e.displayName="VhyxUIProvider";exports.VhyxUIProvider=e;
@@ -1,34 +0,0 @@
1
- import { j as i } from "./jsx-runtime-CL69jGNW.js";
2
- import { SealProvider as t } from "@vhyxseal/react";
3
- import { a } from "./Toast-0acAjZTB.js";
4
- const m = {
5
- "skip-link": "_skip-link_1u818_1"
6
- }, p = {
7
- domain: "",
8
- domainVerified: !1,
9
- verificationToken: ""
10
- };
11
- function c({
12
- children: o,
13
- toastPosition: r = "bottom-right",
14
- maxToasts: s = 5,
15
- defaultDuration: e = 4e3
16
- }) {
17
- const n = process.env.NODE_ENV !== "production";
18
- return /* @__PURE__ */ i.jsxs(t, { config: p, dev: n, children: [
19
- /* @__PURE__ */ i.jsx("a", { href: "#vhyx-main", className: m["skip-link"], children: "Skip to main content" }),
20
- /* @__PURE__ */ i.jsx(
21
- a,
22
- {
23
- position: r,
24
- maxToasts: s,
25
- defaultDuration: e,
26
- children: o
27
- }
28
- )
29
- ] });
30
- }
31
- c.displayName = "VhyxUIProvider";
32
- export {
33
- c as V
34
- };