@hanzogui/start-transition 8.3.1 → 8.3.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,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.startTransition = void 0;
4
+ const react_1 = require("react");
5
+ const startTransition = (callback) => {
6
+ if ("web" !== 'web') {
7
+ // Pass-through function
8
+ callback();
9
+ }
10
+ else {
11
+ // Proxy to react.startTransition
12
+ (0, react_1.startTransition)(callback);
13
+ }
14
+ };
15
+ exports.startTransition = startTransition;
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,iCAA+D;AAExD,MAAM,eAAe,GAAG,CAAC,QAAkC,EAAQ,EAAE;IAC1E,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,KAAK,KAAK,EAAE,CAAC;QACrC,wBAAwB;QACxB,QAAQ,EAAE,CAAA;IACZ,CAAC;SAAM,CAAC;QACN,iCAAiC;QACjC,IAAA,uBAAoB,EAAC,QAAQ,CAAC,CAAA;IAChC,CAAC;AACH,CAAC,CAAA;AARY,QAAA,eAAe,GAAf,eAAe,CAQ3B"}
@@ -0,0 +1 @@
1
+ { "type": "commonjs" }
package/dist/esm/index.js CHANGED
@@ -1,6 +1,12 @@
1
- import { startTransition as startTransition$1 } from "react";
2
- const startTransition = callback => {
3
- startTransition$1(callback);
1
+ import { startTransition as reactStartTransition } from 'react';
2
+ export const startTransition = (callback) => {
3
+ if ("web" !== 'web') {
4
+ // Pass-through function
5
+ callback();
6
+ }
7
+ else {
8
+ // Proxy to react.startTransition
9
+ reactStartTransition(callback);
10
+ }
4
11
  };
5
- export { startTransition };
6
- //# sourceMappingURL=index.js.map
12
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["startTransition","startTransition$1","callback"],"sources":["index.mjs"],"sourcesContent":["import { startTransition as startTransition$1 } from \"react\";\n\nconst startTransition = (callback) => {\n\tstartTransition$1(callback);\n};\n\nexport { startTransition };"],"mappings":"AAAA,SAASA,eAAe,IAAIC,iBAAiB,QAAQ,OAAO;AAE5D,MAAMD,eAAe,GAAIE,QAAQ,IAAK;EACrCD,iBAAiB,CAACC,QAAQ,CAAC;AAC5B,CAAC;AAED,SAASF,eAAe","ignoreList":[]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,IAAI,oBAAoB,EAAE,MAAM,OAAO,CAAA;AAE/D,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,QAAkC,EAAQ,EAAE;IAC1E,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,KAAK,KAAK,EAAE,CAAC;QACrC,wBAAwB;QACxB,QAAQ,EAAE,CAAA;IACZ,CAAC;SAAM,CAAC;QACN,iCAAiC;QACjC,oBAAoB,CAAC,QAAQ,CAAC,CAAA;IAChC,CAAC;AACH,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzogui/start-transition",
3
- "version": "8.3.1",
3
+ "version": "8.3.2",
4
4
  "license": "MIT",
5
5
  "source": "src/index.ts",
6
6
  "files": [
@@ -10,35 +10,40 @@
10
10
  ],
11
11
  "type": "module",
12
12
  "sideEffects": false,
13
- "main": "dist/cjs",
14
- "module": "dist/esm",
13
+ "main": "./dist/cjs/index.js",
14
+ "module": "./dist/esm/index.js",
15
15
  "types": "./types/index.d.ts",
16
16
  "exports": {
17
17
  "./package.json": "./package.json",
18
18
  ".": {
19
19
  "types": "./types/index.d.ts",
20
- "react-native": "./dist/esm/index.native.js",
21
- "browser": "./dist/esm/index.mjs",
22
- "module": "./dist/esm/index.mjs",
23
- "import": "./dist/esm/index.mjs",
24
- "require": "./dist/cjs/index.cjs",
25
- "default": "./dist/esm/index.mjs"
20
+ "react-native": "./dist/esm/index.js",
21
+ "browser": "./dist/esm/index.js",
22
+ "module": "./dist/esm/index.js",
23
+ "import": "./dist/esm/index.js",
24
+ "require": "./dist/cjs/index.js",
25
+ "default": "./dist/esm/index.js"
26
26
  }
27
27
  },
28
28
  "publishConfig": {
29
29
  "access": "public"
30
30
  },
31
31
  "scripts": {
32
- "build": "hanzogui-build",
32
+ "build": "hanzogui-build --skip-native",
33
33
  "watch": "hanzogui-build --watch",
34
34
  "clean": "hanzogui-build clean",
35
35
  "clean:build": "hanzogui-build clean:build"
36
36
  },
37
37
  "devDependencies": {
38
- "@hanzogui/build": "8.3.1",
39
- "react": ">=19"
38
+ "@hanzogui/build": "8.3.2",
39
+ "react": "19.2.8"
40
40
  },
41
41
  "peerDependencies": {
42
- "react": ">=19"
42
+ "react": ">=19.2.8"
43
+ },
44
+ "repository": {
45
+ "type": "git",
46
+ "url": "git+https://github.com/hanzoai/gui.git",
47
+ "directory": "pkgs/core/start-transition"
43
48
  }
44
49
  }
