@sentientui/react 0.2.0 → 0.3.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/dist/server.js CHANGED
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,17 +17,28 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // src/server.ts
21
31
  var server_exports = {};
22
32
  __export(server_exports, {
23
33
  loadAdaptiveAssignments: () => loadAdaptiveAssignments,
34
+ loadAdaptiveDecision: () => loadAdaptiveDecision,
24
35
  preloadAssignments: () => import_core.preloadAssignments,
36
+ preloadDecisions: () => import_core2.preloadDecisions,
25
37
  readSessionCookie: () => import_core.readSessionCookie
26
38
  });
27
39
  module.exports = __toCommonJS(server_exports);
28
40
  var import_core = require("@sentientui/core");
41
+ var import_core2 = require("@sentientui/core");
29
42
  function defaultSessionId() {
30
43
  if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
31
44
  return crypto.randomUUID();
@@ -43,10 +56,31 @@ async function loadAdaptiveAssignments(components, options) {
43
56
  referer: options.referer
44
57
  });
45
58
  }
59
+ async function loadAdaptiveDecision(options) {
60
+ var _a, _b, _c, _d;
61
+ const { preloadDecisions: preloadDecisions2, readSessionCookie: readSessionCookie2 } = await import("@sentientui/core");
62
+ const sessionId = (_c = (_b = readSessionCookie2(options.cookies)) != null ? _b : (_a = options.createSessionId) == null ? void 0 : _a.call(options)) != null ? _c : defaultSessionId();
63
+ return preloadDecisions2(
64
+ {
65
+ sections: options.sections,
66
+ components: (_d = options.components) != null ? _d : []
67
+ },
68
+ sessionId,
69
+ {
70
+ apiKey: options.apiKey,
71
+ baseUrl: options.baseUrl,
72
+ origin: options.origin,
73
+ userAgent: options.userAgent,
74
+ referer: options.referer
75
+ }
76
+ );
77
+ }
46
78
  // Annotate the CommonJS export names for ESM import in node:
47
79
  0 && (module.exports = {
48
80
  loadAdaptiveAssignments,
81
+ loadAdaptiveDecision,
49
82
  preloadAssignments,
83
+ preloadDecisions,
50
84
  readSessionCookie
51
85
  });
52
86
  //# sourceMappingURL=server.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/server.ts"],"sourcesContent":["/**\r\n * Server-only helpers for Next.js / SSR. No React or DOM APIs.\r\n */\r\nimport {\r\n preloadAssignments,\r\n readSessionCookie,\r\n type ServerAssignConfig,\r\n type ServerAssignments,\r\n} from '@sentientui/core';\r\n\r\nexport { preloadAssignments, readSessionCookie };\r\nexport type { ServerAssignConfig, ServerAssignments };\r\n\r\nexport type LoadAdaptiveAssignmentsOptions = {\r\n /** Next.js `cookies()` return value, or any object with `get(name)`. */\r\n cookies: { get(name: string): { value: string } | undefined };\r\n apiKey: string;\r\n baseUrl: string;\r\n /** Used when `_snt_uid` is absent (e.g. first visit, many crawlers). */\r\n createSessionId?: () => string;\r\n /** Must match a value in the project's `allowed_origins` (e.g. `http://localhost:3001`). */\r\n origin?: string;\r\n /** From Next.js `headers().get('user-agent')` — aligns SSR segment with the client. */\r\n userAgent?: string;\r\n /** From Next.js `headers().get('referer')`. */\r\n referer?: string;\r\n};\r\n\r\nfunction defaultSessionId(): string {\r\n if (typeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function') {\r\n return crypto.randomUUID();\r\n }\r\n return `snt-${Date.now()}-${Math.random().toString(36).slice(2, 11)}`;\r\n}\r\n\r\n/**\r\n * Fetches bandit assignments on the server for SEO-safe HTML.\r\n * Pass the result as `initialAssignments` on `<AdaptiveProvider>`.\r\n */\r\nexport async function loadAdaptiveAssignments(\r\n components: Array<{ id: string; variantIds: string[] }>,\r\n options: LoadAdaptiveAssignmentsOptions,\r\n): Promise<ServerAssignments> {\r\n const sessionId =\r\n readSessionCookie(options.cookies) ??\r\n options.createSessionId?.() ??\r\n defaultSessionId();\r\n\r\n return preloadAssignments(components, sessionId, {\r\n apiKey: options.apiKey,\r\n baseUrl: options.baseUrl,\r\n origin: options.origin,\r\n userAgent: options.userAgent,\r\n referer: options.referer,\r\n });\r\n}\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAKO;AAoBP,SAAS,mBAA2B;AAClC,MAAI,OAAO,WAAW,eAAe,OAAO,OAAO,eAAe,YAAY;AAC5E,WAAO,OAAO,WAAW;AAAA,EAC3B;AACA,SAAO,OAAO,KAAK,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,GAAG,EAAE,CAAC;AACrE;AAMA,eAAsB,wBACpB,YACA,SAC4B;AA1C9B;AA2CE,QAAM,aACJ,8CAAkB,QAAQ,OAAO,MAAjC,aACA,aAAQ,oBAAR,qCADA,YAEA,iBAAiB;AAEnB,aAAO,gCAAmB,YAAY,WAAW;AAAA,IAC/C,QAAQ,QAAQ;AAAA,IAChB,SAAS,QAAQ;AAAA,IACjB,QAAQ,QAAQ;AAAA,IAChB,WAAW,QAAQ;AAAA,IACnB,SAAS,QAAQ;AAAA,EACnB,CAAC;AACH;","names":[]}
