@sitecore/sc-contenthub-blok 0.0.21 → 0.0.24
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/BlokTheme.js +2 -2
- package/dist/BlokTheme.js.map +1 -1
- package/dist/Components/BlokBadge/BlokBadge.js +4 -1
- package/dist/Components/BlokBadge/BlokBadge.js.map +1 -1
- package/dist/Components/BlokButton/BlokButton.js +1 -1
- package/dist/Components/BlokButton/BlokButton.js.map +1 -1
- package/dist/Components/BlokButtonSelect/BlokButtonSelect.d.ts +7 -0
- package/dist/Components/BlokButtonSelect/BlokButtonSelect.js +184 -0
- package/dist/Components/BlokButtonSelect/BlokButtonSelect.js.map +1 -0
- package/dist/Components/BlokButtonSelect/BlokButtonSelect.spec.d.ts +1 -0
- package/dist/Components/BlokButtonSelect/BlokButtonSelect.spec.js +58 -0
- package/dist/Components/BlokButtonSelect/BlokButtonSelect.spec.js.map +1 -0
- package/dist/Components/BlokButtonSelect/BlokButtonSelect.stories.d.ts +8 -0
- package/dist/Components/BlokButtonSelect/BlokButtonSelect.stories.js +59 -0
- package/dist/Components/BlokButtonSelect/BlokButtonSelect.stories.js.map +1 -0
- package/dist/Components/BlokSearchBox/BlokSearchBox.d.ts +106 -0
- package/dist/Components/BlokSearchBox/BlokSearchBox.js +316 -0
- package/dist/Components/BlokSearchBox/BlokSearchBox.js.map +1 -0
- package/dist/Components/BlokSearchBox/BlokSearchBox.spec.d.ts +1 -0
- package/dist/Components/BlokSearchBox/BlokSearchBox.spec.js +88 -0
- package/dist/Components/BlokSearchBox/BlokSearchBox.spec.js.map +1 -0
- package/dist/Components/BlokSearchBox/BlokSearchBox.stories.d.ts +9 -0
- package/dist/Components/BlokSearchBox/BlokSearchBox.stories.js +38 -0
- package/dist/Components/BlokSearchBox/BlokSearchBox.stories.js.map +1 -0
- package/dist/Components/BlokSelect/BlokSelect.d.ts +99 -0
- package/dist/Components/BlokSelect/BlokSelect.js +247 -0
- package/dist/Components/BlokSelect/BlokSelect.js.map +1 -0
- package/dist/Components/BlokSelect/BlokSelect.spec.d.ts +1 -0
- package/dist/Components/BlokSelect/BlokSelect.spec.js +54 -0
- package/dist/Components/BlokSelect/BlokSelect.spec.js.map +1 -0
- package/dist/Components/BlokSelect/BlokSelect.stories.d.ts +8 -0
- package/dist/Components/BlokSelect/BlokSelect.stories.js +59 -0
- package/dist/Components/BlokSelect/BlokSelect.stories.js.map +1 -0
- package/dist/Components/BlokTag/BlokTag.js +9 -1
- package/dist/Components/BlokTag/BlokTag.js.map +1 -1
- package/dist/Foundations/utils.d.ts +28 -0
- package/dist/Foundations/utils.js +21 -1
- package/dist/Foundations/utils.js.map +1 -1
- package/dist/customHooks/useIsMounted.d.ts +7 -0
- package/dist/customHooks/useIsMounted.js +19 -0
- package/dist/customHooks/useIsMounted.js.map +1 -0
- package/esm/BlokTheme.js +2 -2
- package/esm/BlokTheme.js.map +1 -1
- package/esm/Components/BlokBadge/BlokBadge.js +4 -1
- package/esm/Components/BlokBadge/BlokBadge.js.map +1 -1
- package/esm/Components/BlokButton/BlokButton.js +1 -1
- package/esm/Components/BlokButton/BlokButton.js.map +1 -1
- package/esm/Components/BlokButtonSelect/BlokButtonSelect.js +179 -0
- package/esm/Components/BlokButtonSelect/BlokButtonSelect.js.map +1 -0
- package/esm/Components/BlokSearchBox/BlokSearchBox.js +312 -0
- package/esm/Components/BlokSearchBox/BlokSearchBox.js.map +1 -0
- package/esm/Components/BlokSelect/BlokSelect.js +242 -0
- package/esm/Components/BlokSelect/BlokSelect.js.map +1 -0
- package/esm/Components/BlokTag/BlokTag.js +9 -1
- package/esm/Components/BlokTag/BlokTag.js.map +1 -1
- package/esm/Foundations/utils.js +18 -0
- package/esm/Foundations/utils.js.map +1 -1
- package/esm/customHooks/useIsMounted.js +17 -0
- package/esm/customHooks/useIsMounted.js.map +1 -0
- package/node_modules/@emotion/cache/node_modules/stylis/LICENSE +21 -0
- package/node_modules/@emotion/cache/node_modules/stylis/README.md +161 -0
- package/node_modules/@emotion/cache/node_modules/stylis/dist/stylis.mjs +2 -0
- package/node_modules/@emotion/cache/node_modules/stylis/dist/stylis.mjs.map +1 -0
- package/node_modules/@emotion/cache/node_modules/stylis/dist/umd/package.json +1 -0
- package/node_modules/@emotion/cache/node_modules/stylis/dist/umd/stylis.js +2 -0
- package/node_modules/@emotion/cache/node_modules/stylis/dist/umd/stylis.js.map +1 -0
- package/node_modules/@emotion/cache/node_modules/stylis/index.js +7 -0
- package/node_modules/@emotion/cache/node_modules/stylis/package.json +167 -0
- package/node_modules/@emotion/cache/node_modules/stylis/src/Enum.js +21 -0
- package/node_modules/@emotion/cache/node_modules/stylis/src/Middleware.js +108 -0
- package/node_modules/@emotion/cache/node_modules/stylis/src/Parser.js +191 -0
- package/node_modules/@emotion/cache/node_modules/stylis/src/Prefixer.js +145 -0
- package/node_modules/@emotion/cache/node_modules/stylis/src/Serializer.js +36 -0
- package/node_modules/@emotion/cache/node_modules/stylis/src/Tokenizer.js +246 -0
- package/node_modules/@emotion/cache/node_modules/stylis/src/Utility.js +115 -0
- package/node_modules/@emotion/css-prettifier/node_modules/stylis/LICENSE +21 -0
- package/node_modules/@emotion/css-prettifier/node_modules/stylis/README.md +161 -0
- package/node_modules/@emotion/css-prettifier/node_modules/stylis/dist/stylis.mjs +2 -0
- package/node_modules/@emotion/css-prettifier/node_modules/stylis/dist/stylis.mjs.map +1 -0
- package/node_modules/@emotion/css-prettifier/node_modules/stylis/dist/umd/package.json +1 -0
- package/node_modules/@emotion/css-prettifier/node_modules/stylis/dist/umd/stylis.js +2 -0
- package/node_modules/@emotion/css-prettifier/node_modules/stylis/dist/umd/stylis.js.map +1 -0
- package/node_modules/@emotion/css-prettifier/node_modules/stylis/index.js +7 -0
- package/node_modules/@emotion/css-prettifier/node_modules/stylis/package.json +167 -0
- package/node_modules/@emotion/css-prettifier/node_modules/stylis/src/Enum.js +21 -0
- package/node_modules/@emotion/css-prettifier/node_modules/stylis/src/Middleware.js +108 -0
- package/node_modules/@emotion/css-prettifier/node_modules/stylis/src/Parser.js +191 -0
- package/node_modules/@emotion/css-prettifier/node_modules/stylis/src/Prefixer.js +145 -0
- package/node_modules/@emotion/css-prettifier/node_modules/stylis/src/Serializer.js +36 -0
- package/node_modules/@emotion/css-prettifier/node_modules/stylis/src/Tokenizer.js +246 -0
- package/node_modules/@emotion/css-prettifier/node_modules/stylis/src/Utility.js +115 -0
- package/node_modules/@emotion/jest/node_modules/stylis/LICENSE +21 -0
- package/node_modules/@emotion/jest/node_modules/stylis/README.md +161 -0
- package/node_modules/@emotion/jest/node_modules/stylis/dist/stylis.mjs +2 -0
- package/node_modules/@emotion/jest/node_modules/stylis/dist/stylis.mjs.map +1 -0
- package/node_modules/@emotion/jest/node_modules/stylis/dist/umd/package.json +1 -0
- package/node_modules/@emotion/jest/node_modules/stylis/dist/umd/stylis.js +2 -0
- package/node_modules/@emotion/jest/node_modules/stylis/dist/umd/stylis.js.map +1 -0
- package/node_modules/@emotion/jest/node_modules/stylis/index.js +7 -0
- package/node_modules/@emotion/jest/node_modules/stylis/package.json +167 -0
- package/node_modules/@emotion/jest/node_modules/stylis/src/Enum.js +21 -0
- package/node_modules/@emotion/jest/node_modules/stylis/src/Middleware.js +108 -0
- package/node_modules/@emotion/jest/node_modules/stylis/src/Parser.js +191 -0
- package/node_modules/@emotion/jest/node_modules/stylis/src/Prefixer.js +145 -0
- package/node_modules/@emotion/jest/node_modules/stylis/src/Serializer.js +36 -0
- package/node_modules/@emotion/jest/node_modules/stylis/src/Tokenizer.js +246 -0
- package/node_modules/@emotion/jest/node_modules/stylis/src/Utility.js +115 -0
- package/package.json +6 -2
- /package/node_modules/{stylis → @emotion/babel-plugin/node_modules/stylis}/LICENSE +0 -0
- /package/node_modules/{stylis → @emotion/babel-plugin/node_modules/stylis}/README.md +0 -0
- /package/node_modules/{stylis → @emotion/babel-plugin/node_modules/stylis}/dist/stylis.mjs +0 -0
- /package/node_modules/{stylis → @emotion/babel-plugin/node_modules/stylis}/dist/stylis.mjs.map +0 -0
- /package/node_modules/{stylis → @emotion/babel-plugin/node_modules/stylis}/dist/umd/package.json +0 -0
- /package/node_modules/{stylis → @emotion/babel-plugin/node_modules/stylis}/dist/umd/stylis.js +0 -0
- /package/node_modules/{stylis → @emotion/babel-plugin/node_modules/stylis}/dist/umd/stylis.js.map +0 -0
- /package/node_modules/{stylis → @emotion/babel-plugin/node_modules/stylis}/index.js +0 -0
- /package/node_modules/{stylis → @emotion/babel-plugin/node_modules/stylis}/package.json +0 -0
- /package/node_modules/{stylis → @emotion/babel-plugin/node_modules/stylis}/src/Enum.js +0 -0
- /package/node_modules/{stylis → @emotion/babel-plugin/node_modules/stylis}/src/Middleware.js +0 -0
- /package/node_modules/{stylis → @emotion/babel-plugin/node_modules/stylis}/src/Parser.js +0 -0
- /package/node_modules/{stylis → @emotion/babel-plugin/node_modules/stylis}/src/Prefixer.js +0 -0
- /package/node_modules/{stylis → @emotion/babel-plugin/node_modules/stylis}/src/Serializer.js +0 -0
- /package/node_modules/{stylis → @emotion/babel-plugin/node_modules/stylis}/src/Tokenizer.js +0 -0
- /package/node_modules/{stylis → @emotion/babel-plugin/node_modules/stylis}/src/Utility.js +0 -0
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import {from, trim, charat, strlen, substr, append, assign} from './Utility.js'
|
|
2
|
+
|
|
3
|
+
export var line = 1
|
|
4
|
+
export var column = 1
|
|
5
|
+
export var length = 0
|
|
6
|
+
export var position = 0
|
|
7
|
+
export var character = 0
|
|
8
|
+
export var characters = ''
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @param {string} value
|
|
12
|
+
* @param {object | null} root
|
|
13
|
+
* @param {object | null} parent
|
|
14
|
+
* @param {string} type
|
|
15
|
+
* @param {string[] | string} props
|
|
16
|
+
* @param {object[] | string} children
|
|
17
|
+
* @param {number} length
|
|
18
|
+
*/
|
|
19
|
+
export function node (value, root, parent, type, props, children, length) {
|
|
20
|
+
return {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @param {object} root
|
|
25
|
+
* @param {object} props
|
|
26
|
+
* @return {object}
|
|
27
|
+
*/
|
|
28
|
+
export function copy (root, props) {
|
|
29
|
+
return assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @return {number}
|
|
34
|
+
*/
|
|
35
|
+
export function char () {
|
|
36
|
+
return character
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @return {number}
|
|
41
|
+
*/
|
|
42
|
+
export function prev () {
|
|
43
|
+
character = position > 0 ? charat(characters, --position) : 0
|
|
44
|
+
|
|
45
|
+
if (column--, character === 10)
|
|
46
|
+
column = 1, line--
|
|
47
|
+
|
|
48
|
+
return character
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @return {number}
|
|
53
|
+
*/
|
|
54
|
+
export function next () {
|
|
55
|
+
character = position < length ? charat(characters, position++) : 0
|
|
56
|
+
|
|
57
|
+
if (column++, character === 10)
|
|
58
|
+
column = 1, line++
|
|
59
|
+
|
|
60
|
+
return character
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @return {number}
|
|
65
|
+
*/
|
|
66
|
+
export function peek () {
|
|
67
|
+
return charat(characters, position)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @return {number}
|
|
72
|
+
*/
|
|
73
|
+
export function caret () {
|
|
74
|
+
return position
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @param {number} begin
|
|
79
|
+
* @param {number} end
|
|
80
|
+
* @return {string}
|
|
81
|
+
*/
|
|
82
|
+
export function slice (begin, end) {
|
|
83
|
+
return substr(characters, begin, end)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* @param {number} type
|
|
88
|
+
* @return {number}
|
|
89
|
+
*/
|
|
90
|
+
export function token (type) {
|
|
91
|
+
switch (type) {
|
|
92
|
+
// \0 \t \n \r \s whitespace token
|
|
93
|
+
case 0: case 9: case 10: case 13: case 32:
|
|
94
|
+
return 5
|
|
95
|
+
// ! + , / > @ ~ isolate token
|
|
96
|
+
case 33: case 43: case 44: case 47: case 62: case 64: case 126:
|
|
97
|
+
// ; { } breakpoint token
|
|
98
|
+
case 59: case 123: case 125:
|
|
99
|
+
return 4
|
|
100
|
+
// : accompanied token
|
|
101
|
+
case 58:
|
|
102
|
+
return 3
|
|
103
|
+
// " ' ( [ opening delimit token
|
|
104
|
+
case 34: case 39: case 40: case 91:
|
|
105
|
+
return 2
|
|
106
|
+
// ) ] closing delimit token
|
|
107
|
+
case 41: case 93:
|
|
108
|
+
return 1
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return 0
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* @param {string} value
|
|
116
|
+
* @return {any[]}
|
|
117
|
+
*/
|
|
118
|
+
export function alloc (value) {
|
|
119
|
+
return line = column = 1, length = strlen(characters = value), position = 0, []
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @param {any} value
|
|
124
|
+
* @return {any}
|
|
125
|
+
*/
|
|
126
|
+
export function dealloc (value) {
|
|
127
|
+
return characters = '', value
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* @param {number} type
|
|
132
|
+
* @return {string}
|
|
133
|
+
*/
|
|
134
|
+
export function delimit (type) {
|
|
135
|
+
return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* @param {string} value
|
|
140
|
+
* @return {string[]}
|
|
141
|
+
*/
|
|
142
|
+
export function tokenize (value) {
|
|
143
|
+
return dealloc(tokenizer(alloc(value)))
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* @param {number} type
|
|
148
|
+
* @return {string}
|
|
149
|
+
*/
|
|
150
|
+
export function whitespace (type) {
|
|
151
|
+
while (character = peek())
|
|
152
|
+
if (character < 33)
|
|
153
|
+
next()
|
|
154
|
+
else
|
|
155
|
+
break
|
|
156
|
+
|
|
157
|
+
return token(type) > 2 || token(character) > 3 ? '' : ' '
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* @param {string[]} children
|
|
162
|
+
* @return {string[]}
|
|
163
|
+
*/
|
|
164
|
+
export function tokenizer (children) {
|
|
165
|
+
while (next())
|
|
166
|
+
switch (token(character)) {
|
|
167
|
+
case 0: append(identifier(position - 1), children)
|
|
168
|
+
break
|
|
169
|
+
case 2: append(delimit(character), children)
|
|
170
|
+
break
|
|
171
|
+
default: append(from(character), children)
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
return children
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* @param {number} index
|
|
179
|
+
* @param {number} count
|
|
180
|
+
* @return {string}
|
|
181
|
+
*/
|
|
182
|
+
export function escaping (index, count) {
|
|
183
|
+
while (--count && next())
|
|
184
|
+
// not 0-9 A-F a-f
|
|
185
|
+
if (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))
|
|
186
|
+
break
|
|
187
|
+
|
|
188
|
+
return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* @param {number} type
|
|
193
|
+
* @return {number}
|
|
194
|
+
*/
|
|
195
|
+
export function delimiter (type) {
|
|
196
|
+
while (next())
|
|
197
|
+
switch (character) {
|
|
198
|
+
// ] ) " '
|
|
199
|
+
case type:
|
|
200
|
+
return position
|
|
201
|
+
// " '
|
|
202
|
+
case 34: case 39:
|
|
203
|
+
if (type !== 34 && type !== 39)
|
|
204
|
+
delimiter(character)
|
|
205
|
+
break
|
|
206
|
+
// (
|
|
207
|
+
case 40:
|
|
208
|
+
if (type === 41)
|
|
209
|
+
delimiter(type)
|
|
210
|
+
break
|
|
211
|
+
// \
|
|
212
|
+
case 92:
|
|
213
|
+
next()
|
|
214
|
+
break
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
return position
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* @param {number} type
|
|
222
|
+
* @param {number} index
|
|
223
|
+
* @return {number}
|
|
224
|
+
*/
|
|
225
|
+
export function commenter (type, index) {
|
|
226
|
+
while (next())
|
|
227
|
+
// //
|
|
228
|
+
if (type + character === 47 + 10)
|
|
229
|
+
break
|
|
230
|
+
// /*
|
|
231
|
+
else if (type + character === 42 + 42 && peek() === 47)
|
|
232
|
+
break
|
|
233
|
+
|
|
234
|
+
return '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* @param {number} index
|
|
239
|
+
* @return {string}
|
|
240
|
+
*/
|
|
241
|
+
export function identifier (index) {
|
|
242
|
+
while (!token(peek()))
|
|
243
|
+
next()
|
|
244
|
+
|
|
245
|
+
return slice(index, position)
|
|
246
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {number}
|
|
3
|
+
* @return {number}
|
|
4
|
+
*/
|
|
5
|
+
export var abs = Math.abs
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @param {number}
|
|
9
|
+
* @return {string}
|
|
10
|
+
*/
|
|
11
|
+
export var from = String.fromCharCode
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @param {object}
|
|
15
|
+
* @return {object}
|
|
16
|
+
*/
|
|
17
|
+
export var assign = Object.assign
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @param {string} value
|
|
21
|
+
* @param {number} length
|
|
22
|
+
* @return {number}
|
|
23
|
+
*/
|
|
24
|
+
export function hash (value, length) {
|
|
25
|
+
return charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @param {string} value
|
|
30
|
+
* @return {string}
|
|
31
|
+
*/
|
|
32
|
+
export function trim (value) {
|
|
33
|
+
return value.trim()
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @param {string} value
|
|
38
|
+
* @param {RegExp} pattern
|
|
39
|
+
* @return {string?}
|
|
40
|
+
*/
|
|
41
|
+
export function match (value, pattern) {
|
|
42
|
+
return (value = pattern.exec(value)) ? value[0] : value
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @param {string} value
|
|
47
|
+
* @param {(string|RegExp)} pattern
|
|
48
|
+
* @param {string} replacement
|
|
49
|
+
* @return {string}
|
|
50
|
+
*/
|
|
51
|
+
export function replace (value, pattern, replacement) {
|
|
52
|
+
return value.replace(pattern, replacement)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @param {string} value
|
|
57
|
+
* @param {string} search
|
|
58
|
+
* @return {number}
|
|
59
|
+
*/
|
|
60
|
+
export function indexof (value, search) {
|
|
61
|
+
return value.indexOf(search)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @param {string} value
|
|
66
|
+
* @param {number} index
|
|
67
|
+
* @return {number}
|
|
68
|
+
*/
|
|
69
|
+
export function charat (value, index) {
|
|
70
|
+
return value.charCodeAt(index) | 0
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @param {string} value
|
|
75
|
+
* @param {number} begin
|
|
76
|
+
* @param {number} end
|
|
77
|
+
* @return {string}
|
|
78
|
+
*/
|
|
79
|
+
export function substr (value, begin, end) {
|
|
80
|
+
return value.slice(begin, end)
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* @param {string} value
|
|
85
|
+
* @return {number}
|
|
86
|
+
*/
|
|
87
|
+
export function strlen (value) {
|
|
88
|
+
return value.length
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @param {any[]} value
|
|
93
|
+
* @return {number}
|
|
94
|
+
*/
|
|
95
|
+
export function sizeof (value) {
|
|
96
|
+
return value.length
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @param {any} value
|
|
101
|
+
* @param {any[]} array
|
|
102
|
+
* @return {any}
|
|
103
|
+
*/
|
|
104
|
+
export function append (value, array) {
|
|
105
|
+
return array.push(value), value
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* @param {string[]} array
|
|
110
|
+
* @param {function} callback
|
|
111
|
+
* @return {string}
|
|
112
|
+
*/
|
|
113
|
+
export function combine (array, callback) {
|
|
114
|
+
return array.map(callback).join('')
|
|
115
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sitecore/sc-contenthub-blok",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.24",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -24,6 +24,8 @@
|
|
|
24
24
|
"react-dom": "^18.2.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
+
"@babel/core": "^7.18.6",
|
|
28
|
+
"@emotion/babel-plugin": "^11.11.0",
|
|
27
29
|
"@babel/plugin-transform-react-jsx": "^7.25.9",
|
|
28
30
|
"@babel/plugin-transform-react-jsx-self": "^7.25.9",
|
|
29
31
|
"@babel/plugin-transform-react-jsx-source": "^7.25.9",
|
|
@@ -89,7 +91,9 @@
|
|
|
89
91
|
"color-string": "^1.9.1",
|
|
90
92
|
"dompurify": "^3.2.3",
|
|
91
93
|
"react-intersection-observer": "^9.13.1",
|
|
92
|
-
"react-tooltip": "^5.28.0"
|
|
94
|
+
"react-tooltip": "^5.28.0",
|
|
95
|
+
"stylis": "^4.3.1",
|
|
96
|
+
"stylis-plugin-rtl": "^2.1.1"
|
|
93
97
|
},
|
|
94
98
|
"repository": {
|
|
95
99
|
"type": "git",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/node_modules/{stylis → @emotion/babel-plugin/node_modules/stylis}/dist/stylis.mjs.map
RENAMED
|
File without changes
|
/package/node_modules/{stylis → @emotion/babel-plugin/node_modules/stylis}/dist/umd/package.json
RENAMED
|
File without changes
|
/package/node_modules/{stylis → @emotion/babel-plugin/node_modules/stylis}/dist/umd/stylis.js
RENAMED
|
File without changes
|
/package/node_modules/{stylis → @emotion/babel-plugin/node_modules/stylis}/dist/umd/stylis.js.map
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/node_modules/{stylis → @emotion/babel-plugin/node_modules/stylis}/src/Middleware.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/node_modules/{stylis → @emotion/babel-plugin/node_modules/stylis}/src/Serializer.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|