@rbxts/uiblox 0.2.0-alpha.22 → 0.2.0-alpha.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/out/ui/packages/cframeEditor/components/CFrameEditor.luau +64 -38
- package/out/ui/packages/cframeEditor/components/CFrameEditor.styles.luau +26 -9
- package/out/ui/packages/checkbox/components/checkboxLook.d.ts +1 -1
- package/out/ui/packages/colorPicker/components/ColorPicker.luau +3 -3
- package/out/ui/packages/colorPicker/components/ColorPicker.styles.luau +34 -20
- package/out/ui/packages/colorPicker/components/ColorSequenceEditor.luau +23 -20
- package/out/ui/packages/colorPicker/components/NumberSequenceEditor.luau +54 -47
- package/out/ui/packages/divider/components/Divider.styles.luau +5 -2
- package/out/ui/packages/drawer/components/Drawer.d.ts +1 -1
- package/out/ui/packages/drawer/components/Drawer.luau +54 -36
- package/out/ui/packages/gradientEditor/components/GradientEditor.luau +45 -27
- package/out/ui/packages/gradientEditor/components/GradientEditor.styles.luau +37 -4
- package/out/ui/packages/imageList/components/ImageList.luau +1 -1
- package/out/ui/packages/index.d.ts +1 -0
- package/out/ui/packages/init.luau +3 -0
- package/out/ui/packages/markdown/components/Markdown.d.ts +6 -0
- package/out/ui/packages/markdown/components/Markdown.luau +228 -0
- package/out/ui/packages/markdown/components/Markdown.styles.d.ts +2 -0
- package/out/ui/packages/markdown/components/Markdown.styles.luau +101 -0
- package/out/ui/packages/markdown/components/MarkdownEditor.d.ts +16 -0
- package/out/ui/packages/markdown/components/MarkdownEditor.luau +322 -0
- package/out/ui/packages/markdown/components/MarkdownEditor.styles.d.ts +6 -0
- package/out/ui/packages/markdown/components/MarkdownEditor.styles.luau +132 -0
- package/out/ui/packages/markdown/htmlToMarkdown.d.ts +2 -0
- package/out/ui/packages/markdown/htmlToMarkdown.luau +350 -0
- package/out/ui/packages/markdown/index.d.ts +8 -0
- package/out/ui/packages/markdown/init.luau +11 -0
- package/out/ui/packages/markdown/parseMarkdown.d.ts +42 -0
- package/out/ui/packages/markdown/parseMarkdown.luau +459 -0
- package/out/ui/packages/splitPane/components/splitLook.d.ts +1 -1
- package/out/ui/packages/stateMatrix.luau +42 -1
- package/out/ui/packages/switch/components/switchLook.d.ts +1 -1
- package/out/ui/packages/toast/components/Toast.styles.luau +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local function trimEnd(value)
|
|
3
|
+
local stop = #value
|
|
4
|
+
while stop > 0 do
|
|
5
|
+
local _value = value
|
|
6
|
+
local _stop = stop
|
|
7
|
+
local _stop_1 = stop
|
|
8
|
+
local ch = string.sub(_value, _stop, _stop_1)
|
|
9
|
+
if ch ~= " " and ch ~= "\t" and ch ~= "\r" then
|
|
10
|
+
break
|
|
11
|
+
end
|
|
12
|
+
stop -= 1
|
|
13
|
+
end
|
|
14
|
+
local _value = value
|
|
15
|
+
local _stop = stop
|
|
16
|
+
return string.sub(_value, 1, _stop)
|
|
17
|
+
end
|
|
18
|
+
local function trim(value)
|
|
19
|
+
local start = 1
|
|
20
|
+
local stop = #value
|
|
21
|
+
while start <= stop do
|
|
22
|
+
local _value = value
|
|
23
|
+
local _start = start
|
|
24
|
+
local _start_1 = start
|
|
25
|
+
local ch = string.sub(_value, _start, _start_1)
|
|
26
|
+
if ch ~= " " and ch ~= "\t" and ch ~= "\r" then
|
|
27
|
+
break
|
|
28
|
+
end
|
|
29
|
+
start += 1
|
|
30
|
+
end
|
|
31
|
+
while stop >= start do
|
|
32
|
+
local _value = value
|
|
33
|
+
local _stop = stop
|
|
34
|
+
local _stop_1 = stop
|
|
35
|
+
local ch = string.sub(_value, _stop, _stop_1)
|
|
36
|
+
if ch ~= " " and ch ~= "\t" and ch ~= "\r" then
|
|
37
|
+
break
|
|
38
|
+
end
|
|
39
|
+
stop -= 1
|
|
40
|
+
end
|
|
41
|
+
if start > stop then
|
|
42
|
+
return ""
|
|
43
|
+
end
|
|
44
|
+
local _value = value
|
|
45
|
+
local _start = start
|
|
46
|
+
local _stop = stop
|
|
47
|
+
return string.sub(_value, _start, _stop)
|
|
48
|
+
end
|
|
49
|
+
local function headingLevel(line)
|
|
50
|
+
local n = 0
|
|
51
|
+
while true do
|
|
52
|
+
local _condition = n < #line and n < 6
|
|
53
|
+
if _condition then
|
|
54
|
+
local _line = line
|
|
55
|
+
local _arg0 = n + 1
|
|
56
|
+
local _arg1 = n + 1
|
|
57
|
+
_condition = string.sub(_line, _arg0, _arg1) == "#"
|
|
58
|
+
end
|
|
59
|
+
if not _condition then
|
|
60
|
+
break
|
|
61
|
+
end
|
|
62
|
+
n += 1
|
|
63
|
+
end
|
|
64
|
+
if n == 0 then
|
|
65
|
+
return nil
|
|
66
|
+
end
|
|
67
|
+
local _condition = n < #line
|
|
68
|
+
if _condition then
|
|
69
|
+
local _line = line
|
|
70
|
+
local _arg0 = n + 1
|
|
71
|
+
local _arg1 = n + 1
|
|
72
|
+
_condition = string.sub(_line, _arg0, _arg1) ~= " "
|
|
73
|
+
end
|
|
74
|
+
if _condition then
|
|
75
|
+
return nil
|
|
76
|
+
end
|
|
77
|
+
return n
|
|
78
|
+
end
|
|
79
|
+
local function parseInlines(source)
|
|
80
|
+
local out = {}
|
|
81
|
+
local i = 1
|
|
82
|
+
local n = #source
|
|
83
|
+
local buf = ""
|
|
84
|
+
local flush = function()
|
|
85
|
+
if #buf > 0 then
|
|
86
|
+
local _arg0 = {
|
|
87
|
+
kind = "text",
|
|
88
|
+
text = buf,
|
|
89
|
+
}
|
|
90
|
+
table.insert(out, _arg0)
|
|
91
|
+
buf = ""
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
while i <= n do
|
|
95
|
+
local _source = source
|
|
96
|
+
local _i = i
|
|
97
|
+
local _i_1 = i
|
|
98
|
+
local ch = string.sub(_source, _i, _i_1)
|
|
99
|
+
if ch == "`" then
|
|
100
|
+
local _source_1 = source
|
|
101
|
+
local _arg1 = i + 1
|
|
102
|
+
local close = { string.find(_source_1, "`", _arg1, true) }
|
|
103
|
+
local endAt = close[1]
|
|
104
|
+
if endAt ~= nil then
|
|
105
|
+
flush()
|
|
106
|
+
local _object = {
|
|
107
|
+
kind = "code",
|
|
108
|
+
}
|
|
109
|
+
local _left = "text"
|
|
110
|
+
local _source_2 = source
|
|
111
|
+
local _arg0 = i + 1
|
|
112
|
+
local _arg1_1 = endAt - 1
|
|
113
|
+
_object[_left] = string.sub(_source_2, _arg0, _arg1_1)
|
|
114
|
+
table.insert(out, _object)
|
|
115
|
+
i = endAt + 1
|
|
116
|
+
continue
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
if ch == "[" then
|
|
120
|
+
local _source_1 = source
|
|
121
|
+
local _arg1 = i + 1
|
|
122
|
+
local mid = { string.find(_source_1, "](", _arg1, true) }
|
|
123
|
+
local midAt = mid[1]
|
|
124
|
+
if midAt ~= nil then
|
|
125
|
+
local _source_2 = source
|
|
126
|
+
local _arg1_1 = midAt + 2
|
|
127
|
+
local closeParen = { string.find(_source_2, ")", _arg1_1, true) }
|
|
128
|
+
local endAt = closeParen[1]
|
|
129
|
+
if endAt ~= nil then
|
|
130
|
+
flush()
|
|
131
|
+
local _object = {
|
|
132
|
+
kind = "link",
|
|
133
|
+
}
|
|
134
|
+
local _left = "text"
|
|
135
|
+
local _source_3 = source
|
|
136
|
+
local _arg0 = i + 1
|
|
137
|
+
local _arg1_2 = midAt - 1
|
|
138
|
+
_object[_left] = string.sub(_source_3, _arg0, _arg1_2)
|
|
139
|
+
local _left_1 = "href"
|
|
140
|
+
local _source_4 = source
|
|
141
|
+
local _arg0_1 = midAt + 2
|
|
142
|
+
local _arg1_3 = endAt - 1
|
|
143
|
+
_object[_left_1] = string.sub(_source_4, _arg0_1, _arg1_3)
|
|
144
|
+
table.insert(out, _object)
|
|
145
|
+
i = endAt + 1
|
|
146
|
+
continue
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
local _condition = ch == "*" and i + 1 <= n
|
|
151
|
+
if _condition then
|
|
152
|
+
local _source_1 = source
|
|
153
|
+
local _arg0 = i + 1
|
|
154
|
+
local _arg1 = i + 1
|
|
155
|
+
_condition = string.sub(_source_1, _arg0, _arg1) == "*"
|
|
156
|
+
end
|
|
157
|
+
if _condition then
|
|
158
|
+
local _source_1 = source
|
|
159
|
+
local _arg1 = i + 2
|
|
160
|
+
local close = { string.find(_source_1, "**", _arg1, true) }
|
|
161
|
+
local endAt = close[1]
|
|
162
|
+
if endAt ~= nil then
|
|
163
|
+
flush()
|
|
164
|
+
local _object = {
|
|
165
|
+
kind = "bold",
|
|
166
|
+
}
|
|
167
|
+
local _left = "text"
|
|
168
|
+
local _source_2 = source
|
|
169
|
+
local _arg0 = i + 2
|
|
170
|
+
local _arg1_1 = endAt - 1
|
|
171
|
+
_object[_left] = string.sub(_source_2, _arg0, _arg1_1)
|
|
172
|
+
table.insert(out, _object)
|
|
173
|
+
i = endAt + 2
|
|
174
|
+
continue
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
local _condition_1 = ch == "*"
|
|
178
|
+
if _condition_1 then
|
|
179
|
+
local _condition_2 = i == 1
|
|
180
|
+
if not _condition_2 then
|
|
181
|
+
local _source_1 = source
|
|
182
|
+
local _arg0 = i - 1
|
|
183
|
+
local _arg1 = i - 1
|
|
184
|
+
_condition_2 = string.sub(_source_1, _arg0, _arg1) ~= "*"
|
|
185
|
+
end
|
|
186
|
+
_condition_1 = _condition_2
|
|
187
|
+
end
|
|
188
|
+
if _condition_1 then
|
|
189
|
+
local _source_1 = source
|
|
190
|
+
local _arg1 = i + 1
|
|
191
|
+
local close = { string.find(_source_1, "*", _arg1, true) }
|
|
192
|
+
local endAt = close[1]
|
|
193
|
+
local _condition_2 = endAt ~= nil
|
|
194
|
+
if _condition_2 then
|
|
195
|
+
local _source_2 = source
|
|
196
|
+
local _arg0 = endAt + 1
|
|
197
|
+
local _arg1_1 = endAt + 1
|
|
198
|
+
_condition_2 = string.sub(_source_2, _arg0, _arg1_1) ~= "*"
|
|
199
|
+
end
|
|
200
|
+
if _condition_2 then
|
|
201
|
+
flush()
|
|
202
|
+
local _object = {
|
|
203
|
+
kind = "italic",
|
|
204
|
+
}
|
|
205
|
+
local _left = "text"
|
|
206
|
+
local _source_2 = source
|
|
207
|
+
local _arg0 = i + 1
|
|
208
|
+
local _arg1_1 = endAt - 1
|
|
209
|
+
_object[_left] = string.sub(_source_2, _arg0, _arg1_1)
|
|
210
|
+
table.insert(out, _object)
|
|
211
|
+
i = endAt + 1
|
|
212
|
+
continue
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
buf = `{buf}{ch}`
|
|
216
|
+
i += 1
|
|
217
|
+
end
|
|
218
|
+
flush()
|
|
219
|
+
return if #out > 0 then out else { {
|
|
220
|
+
kind = "text",
|
|
221
|
+
text = "",
|
|
222
|
+
} }
|
|
223
|
+
end
|
|
224
|
+
local function isHr(line)
|
|
225
|
+
local t = trim(line)
|
|
226
|
+
if #t < 3 then
|
|
227
|
+
return false
|
|
228
|
+
end
|
|
229
|
+
local ch = string.sub(t, 1, 1)
|
|
230
|
+
if ch ~= "-" and ch ~= "*" and ch ~= "_" then
|
|
231
|
+
return false
|
|
232
|
+
end
|
|
233
|
+
for i = 1, #t do
|
|
234
|
+
local _i = i
|
|
235
|
+
local _i_1 = i
|
|
236
|
+
local c = string.sub(t, _i, _i_1)
|
|
237
|
+
if c ~= ch and c ~= " " then
|
|
238
|
+
return false
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
return true
|
|
242
|
+
end
|
|
243
|
+
local function listMarker(line)
|
|
244
|
+
local t = trim(line)
|
|
245
|
+
if #t >= 2 and (string.sub(t, 1, 2) == "- " or string.sub(t, 1, 2) == "* ") then
|
|
246
|
+
return {
|
|
247
|
+
ordered = false,
|
|
248
|
+
rest = string.sub(t, 3),
|
|
249
|
+
}
|
|
250
|
+
end
|
|
251
|
+
local i = 1
|
|
252
|
+
while i <= #t do
|
|
253
|
+
local _i = i
|
|
254
|
+
local _i_1 = i
|
|
255
|
+
local c = string.sub(t, _i, _i_1)
|
|
256
|
+
if c < "0" or c > "9" then
|
|
257
|
+
break
|
|
258
|
+
end
|
|
259
|
+
i += 1
|
|
260
|
+
end
|
|
261
|
+
local _condition = i > 1 and i + 1 <= #t
|
|
262
|
+
if _condition then
|
|
263
|
+
local _i = i
|
|
264
|
+
local _arg1 = i + 1
|
|
265
|
+
_condition = string.sub(t, _i, _arg1) == ". "
|
|
266
|
+
end
|
|
267
|
+
if _condition then
|
|
268
|
+
local _object = {
|
|
269
|
+
ordered = true,
|
|
270
|
+
}
|
|
271
|
+
local _left = "rest"
|
|
272
|
+
local _arg0 = i + 2
|
|
273
|
+
_object[_left] = string.sub(t, _arg0)
|
|
274
|
+
return _object
|
|
275
|
+
end
|
|
276
|
+
return nil
|
|
277
|
+
end
|
|
278
|
+
--* Small markdown subset → blocks. Unsupported syntax stays plain text.
|
|
279
|
+
local function parseMarkdown(source)
|
|
280
|
+
local lines = string.split(source, "\n")
|
|
281
|
+
local blocks = {}
|
|
282
|
+
local i = 0
|
|
283
|
+
while i < #lines do
|
|
284
|
+
local raw = lines[i + 1]
|
|
285
|
+
local line = trimEnd(raw)
|
|
286
|
+
if trim(line) == "" then
|
|
287
|
+
i += 1
|
|
288
|
+
continue
|
|
289
|
+
end
|
|
290
|
+
if #line >= 3 and string.sub(line, 1, 3) == "```" then
|
|
291
|
+
local body = {}
|
|
292
|
+
i += 1
|
|
293
|
+
while i < #lines and not (#lines[i + 1] >= 3 and string.sub(trim(lines[i + 1]), 1, 3) == "```") do
|
|
294
|
+
local _arg0 = lines[i + 1]
|
|
295
|
+
table.insert(body, _arg0)
|
|
296
|
+
i += 1
|
|
297
|
+
end
|
|
298
|
+
if i < #lines then
|
|
299
|
+
i += 1
|
|
300
|
+
end
|
|
301
|
+
local _arg0 = {
|
|
302
|
+
kind = "code",
|
|
303
|
+
text = table.concat(body, "\n"),
|
|
304
|
+
}
|
|
305
|
+
table.insert(blocks, _arg0)
|
|
306
|
+
continue
|
|
307
|
+
end
|
|
308
|
+
if isHr(line) then
|
|
309
|
+
table.insert(blocks, {
|
|
310
|
+
kind = "hr",
|
|
311
|
+
})
|
|
312
|
+
i += 1
|
|
313
|
+
continue
|
|
314
|
+
end
|
|
315
|
+
local level = headingLevel(line)
|
|
316
|
+
if level ~= nil then
|
|
317
|
+
local _object = {
|
|
318
|
+
kind = "heading",
|
|
319
|
+
level = level,
|
|
320
|
+
}
|
|
321
|
+
local _left = "inlines"
|
|
322
|
+
local _arg0 = level + 1
|
|
323
|
+
_object[_left] = parseInlines(trim(string.sub(line, _arg0)))
|
|
324
|
+
table.insert(blocks, _object)
|
|
325
|
+
i += 1
|
|
326
|
+
continue
|
|
327
|
+
end
|
|
328
|
+
if string.sub(line, 1, 1) == ">" and (#line == 1 or string.sub(line, 2, 2) == " ") then
|
|
329
|
+
local parts = {}
|
|
330
|
+
while i < #lines do
|
|
331
|
+
local cur = trimEnd(lines[i + 1])
|
|
332
|
+
if not (string.sub(cur, 1, 1) == ">" and (#cur == 1 or string.sub(cur, 2, 2) == " ")) then
|
|
333
|
+
break
|
|
334
|
+
end
|
|
335
|
+
local _arg0 = if #cur >= 2 then string.sub(cur, 3) else ""
|
|
336
|
+
table.insert(parts, _arg0)
|
|
337
|
+
i += 1
|
|
338
|
+
end
|
|
339
|
+
local _arg0 = {
|
|
340
|
+
kind = "blockquote",
|
|
341
|
+
inlines = parseInlines(table.concat(parts, " ")),
|
|
342
|
+
}
|
|
343
|
+
table.insert(blocks, _arg0)
|
|
344
|
+
continue
|
|
345
|
+
end
|
|
346
|
+
local marker = listMarker(line)
|
|
347
|
+
if marker ~= nil then
|
|
348
|
+
local ordered = marker.ordered
|
|
349
|
+
local items = { parseInlines(marker.rest) }
|
|
350
|
+
i += 1
|
|
351
|
+
while i < #lines do
|
|
352
|
+
local following = listMarker(trimEnd(lines[i + 1]))
|
|
353
|
+
if following == nil or following.ordered ~= ordered then
|
|
354
|
+
break
|
|
355
|
+
end
|
|
356
|
+
local _arg0 = parseInlines(following.rest)
|
|
357
|
+
table.insert(items, _arg0)
|
|
358
|
+
i += 1
|
|
359
|
+
end
|
|
360
|
+
local _arg0 = {
|
|
361
|
+
kind = "list",
|
|
362
|
+
ordered = ordered,
|
|
363
|
+
items = items,
|
|
364
|
+
}
|
|
365
|
+
table.insert(blocks, _arg0)
|
|
366
|
+
continue
|
|
367
|
+
end
|
|
368
|
+
local para = { line }
|
|
369
|
+
i += 1
|
|
370
|
+
while i < #lines do
|
|
371
|
+
local cur = trimEnd(lines[i + 1])
|
|
372
|
+
if trim(cur) == "" then
|
|
373
|
+
break
|
|
374
|
+
end
|
|
375
|
+
if #cur >= 3 and string.sub(cur, 1, 3) == "```" then
|
|
376
|
+
break
|
|
377
|
+
end
|
|
378
|
+
if isHr(cur) then
|
|
379
|
+
break
|
|
380
|
+
end
|
|
381
|
+
if headingLevel(cur) ~= nil then
|
|
382
|
+
break
|
|
383
|
+
end
|
|
384
|
+
if string.sub(cur, 1, 1) == ">" and (#cur == 1 or string.sub(cur, 2, 2) == " ") then
|
|
385
|
+
break
|
|
386
|
+
end
|
|
387
|
+
if listMarker(cur) ~= nil then
|
|
388
|
+
break
|
|
389
|
+
end
|
|
390
|
+
-- two trailing spaces = hard break
|
|
391
|
+
local prev = para[#para]
|
|
392
|
+
local _condition = #prev >= 2
|
|
393
|
+
if _condition then
|
|
394
|
+
local _arg0 = #prev - 1
|
|
395
|
+
_condition = string.sub(prev, _arg0) == " "
|
|
396
|
+
end
|
|
397
|
+
if _condition then
|
|
398
|
+
local _arg1 = #prev - 2
|
|
399
|
+
para[#para] = trimEnd(string.sub(prev, 1, _arg1))
|
|
400
|
+
table.insert(para, cur)
|
|
401
|
+
else
|
|
402
|
+
para[#para] = `{prev} {cur}`
|
|
403
|
+
end
|
|
404
|
+
i += 1
|
|
405
|
+
end
|
|
406
|
+
local _arg0 = {
|
|
407
|
+
kind = "paragraph",
|
|
408
|
+
inlines = parseInlines(table.concat(para, "\n")),
|
|
409
|
+
}
|
|
410
|
+
table.insert(blocks, _arg0)
|
|
411
|
+
end
|
|
412
|
+
return blocks
|
|
413
|
+
end
|
|
414
|
+
local function inlinesToPlain(inlines)
|
|
415
|
+
local out = ""
|
|
416
|
+
for _, part in inlines do
|
|
417
|
+
if part.kind == "link" then
|
|
418
|
+
out = `{out}{part.text}`
|
|
419
|
+
else
|
|
420
|
+
out = `{out}{part.text}`
|
|
421
|
+
end
|
|
422
|
+
end
|
|
423
|
+
return out
|
|
424
|
+
end
|
|
425
|
+
local function escapeRich(text)
|
|
426
|
+
local out = text
|
|
427
|
+
for _, _binding in { { "&", "&" }, { "<", "<" }, { ">", ">" } } do
|
|
428
|
+
local from = _binding[1]
|
|
429
|
+
local to = _binding[2]
|
|
430
|
+
local replaced = string.gsub(out, from, to)
|
|
431
|
+
out = replaced
|
|
432
|
+
end
|
|
433
|
+
return out
|
|
434
|
+
end
|
|
435
|
+
--* Turn inline nodes into Roblox RichText. Links become colored label + (url).
|
|
436
|
+
local function inlinesToRichText(inlines)
|
|
437
|
+
local out = ""
|
|
438
|
+
for _, part in inlines do
|
|
439
|
+
if part.kind == "text" then
|
|
440
|
+
local chunk = escapeRich(part.text)
|
|
441
|
+
local withBreaks = string.gsub(chunk, "\n", "<br/>")
|
|
442
|
+
out = `{out}{withBreaks}`
|
|
443
|
+
elseif part.kind == "bold" then
|
|
444
|
+
out = `{out}<b>{escapeRich(part.text)}</b>`
|
|
445
|
+
elseif part.kind == "italic" then
|
|
446
|
+
out = `{out}<i>{escapeRich(part.text)}</i>`
|
|
447
|
+
elseif part.kind == "code" then
|
|
448
|
+
out = `{out}<font face="RobotoMono">{escapeRich(part.text)}</font>`
|
|
449
|
+
elseif part.kind == "link" then
|
|
450
|
+
out = `{out}<font color="#4C9AFF">{escapeRich(part.text)}</font> ({escapeRich(part.href)})`
|
|
451
|
+
end
|
|
452
|
+
end
|
|
453
|
+
return out
|
|
454
|
+
end
|
|
455
|
+
return {
|
|
456
|
+
parseMarkdown = parseMarkdown,
|
|
457
|
+
inlinesToPlain = inlinesToPlain,
|
|
458
|
+
inlinesToRichText = inlinesToRichText,
|
|
459
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type SplitPointer = "rest" | "hover" | "press";
|
|
2
2
|
export declare function splitPointer(hovering: boolean, pressed: boolean): SplitPointer;
|
|
3
|
-
export declare function splitRuleTransparency(pointer: SplitPointer, disabled?: boolean): 0.25 | 0.
|
|
3
|
+
export declare function splitRuleTransparency(pointer: SplitPointer, disabled?: boolean): 0.25 | 0.7 | 0.55 | 0.35;
|
|
4
4
|
export declare function splitMarkTransparency(pointer: SplitPointer, disabled?: boolean): 0 | 0.55 | 0.1;
|
|
5
5
|
export declare function splitHitTransparency(pointer: SplitPointer, disabled?: boolean): 1 | 0.9 | 0.94;
|
|
@@ -2145,7 +2145,48 @@ local function miscRows()
|
|
|
2145
2145
|
open = true,
|
|
2146
2146
|
selected = "a",
|
|
2147
2147
|
})
|
|
2148
|
-
|
|
2148
|
+
local _Length_67 = #_array_68
|
|
2149
|
+
table.move(_array_68, 1, _Length_67, _length + 1, _array)
|
|
2150
|
+
_length += _Length_67
|
|
2151
|
+
local _array_69 = pair("Markdown", "default", {
|
|
2152
|
+
text = "# Title\n\nHello **world**",
|
|
2153
|
+
})
|
|
2154
|
+
local _Length_68 = #_array_69
|
|
2155
|
+
table.move(_array_69, 1, _Length_68, _length + 1, _array)
|
|
2156
|
+
_length += _Length_68
|
|
2157
|
+
local _array_70 = pair("Markdown", "empty", {
|
|
2158
|
+
text = "",
|
|
2159
|
+
})
|
|
2160
|
+
local _Length_69 = #_array_70
|
|
2161
|
+
table.move(_array_70, 1, _Length_69, _length + 1, _array)
|
|
2162
|
+
_length += _Length_69
|
|
2163
|
+
local _array_71 = pair("MarkdownEditor", "split", {
|
|
2164
|
+
text = "# Title",
|
|
2165
|
+
variant = "split",
|
|
2166
|
+
})
|
|
2167
|
+
local _Length_70 = #_array_71
|
|
2168
|
+
table.move(_array_71, 1, _Length_70, _length + 1, _array)
|
|
2169
|
+
_length += _Length_70
|
|
2170
|
+
local _array_72 = pair("MarkdownEditor", "edit", {
|
|
2171
|
+
text = "# Title",
|
|
2172
|
+
variant = "edit",
|
|
2173
|
+
})
|
|
2174
|
+
local _Length_71 = #_array_72
|
|
2175
|
+
table.move(_array_72, 1, _Length_71, _length + 1, _array)
|
|
2176
|
+
_length += _Length_71
|
|
2177
|
+
local _array_73 = pair("MarkdownEditor", "preview", {
|
|
2178
|
+
text = "# Title",
|
|
2179
|
+
variant = "preview",
|
|
2180
|
+
})
|
|
2181
|
+
local _Length_72 = #_array_73
|
|
2182
|
+
table.move(_array_73, 1, _Length_72, _length + 1, _array)
|
|
2183
|
+
_length += _Length_72
|
|
2184
|
+
local _array_74 = pair("MarkdownEditor", "density-compact", {
|
|
2185
|
+
text = "# Title",
|
|
2186
|
+
density = "compact",
|
|
2187
|
+
variant = "split",
|
|
2188
|
+
})
|
|
2189
|
+
table.move(_array_74, 1, #_array_74, _length + 1, _array)
|
|
2149
2190
|
return _array
|
|
2150
2191
|
end
|
|
2151
2192
|
local function concatRows(...)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type SwitchPointer = "rest" | "hover" | "press" | "focus";
|
|
2
2
|
export declare function switchPointer(hovering: boolean, pressed: boolean, focused: boolean): SwitchPointer;
|
|
3
|
-
export declare function switchTrackTransparency(on: boolean, disabled: boolean, pointer: SwitchPointer): 0 | 0.25 | 0.
|
|
3
|
+
export declare function switchTrackTransparency(on: boolean, disabled: boolean, pointer: SwitchPointer): 0 | 0.25 | 0.55 | 0.35 | 0.15 | 0.65 | 0.08;
|
|
4
4
|
export declare function switchThumbTransparency(disabled: boolean): 0 | 0.35;
|
|
5
5
|
export declare function switchStrokeTransparency(disabled: boolean, pointer: SwitchPointer): 1 | 0 | 0.35;
|
|
6
6
|
export declare function switchThumbPlacement(on: boolean, inset: number): {
|
|
@@ -46,7 +46,7 @@ local useToastStyles = componentStyles("Toast", function(theme, _param)
|
|
|
46
46
|
return createStyles({
|
|
47
47
|
container = {
|
|
48
48
|
Size = UDim2.new(0, theme.spacing.calc(20), 0, theme.spacing.calc(4)),
|
|
49
|
-
Position =
|
|
49
|
+
Position = ACTIVE_POSITION,
|
|
50
50
|
BackgroundColor3 = toastColors.background,
|
|
51
51
|
AnchorPoint = Vector2.new(0.5, 1),
|
|
52
52
|
BorderSizePixel = 0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rbxts/uiblox",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.24",
|
|
4
4
|
"description": "UI Library and theming for roblox-ts projects",
|
|
5
5
|
"main": "out/init.luau",
|
|
6
6
|
"packageManager": "pnpm@11.3.0",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"build": "rbxtsc",
|
|
9
9
|
"watch": "rbxtsc -w",
|
|
10
10
|
"pack:check": "node scripts/pack-check.mjs",
|
|
11
|
-
"test": "node scripts/no-internal-refs.check.mjs && node scripts/import-case.check.mjs && node --experimental-strip-types scripts/theme-scope.check.mjs && node --experimental-strip-types scripts/style-types.check.mjs && node --experimental-strip-types scripts/style-cache.check.mjs && node --experimental-strip-types scripts/style-variants.check.mjs && node --experimental-strip-types scripts/component-styles.check.mjs && node --experimental-strip-types scripts/interaction-styles.check.mjs && node --experimental-strip-types scripts/resolve-style.check.mjs && node --experimental-strip-types scripts/density.check.mjs && node --experimental-strip-types scripts/styles.check.mjs && node --experimental-strip-types scripts/contrast.check.mjs && node --experimental-strip-types scripts/primitives.check.mjs && node --experimental-strip-types scripts/paper.check.mjs && node --experimental-strip-types scripts/list-item.check.mjs && node --experimental-strip-types scripts/slider.check.mjs && node --experimental-strip-types scripts/input.check.mjs && node --experimental-strip-types scripts/menu.check.mjs && node --experimental-strip-types scripts/guard.check.mjs && node --experimental-strip-types scripts/breakpoints.check.mjs && node --experimental-strip-types scripts/focus-trap.check.mjs && node --experimental-strip-types scripts/select-typeahead.check.mjs && node --experimental-strip-types scripts/select-groups.check.mjs && node --experimental-strip-types scripts/select-multi.check.mjs && node --experimental-strip-types scripts/select-polish.check.mjs && node --experimental-strip-types scripts/reduced-motion.check.mjs && node --experimental-strip-types scripts/card.check.mjs && node --experimental-strip-types scripts/chip.check.mjs && node --experimental-strip-types scripts/badge.check.mjs && node --experimental-strip-types scripts/avatar.check.mjs && node --experimental-strip-types scripts/imageList.check.mjs && node --experimental-strip-types scripts/drawer.check.mjs && node --experimental-strip-types scripts/breadcrumbs.check.mjs && node --experimental-strip-types scripts/pagination.check.mjs && node --experimental-strip-types scripts/stepper.check.mjs && node --experimental-strip-types scripts/accordion.check.mjs && node --experimental-strip-types scripts/snackbar.check.mjs && node --experimental-strip-types scripts/table.check.mjs && node --experimental-strip-types scripts/autocomplete.check.mjs && node --experimental-strip-types scripts/field-loading.check.mjs && node --experimental-strip-types scripts/fab.check.mjs && node --experimental-strip-types scripts/appbar.check.mjs && node --experimental-strip-types scripts/bottom-navigation.check.mjs && node --experimental-strip-types scripts/alert.check.mjs && node --experimental-strip-types scripts/toggle-button.check.mjs && node --experimental-strip-types scripts/link.check.mjs && node --experimental-strip-types scripts/rating.check.mjs && node --experimental-strip-types scripts/stack.check.mjs && node --experimental-strip-types scripts/flex-item.check.mjs && node --experimental-strip-types scripts/grid.check.mjs && node --experimental-strip-types scripts/speed-dial.check.mjs && node --experimental-strip-types scripts/form-text.check.mjs && node --experimental-strip-types scripts/box.check.mjs && node --experimental-strip-types scripts/image-list.check.mjs && node --experimental-strip-types scripts/radio-group.check.mjs && node --experimental-strip-types scripts/container.check.mjs && node --experimental-strip-types scripts/divider.check.mjs && node --experimental-strip-types scripts/switch.check.mjs && node --experimental-strip-types scripts/tabs.check.mjs && node --experimental-strip-types scripts/dialog.check.mjs && node --experimental-strip-types scripts/backdrop.check.mjs && node --experimental-strip-types scripts/cframe-editor.check.mjs && node --experimental-strip-types scripts/enum-picker.check.mjs && node --experimental-strip-types scripts/number-range.check.mjs && node --experimental-strip-types scripts/rect-editor.check.mjs && node --experimental-strip-types scripts/asset-field.check.mjs && node --experimental-strip-types scripts/gradient-editor.check.mjs && node --experimental-strip-types scripts/ray-editor.check.mjs && node --experimental-strip-types scripts/physical-properties.check.mjs && node --experimental-strip-types scripts/brickcolor-picker.check.mjs",
|
|
11
|
+
"test": "node scripts/no-internal-refs.check.mjs && node scripts/import-case.check.mjs && node --experimental-strip-types scripts/theme-scope.check.mjs && node --experimental-strip-types scripts/style-types.check.mjs && node --experimental-strip-types scripts/style-cache.check.mjs && node --experimental-strip-types scripts/style-variants.check.mjs && node --experimental-strip-types scripts/component-styles.check.mjs && node --experimental-strip-types scripts/interaction-styles.check.mjs && node --experimental-strip-types scripts/resolve-style.check.mjs && node --experimental-strip-types scripts/density.check.mjs && node --experimental-strip-types scripts/styles.check.mjs && node --experimental-strip-types scripts/contrast.check.mjs && node --experimental-strip-types scripts/primitives.check.mjs && node --experimental-strip-types scripts/paper.check.mjs && node --experimental-strip-types scripts/list-item.check.mjs && node --experimental-strip-types scripts/slider.check.mjs && node --experimental-strip-types scripts/input.check.mjs && node --experimental-strip-types scripts/menu.check.mjs && node --experimental-strip-types scripts/guard.check.mjs && node --experimental-strip-types scripts/breakpoints.check.mjs && node --experimental-strip-types scripts/focus-trap.check.mjs && node --experimental-strip-types scripts/select-typeahead.check.mjs && node --experimental-strip-types scripts/select-groups.check.mjs && node --experimental-strip-types scripts/select-multi.check.mjs && node --experimental-strip-types scripts/select-polish.check.mjs && node --experimental-strip-types scripts/reduced-motion.check.mjs && node --experimental-strip-types scripts/card.check.mjs && node --experimental-strip-types scripts/chip.check.mjs && node --experimental-strip-types scripts/badge.check.mjs && node --experimental-strip-types scripts/avatar.check.mjs && node --experimental-strip-types scripts/imageList.check.mjs && node --experimental-strip-types scripts/drawer.check.mjs && node --experimental-strip-types scripts/breadcrumbs.check.mjs && node --experimental-strip-types scripts/pagination.check.mjs && node --experimental-strip-types scripts/stepper.check.mjs && node --experimental-strip-types scripts/accordion.check.mjs && node --experimental-strip-types scripts/snackbar.check.mjs && node --experimental-strip-types scripts/table.check.mjs && node --experimental-strip-types scripts/autocomplete.check.mjs && node --experimental-strip-types scripts/field-loading.check.mjs && node --experimental-strip-types scripts/fab.check.mjs && node --experimental-strip-types scripts/appbar.check.mjs && node --experimental-strip-types scripts/bottom-navigation.check.mjs && node --experimental-strip-types scripts/alert.check.mjs && node --experimental-strip-types scripts/toggle-button.check.mjs && node --experimental-strip-types scripts/link.check.mjs && node --experimental-strip-types scripts/rating.check.mjs && node --experimental-strip-types scripts/stack.check.mjs && node --experimental-strip-types scripts/flex-item.check.mjs && node --experimental-strip-types scripts/grid.check.mjs && node --experimental-strip-types scripts/speed-dial.check.mjs && node --experimental-strip-types scripts/form-text.check.mjs && node --experimental-strip-types scripts/box.check.mjs && node --experimental-strip-types scripts/image-list.check.mjs && node --experimental-strip-types scripts/radio-group.check.mjs && node --experimental-strip-types scripts/container.check.mjs && node --experimental-strip-types scripts/divider.check.mjs && node --experimental-strip-types scripts/markdown.check.mjs && node --experimental-strip-types scripts/switch.check.mjs && node --experimental-strip-types scripts/tabs.check.mjs && node --experimental-strip-types scripts/dialog.check.mjs && node --experimental-strip-types scripts/backdrop.check.mjs && node --experimental-strip-types scripts/cframe-editor.check.mjs && node --experimental-strip-types scripts/enum-picker.check.mjs && node --experimental-strip-types scripts/number-range.check.mjs && node --experimental-strip-types scripts/rect-editor.check.mjs && node --experimental-strip-types scripts/asset-field.check.mjs && node --experimental-strip-types scripts/gradient-editor.check.mjs && node --experimental-strip-types scripts/ray-editor.check.mjs && node --experimental-strip-types scripts/physical-properties.check.mjs && node --experimental-strip-types scripts/brickcolor-picker.check.mjs",
|
|
12
12
|
"prepublishOnly": "pnpm build"
|
|
13
13
|
},
|
|
14
14
|
"keywords": [
|