@grame/faust-web-component 0.5.4 → 0.5.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.
- package/README.md +2 -2
- package/dist/faust-web-component.js +231 -132
- package/package.json +2 -2
package/README.md
CHANGED
@@ -82,7 +82,7 @@ The HTML [index.html](./index.html) example page can be copied and tested in `di
|
|
82
82
|
|
83
83
|
## NPM package
|
84
84
|
|
85
|
-
A [npm package](https://www.npmjs.com/package/@grame/faust-web-component) can be used with the CDN link: https://cdn.jsdelivr.net/npm/@grame/faust-web-component@0.5.
|
85
|
+
A [npm package](https://www.npmjs.com/package/@grame/faust-web-component) can be used with the CDN link: https://cdn.jsdelivr.net/npm/@grame/faust-web-component@0.5.5/dist/faust-web-component.js (possibly update the version number).
|
86
86
|
|
87
87
|
Here is an HTML example using this model:
|
88
88
|
|
@@ -101,7 +101,7 @@ process = vgroup("Oscillator", os.osc(freq1) * vol, os.osc(freq2) * vol);
|
|
101
101
|
-->
|
102
102
|
</faust-editor>
|
103
103
|
|
104
|
-
<script src="https://cdn.jsdelivr.net/npm/@grame/faust-web-component@0.5.
|
104
|
+
<script src="https://cdn.jsdelivr.net/npm/@grame/faust-web-component@0.5.5/dist/faust-web-component.js"></script>
|
105
105
|
```
|
106
106
|
|
107
107
|
## Demo
|
@@ -1,6 +1,3 @@
|
|
1
|
-
var __defProp = Object.defineProperty;
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
3
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
4
1
|
(function() {
|
5
2
|
"use strict";
|
6
3
|
/*!
|
@@ -3861,21 +3858,21 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
3861
3858
|
/*! ./index.scss */
|
3862
3859
|
"./src/index.scss"
|
3863
3860
|
);
|
3864
|
-
var
|
3861
|
+
var __defProp = Object.defineProperty;
|
3865
3862
|
var __defProps = Object.defineProperties;
|
3866
3863
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
3867
3864
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
3868
3865
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
3869
3866
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
3870
|
-
var
|
3867
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
3871
3868
|
var __spreadValues = (a, b) => {
|
3872
3869
|
for (var prop in b || (b = {}))
|
3873
3870
|
if (__hasOwnProp.call(b, prop))
|
3874
|
-
|
3871
|
+
__defNormalProp(a, prop, b[prop]);
|
3875
3872
|
if (__getOwnPropSymbols)
|
3876
3873
|
for (var prop of __getOwnPropSymbols(b)) {
|
3877
3874
|
if (__propIsEnum.call(b, prop))
|
3878
|
-
|
3875
|
+
__defNormalProp(a, prop, b[prop]);
|
3879
3876
|
}
|
3880
3877
|
return a;
|
3881
3878
|
};
|
@@ -4034,19 +4031,19 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
4034
4031
|
/*! @shren/typed-event-emitter */
|
4035
4032
|
"./node_modules/@shren/typed-event-emitter/dist/index.js"
|
4036
4033
|
);
|
4037
|
-
var
|
4034
|
+
var __defProp = Object.defineProperty;
|
4038
4035
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
4039
4036
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
4040
4037
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
4041
|
-
var
|
4038
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
4042
4039
|
var __spreadValues = (a, b) => {
|
4043
4040
|
for (var prop in b || (b = {}))
|
4044
4041
|
if (__hasOwnProp.call(b, prop))
|
4045
|
-
|
4042
|
+
__defNormalProp(a, prop, b[prop]);
|
4046
4043
|
if (__getOwnPropSymbols)
|
4047
4044
|
for (var prop of __getOwnPropSymbols(b)) {
|
4048
4045
|
if (__propIsEnum.call(b, prop))
|
4049
|
-
|
4046
|
+
__defNormalProp(a, prop, b[prop]);
|
4050
4047
|
}
|
4051
4048
|
return a;
|
4052
4049
|
};
|
@@ -4129,19 +4126,19 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
4129
4126
|
/*! ./Base.scss */
|
4130
4127
|
"./src/components/Base.scss"
|
4131
4128
|
);
|
4132
|
-
var
|
4129
|
+
var __defProp = Object.defineProperty;
|
4133
4130
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
4134
4131
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
4135
4132
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
4136
|
-
var
|
4133
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
4137
4134
|
var __spreadValues = (a, b) => {
|
4138
4135
|
for (var prop in b || (b = {}))
|
4139
4136
|
if (__hasOwnProp.call(b, prop))
|
4140
|
-
|
4137
|
+
__defNormalProp(a, prop, b[prop]);
|
4141
4138
|
if (__getOwnPropSymbols)
|
4142
4139
|
for (var prop of __getOwnPropSymbols(b)) {
|
4143
4140
|
if (__propIsEnum.call(b, prop))
|
4144
|
-
|
4141
|
+
__defNormalProp(a, prop, b[prop]);
|
4145
4142
|
}
|
4146
4143
|
return a;
|
4147
4144
|
};
|
@@ -4192,6 +4189,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
4192
4189
|
};
|
4193
4190
|
this.handleClick = (e) => {
|
4194
4191
|
};
|
4192
|
+
this.handleDoubleClick = (e) => {
|
4193
|
+
e.preventDefault();
|
4194
|
+
e.stopPropagation();
|
4195
|
+
this.setToInitialValue();
|
4196
|
+
};
|
4195
4197
|
this.handleMouseDown = (e) => {
|
4196
4198
|
e.preventDefault();
|
4197
4199
|
e.currentTarget.focus();
|
@@ -4281,6 +4283,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
4281
4283
|
if (changed) this.change(value);
|
4282
4284
|
return changed;
|
4283
4285
|
}
|
4286
|
+
setToInitialValue() {
|
4287
|
+
this.setValue(this.state.init);
|
4288
|
+
}
|
4284
4289
|
/**
|
4285
4290
|
* Send value to DSP
|
4286
4291
|
*/
|
@@ -4418,6 +4423,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
4418
4423
|
address: "",
|
4419
4424
|
min: 0,
|
4420
4425
|
max: 1,
|
4426
|
+
init: 0,
|
4421
4427
|
enums: {},
|
4422
4428
|
type: "float",
|
4423
4429
|
unit: "",
|
@@ -4452,21 +4458,21 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
4452
4458
|
/*! ./Button.scss */
|
4453
4459
|
"./src/components/Button.scss"
|
4454
4460
|
);
|
4455
|
-
var
|
4461
|
+
var __defProp = Object.defineProperty;
|
4456
4462
|
var __defProps = Object.defineProperties;
|
4457
4463
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
4458
4464
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
4459
4465
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
4460
4466
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
4461
|
-
var
|
4467
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
4462
4468
|
var __spreadValues = (a, b) => {
|
4463
4469
|
for (var prop in b || (b = {}))
|
4464
4470
|
if (__hasOwnProp.call(b, prop))
|
4465
|
-
|
4471
|
+
__defNormalProp(a, prop, b[prop]);
|
4466
4472
|
if (__getOwnPropSymbols)
|
4467
4473
|
for (var prop of __getOwnPropSymbols(b)) {
|
4468
4474
|
if (__propIsEnum.call(b, prop))
|
4469
|
-
|
4475
|
+
__defNormalProp(a, prop, b[prop]);
|
4470
4476
|
}
|
4471
4477
|
return a;
|
4472
4478
|
};
|
@@ -4657,6 +4663,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
4657
4663
|
class Group extends _AbstractComponent__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
4658
4664
|
constructor() {
|
4659
4665
|
super(...arguments);
|
4666
|
+
this.handleDoubleClick = (e) => {
|
4667
|
+
e.preventDefault();
|
4668
|
+
e.stopPropagation();
|
4669
|
+
this.setToInitialValue();
|
4670
|
+
};
|
4660
4671
|
this.updateUI = () => {
|
4661
4672
|
this.children = [];
|
4662
4673
|
const { style, type, items, emitter, isRoot } = this.state;
|
@@ -4717,10 +4728,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
4717
4728
|
if (!metaIn) return { metaObject };
|
4718
4729
|
metaIn.forEach((m) => Object.assign(metaObject, m));
|
4719
4730
|
if (metaObject.style) {
|
4720
|
-
const enumsRegex = /\{(?:
|
4731
|
+
const enumsRegex = /\{\s*(?:['_\-](.+?)['_\-]\s*:\s*([-+]?[0-9]*\.?[0-9]+)\s*;\s*)+(?:['_\-](.+?)['_\-]\s*:\s*([-+]?[0-9]*\.?[0-9]+))\s*\}/;
|
4721
4732
|
const matched = metaObject.style.match(enumsRegex);
|
4722
4733
|
if (matched) {
|
4723
|
-
const itemsRegex = /
|
4734
|
+
const itemsRegex = /['_\-](.+?)['_\-]\s*:\s*([-+]?[0-9]*\.?[0-9]+)\s*/g;
|
4724
4735
|
const enums = {};
|
4725
4736
|
let item;
|
4726
4737
|
while (item = itemsRegex.exec(matched[0])) {
|
@@ -4774,7 +4785,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
4774
4785
|
min: isFinite(min) ? min : 0,
|
4775
4786
|
max: isFinite(max) ? max : 1,
|
4776
4787
|
step: "step" in item ? +item.step : 1,
|
4777
|
-
value: "init" in item ? +item.init || 0 : 0
|
4788
|
+
value: "init" in item ? +item.init || 0 : 0,
|
4789
|
+
init: "init" in item ? +item.init || 0 : 0
|
4778
4790
|
};
|
4779
4791
|
if (type === "button") return new _Button__WEBPACK_IMPORTED_MODULE_5__["default"](props);
|
4780
4792
|
if (type === "checkbox") return new _Checkbox__WEBPACK_IMPORTED_MODULE_6__["default"](props);
|
@@ -4791,6 +4803,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
4791
4803
|
if (type === "led") return new _Led__WEBPACK_IMPORTED_MODULE_10__["default"](props);
|
4792
4804
|
return null;
|
4793
4805
|
}
|
4806
|
+
setToInitialValue() {
|
4807
|
+
this.children.forEach((item) => item.setToInitialValue());
|
4808
|
+
}
|
4794
4809
|
setState(newState) {
|
4795
4810
|
let shouldUpdate = false;
|
4796
4811
|
for (const key in newState) {
|
@@ -4862,7 +4877,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
4862
4877
|
return this;
|
4863
4878
|
}
|
4864
4879
|
componentDidMount() {
|
4865
|
-
var _a2;
|
4880
|
+
var _a2, _b;
|
4866
4881
|
const handleResize = () => {
|
4867
4882
|
const { grid, left, top: top2, width, height } = this.state.style;
|
4868
4883
|
if (!this.state.isRoot) this.label.style.height = `${grid * 0.3}px`;
|
@@ -4896,7 +4911,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
4896
4911
|
};
|
4897
4912
|
this.on("label", () => this.schedule(labelChange));
|
4898
4913
|
this.paintLabel();
|
4899
|
-
|
4914
|
+
(_a2 = this.labelCanvas) == null ? void 0 : _a2.addEventListener("dblclick", this.handleDoubleClick);
|
4915
|
+
if ((_b = this.tabs) == null ? void 0 : _b.children.length) this.tabs.children[0].click();
|
4900
4916
|
this.children.forEach((item) => item.componentDidMount());
|
4901
4917
|
return this;
|
4902
4918
|
}
|
@@ -5122,21 +5138,21 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
5122
5138
|
/*! ./Knob.scss */
|
5123
5139
|
"./src/components/Knob.scss"
|
5124
5140
|
);
|
5125
|
-
var
|
5141
|
+
var __defProp = Object.defineProperty;
|
5126
5142
|
var __defProps = Object.defineProperties;
|
5127
5143
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
5128
5144
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
5129
5145
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5130
5146
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
5131
|
-
var
|
5147
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
5132
5148
|
var __spreadValues = (a, b) => {
|
5133
5149
|
for (var prop in b || (b = {}))
|
5134
5150
|
if (__hasOwnProp.call(b, prop))
|
5135
|
-
|
5151
|
+
__defNormalProp(a, prop, b[prop]);
|
5136
5152
|
if (__getOwnPropSymbols)
|
5137
5153
|
for (var prop of __getOwnPropSymbols(b)) {
|
5138
5154
|
if (__propIsEnum.call(b, prop))
|
5139
|
-
|
5155
|
+
__defNormalProp(a, prop, b[prop]);
|
5140
5156
|
}
|
5141
5157
|
return a;
|
5142
5158
|
};
|
@@ -5247,6 +5263,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
5247
5263
|
super.componentDidMount();
|
5248
5264
|
this.input.addEventListener("change", this.handleChange);
|
5249
5265
|
this.canvas.addEventListener("pointerdown", this.handlePointerDown);
|
5266
|
+
this.canvas.addEventListener("dblclick", this.handleDoubleClick);
|
5250
5267
|
this.on("style", () => {
|
5251
5268
|
this.schedule(this.setStyle);
|
5252
5269
|
this.schedule(this.paint);
|
@@ -5327,21 +5344,21 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
5327
5344
|
/*! ./Led.scss */
|
5328
5345
|
"./src/components/Led.scss"
|
5329
5346
|
);
|
5330
|
-
var
|
5347
|
+
var __defProp = Object.defineProperty;
|
5331
5348
|
var __defProps = Object.defineProperties;
|
5332
5349
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
5333
5350
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
5334
5351
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5335
5352
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
5336
|
-
var
|
5353
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
5337
5354
|
var __spreadValues = (a, b) => {
|
5338
5355
|
for (var prop in b || (b = {}))
|
5339
5356
|
if (__hasOwnProp.call(b, prop))
|
5340
|
-
|
5357
|
+
__defNormalProp(a, prop, b[prop]);
|
5341
5358
|
if (__getOwnPropSymbols)
|
5342
5359
|
for (var prop of __getOwnPropSymbols(b)) {
|
5343
5360
|
if (__propIsEnum.call(b, prop))
|
5344
|
-
|
5361
|
+
__defNormalProp(a, prop, b[prop]);
|
5345
5362
|
}
|
5346
5363
|
return a;
|
5347
5364
|
};
|
@@ -5473,21 +5490,21 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
5473
5490
|
/*! ./Menu.scss */
|
5474
5491
|
"./src/components/Menu.scss"
|
5475
5492
|
);
|
5476
|
-
var
|
5493
|
+
var __defProp = Object.defineProperty;
|
5477
5494
|
var __defProps = Object.defineProperties;
|
5478
5495
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
5479
5496
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
5480
5497
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5481
5498
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
5482
|
-
var
|
5499
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
5483
5500
|
var __spreadValues = (a, b) => {
|
5484
5501
|
for (var prop in b || (b = {}))
|
5485
5502
|
if (__hasOwnProp.call(b, prop))
|
5486
|
-
|
5503
|
+
__defNormalProp(a, prop, b[prop]);
|
5487
5504
|
if (__getOwnPropSymbols)
|
5488
5505
|
for (var prop of __getOwnPropSymbols(b)) {
|
5489
5506
|
if (__propIsEnum.call(b, prop))
|
5490
|
-
|
5507
|
+
__defNormalProp(a, prop, b[prop]);
|
5491
5508
|
}
|
5492
5509
|
return a;
|
5493
5510
|
};
|
@@ -5591,21 +5608,21 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
5591
5608
|
/*! ./Nentry.scss */
|
5592
5609
|
"./src/components/Nentry.scss"
|
5593
5610
|
);
|
5594
|
-
var
|
5611
|
+
var __defProp = Object.defineProperty;
|
5595
5612
|
var __defProps = Object.defineProperties;
|
5596
5613
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
5597
5614
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
5598
5615
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5599
5616
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
5600
|
-
var
|
5617
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
5601
5618
|
var __spreadValues = (a, b) => {
|
5602
5619
|
for (var prop in b || (b = {}))
|
5603
5620
|
if (__hasOwnProp.call(b, prop))
|
5604
|
-
|
5621
|
+
__defNormalProp(a, prop, b[prop]);
|
5605
5622
|
if (__getOwnPropSymbols)
|
5606
5623
|
for (var prop of __getOwnPropSymbols(b)) {
|
5607
5624
|
if (__propIsEnum.call(b, prop))
|
5608
|
-
|
5625
|
+
__defNormalProp(a, prop, b[prop]);
|
5609
5626
|
}
|
5610
5627
|
return a;
|
5611
5628
|
};
|
@@ -5697,21 +5714,21 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
5697
5714
|
/*! ./Numerical.scss */
|
5698
5715
|
"./src/components/Numerical.scss"
|
5699
5716
|
);
|
5700
|
-
var
|
5717
|
+
var __defProp = Object.defineProperty;
|
5701
5718
|
var __defProps = Object.defineProperties;
|
5702
5719
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
5703
5720
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
5704
5721
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5705
5722
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
5706
|
-
var
|
5723
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
5707
5724
|
var __spreadValues = (a, b) => {
|
5708
5725
|
for (var prop in b || (b = {}))
|
5709
5726
|
if (__hasOwnProp.call(b, prop))
|
5710
|
-
|
5727
|
+
__defNormalProp(a, prop, b[prop]);
|
5711
5728
|
if (__getOwnPropSymbols)
|
5712
5729
|
for (var prop of __getOwnPropSymbols(b)) {
|
5713
5730
|
if (__propIsEnum.call(b, prop))
|
5714
|
-
|
5731
|
+
__defNormalProp(a, prop, b[prop]);
|
5715
5732
|
}
|
5716
5733
|
return a;
|
5717
5734
|
};
|
@@ -5790,21 +5807,21 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
5790
5807
|
/*! ./Radio.scss */
|
5791
5808
|
"./src/components/Radio.scss"
|
5792
5809
|
);
|
5793
|
-
var
|
5810
|
+
var __defProp = Object.defineProperty;
|
5794
5811
|
var __defProps = Object.defineProperties;
|
5795
5812
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
5796
5813
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
5797
5814
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5798
5815
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
5799
|
-
var
|
5816
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
5800
5817
|
var __spreadValues = (a, b) => {
|
5801
5818
|
for (var prop in b || (b = {}))
|
5802
5819
|
if (__hasOwnProp.call(b, prop))
|
5803
|
-
|
5820
|
+
__defNormalProp(a, prop, b[prop]);
|
5804
5821
|
if (__getOwnPropSymbols)
|
5805
5822
|
for (var prop of __getOwnPropSymbols(b)) {
|
5806
5823
|
if (__propIsEnum.call(b, prop))
|
5807
|
-
|
5824
|
+
__defNormalProp(a, prop, b[prop]);
|
5808
5825
|
}
|
5809
5826
|
return a;
|
5810
5827
|
};
|
@@ -5913,21 +5930,21 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
5913
5930
|
/*! ./Soundfile.scss */
|
5914
5931
|
"./src/components/Soundfile.scss"
|
5915
5932
|
);
|
5916
|
-
var
|
5933
|
+
var __defProp = Object.defineProperty;
|
5917
5934
|
var __defProps = Object.defineProperties;
|
5918
5935
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
5919
5936
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
5920
5937
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5921
5938
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
5922
|
-
var
|
5939
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
5923
5940
|
var __spreadValues = (a, b) => {
|
5924
5941
|
for (var prop in b || (b = {}))
|
5925
5942
|
if (__hasOwnProp.call(b, prop))
|
5926
|
-
|
5943
|
+
__defNormalProp(a, prop, b[prop]);
|
5927
5944
|
if (__getOwnPropSymbols)
|
5928
5945
|
for (var prop of __getOwnPropSymbols(b)) {
|
5929
5946
|
if (__propIsEnum.call(b, prop))
|
5930
|
-
|
5947
|
+
__defNormalProp(a, prop, b[prop]);
|
5931
5948
|
}
|
5932
5949
|
return a;
|
5933
5950
|
};
|
@@ -6016,21 +6033,21 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
6016
6033
|
/*! ./VBargraph.scss */
|
6017
6034
|
"./src/components/VBargraph.scss"
|
6018
6035
|
);
|
6019
|
-
var
|
6036
|
+
var __defProp = Object.defineProperty;
|
6020
6037
|
var __defProps = Object.defineProperties;
|
6021
6038
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
6022
6039
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
6023
6040
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6024
6041
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
6025
|
-
var
|
6042
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
6026
6043
|
var __spreadValues = (a, b) => {
|
6027
6044
|
for (var prop in b || (b = {}))
|
6028
6045
|
if (__hasOwnProp.call(b, prop))
|
6029
|
-
|
6046
|
+
__defNormalProp(a, prop, b[prop]);
|
6030
6047
|
if (__getOwnPropSymbols)
|
6031
6048
|
for (var prop of __getOwnPropSymbols(b)) {
|
6032
6049
|
if (__propIsEnum.call(b, prop))
|
6033
|
-
|
6050
|
+
__defNormalProp(a, prop, b[prop]);
|
6034
6051
|
}
|
6035
6052
|
return a;
|
6036
6053
|
};
|
@@ -6215,21 +6232,21 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
6215
6232
|
/*! ./VSlider.scss */
|
6216
6233
|
"./src/components/VSlider.scss"
|
6217
6234
|
);
|
6218
|
-
var
|
6235
|
+
var __defProp = Object.defineProperty;
|
6219
6236
|
var __defProps = Object.defineProperties;
|
6220
6237
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
6221
6238
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
6222
6239
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6223
6240
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
6224
|
-
var
|
6241
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
6225
6242
|
var __spreadValues = (a, b) => {
|
6226
6243
|
for (var prop in b || (b = {}))
|
6227
6244
|
if (__hasOwnProp.call(b, prop))
|
6228
|
-
|
6245
|
+
__defNormalProp(a, prop, b[prop]);
|
6229
6246
|
if (__getOwnPropSymbols)
|
6230
6247
|
for (var prop of __getOwnPropSymbols(b)) {
|
6231
6248
|
if (__propIsEnum.call(b, prop))
|
6232
|
-
|
6249
|
+
__defNormalProp(a, prop, b[prop]);
|
6233
6250
|
}
|
6234
6251
|
return a;
|
6235
6252
|
};
|
@@ -6338,6 +6355,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
6338
6355
|
super.componentDidMount();
|
6339
6356
|
this.input.addEventListener("change", this.handleChange);
|
6340
6357
|
this.canvas.addEventListener("pointerdown", this.handlePointerDown);
|
6358
|
+
this.canvas.addEventListener("dblclick", this.handleDoubleClick);
|
6341
6359
|
this.on("style", () => {
|
6342
6360
|
this.schedule(this.setStyle);
|
6343
6361
|
this.schedule(this.paint);
|
@@ -16074,10 +16092,10 @@ const dependencies = {
|
|
16074
16092
|
ensureAddr(this, i2 << 1);
|
16075
16093
|
this.computeSlot = null;
|
16076
16094
|
}
|
16077
|
-
field(field,
|
16095
|
+
field(field, require = true) {
|
16078
16096
|
let addr = this.config.address[field.id];
|
16079
16097
|
if (addr == null) {
|
16080
|
-
if (
|
16098
|
+
if (require)
|
16081
16099
|
throw new RangeError("Field is not present in this state");
|
16082
16100
|
return void 0;
|
16083
16101
|
}
|
@@ -17433,6 +17451,33 @@ const dependencies = {
|
|
17433
17451
|
if (name2 == "Down") name2 = "ArrowDown";
|
17434
17452
|
return name2;
|
17435
17453
|
}
|
17454
|
+
function crelt() {
|
17455
|
+
var elt = arguments[0];
|
17456
|
+
if (typeof elt == "string") elt = document.createElement(elt);
|
17457
|
+
var i2 = 1, next = arguments[1];
|
17458
|
+
if (next && typeof next == "object" && next.nodeType == null && !Array.isArray(next)) {
|
17459
|
+
for (var name2 in next) if (Object.prototype.hasOwnProperty.call(next, name2)) {
|
17460
|
+
var value = next[name2];
|
17461
|
+
if (typeof value == "string") elt.setAttribute(name2, value);
|
17462
|
+
else if (value != null) elt[name2] = value;
|
17463
|
+
}
|
17464
|
+
i2++;
|
17465
|
+
}
|
17466
|
+
for (; i2 < arguments.length; i2++) add(elt, arguments[i2]);
|
17467
|
+
return elt;
|
17468
|
+
}
|
17469
|
+
function add(elt, child) {
|
17470
|
+
if (typeof child == "string") {
|
17471
|
+
elt.appendChild(document.createTextNode(child));
|
17472
|
+
} else if (child == null) ;
|
17473
|
+
else if (child.nodeType != null) {
|
17474
|
+
elt.appendChild(child);
|
17475
|
+
} else if (Array.isArray(child)) {
|
17476
|
+
for (var i2 = 0; i2 < child.length; i2++) add(elt, child[i2]);
|
17477
|
+
} else {
|
17478
|
+
throw new RangeError("Unsupported child node: " + child);
|
17479
|
+
}
|
17480
|
+
}
|
17436
17481
|
function getSelection(root) {
|
17437
17482
|
let target;
|
17438
17483
|
if (root.nodeType == 11) {
|
@@ -19673,14 +19718,30 @@ const dependencies = {
|
|
19673
19718
|
}
|
19674
19719
|
const editable = /* @__PURE__ */ Facet.define({ combine: (values) => values.length ? values[0] : true });
|
19675
19720
|
let nextPluginID = 0;
|
19676
|
-
const viewPlugin = /* @__PURE__ */ Facet.define(
|
19721
|
+
const viewPlugin = /* @__PURE__ */ Facet.define({
|
19722
|
+
combine(plugins2) {
|
19723
|
+
return plugins2.filter((p2, i2) => {
|
19724
|
+
for (let j = 0; j < i2; j++)
|
19725
|
+
if (plugins2[j].plugin == p2.plugin)
|
19726
|
+
return false;
|
19727
|
+
return true;
|
19728
|
+
});
|
19729
|
+
}
|
19730
|
+
});
|
19677
19731
|
class ViewPlugin {
|
19678
19732
|
constructor(id, create, domEventHandlers, domEventObservers, buildExtensions) {
|
19679
19733
|
this.id = id;
|
19680
19734
|
this.create = create;
|
19681
19735
|
this.domEventHandlers = domEventHandlers;
|
19682
19736
|
this.domEventObservers = domEventObservers;
|
19683
|
-
this.
|
19737
|
+
this.baseExtensions = buildExtensions(this);
|
19738
|
+
this.extension = this.baseExtensions.concat(viewPlugin.of({ plugin: this, arg: void 0 }));
|
19739
|
+
}
|
19740
|
+
/**
|
19741
|
+
Create an extension for this plugin with the given argument.
|
19742
|
+
*/
|
19743
|
+
of(arg) {
|
19744
|
+
return this.baseExtensions.concat(viewPlugin.of({ plugin: this, arg }));
|
19684
19745
|
}
|
19685
19746
|
/**
|
19686
19747
|
Define a plugin from a constructor function that creates the
|
@@ -19689,7 +19750,7 @@ const dependencies = {
|
|
19689
19750
|
static define(create, spec) {
|
19690
19751
|
const { eventHandlers, eventObservers, provide, decorations: deco } = spec || {};
|
19691
19752
|
return new ViewPlugin(nextPluginID++, create, eventHandlers, eventObservers, (plugin) => {
|
19692
|
-
let ext = [
|
19753
|
+
let ext = [];
|
19693
19754
|
if (deco)
|
19694
19755
|
ext.push(decorations.of((view) => {
|
19695
19756
|
let pluginInst = view.plugin(plugin);
|
@@ -19705,7 +19766,7 @@ const dependencies = {
|
|
19705
19766
|
editor view as argument.
|
19706
19767
|
*/
|
19707
19768
|
static fromClass(cls, spec) {
|
19708
|
-
return ViewPlugin.define((view) => new cls(view), spec);
|
19769
|
+
return ViewPlugin.define((view, arg) => new cls(view, arg), spec);
|
19709
19770
|
}
|
19710
19771
|
}
|
19711
19772
|
class PluginInstance {
|
@@ -19714,11 +19775,14 @@ const dependencies = {
|
|
19714
19775
|
this.mustUpdate = null;
|
19715
19776
|
this.value = null;
|
19716
19777
|
}
|
19778
|
+
get plugin() {
|
19779
|
+
return this.spec && this.spec.plugin;
|
19780
|
+
}
|
19717
19781
|
update(view) {
|
19718
19782
|
if (!this.value) {
|
19719
19783
|
if (this.spec) {
|
19720
19784
|
try {
|
19721
|
-
this.value = this.spec.create(view);
|
19785
|
+
this.value = this.spec.plugin.create(view, this.spec.arg);
|
19722
19786
|
} catch (e) {
|
19723
19787
|
logException(view.state, e, "CodeMirror plugin crashed");
|
19724
19788
|
this.deactivate();
|
@@ -20596,8 +20660,7 @@ const dependencies = {
|
|
20596
20660
|
closestRect = rect;
|
20597
20661
|
closestX = dx;
|
20598
20662
|
closestY = dy;
|
20599
|
-
|
20600
|
-
closestOverlap = !side || (side > 0 ? i2 < rects.length - 1 : i2 > 0);
|
20663
|
+
closestOverlap = !dx ? true : x2 < rect.left ? i2 > 0 : i2 < rects.length - 1;
|
20601
20664
|
}
|
20602
20665
|
if (dx == 0) {
|
20603
20666
|
if (y > rect.bottom && (!aboveRect || aboveRect.bottom < rect.bottom)) {
|
@@ -20743,13 +20806,23 @@ const dependencies = {
|
|
20743
20806
|
return block.from + findColumn(content2, into, view.state.tabSize);
|
20744
20807
|
}
|
20745
20808
|
function isSuspiciousSafariCaretResult(node, offset, x2) {
|
20746
|
-
let len;
|
20809
|
+
let len, scan = node;
|
20747
20810
|
if (node.nodeType != 3 || offset != (len = node.nodeValue.length))
|
20748
20811
|
return false;
|
20749
|
-
for (
|
20750
|
-
|
20812
|
+
for (; ; ) {
|
20813
|
+
let next = scan.nextSibling;
|
20814
|
+
if (next) {
|
20815
|
+
if (next.nodeName == "BR")
|
20816
|
+
break;
|
20751
20817
|
return false;
|
20752
|
-
|
20818
|
+
} else {
|
20819
|
+
let parent = scan.parentNode;
|
20820
|
+
if (!parent || parent.nodeName == "DIV")
|
20821
|
+
break;
|
20822
|
+
scan = parent;
|
20823
|
+
}
|
20824
|
+
}
|
20825
|
+
return textRange(node, len - 1, len).getBoundingClientRect().right > x2;
|
20753
20826
|
}
|
20754
20827
|
function isSuspiciousChromeCaretResult(node, offset, x2) {
|
20755
20828
|
if (offset != 0)
|
@@ -21347,16 +21420,16 @@ const dependencies = {
|
|
21347
21420
|
return result[type] || (result[type] = { observers: [], handlers: [] });
|
21348
21421
|
}
|
21349
21422
|
for (let plugin of plugins2) {
|
21350
|
-
let spec = plugin.spec;
|
21351
|
-
if (
|
21352
|
-
for (let type in
|
21353
|
-
let f =
|
21423
|
+
let spec = plugin.spec, handlers2 = spec && spec.plugin.domEventHandlers, observers2 = spec && spec.plugin.domEventObservers;
|
21424
|
+
if (handlers2)
|
21425
|
+
for (let type in handlers2) {
|
21426
|
+
let f = handlers2[type];
|
21354
21427
|
if (f)
|
21355
21428
|
record(type).handlers.push(bindHandler(plugin.value, f));
|
21356
21429
|
}
|
21357
|
-
if (
|
21358
|
-
for (let type in
|
21359
|
-
let f =
|
21430
|
+
if (observers2)
|
21431
|
+
for (let type in observers2) {
|
21432
|
+
let f = observers2[type];
|
21360
21433
|
if (f)
|
21361
21434
|
record(type).observers.push(bindHandler(plugin.value, f));
|
21362
21435
|
}
|
@@ -23429,13 +23502,16 @@ const dependencies = {
|
|
23429
23502
|
display: "flex",
|
23430
23503
|
height: "100%",
|
23431
23504
|
boxSizing: "border-box",
|
23432
|
-
insetInlineStart: 0,
|
23433
23505
|
zIndex: 200
|
23434
23506
|
},
|
23507
|
+
".cm-gutters-before": { insetInlineStart: 0 },
|
23508
|
+
".cm-gutters-after": { insetInlineEnd: 0 },
|
23435
23509
|
"&light .cm-gutters": {
|
23436
23510
|
backgroundColor: "#f5f5f5",
|
23437
23511
|
color: "#6c6c6c",
|
23438
|
-
|
23512
|
+
border: "0px solid #ddd",
|
23513
|
+
"&.cm-gutters-before": { borderRightWidth: "1px" },
|
23514
|
+
"&.cm-gutters-after": { borderLeftWidth: "1px" }
|
23439
23515
|
},
|
23440
23516
|
"&dark .cm-gutters": {
|
23441
23517
|
backgroundColor: "#333338",
|
@@ -23486,6 +23562,21 @@ const dependencies = {
|
|
23486
23562
|
backgroundColor: "#333338",
|
23487
23563
|
color: "white"
|
23488
23564
|
},
|
23565
|
+
".cm-dialog": {
|
23566
|
+
padding: "2px 19px 4px 6px",
|
23567
|
+
position: "relative",
|
23568
|
+
"& label": { fontSize: "80%" }
|
23569
|
+
},
|
23570
|
+
".cm-dialog-close": {
|
23571
|
+
position: "absolute",
|
23572
|
+
top: "3px",
|
23573
|
+
right: "4px",
|
23574
|
+
backgroundColor: "inherit",
|
23575
|
+
border: "none",
|
23576
|
+
font: "inherit",
|
23577
|
+
fontSize: "14px",
|
23578
|
+
padding: "0"
|
23579
|
+
},
|
23489
23580
|
".cm-tab": {
|
23490
23581
|
display: "inline-block",
|
23491
23582
|
overflow: "hidden",
|
@@ -23590,7 +23681,7 @@ const dependencies = {
|
|
23590
23681
|
else
|
23591
23682
|
this.flush();
|
23592
23683
|
});
|
23593
|
-
if (window.EditContext && view.constructor.EDIT_CONTEXT !== false && // Chrome <126 doesn't support inverted selections in edit context (#1392)
|
23684
|
+
if (window.EditContext && browser.android && view.constructor.EDIT_CONTEXT !== false && // Chrome <126 doesn't support inverted selections in edit context (#1392)
|
23594
23685
|
!(browser.chrome && browser.chrome_version < 126)) {
|
23595
23686
|
this.editContext = new EditContextManager(view);
|
23596
23687
|
if (view.state.facet(editable))
|
@@ -24682,8 +24773,8 @@ const dependencies = {
|
|
24682
24773
|
*/
|
24683
24774
|
plugin(plugin) {
|
24684
24775
|
let known = this.pluginMap.get(plugin);
|
24685
|
-
if (known === void 0 || known && known.
|
24686
|
-
this.pluginMap.set(plugin, known = this.plugins.find((p2) => p2.
|
24776
|
+
if (known === void 0 || known && known.plugin != plugin)
|
24777
|
+
this.pluginMap.set(plugin, known = this.plugins.find((p2) => p2.plugin == plugin) || null);
|
24687
24778
|
return known && known.update(this).value;
|
24688
24779
|
}
|
24689
24780
|
/**
|
@@ -26998,21 +27089,37 @@ const dependencies = {
|
|
26998
27089
|
const gutterView = /* @__PURE__ */ ViewPlugin.fromClass(class {
|
26999
27090
|
constructor(view) {
|
27000
27091
|
this.view = view;
|
27092
|
+
this.domAfter = null;
|
27001
27093
|
this.prevViewport = view.viewport;
|
27002
27094
|
this.dom = document.createElement("div");
|
27003
|
-
this.dom.className = "cm-gutters";
|
27095
|
+
this.dom.className = "cm-gutters cm-gutters-before";
|
27004
27096
|
this.dom.setAttribute("aria-hidden", "true");
|
27005
27097
|
this.dom.style.minHeight = this.view.contentHeight / this.view.scaleY + "px";
|
27006
27098
|
this.gutters = view.state.facet(activeGutters).map((conf) => new SingleGutterView(view, conf));
|
27007
|
-
for (let gutter of this.gutters)
|
27008
|
-
this.dom.appendChild(gutter.dom);
|
27009
27099
|
this.fixed = !view.state.facet(unfixGutters);
|
27100
|
+
for (let gutter of this.gutters) {
|
27101
|
+
if (gutter.config.side == "after")
|
27102
|
+
this.getDOMAfter().appendChild(gutter.dom);
|
27103
|
+
else
|
27104
|
+
this.dom.appendChild(gutter.dom);
|
27105
|
+
}
|
27010
27106
|
if (this.fixed) {
|
27011
27107
|
this.dom.style.position = "sticky";
|
27012
27108
|
}
|
27013
27109
|
this.syncGutters(false);
|
27014
27110
|
view.scrollDOM.insertBefore(this.dom, view.contentDOM);
|
27015
27111
|
}
|
27112
|
+
getDOMAfter() {
|
27113
|
+
if (!this.domAfter) {
|
27114
|
+
this.domAfter = document.createElement("div");
|
27115
|
+
this.domAfter.className = "cm-gutters cm-gutters-after";
|
27116
|
+
this.domAfter.setAttribute("aria-hidden", "true");
|
27117
|
+
this.domAfter.style.minHeight = this.view.contentHeight / this.view.scaleY + "px";
|
27118
|
+
this.domAfter.style.position = this.fixed ? "sticky" : "";
|
27119
|
+
this.view.scrollDOM.appendChild(this.domAfter);
|
27120
|
+
}
|
27121
|
+
return this.domAfter;
|
27122
|
+
}
|
27016
27123
|
update(update) {
|
27017
27124
|
if (this.updateGutters(update)) {
|
27018
27125
|
let vpA = this.prevViewport, vpB = update.view.viewport;
|
@@ -27020,18 +27127,26 @@ const dependencies = {
|
|
27020
27127
|
this.syncGutters(vpOverlap < (vpB.to - vpB.from) * 0.8);
|
27021
27128
|
}
|
27022
27129
|
if (update.geometryChanged) {
|
27023
|
-
|
27130
|
+
let min = this.view.contentHeight / this.view.scaleY + "px";
|
27131
|
+
this.dom.style.minHeight = min;
|
27132
|
+
if (this.domAfter)
|
27133
|
+
this.domAfter.style.minHeight = min;
|
27024
27134
|
}
|
27025
27135
|
if (this.view.state.facet(unfixGutters) != !this.fixed) {
|
27026
27136
|
this.fixed = !this.fixed;
|
27027
27137
|
this.dom.style.position = this.fixed ? "sticky" : "";
|
27138
|
+
if (this.domAfter)
|
27139
|
+
this.domAfter.style.position = this.fixed ? "sticky" : "";
|
27028
27140
|
}
|
27029
27141
|
this.prevViewport = update.view.viewport;
|
27030
27142
|
}
|
27031
27143
|
syncGutters(detach) {
|
27032
27144
|
let after = this.dom.nextSibling;
|
27033
|
-
if (detach)
|
27145
|
+
if (detach) {
|
27034
27146
|
this.dom.remove();
|
27147
|
+
if (this.domAfter)
|
27148
|
+
this.domAfter.remove();
|
27149
|
+
}
|
27035
27150
|
let lineClasses = RangeSet.iter(this.view.state.facet(gutterLineClass), this.view.viewport.from);
|
27036
27151
|
let classSet = [];
|
27037
27152
|
let contexts = this.gutters.map((gutter) => new UpdateContext(gutter, this.view.viewport, -this.view.documentPadding.top));
|
@@ -27062,8 +27177,11 @@ const dependencies = {
|
|
27062
27177
|
}
|
27063
27178
|
for (let cx of contexts)
|
27064
27179
|
cx.finish();
|
27065
|
-
if (detach)
|
27180
|
+
if (detach) {
|
27066
27181
|
this.view.scrollDOM.insertBefore(this.dom, after);
|
27182
|
+
if (this.domAfter)
|
27183
|
+
this.view.scrollDOM.appendChild(this.domAfter);
|
27184
|
+
}
|
27067
27185
|
}
|
27068
27186
|
updateGutters(update) {
|
27069
27187
|
let prev = update.startState.facet(activeGutters), cur2 = update.state.facet(activeGutters);
|
@@ -27089,8 +27207,12 @@ const dependencies = {
|
|
27089
27207
|
if (gutters2.indexOf(g2) < 0)
|
27090
27208
|
g2.destroy();
|
27091
27209
|
}
|
27092
|
-
for (let g2 of gutters2)
|
27093
|
-
|
27210
|
+
for (let g2 of gutters2) {
|
27211
|
+
if (g2.config.side == "after")
|
27212
|
+
this.getDOMAfter().appendChild(g2.dom);
|
27213
|
+
else
|
27214
|
+
this.dom.appendChild(g2.dom);
|
27215
|
+
}
|
27094
27216
|
this.gutters = gutters2;
|
27095
27217
|
}
|
27096
27218
|
return change;
|
@@ -27099,13 +27221,16 @@ const dependencies = {
|
|
27099
27221
|
for (let view of this.gutters)
|
27100
27222
|
view.destroy();
|
27101
27223
|
this.dom.remove();
|
27224
|
+
if (this.domAfter)
|
27225
|
+
this.domAfter.remove();
|
27102
27226
|
}
|
27103
27227
|
}, {
|
27104
27228
|
provide: (plugin) => EditorView.scrollMargins.of((view) => {
|
27105
27229
|
let value = view.plugin(plugin);
|
27106
27230
|
if (!value || value.gutters.length == 0 || !value.fixed)
|
27107
27231
|
return null;
|
27108
|
-
|
27232
|
+
let before = value.dom.offsetWidth * view.scaleX, after = value.domAfter ? value.domAfter.offsetWidth * view.scaleX : 0;
|
27233
|
+
return view.textDirection == Direction.LTR ? { left: before, right: after } : { right: before, left: after };
|
27109
27234
|
})
|
27110
27235
|
});
|
27111
27236
|
function asArray(val) {
|
@@ -27345,7 +27470,8 @@ const dependencies = {
|
|
27345
27470
|
let max = formatNumber(update.view, maxLineNumber(update.view.state.doc.lines));
|
27346
27471
|
return max == spacer.number ? spacer : new NumberMarker(max);
|
27347
27472
|
},
|
27348
|
-
domEventHandlers: state.facet(lineNumberConfig).domEventHandlers
|
27473
|
+
domEventHandlers: state.facet(lineNumberConfig).domEventHandlers,
|
27474
|
+
side: "before"
|
27349
27475
|
}));
|
27350
27476
|
function lineNumbers(config2 = {}) {
|
27351
27477
|
return [
|
@@ -30298,7 +30424,7 @@ const dependencies = {
|
|
30298
30424
|
let inner = ast.resolveInner(pos, -1).resolve(pos, 0).enterUnfinishedNodesBefore(pos);
|
30299
30425
|
if (inner != stack.node) {
|
30300
30426
|
let add2 = [];
|
30301
|
-
for (let cur2 = inner; cur2 && !(cur2.from == stack.node.from && cur2.type == stack.node.type); cur2 = cur2.parent)
|
30427
|
+
for (let cur2 = inner; cur2 && !(cur2.from < stack.node.from || cur2.to > stack.node.to || cur2.from == stack.node.from && cur2.type == stack.node.type); cur2 = cur2.parent)
|
30302
30428
|
add2.push(cur2);
|
30303
30429
|
for (let i2 = add2.length - 1; i2 >= 0; i2--)
|
30304
30430
|
stack = { node: add2[i2], next: stack };
|
@@ -32358,33 +32484,6 @@ const dependencies = {
|
|
32358
32484
|
{ key: "Alt-A", run: toggleBlockComment },
|
32359
32485
|
{ key: "Ctrl-m", mac: "Shift-Alt-m", run: toggleTabFocusMode }
|
32360
32486
|
].concat(standardKeymap);
|
32361
|
-
function crelt() {
|
32362
|
-
var elt = arguments[0];
|
32363
|
-
if (typeof elt == "string") elt = document.createElement(elt);
|
32364
|
-
var i2 = 1, next = arguments[1];
|
32365
|
-
if (next && typeof next == "object" && next.nodeType == null && !Array.isArray(next)) {
|
32366
|
-
for (var name2 in next) if (Object.prototype.hasOwnProperty.call(next, name2)) {
|
32367
|
-
var value = next[name2];
|
32368
|
-
if (typeof value == "string") elt.setAttribute(name2, value);
|
32369
|
-
else if (value != null) elt[name2] = value;
|
32370
|
-
}
|
32371
|
-
i2++;
|
32372
|
-
}
|
32373
|
-
for (; i2 < arguments.length; i2++) add(elt, arguments[i2]);
|
32374
|
-
return elt;
|
32375
|
-
}
|
32376
|
-
function add(elt, child) {
|
32377
|
-
if (typeof child == "string") {
|
32378
|
-
elt.appendChild(document.createTextNode(child));
|
32379
|
-
} else if (child == null) ;
|
32380
|
-
else if (child.nodeType != null) {
|
32381
|
-
elt.appendChild(child);
|
32382
|
-
} else if (Array.isArray(child)) {
|
32383
|
-
for (var i2 = 0; i2 < child.length; i2++) add(elt, child[i2]);
|
32384
|
-
} else {
|
32385
|
-
throw new RangeError("Unsupported child node: " + child);
|
32386
|
-
}
|
32387
|
-
}
|
32388
32487
|
const basicNormalize = typeof String.prototype.normalize == "function" ? (x2) => x2.normalize("NFKD") : (x2) => x2;
|
32389
32488
|
class SearchCursor {
|
32390
32489
|
/**
|
@@ -36472,10 +36571,10 @@ const dependencies = {
|
|
36472
36571
|
closeLintPanel(editor);
|
36473
36572
|
}
|
36474
36573
|
class Scope {
|
36574
|
+
container;
|
36575
|
+
canvas;
|
36576
|
+
ctx;
|
36475
36577
|
constructor(container) {
|
36476
|
-
__publicField(this, "container");
|
36477
|
-
__publicField(this, "canvas");
|
36478
|
-
__publicField(this, "ctx");
|
36479
36578
|
this.container = container;
|
36480
36579
|
this.container.classList.add("scope");
|
36481
36580
|
this.canvas = document.createElement("canvas");
|
@@ -36864,8 +36963,8 @@ const dependencies = {
|
|
36864
36963
|
gutterSize: 7,
|
36865
36964
|
snapOffset: 150,
|
36866
36965
|
onDragEnd: () => {
|
36867
|
-
scope
|
36868
|
-
spectrum
|
36966
|
+
scope?.onResize();
|
36967
|
+
spectrum?.onResize();
|
36869
36968
|
}
|
36870
36969
|
});
|
36871
36970
|
faustPromise.then(() => runButton.disabled = false);
|
@@ -36951,7 +37050,7 @@ const dependencies = {
|
|
36951
37050
|
const ui = node.getUI();
|
36952
37051
|
openTab(ui.length > 1 || ui[0].items.length > 0 ? 0 : 3);
|
36953
37052
|
const faustUI = new distExports.FaustUI({ ui, root: faustUIRoot });
|
36954
|
-
faustUI.paramChangeByUI = (path, value) => node
|
37053
|
+
faustUI.paramChangeByUI = (path, value) => node?.setParamValue(path, value);
|
36955
37054
|
node.setOutputParamHandler((path, value) => faustUI.paramChangeByDSP(path, value));
|
36956
37055
|
editorEl.style.height = `${Math.max(125, faustUI.minHeight)}px`;
|
36957
37056
|
faustUIRoot.style.width = faustUI.minWidth * 1.25 + "px";
|
@@ -37216,7 +37315,7 @@ const dependencies = {
|
|
37216
37315
|
console.error("Error accessing MIDI device:", error.message);
|
37217
37316
|
});
|
37218
37317
|
}
|
37219
|
-
faustUI.paramChangeByUI = (path, value) => node
|
37318
|
+
faustUI.paramChangeByUI = (path, value) => node?.setParamValue(path, value);
|
37220
37319
|
node.setOutputParamHandler((path, value) => faustUI.paramChangeByDSP(path, value));
|
37221
37320
|
if (node.numberOfInputs > 0) {
|
37222
37321
|
audioInputSelector.disabled = false;
|
@@ -37230,8 +37329,8 @@ const dependencies = {
|
|
37230
37329
|
powerButton.style.color = "#ffa500";
|
37231
37330
|
};
|
37232
37331
|
const stop = () => {
|
37233
|
-
node
|
37234
|
-
node
|
37332
|
+
node?.disconnect();
|
37333
|
+
node?.stopSensors();
|
37235
37334
|
powerButton.style.color = "#fff";
|
37236
37335
|
};
|
37237
37336
|
powerButton.onclick = () => {
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@grame/faust-web-component",
|
3
3
|
"description": "Web component embedding the Faust Compiler",
|
4
|
-
"version": "0.5.
|
4
|
+
"version": "0.5.5",
|
5
5
|
"module": "dist/faust-web-component.js",
|
6
6
|
"files": [
|
7
7
|
"src/",
|
@@ -43,7 +43,7 @@
|
|
43
43
|
"@fortawesome/fontawesome-svg-core": "^6.4.2",
|
44
44
|
"@fortawesome/free-solid-svg-icons": "^6.4.2",
|
45
45
|
"@grame/faustwasm": "^0.9.5",
|
46
|
-
"@shren/faust-ui": "^1.1.
|
46
|
+
"@shren/faust-ui": "^1.1.19",
|
47
47
|
"codemirror": "^6.0.1",
|
48
48
|
"split.js": "^1.6.5"
|
49
49
|
}
|