reaxes-toolkit 0.0.9 → 0.0.12
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/changelog.md +4 -0
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/orzPending/index.d.ts +8 -8
- package/package.json +11 -14
- package/yarn-error.log +43 -0
package/changelog.md
ADDED
package/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './orzPending';
|
|
1
|
+
export * from './orzPending';
|
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as r from"reaxes";import*as t from"reaxes-utils";var e={917:(t,e,n)=>{t.exports=(r=>{var t={};return n.d(t,r),t})({orzMobx:()=>r.orzMobx})},926:r=>{r.exports=t}},n={};function o(r){var t=n[r];if(void 0!==t)return t.exports;var a=n[r]={exports:{}};return e[r](a,a.exports,o),a.exports}o.d=(r,t)=>{for(var e in t)o.o(t,e)&&!o.o(r,e)&&Object.defineProperty(r,e,{enumerable:!0,get:t[e]})},o.o=(r,t)=>Object.prototype.hasOwnProperty.call(r,t);var a={};(()=>{o.d(a,{s:()=>i});var r=o(926),t=o(917).orzMobx;function e(r,t){return function(r){if(Array.isArray(r))return r}(r)||function(r,t){var e=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=e){var n,o,a,i,u=[],f=!0,l=!1;try{if(a=(e=e.call(r)).next,0===t){if(Object(e)!==e)return;f=!1}else for(;!(f=(n=a.call(e)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(r){l=!0,o=r}finally{try{if(!f&&null!=e.return&&(i=e.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(r,t)||function(r,t){if(!r)return;if("string"==typeof r)return n(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);"Object"===e&&r.constructor&&(e=r.constructor.name);if("Map"===e||"Set"===e)return Array.from(r);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return n(r,t)}(r,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}var i=function(){var n=e(r.makePair(t({pending:!1,error:!1}),(function(r){var t=r.store,e=r.setState,n="undefined"!=typeof queueMicrotask&&queueMicrotask,o=function(){var r=Promise.resolve();return r.then.bind(r)};return[t,function(r){(n||o())((function(){return e({pending:r})}))},function(r){(n||o())((function(){return e({error:r})}))}]})),2),o=e(n[1],3);return{pendingState:o[0],setPending:o[1],setError:o[2]}}})();var i=a.s;export{i as orzPending};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","mappings":"6EAEAA,EAAOC,QAFCC,KAAO,IAAIC,EAAI,CAAC,EAAgC,OAA7BC,EAAoBC,EAAEF,EAAGD,GAAWC,CAAC,EAE/CA,CAAE,CAAE,QAAa,IAAMG,EAAmCC,S,UCA3EP,EAAOC,QAAUO,C,GCDbC,EAA2B,CAAC,EAGhC,SAASL,EAAoBM,GAE5B,IAAIC,EAAeF,EAAyBC,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaV,QAGrB,IAAID,EAASS,EAAyBC,GAAY,CAGjDT,QAAS,CAAC,GAOX,OAHAY,EAAoBH,GAAUV,EAAQA,EAAOC,QAASG,GAG/CJ,EAAOC,OACf,CCrBAG,EAAoBC,EAAI,CAACJ,EAASa,KACjC,IAAI,IAAIC,KAAOD,EACXV,EAAoBY,EAAEF,EAAYC,KAASX,EAAoBY,EAAEf,EAASc,IAC5EE,OAAOC,eAAejB,EAASc,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDX,EAAoBY,EAAI,CAACK,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,G,6lCCI3E,IAAMI,EAAa,WACzB,IAoBEC,EAAAC,EApB8CC,EAAMC,SAASvB,EAAQ,CACtEwB,SAAS,EACTC,OAAQ,KACL,SAAAC,GAAyB,IAAtBC,EAAKD,EAALC,MAAOC,EAAQF,EAARE,SACPC,EAAqC,oBAAjBC,gBAAgCA,eACpDC,EAAU,WACf,IAAMC,EAAUC,QAAQC,UACxB,OAAOF,EAAQG,KAAKC,KAAMJ,EAC3B,EACA,MAAO,CACNL,EACA,SAACH,IACCK,GAAcE,MAAW,kBAAMH,EAAS,CAAEJ,QAAAA,GAAU,GAEtD,EACA,SAACC,IACCI,GAAcE,MAAW,kBAAMH,EAAS,CAAEH,MAAAA,GAAQ,GAEpD,EAEF,IAAE,GAAAY,EAAAhB,EAAAD,EAAA,MACF,MAAO,CAAEkB,aArBaD,EAAA,GAqBCE,WArBWF,EAAA,GAqBCG,SArBQH,EAAA,GAsB5C,C","sources":["webpack://mono-reaxes/external module \"reaxes\"","webpack://mono-reaxes/external module \"reaxes-utils\"","webpack://mono-reaxes/webpack/bootstrap","webpack://mono-reaxes/webpack/runtime/define property getters","webpack://mono-reaxes/webpack/runtime/hasOwnProperty shorthand","webpack://mono-reaxes/./packages/reaxes-toolkit/src/orzPending/index.tsx"],"sourcesContent":["var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }\nvar y = x => () => x\nmodule.exports = x({ [\"orzMobx\"]: () => __WEBPACK_EXTERNAL_MODULE_reaxes__.orzMobx });","var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }\nvar y = x => () => x\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_reaxes_utils_40cf4af7__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","\n/**\n * pending状态和error状态\n */\nexport const orzPending = () => {\n\tconst [, [pendingState, setPending,setError]] = utils.makePair(orzMobx({\n\t\tpending: false ,\n\t\terror : false ,\n\t}), ({ store, setState }) => {\n\t\tconst qMicroTask = typeof queueMicrotask!==\"undefined\" && queueMicrotask;\n\t\tconst getThen = () => {\n\t\t\tconst promise = Promise.resolve();\n\t\t\treturn promise.then.bind( promise );\n\t\t};\n\t\treturn [\n\t\t\tstore ,\n\t\t\t(pending : boolean) => {\n\t\t\t\t(qMicroTask || getThen())(() => setState({ pending }));\n\t\t\t\treturn;\n\t\t\t},\n\t\t\t(error : boolean) => {\n\t\t\t\t(qMicroTask || getThen())(() => setState({ error }));\n\t\t\t\treturn;\n\t\t\t},\n\t\t] as const;\n\t});\n\treturn { pendingState, setPending, setError };\n};\n\n\nif(false){\n\t//@ts-ignore\n\tconst TestRender = reaxper(() => {\n\t\t\n\t\tconst { pending , error , setPending , setError } = reaxel();\n\t\t\n\t\tif( pending ) {\n\t\t\treturn <span>pending.......</span>;\n\t\t}\n\t\t\n\t\tif( error ) {\n\t\t\treturn <span>Error!</span>;\n\t\t}\n\t\t\n\t\treturn <div\n\t\t\tonClick = { () => {\n\t\t\t\tsetPending(true);\n\t\t\t} }\n\t\t>\n\t\t\tmessage\n\t\t</div>;\n\t});\n\t\n\t\n\tconst reaxel = function(){\n\t\tconst { pendingState , setPending , setError } = orzPending();\n\t\t\n\t\t\n\t\tutils.crayon.blue(pendingState.pending);\n\t\tsetPending(true);\n\t\t\n\t\tutils.orzPromise((res , rej) => {\n\t\t\tsetTimeout(() => {\n\t\t\t\trej();\n\t\t\t} , 1400);\n\t\t}).then(() => {\n\t\t\tsetPending(false);\n\t\t}).catch(() => {\n\t\t\tsetPending(false);\n\t\t\tsetError(true);\n\t\t});\n\t\treturn () => {\n\t\t\treturn {\n\t\t\t\tget pending(){\n\t\t\t\t\treturn pendingState.pending;\n\t\t\t\t} ,\n\t\t\t\tget error(){\n\t\t\t\t\treturn pendingState.error;\n\t\t\t\t} ,\n\t\t\t\tsetPending ,\n\t\t\t\tsetError ,\n\t\t\t};\n\t\t};\n\t}();\n}\n"],"names":["module","exports","y","x","__webpack_require__","d","__WEBPACK_EXTERNAL_MODULE_reaxes__","orzMobx","__WEBPACK_EXTERNAL_MODULE_reaxes_utils_40cf4af7__","__webpack_module_cache__","moduleId","cachedModule","undefined","__webpack_modules__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","orzPending","_utils$makePair2","_slicedToArray","utils","makePair","pending","error","_ref","store","setState","qMicroTask","queueMicrotask","getThen","promise","Promise","resolve","then","bind","_utils$makePair2$","pendingState","setPending","setError"],"sourceRoot":""}
|
package/orzPending/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare const orzPending: () => {
|
|
2
|
-
pendingState: {
|
|
3
|
-
pending: boolean;
|
|
4
|
-
error: boolean;
|
|
5
|
-
};
|
|
6
|
-
setPending: (pending: boolean) => void;
|
|
7
|
-
setError: (error: boolean) => void;
|
|
8
|
-
};
|
|
1
|
+
export declare const orzPending: () => {
|
|
2
|
+
pendingState: {
|
|
3
|
+
pending: boolean;
|
|
4
|
+
error: boolean;
|
|
5
|
+
};
|
|
6
|
+
setPending: (pending: boolean) => void;
|
|
7
|
+
setError: (error: boolean) => void;
|
|
8
|
+
};
|
package/package.json
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "reaxes-toolkit",
|
|
3
|
-
"version" : "0.0.
|
|
4
|
-
"main" : "index.js",
|
|
5
|
-
"module" : "index.js",
|
|
6
|
-
"types" : "index.d.ts" ,
|
|
7
|
-
"dependencies" : {
|
|
8
|
-
"reaxes" : "^0.0.
|
|
9
|
-
"reaxes-utils" : "^1.0.
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
"react-router-dom" : ">=6.0.0"
|
|
13
|
-
}
|
|
14
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name" : "reaxes-toolkit" ,
|
|
3
|
+
"version" : "0.0.12" ,
|
|
4
|
+
"main" : "index.js" ,
|
|
5
|
+
"module" : "index.js" ,
|
|
6
|
+
"types" : "index.d.ts" ,
|
|
7
|
+
"dependencies" : {
|
|
8
|
+
"reaxes" : "^0.0.11" ,
|
|
9
|
+
"reaxes-utils" : "^1.0.10"
|
|
10
|
+
}
|
|
11
|
+
}
|
package/yarn-error.log
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
Arguments:
|
|
2
|
+
C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\yarn\bin\yarn.js config get npmScopes --json
|
|
3
|
+
|
|
4
|
+
PATH:
|
|
5
|
+
C:\Python27\;C:\Python27\Scripts;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Git\cmd;C:\Users\Administrator\AppData\Roaming\nvm;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Users\Administrator\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Users\Administrator\.windows-build-tools\python27\;C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Administrator\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\.bin;C:\Users\Administrator\AppData\Roaming\npm\node_modules\.bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Program Files\JetBrains\WebStorm 2020.1.2\bin;C:\Program Files\JetBrains\PhpStorm 2020.1.2\bin;C:\Users\Administrator\AppData\Local\Programs\Fiddler;C:\Program Files (x86)\WinRAR\rar.exe;C:\Program Files\JetBrains\WebStorm 2021.2.3\bin;C:\Program Files\JetBrains\IntelliJ IDEA 2021.2.3\bin;C:\Users\Administrator\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;
|
|
6
|
+
|
|
7
|
+
Yarn version:
|
|
8
|
+
1.22.19
|
|
9
|
+
|
|
10
|
+
Node version:
|
|
11
|
+
16.20.2
|
|
12
|
+
|
|
13
|
+
Platform:
|
|
14
|
+
win32 x64
|
|
15
|
+
|
|
16
|
+
Trace:
|
|
17
|
+
SyntaxError: A:\Reaxes\packages\reaxes-toolkit\public\package.json: Unexpected token } in JSON at position 237
|
|
18
|
+
at JSON.parse (<anonymous>)
|
|
19
|
+
at C:\Users\Administrator\AppData\Roaming\nvm\v16.20.2\node_modules\yarn\lib\cli.js:1629:59
|
|
20
|
+
at Generator.next (<anonymous>)
|
|
21
|
+
at step (C:\Users\Administrator\AppData\Roaming\nvm\v16.20.2\node_modules\yarn\lib\cli.js:310:30)
|
|
22
|
+
at C:\Users\Administrator\AppData\Roaming\nvm\v16.20.2\node_modules\yarn\lib\cli.js:321:13
|
|
23
|
+
|
|
24
|
+
npm manifest:
|
|
25
|
+
{
|
|
26
|
+
"name": "reaxes-toolkit",
|
|
27
|
+
"version" : "0.0.10" ,
|
|
28
|
+
"main" : "index.js",
|
|
29
|
+
"module" : "index.js",
|
|
30
|
+
"types" : "index.d.ts" ,
|
|
31
|
+
"dependencies" : {
|
|
32
|
+
"reaxes" : "^0.0.7",
|
|
33
|
+
"reaxes-utils" : "^1.0.9"
|
|
34
|
+
} ,
|
|
35
|
+
"react-router-dom" : ">=6.0.0"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
yarn manifest:
|
|
40
|
+
No manifest
|
|
41
|
+
|
|
42
|
+
Lockfile:
|
|
43
|
+
No lockfile
|