create-mendix-widget-gleam 2.0.19 → 3.0.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.
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/i18n.mjs +394 -334
- package/src/index.mjs +284 -231
- package/src/licenses.mjs +147 -0
- package/src/prompts.mjs +247 -142
- package/src/scaffold.mjs +108 -97
- package/src/templates/claude_md.mjs +7 -6
- package/src/templates/readme_md.mjs +88 -76
- package/src/templates/widgets_readme.mjs +18 -15
- package/template/docs/glendix_guide.md +1050 -2538
- package/template/gleam.toml +5 -2
- package/template/package.json +10 -7
- package/template/src/__WidgetName__.xml +1 -1
- package/template/src/__widget_name__.gleam +3 -3
- package/template/src/components/hello_world.gleam +5 -5
- package/template/src/editor_config.gleam +4 -8
- package/template/src/editor_preview.gleam +3 -3
- package/template/src/package.xml +2 -2
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@command.cache +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@cursor.cache +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@cursor.cache_meta +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@event.cache +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@internal@consts.cache +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@stdout.cache +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@style.cache +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@terminal.cache +0 -0
- package/tui/build/dev/javascript/etch/etch/event.mjs +36 -30
- package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@application.cache +0 -0
- package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@atom.cache +0 -0
- package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@charlist.cache +0 -0
- package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@node.cache +0 -0
- package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@port.cache +0 -0
- package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@process.cache +0 -0
- package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@reference.cache +0 -0
- package/tui/build/dev/javascript/gleam_javascript/_gleam_artefacts/gleam@javascript@array.cache +0 -0
- package/tui/build/dev/javascript/gleam_javascript/_gleam_artefacts/gleam@javascript@promise.cache +0 -0
- package/tui/build/dev/javascript/gleam_javascript/_gleam_artefacts/gleam@javascript@symbol.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bit_array.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bool.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bool.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bytes_tree.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dict.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dynamic.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dynamic@decode.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dynamic@decode.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@float.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@function.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@int.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@io.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@list.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@option.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@order.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@pair.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@result.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@result.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@set.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@string.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@string.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@string_tree.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@uri.cache +0 -0
- package/tui/build/dev/javascript/gleam_version +1 -1
- package/tui/build/dev/javascript/prelude.mjs +10 -26
- package/tui/build/dev/javascript/tui/_gleam_artefacts/tui.cache +0 -0
- package/tui/build/dev/javascript/tui/_gleam_artefacts/tui.cache_meta +0 -0
- package/tui/build/dev/javascript/tui/_gleam_artefacts/tui@prompt.cache +0 -0
- package/tui/build/dev/javascript/tui/_gleam_artefacts/tui@prompt.cache_meta +0 -0
- package/tui/build/dev/javascript/tui/tui/prompt.mjs +713 -52
- package/tui/build/dev/javascript/tui/tui.mjs +438 -51
- package/tui/build/dev/javascript/tui/tui_ffi.mjs +12 -0
- package/template/LICENSE +0 -15
package/template/gleam.toml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
name = "{{SNAKE_CASE}}"
|
|
2
|
-
version = "
|
|
2
|
+
version = "{{VERSION}}"
|
|
3
3
|
target = "javascript"
|
|
4
4
|
|
|
5
5
|
[javascript]
|
|
@@ -8,4 +8,7 @@ runtime = "node"
|
|
|
8
8
|
|
|
9
9
|
[dependencies]
|
|
10
10
|
gleam_stdlib = ">= 0.44.0 and < 2.0.0"
|
|
11
|
-
glendix = ">=
|
|
11
|
+
glendix = ">= 3.0.0 and < 4.0.0"
|
|
12
|
+
redraw = ">= 19.2.2 and < 20.0.0"
|
|
13
|
+
redraw_dom = ">= 19.2.2 and < 20.0.0"
|
|
14
|
+
lustre = ">= 5.6.0 and < 6.0.0"
|
package/template/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "{{LOWERCASE}}",
|
|
3
3
|
"widgetName": "{{PASCAL_CASE}}",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "{{VERSION}}",
|
|
5
5
|
"description": "My widget description",
|
|
6
|
-
"copyright": "
|
|
7
|
-
"author": "",
|
|
6
|
+
"copyright": "{{COPYRIGHT}}",
|
|
7
|
+
"author": "{{AUTHOR}}",
|
|
8
8
|
"engines": {
|
|
9
9
|
"node": ">=16"
|
|
10
10
|
},
|
|
11
|
-
"license": "
|
|
11
|
+
"license": "{{LICENSE_ID}}",
|
|
12
12
|
"config": {
|
|
13
|
-
"projectPath": "
|
|
13
|
+
"projectPath": "{{PROJECT_PATH}}",
|
|
14
14
|
"mendixHost": "http://localhost:8080",
|
|
15
15
|
"developmentPort": 3000
|
|
16
16
|
},
|
|
17
|
-
"packagePath": "
|
|
17
|
+
"packagePath": "{{ORGANIZATION}}",
|
|
18
18
|
"scripts": {
|
|
19
19
|
"prerelease": "echo skipping lint"
|
|
20
20
|
},
|
|
@@ -23,7 +23,10 @@
|
|
|
23
23
|
"playwright": "^1.58.2"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"classnames": "^2.5.1"
|
|
26
|
+
"classnames": "^2.5.1",
|
|
27
|
+
"react": "^19.0.0",
|
|
28
|
+
"react-dom": "^19.0.0",
|
|
29
|
+
"big.js": "^6.0.0"
|
|
27
30
|
},
|
|
28
31
|
"resolutions": {
|
|
29
32
|
"react": "^19.0.0",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<widget id="
|
|
2
|
+
<widget id="{{ORGANIZATION}}.{{LOWERCASE}}.{{PASCAL_CASE}}" pluginWidget="true" needsEntityContext="true" offlineCapable="true"
|
|
3
3
|
supportedPlatform="Web"
|
|
4
4
|
xmlns="http://www.mendix.com/widget/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
5
5
|
xsi:schemaLocation="http://www.mendix.com/widget/1.0/ ../node_modules/mendix/custom_widget.xsd">
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
{{I18N:widget_main_2}}
|
|
3
3
|
|
|
4
4
|
import components/hello_world
|
|
5
|
-
import glendix/mendix
|
|
6
|
-
import
|
|
5
|
+
import glendix/mendix.{type JsProps}
|
|
6
|
+
import redraw.{type Element}
|
|
7
7
|
|
|
8
8
|
{{I18N:widget_main_doc}}
|
|
9
|
-
pub fn widget(props: JsProps) ->
|
|
9
|
+
pub fn widget(props: JsProps) -> Element {
|
|
10
10
|
let sample_text = mendix.get_string_prop(props, "sampleText")
|
|
11
11
|
hello_world.render(sample_text)
|
|
12
12
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{{I18N:hello_world_1}}
|
|
2
2
|
{{I18N:hello_world_2}}
|
|
3
3
|
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
4
|
+
import redraw.{type Element}
|
|
5
|
+
import redraw/dom/attribute
|
|
6
|
+
import redraw/dom/html
|
|
7
7
|
|
|
8
8
|
{{I18N:hello_world_doc}}
|
|
9
|
-
pub fn render(sample_text: String) ->
|
|
9
|
+
pub fn render(sample_text: String) -> Element {
|
|
10
10
|
html.div([attribute.class("widget-hello-world")], [
|
|
11
|
-
|
|
11
|
+
html.text("Hello " <> sample_text),
|
|
12
12
|
])
|
|
13
13
|
}
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
{{I18N:editor_config_1}}
|
|
2
2
|
{{I18N:editor_config_2}}
|
|
3
3
|
|
|
4
|
-
{
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
pub type Properties
|
|
8
|
-
|
|
9
|
-
pub type Target
|
|
4
|
+
import glendix/editor_config.{type Properties}
|
|
5
|
+
import glendix/mendix.{type JsProps}
|
|
10
6
|
|
|
11
7
|
{{I18N:editor_config_doc}}
|
|
12
8
|
pub fn get_properties(
|
|
13
|
-
_values:
|
|
9
|
+
_values: JsProps,
|
|
14
10
|
default_properties: Properties,
|
|
15
|
-
|
|
11
|
+
_platform: String,
|
|
16
12
|
) -> Properties {
|
|
17
13
|
default_properties
|
|
18
14
|
}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
{{I18N:editor_preview_2}}
|
|
3
3
|
|
|
4
4
|
import components/hello_world
|
|
5
|
-
import glendix/mendix
|
|
6
|
-
import
|
|
5
|
+
import glendix/mendix.{type JsProps}
|
|
6
|
+
import redraw.{type Element}
|
|
7
7
|
|
|
8
8
|
{{I18N:editor_preview_doc}}
|
|
9
|
-
pub fn preview(props: JsProps) ->
|
|
9
|
+
pub fn preview(props: JsProps) -> Element {
|
|
10
10
|
let sample_text = mendix.get_string_prop(props, "sampleText")
|
|
11
11
|
hello_world.render(sample_text)
|
|
12
12
|
}
|
package/template/src/package.xml
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8" ?>
|
|
2
2
|
<package xmlns="http://www.mendix.com/package/1.0/">
|
|
3
|
-
<clientModule name="{{PASCAL_CASE}}" version="
|
|
3
|
+
<clientModule name="{{PASCAL_CASE}}" version="{{VERSION}}" xmlns="http://www.mendix.com/clientModule/1.0/">
|
|
4
4
|
<widgetFiles>
|
|
5
5
|
<widgetFile path="{{PASCAL_CASE}}.xml"/>
|
|
6
6
|
</widgetFiles>
|
|
7
7
|
<files>
|
|
8
|
-
<file path="
|
|
8
|
+
<file path="{{ORGANIZATION}}/{{LOWERCASE}}"/>
|
|
9
9
|
</files>
|
|
10
10
|
</clientModule>
|
|
11
11
|
</package>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -953,11 +953,13 @@ export function parse_modifier_to_state(modifier_mask) {
|
|
|
953
953
|
let state = new KeyEventState(false, false, false);
|
|
954
954
|
let _block;
|
|
955
955
|
let $ = modifier_mask - 1;
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
956
|
+
{
|
|
957
|
+
let n = $;
|
|
958
|
+
if (n < 0) {
|
|
959
|
+
_block = 0;
|
|
960
|
+
} else {
|
|
961
|
+
_block = $;
|
|
962
|
+
}
|
|
961
963
|
}
|
|
962
964
|
let mask = _block;
|
|
963
965
|
let _block$1;
|
|
@@ -1123,7 +1125,7 @@ export function parse_cb(code) {
|
|
|
1123
1125
|
_block = $result.unwrap(_pipe, 0);
|
|
1124
1126
|
let code$1 = _block;
|
|
1125
1127
|
let _block$1;
|
|
1126
|
-
let _pipe$1 = $int.bitwise_and(code$1,
|
|
1128
|
+
let _pipe$1 = $int.bitwise_and(code$1, 0b11);
|
|
1127
1129
|
_block$1 = $int.bitwise_or(
|
|
1128
1130
|
_pipe$1,
|
|
1129
1131
|
(() => {
|
|
@@ -1411,11 +1413,13 @@ export function parse_sgr_mouse(s) {
|
|
|
1411
1413
|
export function parse_modifiers(code) {
|
|
1412
1414
|
let _block;
|
|
1413
1415
|
let $ = code - 1;
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1416
|
+
{
|
|
1417
|
+
let x = $;
|
|
1418
|
+
if (x < 0) {
|
|
1419
|
+
_block = 0;
|
|
1420
|
+
} else {
|
|
1421
|
+
_block = $;
|
|
1422
|
+
}
|
|
1419
1423
|
}
|
|
1420
1424
|
let mask = _block;
|
|
1421
1425
|
return new Modifiers(
|
|
@@ -1848,31 +1852,33 @@ export function parse_special_key_code(code) {
|
|
|
1848
1852
|
_block$2 = new Ok(new PageDown());
|
|
1849
1853
|
} else {
|
|
1850
1854
|
let k = key$1;
|
|
1851
|
-
|
|
1852
|
-
if ((k$1 >= 11) && (k$1 <= 15)) {
|
|
1853
|
-
_block$2 = new Ok(new F(k$1 - 10));
|
|
1854
|
-
} else {
|
|
1855
|
+
{
|
|
1855
1856
|
let k$1 = k;
|
|
1856
|
-
if ((k$1 >=
|
|
1857
|
-
_block$2 = new Ok(new F(k$1 -
|
|
1857
|
+
if ((k$1 >= 11) && (k$1 <= 15)) {
|
|
1858
|
+
_block$2 = new Ok(new F(k$1 - 10));
|
|
1858
1859
|
} else {
|
|
1859
1860
|
let k$1 = k;
|
|
1860
|
-
if ((k$1 >=
|
|
1861
|
-
_block$2 = new Ok(new F(k$1 -
|
|
1862
|
-
} else if (k === 28) {
|
|
1863
|
-
_block$2 = new Ok(new F(k - 15));
|
|
1864
|
-
} else if (k === 29) {
|
|
1865
|
-
_block$2 = new Ok(new F(k - 15));
|
|
1861
|
+
if ((k$1 >= 17) && (k$1 <= 21)) {
|
|
1862
|
+
_block$2 = new Ok(new F(k$1 - 11));
|
|
1866
1863
|
} else {
|
|
1867
1864
|
let k$1 = k;
|
|
1868
|
-
if ((k$1 >=
|
|
1869
|
-
_block$2 = new Ok(new F(k$1 -
|
|
1865
|
+
if ((k$1 >= 23) && (k$1 <= 26)) {
|
|
1866
|
+
_block$2 = new Ok(new F(k$1 - 12));
|
|
1867
|
+
} else if (k === 28) {
|
|
1868
|
+
_block$2 = new Ok(new F(k - 15));
|
|
1869
|
+
} else if (k === 29) {
|
|
1870
|
+
_block$2 = new Ok(new F(k - 15));
|
|
1870
1871
|
} else {
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1872
|
+
let k$1 = k;
|
|
1873
|
+
if ((k$1 >= 31) && (k$1 <= 34)) {
|
|
1874
|
+
_block$2 = new Ok(new F(k$1 - 17));
|
|
1875
|
+
} else {
|
|
1876
|
+
_block$2 = new Error(
|
|
1877
|
+
new FailedToParseEvent(
|
|
1878
|
+
"Failed to parse special key code (CSI <..> ~)",
|
|
1879
|
+
),
|
|
1880
|
+
);
|
|
1881
|
+
}
|
|
1876
1882
|
}
|
|
1877
1883
|
}
|
|
1878
1884
|
}
|
package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@application.cache
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/tui/build/dev/javascript/gleam_javascript/_gleam_artefacts/gleam@javascript@array.cache
CHANGED
|
Binary file
|
package/tui/build/dev/javascript/gleam_javascript/_gleam_artefacts/gleam@javascript@promise.cache
CHANGED
|
Binary file
|
package/tui/build/dev/javascript/gleam_javascript/_gleam_artefacts/gleam@javascript@symbol.cache
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dynamic@decode.cache_meta
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
1.
|
|
1
|
+
1.15.1
|
|
@@ -262,16 +262,11 @@ export class BitArray {
|
|
|
262
262
|
/**
|
|
263
263
|
* Returns this bit array's internal buffer.
|
|
264
264
|
*
|
|
265
|
-
* @deprecated
|
|
265
|
+
* @deprecated
|
|
266
266
|
*
|
|
267
267
|
* @returns {Uint8Array}
|
|
268
268
|
*/
|
|
269
269
|
get buffer() {
|
|
270
|
-
bitArrayPrintDeprecationWarning(
|
|
271
|
-
"buffer",
|
|
272
|
-
"Use BitArray.byteAt() or BitArray.rawBuffer instead",
|
|
273
|
-
);
|
|
274
|
-
|
|
275
270
|
if (this.bitOffset !== 0 || this.bitSize % 8 !== 0) {
|
|
276
271
|
throw new globalThis.Error(
|
|
277
272
|
"BitArray.buffer does not support unaligned bit arrays",
|
|
@@ -284,16 +279,11 @@ export class BitArray {
|
|
|
284
279
|
/**
|
|
285
280
|
* Returns the length in bytes of this bit array's internal buffer.
|
|
286
281
|
*
|
|
287
|
-
* @deprecated
|
|
282
|
+
* @deprecated
|
|
288
283
|
*
|
|
289
284
|
* @returns {number}
|
|
290
285
|
*/
|
|
291
286
|
get length() {
|
|
292
|
-
bitArrayPrintDeprecationWarning(
|
|
293
|
-
"length",
|
|
294
|
-
"Use BitArray.bitSize or BitArray.byteSize instead",
|
|
295
|
-
);
|
|
296
|
-
|
|
297
287
|
if (this.bitOffset !== 0 || this.bitSize % 8 !== 0) {
|
|
298
288
|
throw new globalThis.Error(
|
|
299
289
|
"BitArray.length does not support unaligned bit arrays",
|
|
@@ -306,6 +296,13 @@ export class BitArray {
|
|
|
306
296
|
|
|
307
297
|
export const BitArray$BitArray = (buffer, bitSize, bitOffset) =>
|
|
308
298
|
new BitArray(buffer, bitSize, bitOffset);
|
|
299
|
+
export const BitArray$isBitArray = (value) => value instanceof BitArray;
|
|
300
|
+
export const BitArray$BitArray$data = (bitArray) => {
|
|
301
|
+
if (bitArray.bitSize % 8 !== 0)
|
|
302
|
+
throw new Error("BitArray$BitArray$data called on un-aligned bit array");
|
|
303
|
+
const array = bitArray.rawBuffer;
|
|
304
|
+
return new DataView(array.buffer, array.byteOffset, bitArray.byteLength);
|
|
305
|
+
};
|
|
309
306
|
|
|
310
307
|
/**
|
|
311
308
|
* Returns the nth byte in the given buffer, after applying the specified bit
|
|
@@ -333,19 +330,6 @@ export class UtfCodepoint {
|
|
|
333
330
|
}
|
|
334
331
|
}
|
|
335
332
|
|
|
336
|
-
const isBitArrayDeprecationMessagePrinted = {};
|
|
337
|
-
function bitArrayPrintDeprecationWarning(name, message) {
|
|
338
|
-
if (isBitArrayDeprecationMessagePrinted[name]) {
|
|
339
|
-
return;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
console.warn(
|
|
343
|
-
`Deprecated BitArray.${name} property used in JavaScript FFI code. ${message}.`,
|
|
344
|
-
);
|
|
345
|
-
|
|
346
|
-
isBitArrayDeprecationMessagePrinted[name] = true;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
333
|
/**
|
|
350
334
|
* Slices a bit array to produce a new bit array. If `end` is not supplied then
|
|
351
335
|
* all bits from `start` onward are returned.
|
|
@@ -514,7 +498,7 @@ export function bitArraySliceToInt(
|
|
|
514
498
|
|
|
515
499
|
// Handle the case of the slice being completely contained in a single byte
|
|
516
500
|
if (startByteIndex == endByteIndex) {
|
|
517
|
-
const mask = 0xff >> start % 8;
|
|
501
|
+
const mask = 0xff >> (start % 8);
|
|
518
502
|
const unusedLowBitCount = (8 - (end % 8)) % 8;
|
|
519
503
|
|
|
520
504
|
let value =
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|