@razaman2/reactive-view 0.0.21 → 0.0.22
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/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +18 -10
- package/dist/index.mjs +17 -10
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -112,6 +112,7 @@ declare function getSubscription(): {
|
|
|
112
112
|
subscriptions: any[];
|
|
113
113
|
subscription: Subscription;
|
|
114
114
|
};
|
|
115
|
-
declare function StyleParser(styles?: Array<string> | Record<string,
|
|
115
|
+
declare function StyleParser(styles?: Array<string> | Record<string, boolean> | string): {};
|
|
116
|
+
declare function MergeStyles(...params: any): any;
|
|
116
117
|
|
|
117
|
-
export { StyleParser, access, _default as default, getDate, getProps, getReactiveViewComponent, getSubscription, safeRequest, setup };
|
|
118
|
+
export { MergeStyles, StyleParser, access, _default as default, getDate, getProps, getReactiveViewComponent, getSubscription, safeRequest, setup };
|
package/dist/index.d.ts
CHANGED
|
@@ -112,6 +112,7 @@ declare function getSubscription(): {
|
|
|
112
112
|
subscriptions: any[];
|
|
113
113
|
subscription: Subscription;
|
|
114
114
|
};
|
|
115
|
-
declare function StyleParser(styles?: Array<string> | Record<string,
|
|
115
|
+
declare function StyleParser(styles?: Array<string> | Record<string, boolean> | string): {};
|
|
116
|
+
declare function MergeStyles(...params: any): any;
|
|
116
117
|
|
|
117
|
-
export { StyleParser, access, _default as default, getDate, getProps, getReactiveViewComponent, getSubscription, safeRequest, setup };
|
|
118
|
+
export { MergeStyles, StyleParser, access, _default as default, getDate, getProps, getReactiveViewComponent, getSubscription, safeRequest, setup };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defProps = Object.defineProperties;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
7
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
8
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
9
|
var __getProtoOf = Object.getPrototypeOf;
|
|
@@ -19,6 +21,7 @@ var __spreadValues = (a, b) => {
|
|
|
19
21
|
}
|
|
20
22
|
return a;
|
|
21
23
|
};
|
|
24
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
22
25
|
var __export = (target, all) => {
|
|
23
26
|
for (var name2 in all)
|
|
24
27
|
__defProp(target, name2, { get: all[name2], enumerable: true });
|
|
@@ -44,6 +47,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
44
47
|
// src/index.ts
|
|
45
48
|
var index_exports = {};
|
|
46
49
|
__export(index_exports, {
|
|
50
|
+
MergeStyles: () => MergeStyles,
|
|
47
51
|
StyleParser: () => StyleParser,
|
|
48
52
|
access: () => access,
|
|
49
53
|
default: () => index_default,
|
|
@@ -155,7 +159,7 @@ var import_vue = require("vue");
|
|
|
155
159
|
|
|
156
160
|
// package.json
|
|
157
161
|
var name = "@razaman2/reactive-view";
|
|
158
|
-
var version = "0.0.
|
|
162
|
+
var version = "0.0.22";
|
|
159
163
|
|
|
160
164
|
// src/ReactiveView.ts
|
|
161
165
|
var setup = {
|
|
@@ -430,19 +434,23 @@ function getSubscription() {
|
|
|
430
434
|
};
|
|
431
435
|
}
|
|
432
436
|
function StyleParser(styles = {}) {
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
}, {});
|
|
437
|
-
return (_a = Array.isArray(styles) ? object(styles) : typeof styles === "string" ? object(styles.split(/\s+/)) : Object.entries(styles).reduce((acc, [styles2, value]) => {
|
|
438
|
-
styles2.split(/\s+/).forEach((style) => {
|
|
439
|
-
acc[style] = value;
|
|
437
|
+
const transform = (style, status = true) => style.split(/\s+/).reduce((object, style2) => {
|
|
438
|
+
return __spreadProps(__spreadValues({}, object), {
|
|
439
|
+
[style2]: status
|
|
440
440
|
});
|
|
441
|
-
|
|
442
|
-
|
|
441
|
+
}, {});
|
|
442
|
+
return Array.isArray(styles) ? styles.reduce((styles2, style) => Object.assign(transform(style), styles2), {}) : typeof styles === "string" ? transform(styles) : Object.entries(styles).reduce((acc, [styles2, value]) => {
|
|
443
|
+
return __spreadValues(__spreadValues({}, acc), transform(styles2, value));
|
|
444
|
+
}, {});
|
|
445
|
+
}
|
|
446
|
+
function MergeStyles(...params) {
|
|
447
|
+
return params.reduce((styles, style, index, array) => {
|
|
448
|
+
return __spreadValues(__spreadValues({}, StyleParser(array[array.length - index - 1])), styles);
|
|
449
|
+
}, {});
|
|
443
450
|
}
|
|
444
451
|
// Annotate the CommonJS export names for ESM import in node:
|
|
445
452
|
0 && (module.exports = {
|
|
453
|
+
MergeStyles,
|
|
446
454
|
StyleParser,
|
|
447
455
|
access,
|
|
448
456
|
getDate,
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
2
4
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
6
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -14,6 +16,7 @@ var __spreadValues = (a, b) => {
|
|
|
14
16
|
}
|
|
15
17
|
return a;
|
|
16
18
|
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
17
20
|
|
|
18
21
|
// src/index.ts
|
|
19
22
|
import { formatInTimeZone } from "date-fns-tz";
|
|
@@ -116,7 +119,7 @@ import { ref, reactive, watch, nextTick, createVNode, getCurrentInstance } from
|
|
|
116
119
|
|
|
117
120
|
// package.json
|
|
118
121
|
var name = "@razaman2/reactive-view";
|
|
119
|
-
var version = "0.0.
|
|
122
|
+
var version = "0.0.22";
|
|
120
123
|
|
|
121
124
|
// src/ReactiveView.ts
|
|
122
125
|
var setup = {
|
|
@@ -391,18 +394,22 @@ function getSubscription() {
|
|
|
391
394
|
};
|
|
392
395
|
}
|
|
393
396
|
function StyleParser(styles = {}) {
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
}, {});
|
|
398
|
-
return (_a = Array.isArray(styles) ? object(styles) : typeof styles === "string" ? object(styles.split(/\s+/)) : Object.entries(styles).reduce((acc, [styles2, value]) => {
|
|
399
|
-
styles2.split(/\s+/).forEach((style) => {
|
|
400
|
-
acc[style] = value;
|
|
397
|
+
const transform = (style, status = true) => style.split(/\s+/).reduce((object, style2) => {
|
|
398
|
+
return __spreadProps(__spreadValues({}, object), {
|
|
399
|
+
[style2]: status
|
|
401
400
|
});
|
|
402
|
-
|
|
403
|
-
|
|
401
|
+
}, {});
|
|
402
|
+
return Array.isArray(styles) ? styles.reduce((styles2, style) => Object.assign(transform(style), styles2), {}) : typeof styles === "string" ? transform(styles) : Object.entries(styles).reduce((acc, [styles2, value]) => {
|
|
403
|
+
return __spreadValues(__spreadValues({}, acc), transform(styles2, value));
|
|
404
|
+
}, {});
|
|
405
|
+
}
|
|
406
|
+
function MergeStyles(...params) {
|
|
407
|
+
return params.reduce((styles, style, index, array) => {
|
|
408
|
+
return __spreadValues(__spreadValues({}, StyleParser(array[array.length - index - 1])), styles);
|
|
409
|
+
}, {});
|
|
404
410
|
}
|
|
405
411
|
export {
|
|
412
|
+
MergeStyles,
|
|
406
413
|
StyleParser,
|
|
407
414
|
access,
|
|
408
415
|
index_default as default,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@razaman2/reactive-view",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.22",
|
|
4
4
|
"description": "This library enables you to build vue apps in an object oriented way. It provides a convenient approach to extend and override ui components. It provides a built in eventing system along with component data management.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|