renusify 1.2.3 → 1.2.5

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,29 +1,46 @@
1
- <template>
2
- <component :is="page"></component>
3
- </template>
4
- <script>
5
- import {defineAsyncComponent} from "vue/dist/vue.esm-bundler.js";
6
-
7
- export default {
8
- name: "r-code-editor-run",
9
- props: {
10
- template: String,
11
- script: String
12
- },
13
- computed: {
14
- page() {
15
- let temp = this.template || ''
16
- let scr = this.script || 'name:"test"'
17
- scr = this.$helper.replacer(scr, '&lt;', '<')
18
- scr = this.$helper.replacer(scr, '&gt;', '>')
19
- return defineAsyncComponent(() =>
20
- new Promise((resolve, reject) => {
21
- resolve({
22
- template: temp,
23
- ...eval('Object({' + scr + '})')
24
- })
25
- }))
26
- }
27
- }
28
- };
29
- </script>
1
+ <template>
2
+ <component :is="page"></component>
3
+ </template>
4
+ <script>
5
+ import {defineAsyncComponent} from "vue/dist/vue.esm-bundler.js";
6
+
7
+ export default {
8
+ name: "r-code-editor-run",
9
+ props: {
10
+ template: String,
11
+ script: String,
12
+ style: String,
13
+ id: String,
14
+ },
15
+ computed: {
16
+ page() {
17
+ if (this.style) {
18
+ let children = document.querySelectorAll(`[f='${this.id}']`);
19
+ if (children) {
20
+ let childArray = Array.prototype.slice.call(children);
21
+
22
+ childArray.forEach(function (child) {
23
+ child.parentNode.removeChild(child);
24
+ });
25
+ }
26
+ let s = document.createElement("style");
27
+ s.innerText = this.style;
28
+ s.setAttribute("f", this.id);
29
+ s.setAttribute("type", "text/css");
30
+ window.document.head.append(s);
31
+ }
32
+ let temp = this.template || "";
33
+ let scr = this.script || 'name:"test"';
34
+ return defineAsyncComponent(
35
+ () =>
36
+ new Promise((resolve) => {
37
+ resolve({
38
+ template: temp,
39
+ ...eval("Object({" + scr + "})"),
40
+ });
41
+ })
42
+ );
43
+ },
44
+ },
45
+ };
46
+ </script>
@@ -441,23 +441,23 @@
441
441
  @import "../../style/_include.scss";
442
442
 
443
443
  .#{$prefix}float {