1
+ {"version":3,"sources":["../src/server.ts"],"sourcesContent":["/**\n * Server-only helpers for Next.js / SSR. No React or DOM APIs.\n */\nimport {\n preloadAssignments,\n readSessionCookie,\n type ServerAssignConfig,\n type ServerAssignments,\n} from '@sentientui/core';\n\nexport { preloadAssignments, readSessionCookie };\nexport type { ServerAssignConfig, ServerAssignments };\n\nexport type LoadAdaptiveAssignmentsOptions = {\n /** Next.js `cookies()` return value, or any object with `get(name)`. */\n cookies: { get(name: string): { value: string } | undefined };\n apiKey: string;\n baseUrl: string;\n /** Used when `_snt_uid` is absent (e.g. first visit, many crawlers). */\n createSessionId?: () => string;\n /** Must match a value in the project's `allowed_origins` (e.g. `http://localhost:3001`). */\n origin?: string;\n /** From Next.js `headers().get('user-agent')` — aligns SSR segment with the client. */\n userAgent?: string;\n /** From Next.js `headers().get('referer')`. */\n referer?: string;\n};\n\nfunction defaultSessionId(): string {\n if (typeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function') {\n return crypto.randomUUID();\n }\n return `snt-${Date.now()}-${Math.random().toString(36).slice(2, 11)}`;\n}\n\n/**\n * Fetches bandit assignments on the server for SEO-safe HTML.\n * Pass the result as `initialAssignments` on `<AdaptiveProvider>`.\n */\nexport async function loadAdaptiveAssignments(\n components: Array<{ id: string; variantIds: string[] }>,\n options: LoadAdaptiveAssignmentsOptions,\n): Promise<ServerAssignments> {\n const sessionId =\n readSessionCookie(options.cookies) ??\n options.createSessionId?.() ??\n defaultSessionId();\n\n return preloadAssignments(components, sessionId, {\n apiKey: options.apiKey,\n baseUrl: options.baseUrl,\n origin: options.origin,\n userAgent: options.userAgent,\n referer: options.referer,\n });\n}\n\nexport { preloadDecisions, type DecideResult } from '@sentientui/core';\n\nexport type LoadAdaptiveDecisionOptions = LoadAdaptiveAssignmentsOptions & {\n /** Section IDs in default order. Passed to /v1/decide as the candidate layout. */\n sections: string[];\n /** Components to assign in the same decide call. */\n components?: Array<{ id: string; variantIds?: string[] }>;\n};\n\n/**\n * SSR helper for pages with a declared section layout. Calls `/v1/decide`\n * instead of multiple `/v1/assign` round trips.\n */\nexport async function loadAdaptiveDecision(\n options: LoadAdaptiveDecisionOptions,\n): Promise<import('@sentientui/core').DecideResult> {\n const { preloadDecisions, readSessionCookie } = await import('@sentientui/core');\n\n const sessionId =\n readSessionCookie(options.cookies) ??\n options.createSessionId?.() ??\n defaultSessionId();\n\n return preloadDecisions(\n {\n sections: options.sections,\n components: options.components ?? [],\n },\n sessionId,\n {\n apiKey: options.apiKey,\n baseUrl: options.baseUrl,\n origin: options.origin,\n userAgent: options.userAgent,\n referer: options.referer,\n },\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAKO;AAiDP,IAAAA,eAAoD;AA7BpD,SAAS,mBAA2B;AAClC,MAAI,OAAO,WAAW,eAAe,OAAO,OAAO,eAAe,YAAY;AAC5E,WAAO,OAAO,WAAW;AAAA,EAC3B;AACA,SAAO,OAAO,KAAK,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,GAAG,EAAE,CAAC;AACrE;AAMA,eAAsB,wBACpB,YACA,SAC4B;AA1C9B;AA2CE,QAAM,aACJ,8CAAkB,QAAQ,OAAO,MAAjC,aACA,aAAQ,oBAAR,qCADA,YAEA,iBAAiB;AAEnB,aAAO,gCAAmB,YAAY,WAAW;AAAA,IAC/C,QAAQ,QAAQ;AAAA,IAChB,SAAS,QAAQ;AAAA,IACjB,QAAQ,QAAQ;AAAA,IAChB,WAAW,QAAQ;AAAA,IACnB,SAAS,QAAQ;AAAA,EACnB,CAAC;AACH;AAeA,eAAsB,qBACpB,SACkD;AAxEpD;AAyEE,QAAM,EAAE,kBAAAC,mBAAkB,mBAAAC,mBAAkB,IAAI,MAAM,OAAO,kBAAkB;AAE/E,QAAM,aACJ,WAAAA,mBAAkB,QAAQ,OAAO,MAAjC,aACA,aAAQ,oBAAR,qCADA,YAEA,iBAAiB;AAEnB,SAAOD;AAAA,IACL;AAAA,MACE,UAAU,QAAQ;AAAA,MAClB,aAAY,aAAQ,eAAR,YAAsB,CAAC;AAAA,IACrC;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ,QAAQ;AAAA,MAChB,SAAS,QAAQ;AAAA,MACjB,QAAQ,QAAQ;AAAA,MAChB,WAAW,QAAQ;AAAA,MACnB,SAAS,QAAQ;AAAA,IACnB;AAAA,EACF;AACF;","names":["import_core","preloadDecisions","readSessionCookie"]}
package/dist/server.mjs CHANGED
@@ -3,6 +3,7 @@ import {
3
3
  preloadAssignments,
4
4
  readSessionCookie
5
5
  } from "@sentientui/core";
6
+ import { preloadDecisions } from "@sentientui/core";
6
7
  function defaultSessionId() {
7
8
  if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
8
9
  return crypto.randomUUID();
@@ -20,9 +21,30 @@ async function loadAdaptiveAssignments(components, options) {
20
21
  referer: options.referer
21
22
  });
22
23
  }