package/src/index.test.js CHANGED
@@ -1,4 +1,4 @@
1
- import { startTransition } from './index'
1
+ import { startTransition } from './index.ts'
2
2
 
3
3
  describe('startTransition', () => {
4
4
  it('should call the callback directly if GUI_TARGET is not web', () => {
package/types/index.d.ts CHANGED
@@ -1,3 +1,2 @@
1
1
  export declare const startTransition: (callback: React.TransitionFunction) => void;
2
-
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,11 +1 @@
1
- {
2
- "mappings": "AAEA,OAAO,cAAM,kBAAmB,UAAU,MAAM",
3
- "names": [],
4
- "sources": [
5
- "src/index.ts"
6
- ],
7
- "version": 3,
8
- "sourcesContent": [
9
- "import { startTransition as reactStartTransition } from 'react'\n\nexport const startTransition = (callback: React.TransitionFunction): void => {\n if (process.env.GUI_TARGET !== 'web') {\n // Pass-through function\n callback()\n } else {\n // Proxy to react.startTransition\n reactStartTransition(callback)\n }\n}\n"
10
- ]
11
- }
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,aAAc,KAAK,CAAC,kBAAkB,KAAG,IAQpE,CAAA"}
@@ -1,31 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
- get: () => from[key],
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- return to;
19
- };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
23
- var index_exports = {};
24
- __export(index_exports, {
25
- startTransition: () => startTransition
26
- });
27
- module.exports = __toCommonJS(index_exports);
28
- var import_react = require("react");
29
- const startTransition = callback => {
30
- (0, import_react.startTransition)(callback);
31
- };
@@ -1,34 +0,0 @@
1
- "use strict";
2
-
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
12
- };
13
- var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
21
- };
22
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
23
- value: true
24
- }), mod);
25
- var index_exports = {};
26
- __export(index_exports, {
27
- startTransition: () => startTransition
28
- });
29
- module.exports = __toCommonJS(index_exports);
30
- require("react");
31
- var startTransition = function (callback) {
32
- callback();
33
- };
34
- //# sourceMappingURL=index.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["to","__toCommonJS","mod","__copyProps","__defProp","value","index_exports","__export","startTransition","module","exports","require","callback"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;EAAA;EAAA,OAAAA,EAAA;AAAA;AAAA,IAAAC,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,QAAA,CAAAD,aAAwD;EAAAE,eAAA,EAAAA,CAAA,KAAAA;AAAA;AAEjDC,MAAM,CAAAC,OAAA,GAAAT,YAAmB,CAAAK,aAA6C;AAC3EK,OAAI,QAAQ;AAEV,IAAAH,eAAS,YAAAA,CAAAI,QAAA;EAAAA,QACJ;AAEL","ignoreList":[]}
@@ -1,15 +0,0 @@
1
- var import_index = require("./index.cjs");
2
- describe("startTransition", () => {
3
- it("should call the callback directly if GUI_TARGET is not web", () => {
4
- process.env.GUI_TARGET = "native";
5
- const callback = jest.fn();
6
- (0, import_index.startTransition)(callback);
7
- expect(callback).toHaveBeenCalled();
8
- });
9
- it("should proxy to react.startTransition if GUI_TARGET is web", () => {
10
- process.env.GUI_TARGET = "web";
11
- const callback = jest.fn();
12
- (0, import_index.startTransition)(callback);
13
- expect(callback).not.toHaveBeenCalled();
14
- });
15
- });
@@ -1,18 +0,0 @@
1
- "use strict";
2
-
3
- var import_index = require("./index.native.js");
4
- describe("startTransition", function () {
5
- it("should call the callback directly if GUI_TARGET is not web", function () {
6
- process.env.GUI_TARGET = "native";
7
- var callback = jest.fn();
8
- (0, import_index.startTransition)(callback);
9
- expect(callback).toHaveBeenCalled();
10
- });
11
- it("should proxy to react.startTransition if GUI_TARGET is web", function () {
12
- process.env.GUI_TARGET = "web";
13
- var callback = jest.fn();
14
- (0, import_index.startTransition)(callback);
15
- expect(callback).not.toHaveBeenCalled();
16
- });
17
- });
18
- //# sourceMappingURL=index.test.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["import_index","require","describe","it","process","env","GUI_TARGET","callback","jest","fn","startTransition","expect","toHaveBeenCalled","not"],"sources":["../../src/index.test.js"],"sourcesContent":[null],"mappings":"AAAA;;AAEA,IAAAA,YAAS,GAAAC,OAAA,oBAAyB;AAChCC,QAAG;EACDC,EAAA,6DAAyB;IACzBC,OAAA,CAAMC,GAAA,CAAAC,UAAW,GAAK,QAAG;IACzB,IAAAC,QAAA,GAAAC,IAAA,CAAAC,EAAA;IACA,IAAAT,YAAO,CAAQU,eAAE,EAAAH,QAAiB;IACpCI,MAAC,CAAAJ,QAAA,EAAAK,gBAAA;EAED;EACET,EAAA,6DAAyB;IACzBC,OAAA,CAAMC,GAAA,CAAAC,UAAW,GAAK,KAAG;IACzB,IAAAC,QAAA,GAAAC,IAAA,CAAAC,EAAA;IAEA,IAAAT,YAAO,CAAQU,eAAM,EAAAH,QAAiB;IACxCI,MAAC,CAAAJ,QAAA,EAAAM,GAAA,CAAAD,gBAAA;EACF","ignoreList":[]}
@@ -1,6 +0,0 @@
1
- import { startTransition as startTransition$1 } from "react";
2
- const startTransition = callback => {
3
- startTransition$1(callback);
4
- };
5
- export { startTransition };
6
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["startTransition","startTransition$1","callback"],"sources":["index.mjs"],"sourcesContent":["import { startTransition as startTransition$1 } from \"react\";\n\nconst startTransition = (callback) => {\n\tstartTransition$1(callback);\n};\n\nexport { startTransition };"],"mappings":"AAAA,SAASA,eAAe,IAAIC,iBAAiB,QAAQ,OAAO;AAE5D,MAAMD,eAAe,GAAIE,QAAQ,IAAK;EACrCD,iBAAiB,CAACC,QAAQ,CAAC;AAC5B,CAAC;AAED,SAASF,eAAe","ignoreList":[]}
@@ -1,5 +0,0 @@
1
- var startTransition = function (callback) {
2
- callback();
3
- };
4
- export { startTransition };
5
- //# sourceMappingURL=index.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["startTransition","callback"],"sources":["index.native.js"],"sourcesContent":["\n\nvar startTransition = function(callback) {\n\tcallback();\n};\n\nexport { startTransition };"],"mappings":"AAEA,IAAIA,eAAe,GAAG,SAAAA,CAASC,QAAQ,EAAE;EACxCA,QAAQ,CAAC,CAAC;AACX,CAAC;AAED,SAASD,eAAe","ignoreList":[]}
@@ -1,16 +0,0 @@
1
- import { startTransition } from "./index.mjs";
2
- describe("startTransition", () => {
3
- it("should call the callback directly if GUI_TARGET is not web", () => {
4
- process.env.GUI_TARGET = "native";
5
- const callback = jest.fn();
6
- startTransition(callback);
7
- expect(callback).toHaveBeenCalled();
8
- });
9
- it("should proxy to react.startTransition if GUI_TARGET is web", () => {
10
- process.env.GUI_TARGET = "web";
11
- const callback = jest.fn();
12
- startTransition(callback);
13
- expect(callback).not.toHaveBeenCalled();
14
- });
15
- });
16
- //# sourceMappingURL=index.test.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["startTransition","describe","it","process","env","GUI_TARGET","callback","jest","fn","expect","toHaveBeenCalled","not"],"sources":["index.test.mjs"],"sourcesContent":["import { startTransition } from \"./index\";\n\ndescribe(\"startTransition\", () => {\n\tit(\"should call the callback directly if GUI_TARGET is not web\", () => {\n\t\tprocess.env.GUI_TARGET = \"native\";\n\t\tconst callback = jest.fn();\n\t\tstartTransition(callback);\n\t\texpect(callback).toHaveBeenCalled();\n\t});\n\tit(\"should proxy to react.startTransition if GUI_TARGET is web\", () => {\n\t\tprocess.env.GUI_TARGET = \"web\";\n\t\tconst callback = jest.fn();\n\t\tstartTransition(callback);\n\t\texpect(callback).not.toHaveBeenCalled();\n\t});\n});\n\n"],"mappings":"AAAA,SAASA,eAAe,QAAQ,aAAS;AAEzCC,QAAQ,CAAC,iBAAiB,EAAE,MAAM;EACjCC,EAAE,CAAC,4DAA4D,EAAE,MAAM;IACtEC,OAAO,CAACC,GAAG,CAACC,UAAU,GAAG,QAAQ;IACjC,MAAMC,QAAQ,GAAGC,IAAI,CAACC,EAAE,CAAC,CAAC;IAC1BR,eAAe,CAACM,QAAQ,CAAC;IACzBG,MAAM,CAACH,QAAQ,CAAC,CAACI,gBAAgB,CAAC,CAAC;EACpC,CAAC,CAAC;EACFR,EAAE,CAAC,4DAA4D,EAAE,MAAM;IACtEC,OAAO,CAACC,GAAG,CAACC,UAAU,GAAG,KAAK;IAC9B,MAAMC,QAAQ,GAAGC,IAAI,CAACC,EAAE,CAAC,CAAC;IAC1BR,eAAe,CAACM,QAAQ,CAAC;IACzBG,MAAM,CAACH,QAAQ,CAAC,CAACK,GAAG,CAACD,gBAAgB,CAAC,CAAC;EACxC,CAAC,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
@@ -1,16 +0,0 @@
1
- import { startTransition } from "./index.native.js";
2
- describe("startTransition", function () {
3
- it("should call the callback directly if GUI_TARGET is not web", function () {
4
- process.env.GUI_TARGET = "native";
5
- var callback = jest.fn();
6
- startTransition(callback);
7
- expect(callback).toHaveBeenCalled();
8
- });
9
- it("should proxy to react.startTransition if GUI_TARGET is web", function () {
10
- process.env.GUI_TARGET = "web";
11
- var callback = jest.fn();
12
- startTransition(callback);
13
- expect(callback).not.toHaveBeenCalled();
14
- });
15
- });
16
- //# sourceMappingURL=index.test.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["startTransition","describe","it","process","env","GUI_TARGET","callback","jest","fn","expect","toHaveBeenCalled","not"],"sources":["index.test.native.js"],"sourcesContent":["import { startTransition } from \"./index\";\n\ndescribe(\"startTransition\", function() {\n\tit(\"should call the callback directly if GUI_TARGET is not web\", function() {\n\t\tprocess.env.GUI_TARGET = \"native\";\n\t\tvar callback = jest.fn();\n\t\tstartTransition(callback);\n\t\texpect(callback).toHaveBeenCalled();\n\t});\n\tit(\"should proxy to react.startTransition if GUI_TARGET is web\", function() {\n\t\tprocess.env.GUI_TARGET = \"web\";\n\t\tvar callback = jest.fn();\n\t\tstartTransition(callback);\n\t\texpect(callback).not.toHaveBeenCalled();\n\t});\n});\n\n"],"mappings":"AAAA,SAASA,eAAe,QAAQ,mBAAS;AAEzCC,QAAQ,CAAC,iBAAiB,EAAE,YAAW;EACtCC,EAAE,CAAC,4DAA4D,EAAE,YAAW;IAC3EC,OAAO,CAACC,GAAG,CAACC,UAAU,GAAG,QAAQ;IACjC,IAAIC,QAAQ,GAAGC,IAAI,CAACC,EAAE,CAAC,CAAC;IACxBR,eAAe,CAACM,QAAQ,CAAC;IACzBG,MAAM,CAACH,QAAQ,CAAC,CAACI,gBAAgB,CAAC,CAAC;EACpC,CAAC,CAAC;EACFR,EAAE,CAAC,4DAA4D,EAAE,YAAW;IAC3EC,OAAO,CAACC,GAAG,CAACC,UAAU,GAAG,KAAK;IAC9B,IAAIC,QAAQ,GAAGC,IAAI,CAACC,EAAE,CAAC,CAAC;IACxBR,eAAe,CAACM,QAAQ,CAAC;IACzBG,MAAM,CAACH,QAAQ,CAAC,CAACK,GAAG,CAACD,gBAAgB,CAAC,CAAC;EACxC,CAAC,CAAC;AACH,CAAC,CAAC","ignoreList":[]}