@onjmin/dtm 0.1.18 → 0.1.19

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.js CHANGED
@@ -9089,6 +9089,11 @@ var createDtmStudio = async (options = {}) => {
9089
9089
  buttons.set(mode, btn);
9090
9090
  }
9091
9091
  wrapper.appendChild(seg);
9092
+ const attachWrapper = () => {
9093
+ if (opts.position === "prepend")
9094
+ target.insertBefore(wrapper, target.firstChild);
9095
+ else target.appendChild(wrapper);
9096
+ };
9092
9097
  const doMount = (mode, mml) => {
9093
9098
  const editorOpts = editorOptionsFor(mode);
9094
9099
  daw = mountEditor(opts.editorTarget, {
@@ -9097,6 +9102,7 @@ var createDtmStudio = async (options = {}) => {
9097
9102
  tracks: tracksFor(mode),
9098
9103
  initialMML: mml ?? editorOpts.initialMML
9099
9104
  });
9105
+ attachWrapper();
9100
9106
  opts.onMount?.(daw, mode);
9101
9107
  };
9102
9108
  const doUnmount = () => {
@@ -9115,9 +9121,6 @@ var createDtmStudio = async (options = {}) => {
9115
9121
  opts.onChange?.(mode);
9116
9122
  doMount(mode, carried);
9117
9123
  }
9118
- if (opts.position === "prepend")
9119
- target.insertBefore(wrapper, target.firstChild);
9120
- else target.appendChild(wrapper);
9121
9124
  updateButtons();
9122
9125
  doMount(currentMode, editorOptionsFor(currentMode).initialMML);
9123
9126
  const instance = {
package/dist/index.mjs CHANGED
@@ -8983,6 +8983,11 @@ var createDtmStudio = async (options = {}) => {
8983
8983
  buttons.set(mode, btn);
8984
8984
  }
8985
8985
  wrapper.appendChild(seg);
8986
+ const attachWrapper = () => {
8987
+ if (opts.position === "prepend")
8988
+ target.insertBefore(wrapper, target.firstChild);
8989
+ else target.appendChild(wrapper);
8990
+ };
8986
8991
  const doMount = (mode, mml) => {
8987
8992
  const editorOpts = editorOptionsFor(mode);
8988
8993
  daw = mountEditor(opts.editorTarget, {
@@ -8991,6 +8996,7 @@ var createDtmStudio = async (options = {}) => {
8991
8996
  tracks: tracksFor(mode),
8992
8997
  initialMML: mml ?? editorOpts.initialMML
8993
8998
  });
8999
+ attachWrapper();
8994
9000
  opts.onMount?.(daw, mode);
8995
9001
  };
8996
9002
  const doUnmount = () => {
@@ -9009,9 +9015,6 @@ var createDtmStudio = async (options = {}) => {
9009
9015
  opts.onChange?.(mode);
9010
9016
  doMount(mode, carried);
9011
9017
  }
9012
- if (opts.position === "prepend")
9013
- target.insertBefore(wrapper, target.firstChild);
9014
- else target.appendChild(wrapper);
9015
9018
  updateButtons();
9016
9019
  doMount(currentMode, editorOptionsFor(currentMode).initialMML);
9017
9020
  const instance = {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "author": "onjmin",
3
3
  "license": "MIT",
4
4
  "name": "@onjmin/dtm",
5
- "version": "0.1.18",
5
+ "version": "0.1.19",
6
6
  "description": "MMLを中間言語に用いた、モバイルファーストなDAW / ピアノロール打ち込みコンポーネント",
7
7
  "homepage": "https://onjmin.github.io/dtm",
8
8
  "repository": {