444
+ width: 100%;
445
+ max-width: 100%;
446
+ max-height: 100vh;
447
+ height: 100%;
448
+ overflow: hidden;
449
+ outline: none;
450
+ border-radius: map-get($borders, 'sm');
451
+
452
+ &.float-bordered {
453
+ border: 1px solid #3a3e3a;
454
+ }
455
+
456
+ .float-container {
444
457
  width: 100%;
445
- max-width: 100%;
446
- max-height: 100vh;
447
458
  height: 100%;
448
- overflow: hidden;
449
- outline: none;
450
- border-radius: 4px;
451
459
 
452
- &.float-bordered {
453
- border: 1px solid #3a3e3a;
454
- }
455
-
456
- .float-container {
457
- width: 100%;
458
- height: 100%;
459
-
460
- &.in-zoom {
460
+ &.in-zoom {
461
461
  transition: all 0.5s ease-in-out;
462
462
  }
463
463
  }
@@ -85,7 +85,7 @@ emits:['update:modelValue'],
85
85
 
86
86
  .checkbox-input {
87
87
  text-align: center;
88
- border-radius: 4px;
88
+ border-radius: map-get($borders, 'sm');
89
89
  transition: .3s all ease-in-out;
90
90
 
91
91
  &.x-small {
@@ -166,7 +166,7 @@ export default {
166
166
 
167
167
  .color-box {
168
168
  padding: 10px;
169
- border-radius: 4px;
169
+ border-radius: map-get($borders, 'sm');
170
170
  box-shadow: 0 0 16px 0 rgba(0, 0, 0, 0.16);
171
171
  z-index: 1;
172
172
 
@@ -299,7 +299,7 @@ export default {
299
299
  margin-top: 20px;
300
300
 
301
301
  &.input-ltr {
302
- input {
302
+ input, textarea {
303
303
  direction: ltr;
304
304
  }
305
305
  }
@@ -394,12 +394,12 @@ export default {
394
394
 
395
395
  &:not(.input-tile) {
396
396
  padding: 0 16px;
397
- border-radius: 20px;
397
+ border-radius: map-get($borders, 'xl');
398
398
  }
399
399
 
400
400
  &.input-tile {
401
401
  padding: 0 8px;
402
- border-radius: 4px;
402
+ border-radius: map-get($borders, 'sm');
403
403
  }
404
404
  }
405
405
 
@@ -526,7 +526,7 @@ export default {
526
526
  height: auto;
527
527
 
528
528
  &:not(.input-tile) {
529
- border-radius: 15px;
529
+ border-radius: map-get($borders, 'xl');
530
530
  }
531
531
  }
532
532
 
@@ -148,7 +148,7 @@ export default {
148
148
 
149
149
  .input-tile {
150
150
  .#{$prefix}btn {
151
- border-radius: 4px;
151
+ border-radius: map-get($borders, 'sm');
152
152
  }
153
153
  }
154
154
  }
@@ -86,7 +86,7 @@ export default {
86
86
  text-align: center;
87
87
  width: 25px;
88
88
  height: 25px;
89
- border-radius: 4px;
89
+ border-radius: map-get($borders, 'sm');
90
90
  transition: .3s all ease-in-out;
91
91
  }
92
92
 
@@ -261,20 +261,20 @@ winPrint.close();
261
261
 
262
262
  .#{$prefix}html2pdf {
263
263
  .preview {
264
- position: fixed;
265
- width: 65%;
266
- min-width: 600px;
267
- height: 80vh;
268
- top: 100px;
269
- z-index: 9999999;
270
- left: 50%;
271
- transform: translateX(-50%);
272
- border-radius: 5px;
273
- box-shadow: 0px 0px 10px #00000048;
264
+ position: fixed;
265
+ width: 65%;
266
+ min-width: 600px;
267
+ height: 80vh;
268
+ top: 100px;
269
+ z-index: 9999999;
270
+ left: 50%;
271
+ transform: translateX(-50%);
272
+ border-radius: map-get($borders, 'sm');
273
+ box-shadow: 0px 0px 10px #00000048;
274
274
 
275
- iframe {
276
- border: 0;
277
- }
275
+ iframe {
276
+ border: 0;
277
+ }
278
278
  }
279
279
  }
280
280
  </style>
@@ -3,7 +3,7 @@
3
3
  $item-height: 48px;
4
4
 
5
5
  .#{$prefix}list {
6
- border-radius: 4px;
6
+ border-radius: map-get($borders, 'sm');
7
7
  display: block;
8
8
  padding: 8px 0;
9
9
  will-change: box-shadow;
@@ -11,9 +11,9 @@ $item-height: 48px;
11
11
  position: relative;
12
12
  max-width: 100%;
13
13
 
14
- .list-item {
15
- &.list-item-active {
16
- background-color: var(--color-table-active)
14
+ .list-item {
15
+ &.list-item-active {
16
+ background-color: var(--color-table-active)
17
17
  }
18
18
 
19
19
  &:hover {
@@ -65,7 +65,7 @@ $item-height: 48px;
65
65
 
66
66
  &.list-rounded {
67
67
  .list-item {
68
- border-radius: 30px;
68
+ border-radius: map-get($borders, 'xl');
69
69
  }
70
70
  }
71
71
  }
@@ -174,7 +174,7 @@ export default {
174
174
  max-height: 200px;
175
175
  overflow-y: auto;
176
176
  background-clip: padding-box;
177
- border-radius: 8px;
177
+ border-radius: map-get($borders, 'sm');
178
178
 
179
179
  &-item {
180
180
  cursor: pointer;
@@ -55,7 +55,7 @@ export default {
55
55
  }
56
56
 
57
57
  .sk-card {
58
- border-radius: 4px;
58
+ border-radius: map-get($borders, 'sm');
59
59
  }
60
60
 
61
61
  .sk-line {
@@ -7,7 +7,7 @@
7
7
  background: #181818;
8
8
  color: #FFF;
9
9
  position: fixed;
10
- border-radius: 4px;
10
+ border-radius: map-get($borders, 'sm');
11
11
  font-size: 14px;
12
12
  font-family: inherit;
13
13
  transform: translateX(-50%);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "renusify",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "description": "Vue3 Framework",
5
5
  "keywords": [
6
6
  "vuejs",
package/style/app.scss CHANGED
@@ -29,12 +29,12 @@ body {
29
29
 
30
30
  ::-webkit-scrollbar-track:hover {
31
31
  border: 1px solid rgba(100, 100, 100, 0.4);
32
- border-radius: 4px;
32
+ border-radius: map-get($borders, 'sm');
33
33
  }
34
34
 
35
35
  ::-webkit-scrollbar-thumb {
36
36
  background: rgba(100, 100, 100, 0.4);
37
- border-radius: 4px;
37
+ border-radius: map-get($borders, 'sm');
38
38
  }
39
39
 
40
40
  ::-webkit-scrollbar-thumb:hover {
@@ -265,7 +265,7 @@ $color-text: var(--color-two-text);
265
265
  font-size: 17px;
266
266
  line-height: 22px;
267
267
  border: 2px solid grey;
268
- border-radius: 2px;
268
+ border-radius: map-get($borders, 'sm');
269
269
  background-color: #283739;
270
270
  color: white;
271
271
  padding: 0em 1em;
@@ -17,11 +17,11 @@ $negative-spacers: ();
17
17
 
18
18
  $borders: (
19
19
  'none': 0,
20
- 'xs': 2px,
21
- 'sm': 5px,
22
- 'md': 7px,
23
- 'lg': 12px,
24
- 'xl': 19px,
20
+ 'xs': .125rem,
21
+ 'sm': .25rem,
22
+ 'md': .5rem,
23
+ 'lg': 1rem,
24
+ 'xl': 1.5rem,
25
25
  'pill': 9999px,
26
26
  'circle': 50%
27
27
  ) !default;
@@ -30,27 +30,47 @@ $cursor:('pointer','auto','grab','grabbing')!default;
30
30
 
31
31
  $widths: (
32
32
  'full': 100%,
33
+ '95': 95%,
33
34
  '90': 90%,
35
+ '85': 85%,
34
36
  '80': 80%,
37
+ '75': 75%,
35
38
  '70': 70%,
39
+ '65': 65%,
36
40
  '60': 60%,
41
+ '55': 55%,
37
42
  '50': 50%,
43
+ '45': 45%,
38
44
  '40': 40%,
45
+ '35': 35%,
39
46
  '30': 30%,
47
+ '25': 25%,
40
48
  '20': 20%,
41
- '10': 10%
49
+ '15': 15%,
50
+ '10': 10%,
51
+ '5': 5%
42
52
  ) !default;
43
53
  $heights: (
44
54
  'full': 100%,
55
+ '95': 95%,
45
56
  '90': 90%,
57
+ '85': 85%,
46
58
  '80': 80%,
59
+ '75': 75%,
47
60
  '70': 70%,
61
+ '65': 65%,
48
62
  '60': 60%,
63
+ '55': 55%,
49
64
  '50': 50%,
65
+ '45': 45%,
50
66
  '40': 40%,
67
+ '35': 35%,
51
68
  '30': 30%,
69
+ '25': 25%,
52
70
  '20': 20%,
53
- '10': 10%
71
+ '15': 15%,
72
+ '10': 10%,
73
+ '5': 5%
54
74
  ) !default;
55
75
 
56
76
  $grid-breakpoints: (
@@ -239,7 +259,7 @@ $toolbar-content-padding-x: 16px !default;
239
259
  $toolbar-height: 80px !default;
240
260
 
241
261
  //modal
242
- $border-modal: 7px !default;
262
+ $border-modal: map-get($borders, 'md') !default;
243
263
 
244
264
  //bottom navigation
245
265
  $bottom-nav-btn-min-width: 56px !default;
@@ -1,134 +0,0 @@
1
- <template>
2
- <div :class="`${$r.prefix}highlight-script`" v-html="build"></div>
3
- </template>
4
- <script>
5
- export default {
6
- name: 'highlightScript',
7
- props: {
8
- code: String,
9
- runnable:Boolean
10
- },
11
- data() {
12
- return {}
13
- },
14
- computed: {
15
- build() {
16
- let data = this.code.split('')
17
- let str = this.code.trim()
18
- if (str.substr(0, 1) === '{') {
19
- str = str.substr(1, str.length - 2)
20
- }
21
- let res = this.runnable?'<span class="color-orange">&lt;script&gt;\n export default{</span>':''
22
- let in_quta = false
23
-
24
- data.forEach((c, i) => {
25
- if (['=', '$', '&', '{', '}', '(', ')', '<', '>'].includes(c)) {
26
- res += '<span class="color-blue">' + c + '</span>'
27
- } else if ([',', ';', ':'].includes(c)) {
28
- res += '<span class="color-orange">' + c + '</span>'
29
- } else if (parseInt(c) > -1) {
30
- res += '<span class="color-number">' + c + '</span>'
31
- } else if ((c === '"' || c === "'") && !in_quta) {
32
- in_quta = c
33
- res += '<span class="color-green">' + c
34
- } else if (c === in_quta) {
35
- in_quta = false
36
- res += c + '</span>'
37
- } else {
38
- res += c
39
- }
40
- })
41
- res += this.runnable?'\n<span class="color-orange">}\n&lt;/script&gt;</span>':''
42
- res = this.$helper.replacer(res, ' var ', ' <span class="color-orange">var</span> ')
43
- res = this.$helper.replacer(res, '<span class="color-blue">$</span>r.', '<span class="color-blue">$r.</span>')
44
- res = this.$helper.replacer(res, ' let ', ' <span class="color-orange">let</span> ')
45
- res = this.$helper.replacer(res, ' const ', ' <span class="color-orange">const</span> ')
46
- res = this.$helper.replacer(res, ' return ', ' <span class="color-orange">return</span> ')
47
- res = this.$helper.replacer(res, ' this.', ' <span class="color-orange">this.</span>')
48
- let regex = /(\/\*[\w\'\s\r\n\*]*\*\/)|(\/\/[\w\s\']*)|(\<![\-\-\s\w\>\/]*\>)/g
49
- let matched = res.matchAll(regex)
50
- for (const match of matched) {
51
- res = this.$helper.replacer(res, match[0], ' <span class="color-comment">' + match[0] + '</span>')
52
- }
53
-
54
- this.strToObj(str).forEach((item)=>{
55
- res = this.$helper.replacer(res, item, ' <span class="color-purple">'+item+'</span>')
56
- })
57
-
58
- return res
59
- }
60
- },
61
- methods: {
62
- strToObj(str) {
63
- str = this.$helper.replacer(str, ' ', '')
64
- str = this.$helper.replacer(str, "\n", '')
65
- str = this.$helper.replacer(str, "\r", '')
66
- let open = 0
67
- let pre = 0
68
- let to = 0
69
- let items = []
70
- const s = str
71
- s.split('').forEach((c, i) => {
72
- to++
73
- if (c === '{') {
74
- open++
75
- }
76
- if (c === '}') {
77
- open--
78
- }
79
- if (open === 0 && c === ',') {
80
- let new_str = str.substr(pre, to - 1)
81
- const o = new_str.indexOf(':')
82
- const f = new_str.indexOf('(')
83
- if ((f > 0 && f < o) || o < 0) {
84
- new_str = new_str.substr(0, f)
85
- } else {
86
- new_str = new_str.substr(0, o)
87
- }
88
- items.push(new_str)
89
- pre = i + 1
90
- to = 0
91
- }
92
- })
93
- let new_str = str.substr(pre, str.length)
94
- const o = new_str.indexOf(':')
95
- const f = new_str.indexOf('(')
96
- if ((f > 0 && f < o) || o < 0) {
97
- new_str = new_str.substr(0, f)
98
- } else {
99
- new_str = new_str.substr(0, o)
100
- }
101
- items.push(new_str)
102
- return items
103
- },
104
- }
105
- }
106
- </script>
107
- <style lang="scss">
108
- @import "../../style/include";
109
-
110
- .#{$prefix}highlight-script {
111
- .color-green {
112
- color: #0cde27;
113
- }
114
-
115
- .color-orange {
116
- color: orange;
117
- }
118
-
119
- .color-blue {
120
- color: #0c9ddc;
121
- }
122
-
123
- .color-number {
124
- color: #7ad5ff;
125
- }
126
- .color-purple {
127
- color: #d2a8ee;
128
- }
129
-
130
- .color-comment{
131
- color: #898d8c;
132
- }
133
- }
134
- </style>