24
+ async function loadAdaptiveDecision(options) {
25
+ var _a, _b, _c, _d;
26
+ const { preloadDecisions: preloadDecisions2, readSessionCookie: readSessionCookie2 } = await import("@sentientui/core");
27
+ const sessionId = (_c = (_b = readSessionCookie2(options.cookies)) != null ? _b : (_a = options.createSessionId) == null ? void 0 : _a.call(options)) != null ? _c : defaultSessionId();
28
+ return preloadDecisions2(
29
+ {
30
+ sections: options.sections,
31
+ components: (_d = options.components) != null ? _d : []
32
+ },
33
+ sessionId,
34
+ {
35
+ apiKey: options.apiKey,
36
+ baseUrl: options.baseUrl,
37
+ origin: options.origin,
38
+ userAgent: options.userAgent,
39
+ referer: options.referer
40
+ }
41
+ );
42
+ }
23
43
  export {
24
44
  loadAdaptiveAssignments,
45
+ loadAdaptiveDecision,
25
46
  preloadAssignments,
47
+ preloadDecisions,
26
48
  readSessionCookie
27
49
  };
28
50
  //# sourceMappingURL=server.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/server.ts"],"sourcesContent":["/**\r\n * Server-only helpers for Next.js / SSR. No React or DOM APIs.\r\n */\r\nimport {\r\n preloadAssignments,\r\n readSessionCookie,\r\n type ServerAssignConfig,\r\n type ServerAssignments,\r\n} from '@sentientui/core';\r\n\r\nexport { preloadAssignments, readSessionCookie };\r\nexport type { ServerAssignConfig, ServerAssignments };\r\n\r\nexport type LoadAdaptiveAssignmentsOptions = {\r\n /** Next.js `cookies()` return value, or any object with `get(name)`. */\r\n cookies: { get(name: string): { value: string } | undefined };\r\n apiKey: string;\r\n baseUrl: string;\r\n /** Used when `_snt_uid` is absent (e.g. first visit, many crawlers). */\r\n createSessionId?: () => string;\r\n /** Must match a value in the project's `allowed_origins` (e.g. `http://localhost:3001`). */\r\n origin?: string;\r\n /** From Next.js `headers().get('user-agent')` — aligns SSR segment with the client. */\r\n userAgent?: string;\r\n /** From Next.js `headers().get('referer')`. */\r\n referer?: string;\r\n};\r\n\r\nfunction defaultSessionId(): string {\r\n if (typeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function') {\r\n return crypto.randomUUID();\r\n }\r\n return `snt-${Date.now()}-${Math.random().toString(36).slice(2, 11)}`;\r\n}\r\n\r\n/**\r\n * Fetches bandit assignments on the server for SEO-safe HTML.\r\n * Pass the result as `initialAssignments` on `<AdaptiveProvider>`.\r\n */\r\nexport async function loadAdaptiveAssignments(\r\n components: Array<{ id: string; variantIds: string[] }>,\r\n options: LoadAdaptiveAssignmentsOptions,\r\n): Promise<ServerAssignments> {\r\n const sessionId =\r\n readSessionCookie(options.cookies) ??\r\n options.createSessionId?.() ??\r\n defaultSessionId();\r\n\r\n return preloadAssignments(components, sessionId, {\r\n apiKey: options.apiKey,\r\n baseUrl: options.baseUrl,\r\n origin: options.origin,\r\n userAgent: options.userAgent,\r\n referer: options.referer,\r\n });\r\n}\r\n"],"mappings":";AAGA;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AAoBP,SAAS,mBAA2B;AAClC,MAAI,OAAO,WAAW,eAAe,OAAO,OAAO,eAAe,YAAY;AAC5E,WAAO,OAAO,WAAW;AAAA,EAC3B;AACA,SAAO,OAAO,KAAK,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,GAAG,EAAE,CAAC;AACrE;AAMA,eAAsB,wBACpB,YACA,SAC4B;AA1C9B;AA2CE,QAAM,aACJ,6BAAkB,QAAQ,OAAO,MAAjC,aACA,aAAQ,oBAAR,qCADA,YAEA,iBAAiB;AAEnB,SAAO,mBAAmB,YAAY,WAAW;AAAA,IAC/C,QAAQ,QAAQ;AAAA,IAChB,SAAS,QAAQ;AAAA,IACjB,QAAQ,QAAQ;AAAA,IAChB,WAAW,QAAQ;AAAA,IACnB,SAAS,QAAQ;AAAA,EACnB,CAAC;AACH;","names":[]}
