@schematichq/schematic-react 1.2.14 → 1.2.16
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/schematic-react.cjs.js +14 -11
- package/dist/schematic-react.esm.js +14 -11
- package/package.json +9 -9
|
@@ -799,7 +799,7 @@ function contextString(context) {
|
|
|
799
799
|
}, {});
|
|
800
800
|
return JSON.stringify(sortedContext);
|
|
801
801
|
}
|
|
802
|
-
var version = "1.2.
|
|
802
|
+
var version = "1.2.16";
|
|
803
803
|
var anonymousIdKey = "schematicId";
|
|
804
804
|
var Schematic = class {
|
|
805
805
|
additionalHeaders = {};
|
|
@@ -876,8 +876,13 @@ var Schematic = class {
|
|
|
876
876
|
};
|
|
877
877
|
if (options?.storage) {
|
|
878
878
|
this.storage = options.storage;
|
|
879
|
-
} else
|
|
880
|
-
|
|
879
|
+
} else {
|
|
880
|
+
try {
|
|
881
|
+
if (typeof localStorage !== "undefined") {
|
|
882
|
+
this.storage = localStorage;
|
|
883
|
+
}
|
|
884
|
+
} catch {
|
|
885
|
+
}
|
|
881
886
|
}
|
|
882
887
|
if (options?.apiUrl !== void 0) {
|
|
883
888
|
this.apiUrl = options.apiUrl;
|
|
@@ -1280,14 +1285,12 @@ var Schematic = class {
|
|
|
1280
1285
|
*/
|
|
1281
1286
|
identify = (body) => {
|
|
1282
1287
|
this.debug(`identify:`, body);
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
});
|
|
1288
|
-
} catch (error) {
|
|
1288
|
+
this.setContext({
|
|
1289
|
+
company: body.company?.keys,
|
|
1290
|
+
user: body.keys
|
|
1291
|
+
}).catch((error) => {
|
|
1289
1292
|
console.warn("Error setting context:", error);
|
|
1290
|
-
}
|
|
1293
|
+
});
|
|
1291
1294
|
return this.handleEvent("identify", body);
|
|
1292
1295
|
};
|
|
1293
1296
|
/**
|
|
@@ -2199,7 +2202,7 @@ var notifyFlagValueListener = (listener, value) => {
|
|
|
2199
2202
|
var import_react = __toESM(require("react"));
|
|
2200
2203
|
|
|
2201
2204
|
// src/version.ts
|
|
2202
|
-
var version2 = "1.2.
|
|
2205
|
+
var version2 = "1.2.16";
|
|
2203
2206
|
|
|
2204
2207
|
// src/context/schematic.tsx
|
|
2205
2208
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -754,7 +754,7 @@ function contextString(context) {
|
|
|
754
754
|
}, {});
|
|
755
755
|
return JSON.stringify(sortedContext);
|
|
756
756
|
}
|
|
757
|
-
var version = "1.2.
|
|
757
|
+
var version = "1.2.16";
|
|
758
758
|
var anonymousIdKey = "schematicId";
|
|
759
759
|
var Schematic = class {
|
|
760
760
|
additionalHeaders = {};
|
|
@@ -831,8 +831,13 @@ var Schematic = class {
|
|
|
831
831
|
};
|
|
832
832
|
if (options?.storage) {
|
|
833
833
|
this.storage = options.storage;
|
|
834
|
-
} else
|
|
835
|
-
|
|
834
|
+
} else {
|
|
835
|
+
try {
|
|
836
|
+
if (typeof localStorage !== "undefined") {
|
|
837
|
+
this.storage = localStorage;
|
|
838
|
+
}
|
|
839
|
+
} catch {
|
|
840
|
+
}
|
|
836
841
|
}
|
|
837
842
|
if (options?.apiUrl !== void 0) {
|
|
838
843
|
this.apiUrl = options.apiUrl;
|
|
@@ -1235,14 +1240,12 @@ var Schematic = class {
|
|
|
1235
1240
|
*/
|
|
1236
1241
|
identify = (body) => {
|
|
1237
1242
|
this.debug(`identify:`, body);
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
});
|
|
1243
|
-
} catch (error) {
|
|
1243
|
+
this.setContext({
|
|
1244
|
+
company: body.company?.keys,
|
|
1245
|
+
user: body.keys
|
|
1246
|
+
}).catch((error) => {
|
|
1244
1247
|
console.warn("Error setting context:", error);
|
|
1245
|
-
}
|
|
1248
|
+
});
|
|
1246
1249
|
return this.handleEvent("identify", body);
|
|
1247
1250
|
};
|
|
1248
1251
|
/**
|
|
@@ -2154,7 +2157,7 @@ var notifyFlagValueListener = (listener, value) => {
|
|
|
2154
2157
|
import React, { createContext, useEffect, useMemo, useRef } from "react";
|
|
2155
2158
|
|
|
2156
2159
|
// src/version.ts
|
|
2157
|
-
var version2 = "1.2.
|
|
2160
|
+
var version2 = "1.2.16";
|
|
2158
2161
|
|
|
2159
2162
|
// src/context/schematic.tsx
|
|
2160
2163
|
import { jsx } from "react/jsx-runtime";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@schematichq/schematic-react",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.16",
|
|
4
4
|
"main": "dist/schematic-react.cjs.js",
|
|
5
5
|
"module": "dist/schematic-react.esm.js",
|
|
6
6
|
"types": "dist/schematic-react.d.ts",
|
|
@@ -31,18 +31,18 @@
|
|
|
31
31
|
"prepare": "husky"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@schematichq/schematic-js": "^1.2.
|
|
34
|
+
"@schematichq/schematic-js": "^1.2.16"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@eslint/js": "^9.39.
|
|
37
|
+
"@eslint/js": "^9.39.2",
|
|
38
38
|
"@microsoft/api-extractor": "^7.55.0",
|
|
39
39
|
"@testing-library/dom": "^10.4.1",
|
|
40
40
|
"@testing-library/jest-dom": "^6.9.1",
|
|
41
|
-
"@testing-library/react": "^16.3.
|
|
42
|
-
"@types/react": "^19.2.
|
|
41
|
+
"@testing-library/react": "^16.3.1",
|
|
42
|
+
"@types/react": "^19.2.7",
|
|
43
43
|
"@vitest/browser": "^4.0.8",
|
|
44
|
-
"esbuild": "^0.27.
|
|
45
|
-
"eslint": "^9.39.
|
|
44
|
+
"esbuild": "^0.27.1",
|
|
45
|
+
"eslint": "^9.39.2",
|
|
46
46
|
"eslint-plugin-import": "^2.32.0",
|
|
47
47
|
"eslint-plugin-react": "^7.37.5",
|
|
48
48
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"husky": "^9.1.7",
|
|
52
52
|
"jsdom": "^27.2.0",
|
|
53
53
|
"prettier": "^3.7.4",
|
|
54
|
-
"react": "^19.2.
|
|
55
|
-
"react-dom": "^19.2.
|
|
54
|
+
"react": "^19.2.3",
|
|
55
|
+
"react-dom": "^19.2.3",
|
|
56
56
|
"typescript": "^5.9.3",
|
|
57
57
|
"typescript-eslint": "^8.47.0",
|
|
58
58
|
"vitest": "^4.0.8"
|