@yyfather/dsh-balance 0.1.1 → 0.1.2
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/client.js +16 -3
- package/package.json +1 -1
package/client.js
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
|
+
window.__ModuleLoader__.load({
|
|
2
|
+
id: "@yyfather/dsh-balance",
|
|
3
|
+
factory: (require) => {
|
|
4
|
+
var module = { exports: {} };
|
|
5
|
+
var exports = module.exports;
|
|
6
|
+
|
|
1
7
|
/**
|
|
2
8
|
* dsh-balance — Client half (browser).
|
|
3
9
|
*
|
|
4
10
|
* Registers the ambient composition dock readout. All data comes from the
|
|
5
11
|
* Host's loopback-only same-origin routes; no credential ever reaches the page.
|
|
6
12
|
*/
|
|
7
|
-
|
|
13
|
+
const React = require("react");
|
|
8
14
|
|
|
9
|
-
|
|
15
|
+
var inject = ["slots"];
|
|
10
16
|
|
|
11
17
|
const STATE_ROUTE = '/dsh-balance/api/state'
|
|
12
18
|
const CONFIG_ROUTE = '/dsh-balance/api/config'
|
|
@@ -225,7 +231,7 @@ function BalanceDock(props) {
|
|
|
225
231
|
)
|
|
226
232
|
}
|
|
227
233
|
|
|
228
|
-
|
|
234
|
+
function apply(ctx) {
|
|
229
235
|
ctx.effect(() => {
|
|
230
236
|
const style = document.createElement('style')
|
|
231
237
|
style.dataset.plugin = 'dsh-balance'
|
|
@@ -241,3 +247,10 @@ export function apply(ctx) {
|
|
|
241
247
|
inject: () => ({ loadState, saveConfig }),
|
|
242
248
|
}, BalanceDock))
|
|
243
249
|
}
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
exports.apply = apply;
|
|
253
|
+
exports.inject = inject;
|
|
254
|
+
return module.exports;
|
|
255
|
+
},
|
|
256
|
+
});
|