1
+ {"version":3,"sources":["../src/server.ts"],"sourcesContent":["/**\n * Server-only helpers for Next.js / SSR. No React or DOM APIs.\n */\nimport {\n preloadAssignments,\n readSessionCookie,\n type ServerAssignConfig,\n type ServerAssignments,\n} from '@sentientui/core';\n\nexport { preloadAssignments, readSessionCookie };\nexport type { ServerAssignConfig, ServerAssignments };\n\nexport type LoadAdaptiveAssignmentsOptions = {\n /** Next.js `cookies()` return value, or any object with `get(name)`. */\n cookies: { get(name: string): { value: string } | undefined };\n apiKey: string;\n baseUrl: string;\n /** Used when `_snt_uid` is absent (e.g. first visit, many crawlers). */\n createSessionId?: () => string;\n /** Must match a value in the project's `allowed_origins` (e.g. `http://localhost:3001`). */\n origin?: string;\n /** From Next.js `headers().get('user-agent')` — aligns SSR segment with the client. */\n userAgent?: string;\n /** From Next.js `headers().get('referer')`. */\n referer?: string;\n};\n\nfunction defaultSessionId(): string {\n if (typeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function') {\n return crypto.randomUUID();\n }\n return `snt-${Date.now()}-${Math.random().toString(36).slice(2, 11)}`;\n}\n\n/**\n * Fetches bandit assignments on the server for SEO-safe HTML.\n * Pass the result as `initialAssignments` on `<AdaptiveProvider>`.\n */\nexport async function loadAdaptiveAssignments(\n components: Array<{ id: string; variantIds: string[] }>,\n options: LoadAdaptiveAssignmentsOptions,\n): Promise<ServerAssignments> {\n const sessionId =\n readSessionCookie(options.cookies) ??\n options.createSessionId?.() ??\n defaultSessionId();\n\n return preloadAssignments(components, sessionId, {\n apiKey: options.apiKey,\n baseUrl: options.baseUrl,\n origin: options.origin,\n userAgent: options.userAgent,\n referer: options.referer,\n });\n}\n\nexport { preloadDecisions, type DecideResult } from '@sentientui/core';\n\nexport type LoadAdaptiveDecisionOptions = LoadAdaptiveAssignmentsOptions & {\n /** Section IDs in default order. Passed to /v1/decide as the candidate layout. */\n sections: string[];\n /** Components to assign in the same decide call. */\n components?: Array<{ id: string; variantIds?: string[] }>;\n};\n\n/**\n * SSR helper for pages with a declared section layout. Calls `/v1/decide`\n * instead of multiple `/v1/assign` round trips.\n */\nexport async function loadAdaptiveDecision(\n options: LoadAdaptiveDecisionOptions,\n): Promise<import('@sentientui/core').DecideResult> {\n const { preloadDecisions, readSessionCookie } = await import('@sentientui/core');\n\n const sessionId =\n readSessionCookie(options.cookies) ??\n options.createSessionId?.() ??\n defaultSessionId();\n\n return preloadDecisions(\n {\n sections: options.sections,\n components: options.components ?? [],\n },\n sessionId,\n {\n apiKey: options.apiKey,\n baseUrl: options.baseUrl,\n origin: options.origin,\n userAgent: options.userAgent,\n referer: options.referer,\n },\n );\n}\n"],"mappings":";AAGA;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AAiDP,SAAS,wBAA2C;AA7BpD,SAAS,mBAA2B;AAClC,MAAI,OAAO,WAAW,eAAe,OAAO,OAAO,eAAe,YAAY;AAC5E,WAAO,OAAO,WAAW;AAAA,EAC3B;AACA,SAAO,OAAO,KAAK,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,GAAG,EAAE,CAAC;AACrE;AAMA,eAAsB,wBACpB,YACA,SAC4B;AA1C9B;AA2CE,QAAM,aACJ,6BAAkB,QAAQ,OAAO,MAAjC,aACA,aAAQ,oBAAR,qCADA,YAEA,iBAAiB;AAEnB,SAAO,mBAAmB,YAAY,WAAW;AAAA,IAC/C,QAAQ,QAAQ;AAAA,IAChB,SAAS,QAAQ;AAAA,IACjB,QAAQ,QAAQ;AAAA,IAChB,WAAW,QAAQ;AAAA,IACnB,SAAS,QAAQ;AAAA,EACnB,CAAC;AACH;AAeA,eAAsB,qBACpB,SACkD;AAxEpD;AAyEE,QAAM,EAAE,kBAAAA,mBAAkB,mBAAAC,mBAAkB,IAAI,MAAM,OAAO,kBAAkB;AAE/E,QAAM,aACJ,WAAAA,mBAAkB,QAAQ,OAAO,MAAjC,aACA,aAAQ,oBAAR,qCADA,YAEA,iBAAiB;AAEnB,SAAOD;AAAA,IACL;AAAA,MACE,UAAU,QAAQ;AAAA,MAClB,aAAY,aAAQ,eAAR,YAAsB,CAAC;AAAA,IACrC;AAAA,IACA;AAAA,IACA;AAAA,MACE,QAAQ,QAAQ;AAAA,MAChB,SAAS,QAAQ;AAAA,MACjB,QAAQ,QAAQ;AAAA,MAChB,WAAW,QAAQ;AAAA,MACnB,SAAS,QAAQ;AAAA,IACnB;AAAA,EACF;AACF;","names":["preloadDecisions","readSessionCookie"]}
package/package.json CHANGED
@@ -1,58 +1,60 @@
1
- {
2
- "name": "@sentientui/react",
3
- "version": "0.2.0",
4
- "private": false,
5
- "type": "module",
6
- "main": "./dist/index.js",
7
- "module": "./dist/index.mjs",
8
- "types": "./dist/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "types": "./dist/index.d.ts",
12
- "import": "./dist/index.mjs",
13
- "require": "./dist/index.js"
14
- },
15
- "./server": {
16
- "types": "./dist/server.d.ts",
17
- "import": "./dist/server.mjs",
18
- "require": "./dist/server.js"
19
- },
20
- "./next": {
21
- "types": "./dist/next/adaptive-root.d.ts",
22
- "import": "./dist/next/adaptive-root.js",
23
- "default": "./dist/next/adaptive-root.js"
24
- }
25
- },
26
- "files": ["dist"],
27
- "scripts": {
28
- "build": "tsup",
29
- "test": "vitest run",
30
- "typecheck": "tsc --noEmit -p tsconfig.typecheck.json",
31
- "size-check": "tsx scripts/size-check.ts",
32
- "lint": "eslint src",
33
- "prepublishOnly": "pnpm build"
34
- },
35
- "dependencies": {
36
- "@sentientui/core": "^0.2.0"
37
- },
38
- "peerDependencies": {
39
- "react": ">=18.0.0",
40
- "next": ">=14.0.0"
41
- },
42
- "peerDependenciesMeta": {
43
- "next": {
44
- "optional": true
45
- }
46
- },
47
- "devDependencies": {
48
- "@testing-library/react": "^16.1.0",
49
- "@types/react": "^18.3.12",
50
- "jsdom": "^25.0.1",
51
- "react": "^18.3.1",
52
- "react-dom": "^18.3.1",
53
- "tsup": "^8.3.5",
54
- "tsx": "^4.19.2",
55
- "typescript": "^5.7.2",
56
- "vitest": "^2.1.8"
57
- }
58
- }
1
+ {
2
+ "name": "@sentientui/react",
3
+ "version": "0.3.0",
4
+ "private": false,
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.mjs",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.mjs",
13
+ "require": "./dist/index.js"
14
+ },
15
+ "./server": {
16
+ "types": "./dist/server.d.ts",
17
+ "import": "./dist/server.mjs",
18
+ "require": "./dist/server.js"
19
+ },
20
+ "./next": {
21
+ "types": "./dist/next/adaptive-root.d.ts",
22
+ "import": "./dist/next/adaptive-root.js",
23
+ "default": "./dist/next/adaptive-root.js"
24
+ }
25
+ },
26
+ "files": [
27
+ "dist"
28
+ ],
29
+ "scripts": {
30
+ "build": "tsup",
31
+ "test": "vitest run",
32
+ "typecheck": "tsc --noEmit -p tsconfig.typecheck.json",
33
+ "size-check": "tsx scripts/size-check.ts",
34
+ "lint": "eslint src",
35
+ "prepublishOnly": "pnpm build"
36
+ },
37
+ "dependencies": {
38
+ "@sentientui/core": "workspace:*"
39
+ },
40
+ "peerDependencies": {
41
+ "react": ">=18.0.0",
42
+ "next": ">=14.0.0"
43
+ },
44
+ "peerDependenciesMeta": {
45
+ "next": {
46
+ "optional": true
47
+ }
48
+ },
49
+ "devDependencies": {
50
+ "@testing-library/react": "^16.1.0",
51
+ "@types/react": "^18.3.12",
52
+ "jsdom": "^25.0.1",
53
+ "react": "^18.3.1",
54
+ "react-dom": "^18.3.1",
55
+ "tsup": "^8.3.5",
56
+ "tsx": "^4.19.2",
57
+ "typescript": "^5.7.2",
58
+ "vitest": "^2.1.8"
59
+ }
60
+ }