@zero-bits/taro-components 1.0.6 → 1.1.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.
@@ -1 +1,36 @@
1
- 'use strict';var _0x549ca2=_0x3571;function _0x3571(_0x3e8528,_0x43ea25){_0x3e8528=_0x3e8528-0x1e7;var _0x1c5950=_0x1c59();var _0x3571aa=_0x1c5950[_0x3e8528];return _0x3571aa;}(function(_0x4c73e8,_0x36279e){var _0x4061c6=_0x3571,_0x47c24c=_0x4c73e8();while(!![]){try{var _0x5caa8b=parseInt(_0x4061c6(0x1fa))/0x1*(parseInt(_0x4061c6(0x1f4))/0x2)+parseInt(_0x4061c6(0x1f3))/0x3*(-parseInt(_0x4061c6(0x1f6))/0x4)+parseInt(_0x4061c6(0x1ea))/0x5+-parseInt(_0x4061c6(0x1f9))/0x6*(-parseInt(_0x4061c6(0x1f8))/0x7)+parseInt(_0x4061c6(0x1ed))/0x8+-parseInt(_0x4061c6(0x1f2))/0x9+parseInt(_0x4061c6(0x1ef))/0xa;if(_0x5caa8b===_0x36279e)break;else _0x47c24c['push'](_0x47c24c['shift']());}catch(_0x13a594){_0x47c24c['push'](_0x47c24c['shift']());}}}(_0x1c59,0x9d95d));function _0x1c59(){var _0x1fafc0=['179210JRuvfj','hasOwnProperty','View','6176944HRVkwB','prototype','6209580xdEfQj','./Permission','__esModule','5552406LczlXh','2553HNfpLm','750vZdUkr','forEach','5140jDaGoC','defineProperty','35uFqhMX','670974CmbhQT','981vvEzGe','Text','default','call'];_0x1c59=function(){return _0x1fafc0;};return _0x1c59();}Object[_0x549ca2(0x1f7)](exports,_0x549ca2(0x1f1),{'value':!![]});var _exportNames={'View':!![],'Text':!![]};Object[_0x549ca2(0x1f7)](exports,_0x549ca2(0x1e7),{'enumerable':!![],'get':function get(){var _0x2266fd=_0x549ca2;return _Text[_0x2266fd(0x1e8)];}}),Object[_0x549ca2(0x1f7)](exports,_0x549ca2(0x1ec),{'enumerable':!![],'get':function get(){var _0x2cf3b7=_0x549ca2;return _View[_0x2cf3b7(0x1e8)];}});var _Permission=require(_0x549ca2(0x1f0));Object['keys'](_Permission)[_0x549ca2(0x1f5)](function(_0x37e728){var _0x5928f9=_0x549ca2;if(_0x37e728===_0x5928f9(0x1e8)||_0x37e728===_0x5928f9(0x1f1))return;if(Object[_0x5928f9(0x1ee)][_0x5928f9(0x1eb)][_0x5928f9(0x1e9)](_exportNames,_0x37e728))return;if(_0x37e728 in exports&&exports[_0x37e728]===_Permission[_0x37e728])return;Object[_0x5928f9(0x1f7)](exports,_0x37e728,{'enumerable':!![],'get':function _0x4af63c(){return _Permission[_0x37e728];}});});var _View=_interopRequireDefault(require('./View')),_Text=_interopRequireDefault(require('./Text'));function _interopRequireDefault(_0x1f5803){var _0x59abe2=_0x549ca2;return _0x1f5803&&_0x1f5803[_0x59abe2(0x1f1)]?_0x1f5803:{'default':_0x1f5803};}
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _exportNames = {
7
+ View: true,
8
+ Text: true
9
+ };
10
+ Object.defineProperty(exports, "Text", {
11
+ enumerable: true,
12
+ get: function get() {
13
+ return _Text.default;
14
+ }
15
+ });
16
+ Object.defineProperty(exports, "View", {
17
+ enumerable: true,
18
+ get: function get() {
19
+ return _View.default;
20
+ }
21
+ });
22
+ var _Permission = require("./Permission");
23
+ Object.keys(_Permission).forEach(function (key) {
24
+ if (key === "default" || key === "__esModule") return;
25
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
26
+ if (key in exports && exports[key] === _Permission[key]) return;
27
+ Object.defineProperty(exports, key, {
28
+ enumerable: true,
29
+ get: function get() {
30
+ return _Permission[key];
31
+ }
32
+ });
33
+ });
34
+ var _View = _interopRequireDefault(require("./View"));
35
+ var _Text = _interopRequireDefault(require("./Text"));
36
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -1 +1,12 @@
1
- 'use strict';function _0x2d83(){var _0x1ce9c9=['366521QxBJQB','536514BOmrbT','7830522iyXJDc','6LqvPxr','28LcLqty','createContext','9152112GpSomI','933558zuAGlz','12VjKGql','6600030HnmAeq','defineProperty','63247010BFkniB','react','PermissionContext'];_0x2d83=function(){return _0x1ce9c9;};return _0x2d83();}var _0xc7b124=_0x2c63;(function(_0x3146b0,_0x3d0a24){var _0x579a9a=_0x2c63,_0x5efc53=_0x3146b0();while(!![]){try{var _0x4a9096=parseInt(_0x579a9a(0x1cd))/0x1*(-parseInt(_0x579a9a(0x1d0))/0x2)+parseInt(_0x579a9a(0x1ce))/0x3*(-parseInt(_0x579a9a(0x1c7))/0x4)+-parseInt(_0x579a9a(0x1c8))/0x5+-parseInt(_0x579a9a(0x1c6))/0x6*(parseInt(_0x579a9a(0x1d1))/0x7)+-parseInt(_0x579a9a(0x1c5))/0x8+-parseInt(_0x579a9a(0x1cf))/0x9+parseInt(_0x579a9a(0x1ca))/0xa;if(_0x4a9096===_0x3d0a24)break;else _0x5efc53['push'](_0x5efc53['shift']());}catch(_0x3bae2d){_0x5efc53['push'](_0x5efc53['shift']());}}}(_0x2d83,0xb2c0e));Object[_0xc7b124(0x1c9)](exports,'__esModule',{'value':!![]}),exports['PermissionContext']=void 0x0;function _0x2c63(_0x2e2a74,_0xb3e48b){_0x2e2a74=_0x2e2a74-0x1c5;var _0x2d830d=_0x2d83();var _0x2c63cb=_0x2d830d[_0x2e2a74];return _0x2c63cb;}var _react=require(_0xc7b124(0x1cb)),PermissionContext=exports[_0xc7b124(0x1cc)]=(0x0,_react[_0xc7b124(0x1d2)])({});
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.PermissionContext = void 0;
7
+ var _react = require("react");
8
+ /**
9
+ * PermissionContext 使用 object 作为基础泛型约束
10
+ * 消费侧通过 usePermission<P, U>() 收窄为具体的业务类型
11
+ */
12
+ var PermissionContext = exports.PermissionContext = /*#__PURE__*/(0, _react.createContext)({});
@@ -1 +1,19 @@
1
- 'use strict';var _0x2b02f1=_0x1b67;function _0x1b67(_0x532f29,_0x5655aa){_0x532f29=_0x532f29-0x18c;var _0xb11aae=_0xb11a();var _0x1b67e3=_0xb11aae[_0x532f29];return _0x1b67e3;}(function(_0x43c75f,_0x5d540b){var _0x46780d=_0x1b67,_0xe213ee=_0x43c75f();while(!![]){try{var _0x29e775=parseInt(_0x46780d(0x19b))/0x1+-parseInt(_0x46780d(0x198))/0x2+parseInt(_0x46780d(0x191))/0x3*(-parseInt(_0x46780d(0x199))/0x4)+parseInt(_0x46780d(0x196))/0x5*(-parseInt(_0x46780d(0x193))/0x6)+parseInt(_0x46780d(0x18c))/0x7*(-parseInt(_0x46780d(0x18d))/0x8)+parseInt(_0x46780d(0x192))/0x9*(parseInt(_0x46780d(0x18f))/0xa)+parseInt(_0x46780d(0x197))/0xb;if(_0x29e775===_0x5d540b)break;else _0xe213ee['push'](_0xe213ee['shift']());}catch(_0x552c02){_0xe213ee['push'](_0xe213ee['shift']());}}}(_0xb11a,0xc6da8));function _0xb11a(){var _0x2d06b7=['useWeappUpdate','defineProperty','41430PSmqxS','25869316UsZcmP','1532558sAQVdc','360604AMsMqH','./usePermission','954505lljcnd','1302sxbYuJ','36976vATEaH','usePermission','1930yLOShK','./useWeappUpdate','45duvlwc','31959NVJyeV','144zUcFzL'];_0xb11a=function(){return _0x2d06b7;};return _0xb11a();}Object[_0x2b02f1(0x195)](exports,'__esModule',{'value':!![]}),Object[_0x2b02f1(0x195)](exports,_0x2b02f1(0x18e),{'enumerable':!![],'get':function get(){var _0x209148=_0x2b02f1;return _usePermission[_0x209148(0x18e)];}}),Object[_0x2b02f1(0x195)](exports,_0x2b02f1(0x194),{'enumerable':!![],'get':function get(){var _0x18f89c=_0x2b02f1;return _useWeappUpdate[_0x18f89c(0x194)];}});var _usePermission=require(_0x2b02f1(0x19a)),_useWeappUpdate=require(_0x2b02f1(0x190));
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "usePermission", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _usePermission.usePermission;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "useWeappUpdate", {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _useWeappUpdate.useWeappUpdate;
16
+ }
17
+ });
18
+ var _usePermission = require("./usePermission");
19
+ var _useWeappUpdate = require("./useWeappUpdate");
@@ -1 +1,24 @@
1
- 'use strict';var _0x4b8143=_0x19e7;(function(_0x103faa,_0x2fb810){var _0x5da410=_0x19e7,_0x4fab02=_0x103faa();while(!![]){try{var _0x4e9310=-parseInt(_0x5da410(0x1d5))/0x1*(parseInt(_0x5da410(0x1e0))/0x2)+-parseInt(_0x5da410(0x1da))/0x3*(-parseInt(_0x5da410(0x1d0))/0x4)+-parseInt(_0x5da410(0x1d6))/0x5*(-parseInt(_0x5da410(0x1e3))/0x6)+-parseInt(_0x5da410(0x1d9))/0x7+-parseInt(_0x5da410(0x1d3))/0x8*(parseInt(_0x5da410(0x1d8))/0x9)+-parseInt(_0x5da410(0x1d4))/0xa*(-parseInt(_0x5da410(0x1d2))/0xb)+parseInt(_0x5da410(0x1dc))/0xc;if(_0x4e9310===_0x2fb810)break;else _0x4fab02['push'](_0x4fab02['shift']());}catch(_0x1c8eff){_0x4fab02['push'](_0x4fab02['shift']());}}}(_0x5be0,0x6748f));function _0x19e7(_0x3e5375,_0x3044f3){_0x3e5375=_0x3e5375-0x1cf;var _0x5be050=_0x5be0();var _0x19e721=_0x5be050[_0x3e5375];return _0x19e721;}Object['defineProperty'](exports,_0x4b8143(0x1df),{'value':!![]}),exports[_0x4b8143(0x1dd)]=usePermission;var _react=require(_0x4b8143(0x1db)),_context=require(_0x4b8143(0x1de));function _0x5be0(){var _0x25b20b=['../context','__esModule','33452eFvxRb','useContext','PermissionContext','2037198ynILGT','function','3676JzsmGu','请确保在\x20App\x20根节点包裹了\x20<PermissionProvider\x20store={...}>','318659cYIowt','96qZenUN','30dzoKBv','4FHEaJT','10fSHXPr','[zero-bits/taro]\x20usePermission\x20must\x20be\x20used\x20within\x20a\x20<PermissionProvider>.\x0a','359982UPLECv','5419694lmpIDu','1308nnkZtX','react','6930240qkGkzV','usePermission'];_0x5be0=function(){return _0x25b20b;};return _0x5be0();}function usePermission(){var _0x1df753=_0x4b8143,_0x1047e2=(0x0,_react[_0x1df753(0x1e1)])(_context[_0x1df753(0x1e2)]);if(typeof _0x1047e2['granted']!==_0x1df753(0x1cf))throw new Error(_0x1df753(0x1d7)+_0x1df753(0x1d1));return _0x1047e2;}
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.usePermission = usePermission;
7
+ var _react = require("react");
8
+ var _context = require("../context");
9
+ /**
10
+ * 在任意子孙组件中获取权限状态与操作方法
11
+ * 必须在 PermissionProvider 内部使用
12
+ *
13
+ * @template P - 权限对象类型
14
+ * @template U - 用户对象类型
15
+ * @returns {PermissionContextValue<P, U>} 权限上下文值
16
+ * @throws {Error} 未包裹 PermissionProvider 时抛出异常
17
+ */
18
+ function usePermission() {
19
+ var ctx = (0, _react.useContext)(_context.PermissionContext);
20
+ if (typeof ctx.granted !== 'function') {
21
+ throw new Error('[zero-bits/taro] usePermission must be used within a <PermissionProvider>.\n' + '请确保在 App 根节点包裹了 <PermissionProvider store={...}>');
22
+ }
23
+ return ctx;
24
+ }
@@ -1 +1,38 @@
1
- 'use strict';var _0x22e30b=_0x2232;function _0x2232(_0x1ef06c,_0x3459f5){_0x1ef06c=_0x1ef06c-0x10d;var _0x176952=_0x1769();var _0x223247=_0x176952[_0x1ef06c];return _0x223247;}(function(_0x14f247,_0x5082cd){var _0x4b7acc=_0x2232,_0x321748=_0x14f247();while(!![]){try{var _0x4eb75b=parseInt(_0x4b7acc(0x114))/0x1+parseInt(_0x4b7acc(0x119))/0x2+-parseInt(_0x4b7acc(0x110))/0x3*(parseInt(_0x4b7acc(0x11c))/0x4)+-parseInt(_0x4b7acc(0x120))/0x5*(-parseInt(_0x4b7acc(0x10f))/0x6)+-parseInt(_0x4b7acc(0x10e))/0x7+-parseInt(_0x4b7acc(0x123))/0x8+parseInt(_0x4b7acc(0x122))/0x9*(parseInt(_0x4b7acc(0x117))/0xa);if(_0x4eb75b===_0x5082cd)break;else _0x321748['push'](_0x321748['shift']());}catch(_0x3ae3a1){_0x321748['push'](_0x321748['shift']());}}}(_0x1769,0x96dd4));Object[_0x22e30b(0x11d)](exports,'__esModule',{'value':!![]}),exports[_0x22e30b(0x11e)]=void 0x0;var _taro=require(_0x22e30b(0x11a)),_react=require('react'),useWeappUpdate=exports[_0x22e30b(0x11e)]=function useWeappUpdate(){(0x0,_react['useEffect'])(function(){var _0xf3f421=_0x2232;if(process.env.TARO_ENV!==_0xf3f421(0x11b))return;var _0x446de8=(0x0,_taro[_0xf3f421(0x116)])();_0x446de8['onCheckForUpdate'](function(_0xc04bf2){var _0x1a20ba=_0xf3f421;_0xc04bf2[_0x1a20ba(0x112)]&&_0x446de8[_0x1a20ba(0x113)](function(){var _0x10c796=_0x1a20ba;(0x0,_taro[_0x10c796(0x115)])({'title':_0x10c796(0x121),'content':'新版本已经准备好,是否重启应用?','showCancel':![],'success':function _0x2dc789(_0xb6b2d2){var _0x33d368=_0x10c796;if(_0xb6b2d2[_0x33d368(0x11f)])_0x446de8[_0x33d368(0x118)]();}});});}),_0x446de8[_0xf3f421(0x111)](function(){var _0x3bc7b6=_0xf3f421;(0x0,_taro['showModal'])({'title':'更新提示','content':_0x3bc7b6(0x10d),'showCancel':![]});});},[]);};function _0x1769(){var _0x4b09ff=['defineProperty','useWeappUpdate','confirm','522100mUJpZz','更新提示','54OJGPqv','9544oxjVIS','新版本下载失败,请删除当前小程序,重新搜索打开','4671079PFIXhF','60sMUMcM','4287phQBmB','onUpdateFailed','hasUpdate','onUpdateReady','678309axThvm','showModal','getUpdateManager','120490YFBSGK','applyUpdate','1192488DJmhrb','@tarojs/taro','weapp','3092QNGCUR'];_0x1769=function(){return _0x4b09ff;};return _0x1769();}
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useWeappUpdate = void 0;
7
+ var _taro = require("@tarojs/taro");
8
+ var _react = require("react");
9
+ /**
10
+ * 微信小程序自动更新钩子
11
+ */
12
+ var useWeappUpdate = exports.useWeappUpdate = function useWeappUpdate() {
13
+ (0, _react.useEffect)(function () {
14
+ if (process.env.TARO_ENV !== 'weapp') return;
15
+ var updateManager = (0, _taro.getUpdateManager)();
16
+ updateManager.onCheckForUpdate(function (res) {
17
+ if (res.hasUpdate) {
18
+ updateManager.onUpdateReady(function () {
19
+ (0, _taro.showModal)({
20
+ title: '更新提示',
21
+ content: '新版本已经准备好,是否重启应用?',
22
+ showCancel: false,
23
+ success: function success(result) {
24
+ if (result.confirm) updateManager.applyUpdate();
25
+ }
26
+ });
27
+ });
28
+ }
29
+ });
30
+ updateManager.onUpdateFailed(function () {
31
+ (0, _taro.showModal)({
32
+ title: '更新提示',
33
+ content: '新版本下载失败,请删除当前小程序,重新搜索打开',
34
+ showCancel: false
35
+ });
36
+ });
37
+ }, []);
38
+ };
package/lib/index.js CHANGED
@@ -1 +1,63 @@
1
- 'use strict';var _0x4175fe=_0x46e2;(function(_0x11618f,_0x1c5d70){var _0x40eefc=_0x46e2,_0x3456e2=_0x11618f();while(!![]){try{var _0xae9b77=parseInt(_0x40eefc(0xf2))/0x1+-parseInt(_0x40eefc(0xfd))/0x2*(-parseInt(_0x40eefc(0xef))/0x3)+-parseInt(_0x40eefc(0xf0))/0x4*(parseInt(_0x40eefc(0xf4))/0x5)+parseInt(_0x40eefc(0xf5))/0x6+-parseInt(_0x40eefc(0xf6))/0x7+-parseInt(_0x40eefc(0xe7))/0x8+parseInt(_0x40eefc(0xf7))/0x9*(-parseInt(_0x40eefc(0xec))/0xa);if(_0xae9b77===_0x1c5d70)break;else _0x3456e2['push'](_0x3456e2['shift']());}catch(_0x28ba1a){_0x3456e2['push'](_0x3456e2['shift']());}}}(_0x1e80,0xa63f8));function _0x1e80(){var _0x33cb9d=['usePermission','createPermissionStore','PermissionProvider','143916EDSHnK','defineProperty','6092272eIfeZy','keys','View','useWeappUpdate','forEach','11709550kfDPvD','__esModule','./types','48Qigafu','390796iLPzJh','default','1260148XolgpJ','Text','30tqZFHF','8140080TCAjZT','3979647uvmeSy','9EYQihd','prototype','./hooks'];_0x1e80=function(){return _0x33cb9d;};return _0x1e80();}Object[_0x4175fe(0xe6)](exports,_0x4175fe(0xed),{'value':!![]});var _exportNames={'View':!![],'Text':!![],'PermissionProvider':!![],'createPermissionStore':!![],'usePermission':!![],'useWeappUpdate':!![]};function _0x46e2(_0x24dc57,_0x5d6576){_0x24dc57=_0x24dc57-0xe6;var _0x1e80b3=_0x1e80();var _0x46e2ec=_0x1e80b3[_0x24dc57];return _0x46e2ec;}Object[_0x4175fe(0xe6)](exports,'PermissionProvider',{'enumerable':!![],'get':function get(){var _0x3d3918=_0x4175fe;return _components[_0x3d3918(0xfc)];}}),Object[_0x4175fe(0xe6)](exports,_0x4175fe(0xf3),{'enumerable':!![],'get':function get(){var _0x227157=_0x4175fe;return _components[_0x227157(0xf3)];}}),Object['defineProperty'](exports,_0x4175fe(0xe9),{'enumerable':!![],'get':function get(){var _0x25b316=_0x4175fe;return _components[_0x25b316(0xe9)];}}),Object[_0x4175fe(0xe6)](exports,'createPermissionStore',{'enumerable':!![],'get':function get(){var _0x496348=_0x4175fe;return _components[_0x496348(0xfb)];}}),Object[_0x4175fe(0xe6)](exports,'usePermission',{'enumerable':!![],'get':function get(){var _0x5675b6=_0x4175fe;return _hooks[_0x5675b6(0xfa)];}}),Object[_0x4175fe(0xe6)](exports,_0x4175fe(0xea),{'enumerable':!![],'get':function get(){var _0x10dbf0=_0x4175fe;return _hooks[_0x10dbf0(0xea)];}});var _components=require('./components'),_hooks=require(_0x4175fe(0xf9)),_types=require(_0x4175fe(0xee));Object[_0x4175fe(0xe8)](_types)[_0x4175fe(0xeb)](function(_0x4b00c2){var _0x36d483=_0x4175fe;if(_0x4b00c2===_0x36d483(0xf1)||_0x4b00c2===_0x36d483(0xed))return;if(Object[_0x36d483(0xf8)]['hasOwnProperty']['call'](_exportNames,_0x4b00c2))return;if(_0x4b00c2 in exports&&exports[_0x4b00c2]===_types[_0x4b00c2])return;Object[_0x36d483(0xe6)](exports,_0x4b00c2,{'enumerable':!![],'get':function _0x19f4de(){return _types[_0x4b00c2];}});});
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _exportNames = {
7
+ View: true,
8
+ Text: true,
9
+ PermissionProvider: true,
10
+ createPermissionStore: true,
11
+ usePermission: true,
12
+ useWeappUpdate: true
13
+ };
14
+ Object.defineProperty(exports, "PermissionProvider", {
15
+ enumerable: true,
16
+ get: function get() {
17
+ return _components.PermissionProvider;
18
+ }
19
+ });
20
+ Object.defineProperty(exports, "Text", {
21
+ enumerable: true,
22
+ get: function get() {
23
+ return _components.Text;
24
+ }
25
+ });
26
+ Object.defineProperty(exports, "View", {
27
+ enumerable: true,
28
+ get: function get() {
29
+ return _components.View;
30
+ }
31
+ });
32
+ Object.defineProperty(exports, "createPermissionStore", {
33
+ enumerable: true,
34
+ get: function get() {
35
+ return _components.createPermissionStore;
36
+ }
37
+ });
38
+ Object.defineProperty(exports, "usePermission", {
39
+ enumerable: true,
40
+ get: function get() {
41
+ return _hooks.usePermission;
42
+ }
43
+ });
44
+ Object.defineProperty(exports, "useWeappUpdate", {
45
+ enumerable: true,
46
+ get: function get() {
47
+ return _hooks.useWeappUpdate;
48
+ }
49
+ });
50
+ var _components = require("./components");
51
+ var _hooks = require("./hooks");
52
+ var _types = require("./types");
53
+ Object.keys(_types).forEach(function (key) {
54
+ if (key === "default" || key === "__esModule") return;
55
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
56
+ if (key in exports && exports[key] === _types[key]) return;
57
+ Object.defineProperty(exports, key, {
58
+ enumerable: true,
59
+ get: function get() {
60
+ return _types[key];
61
+ }
62
+ });
63
+ });
@@ -1,120 +1 @@
1
- .zero-line-clamp-1 {
2
- overflow: hidden;
3
- display: -webkit-box;
4
- -webkit-box-orient: vertical;
5
- -webkit-line-clamp: 1
6
- }
7
-
8
- .zero-line-clamp-2 {
9
- overflow: hidden;
10
- display: -webkit-box;
11
- -webkit-box-orient: vertical;
12
- -webkit-line-clamp: 2
13
- }
14
-
15
- .zero-line-clamp-3 {
16
- overflow: hidden;
17
- display: -webkit-box;
18
- -webkit-box-orient: vertical;
19
- -webkit-line-clamp: 3
20
- }
21
-
22
- .zero-line-clamp-4 {
23
- overflow: hidden;
24
- display: -webkit-box;
25
- -webkit-box-orient: vertical;
26
- -webkit-line-clamp: 4
27
- }
28
-
29
- .zero-line-clamp-5 {
30
- overflow: hidden;
31
- display: -webkit-box;
32
- -webkit-box-orient: vertical;
33
- -webkit-line-clamp: 5
34
- }
35
-
36
- .zero-line-clamp-6 {
37
- overflow: hidden;
38
- display: -webkit-box;
39
- -webkit-box-orient: vertical;
40
- -webkit-line-clamp: 6
41
- }
42
-
43
- .zero-flex {
44
- display: flex
45
- }
46
-
47
- .zero-hidden {
48
- display: none
49
- }
50
-
51
- .zero-flex-1 {
52
- flex: 1 1 0%
53
- }
54
-
55
- @keyframes zero-pulse {
56
- 50% {
57
- opacity: .5
58
- }
59
- }
60
-
61
- .zero-animate-pulse {
62
- animation: zero-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite
63
- }
64
-
65
- .zero-flex-row {
66
- flex-direction: row
67
- }
68
-
69
- .zero-flex-col {
70
- flex-direction: column
71
- }
72
-
73
- .zero-flex-wrap {
74
- flex-wrap: wrap
75
- }
76
-
77
- .zero-place-content-around {
78
- place-content: space-around
79
- }
80
-
81
- .zero-items-start {
82
- align-items: flex-start
83
- }
84
-
85
- .zero-items-end {
86
- align-items: flex-end
87
- }
88
-
89
- .zero-items-center {
90
- align-items: center
91
- }
92
-
93
- .zero-justify-start {
94
- justify-content: flex-start
95
- }
96
-
97
- .zero-justify-end {
98
- justify-content: flex-end
99
- }
100
-
101
- .zero-justify-center {
102
- justify-content: center
103
- }
104
-
105
- .zero-justify-between {
106
- justify-content: space-between
107
- }
108
-
109
- .zero-justify-around {
110
- justify-content: space-around
111
- }
112
-
113
- .zero-bg-gray-200 {
114
- --tw-bg-opacity: 1;
115
- background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1))
116
- }
117
-
118
- .zero-text-transparent {
119
- color: transparent
120
- }
1
+ @tailwind utilities;
@@ -1 +1,5 @@
1
- 'use strict';var _0x252e5b=_0x198e;function _0x198e(_0x2dcf29,_0x451570){_0x2dcf29=_0x2dcf29-0xbf;var _0x1b6f9f=_0x1b6f();var _0x198e8d=_0x1b6f9f[_0x2dcf29];return _0x198e8d;}(function(_0x3be1a2,_0x378155){var _0x1a6554=_0x198e,_0x59d658=_0x3be1a2();while(!![]){try{var _0x357c5a=-parseInt(_0x1a6554(0xc2))/0x1+parseInt(_0x1a6554(0xca))/0x2*(-parseInt(_0x1a6554(0xbf))/0x3)+-parseInt(_0x1a6554(0xc5))/0x4*(-parseInt(_0x1a6554(0xc4))/0x5)+parseInt(_0x1a6554(0xc9))/0x6*(parseInt(_0x1a6554(0xc8))/0x7)+parseInt(_0x1a6554(0xc7))/0x8*(-parseInt(_0x1a6554(0xc0))/0x9)+parseInt(_0x1a6554(0xc1))/0xa*(-parseInt(_0x1a6554(0xc6))/0xb)+parseInt(_0x1a6554(0xcb))/0xc;if(_0x357c5a===_0x378155)break;else _0x59d658['push'](_0x59d658['shift']());}catch(_0x18da6a){_0x59d658['push'](_0x59d658['shift']());}}}(_0x1b6f,0x2844e));function _0x1b6f(){var _0x1b8f30=['1099EgskDM','8508trUDNC','10256CLhjGL','6054336jnWODt','129Fpzbxl','54ITwvTf','772910TCXssJ','74776sxRfMP','__esModule','902515AZJuMD','4WnJYiw','33XQCiRK','287416hcAgEC'];_0x1b6f=function(){return _0x1b8f30;};return _0x1b6f();}Object['defineProperty'](exports,_0x252e5b(0xc3),{'value':!![]});
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zero-bits/taro-components",
3
- "version": "1.0.6",
3
+ "version": "1.1.0",
4
4
  "description": "Taro components and utilities",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -62,6 +62,29 @@
