@netless/fastboard-ui 0.3.0-canary.4 → 0.3.0-canary.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/dist/index.mjs CHANGED
@@ -193,6 +193,9 @@ function get_current_component() {
193
193
  throw new Error("Function called outside component initialization");
194
194
  return current_component;
195
195
  }
196
+ function onMount(fn) {
197
+ get_current_component().$$.on_mount.push(fn);
198
+ }
196
199
  function createEventDispatcher() {
197
200
  const component = get_current_component();
198
201
  return (type, detail) => {
@@ -8522,10 +8525,6 @@ function instance54($$self, $$props, $$invalidate) {
8522
8525
  $:
8523
8526
  $$subscribe_status($$invalidate(15, status = app == null ? void 0 : app.appsStatus));
8524
8527
  }
8525
- if ($$self.$$.dirty[0] & 536870944 | $$self.$$.dirty[1] & 1) {
8526
- $:
8527
- max_scroll = scrollable ? $scroll_height + (32 + 8) * 2 - computed_height : 0;
8528
- }
8529
8528
  if ($$self.$$.dirty[0] & 192) {
8530
8529
  $:
8531
8530
  if (applianceShapes.includes(appliance)) {
@@ -8534,6 +8533,10 @@ function instance54($$self, $$props, $$invalidate) {
8534
8533
  $$invalidate(9, last_shape = shape);
8535
8534
  }
8536
8535
  }
8536
+ if ($$self.$$.dirty[0] & 536870944 | $$self.$$.dirty[1] & 1) {
8537
+ $:
8538
+ max_scroll = scrollable ? $scroll_height + (32 + 8) * 2 - computed_height : 0;
8539
+ }
8537
8540
  };
8538
8541
  return [
8539
8542
  app,
@@ -10092,6 +10095,15 @@ function instance58($$self, $$props, $$invalidate) {
10092
10095
  let { language = "en" } = $$props;
10093
10096
  let { containerRef = void 0 } = $$props;
10094
10097
  let container;
10098
+ onMount(() => {
10099
+ if (containerRef) {
10100
+ containerRef(container);
10101
+ return () => {
10102
+ if (containerRef)
10103
+ containerRef(null);
10104
+ };
10105
+ }
10106
+ });
10095
10107
  function div0_binding($$value) {
10096
10108
  binding_callbacks[$$value ? "unshift" : "push"](() => {
10097
10109
  container = $$value;
@@ -10114,11 +10126,6 @@ function instance58($$self, $$props, $$invalidate) {
10114
10126
  if (app && container)
10115
10127
  app.bindContainer(container);
10116
10128
  }
10117
- if ($$self.$$.dirty & 24) {
10118
- $:
10119
- if (containerRef)
10120
- containerRef(container || null);
10121
- }
10122
10129
  };
10123
10130
  return [app, theme, language, container, containerRef, div0_binding];
10124
10131
  }