62
62
  "react": ">=18.0.0",
63
63
  "react-dom": ">=18.0.0"
64
64
  },
65
+ "scripts": {
66
+ "build": "father build && npx tsc --emitDeclarationOnly --outDir lib && npx tsc --emitDeclarationOnly --outDir es",
67
+ "clean": "rm -rf lib && rm -rf es",
68
+ "prebuild": "npm run clean",
69
+ "build:cjs-css": "npx tailwindcss -i ./src/styles/index.css -o ./lib/styles/index.css",
70
+ "build:es-css": "npx tailwindcss -i ./src/styles/index.css -o ./es/styles/index.css",
71
+ "build:css": "npm run build:cjs-css && npm run build:es-css",
72
+ "build:all": "npm run build && npm run build:css",
73
+ "build:watch": "father dev",
74
+ "obfuscate": "node ../scripts/obfuscate.mjs",
75
+ "build:obf": "npm run build:all && npm run obfuscate",
76
+ "pub": "node ../scripts/publish.js"
77
+ },
78
+ "devDependencies": {
79
+ "@types/node": "^24.7.2",
80
+ "@types/react": "^18.2.0",
81
+ "@types/react-dom": "^18.2.0",
82
+ "father": "^4.6.15",
83
+ "react": "^18.2.0",
84
+ "react-dom": "^18.2.0",
85
+ "tailwindcss": "^3.4.19",
86
+ "typescript": "^5.9.3"
87
+ },
65
88
  "dependencies": {
66
89
  "classnames": "^2.3.0"
67
90
  }