mce 0.16.5 → 0.16.6

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.css CHANGED
@@ -1191,8 +1191,7 @@
1191
1191
  flex-direction: column-reverse;
1192
1192
  align-items: center;
1193
1193
  width: 120px;
1194
- height: max-content;
1195
- min-height: 100%;
1194
+ height: 100%;
1196
1195
  padding-top: 24px;
1197
1196
  overflow: hidden;
1198
1197
  }
package/dist/index.js CHANGED
@@ -1964,11 +1964,15 @@ const _1_timeline = defineMixin((editor) => {
1964
1964
  const {
1965
1965
  assets: assets2,
1966
1966
  on,
1967
- off
1967
+ off,
1968
+ config
1968
1969
  } = editor;
1969
1970
  async function updateEndTime() {
1970
1971
  await renderEngine.value.nextTick();
1971
1972
  timeline.value.endTime = root.value ? getTimeRange(root.value).endTime : 0;
1973
+ if (!config.value.timeline) {
1974
+ timeline.value.currentTime = timeline.value.endTime;
1975
+ }
1972
1976
  }
1973
1977
  onBeforeMount(() => {
1974
1978
  on("setDoc", updateEndTime);
@@ -6581,7 +6585,7 @@ const _hoisted_6$3 = {
6581
6585
  key: 2,
6582
6586
  class: "mce-list-item__kbd"
6583
6587
  };
6584
- const _hoisted_7$3 = {
6588
+ const _hoisted_7$2 = {
6585
6589
  key: 3,
6586
6590
  class: "mce-list-item__append"
6587
6591
  };
@@ -6731,7 +6735,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
6731
6735
  _ctx.$slots.kbd ? (openBlock(), createElementBlock("div", _hoisted_6$3, [
6732
6736
  renderSlot(_ctx.$slots, "kbd", { item })
6733
6737
  ])) : createCommentVNode("", true),
6734
- item.children?.length || _ctx.$slots.append ? (openBlock(), createElementBlock("div", _hoisted_7$3, [
6738
+ item.children?.length || _ctx.$slots.append ? (openBlock(), createElementBlock("div", _hoisted_7$2, [
6735
6739
  renderSlot(_ctx.$slots, "append", { item }),
6736
6740
  item.children?.length ? (openBlock(), createBlock(unref(_sfc_main$E), {
6737
6741
  key: 0,
@@ -12318,7 +12322,7 @@ const _hoisted_3$6 = ["x", "y", "width", "height", "aria-label"];
12318
12322
  const _hoisted_4$3 = ["cx", "cy", "r", "aria-label"];
12319
12323
  const _hoisted_5$2 = ["x", "y", "width", "height", "aria-label", "rx", "ry"];
12320
12324
  const _hoisted_6$2 = ["transform"];
12321
- const _hoisted_7$2 = { "pointer-events": "all" };
12325
+ const _hoisted_7$1 = { "pointer-events": "all" };
12322
12326
  const _hoisted_8$1 = ["x", "y", "width", "height", "aria-label", "cursor", "onPointerdown"];
12323
12327
  const _hoisted_9$1 = {
12324
12328
  "pointer-events": "all",
@@ -12952,7 +12956,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
12952
12956
  createElementVNode("path", { d: "M22.4789 9.45728L25.9935 12.9942L22.4789 16.5283V14.1032C18.126 14.1502 14.6071 17.6737 14.5675 22.0283H17.05L13.513 25.543L9.97889 22.0283H12.5674C12.6071 16.5691 17.0214 12.1503 22.4789 12.1031L22.4789 9.45728Z" }, null, -1)
12953
12957
  ])], 8, _hoisted_6$2)) : createCommentVNode("", true)
12954
12958
  ]),
12955
- createElementVNode("g", _hoisted_7$2, [
12959
+ createElementVNode("g", _hoisted_7$1, [
12956
12960
  (openBlock(true), createElementBlock(Fragment, null, renderList(computedHandles.value, (handle, index) => {
12957
12961
  return openBlock(), createElementBlock("rect", {
12958
12962
  key: index,
@@ -15558,7 +15562,7 @@ const _hoisted_3$4 = { class: "mce-statusbar__item" };
15558
15562
  const _hoisted_4$1 = { class: "mce-statusbar__kbd" };
15559
15563
  const _hoisted_5$1 = { class: "mce-statusbar__kbd" };
15560
15564
  const _hoisted_6$1 = { class: "mce-statusbar__item" };
15561
- const _hoisted_7$1 = { class: "mce-statusbar__kbd" };
15565
+ const _hoisted_7 = { class: "mce-statusbar__kbd" };
15562
15566
  const _hoisted_8 = { class: "mce-statusbar__item" };
15563
15567
  const _hoisted_9 = { class: "mce-statusbar__item" };
15564
15568
  const _hoisted_10 = { class: "mce-statusbar__kbd" };
@@ -15596,7 +15600,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
15596
15600
  ]),
15597
15601
  _cache[1] || (_cache[1] = createElementVNode("span", null, "/", -1)),
15598
15602
  createElementVNode("div", _hoisted_6$1, [
15599
- createElementVNode("span", _hoisted_7$1, toDisplayString(unref(getKbd)("Escape")), 1),
15603
+ createElementVNode("span", _hoisted_7, toDisplayString(unref(getKbd)("Escape")), 1),
15600
15604
  createElementVNode("span", null, toDisplayString(unref(t)("commitChanges")), 1)
15601
15605
  ])
15602
15606
  ], 64)) : unref(state) === "transforming" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
@@ -15975,7 +15979,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
15975
15979
  key: index,
15976
15980
  class: "mce-segment__block",
15977
15981
  style: normalizeStyle$1(block.style)
15978
- }, toDisplayString(block.name), 5);
15982
+ }, null, 4);
15979
15983
  }), 128)),
15980
15984
  __props.active ? (openBlock(), createElementBlock("div", _hoisted_1$6)) : createCommentVNode("", true),
15981
15985
  createElementVNode("span", _hoisted_2$3, toDisplayString(props.node.name), 1),
@@ -16013,11 +16017,10 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
16013
16017
  });
16014
16018
  const _hoisted_1$4 = { class: "mce-timeline__toolbar" };
16015
16019
  const _hoisted_2$2 = { class: "mce-timeline__main" };
16016
- const _hoisted_3$2 = { class: "mce-timeline__left" };
16017
- const _hoisted_4 = { class: "mce-timeline__left-wrapper" };
16018
- const _hoisted_5 = { class: "mce-timeline__right-wrapper" };
16019
- const _hoisted_6 = { class: "mce-timeline__ruler" };
16020
- const _hoisted_7 = { class: "mce-timeline__track" };
16020
+ const _hoisted_3$2 = { class: "mce-timeline__left-wrapper" };
16021
+ const _hoisted_4 = { class: "mce-timeline__right-wrapper" };
16022
+ const _hoisted_5 = { class: "mce-timeline__ruler" };
16023
+ const _hoisted_6 = { class: "mce-timeline__track" };
16021
16024
  const _sfc_main$8 = /* @__PURE__ */ defineComponent({
16022
16025
  __name: "Timeline",
16023
16026
  setup(__props) {
@@ -16042,7 +16045,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
16042
16045
  }
16043
16046
  }
16044
16047
  return false;
16045
- });
16048
+ }).reverse();
16046
16049
  });
16047
16050
  function onWheel(e) {
16048
16051
  if (e.ctrlKey || e.metaKey) {
@@ -16130,8 +16133,11 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
16130
16133
  ])
16131
16134
  ]),
16132
16135
  createElementVNode("div", _hoisted_2$2, [
16133
- createElementVNode("div", _hoisted_3$2, [
16134
- createElementVNode("div", _hoisted_4, [
16136
+ createElementVNode("div", {
16137
+ class: "mce-timeline__left",
16138
+ onWheel
16139
+ }, [
16140
+ createElementVNode("div", _hoisted_3$2, [
16135
16141
  createElementVNode("div", {
16136
16142
  style: normalizeStyle$1({
16137
16143
  transform: `translateY(${offset2.value[1]}px)`
@@ -16145,14 +16151,14 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
16145
16151
  }), 128))
16146
16152
  ], 4)
16147
16153
  ])
16148
- ]),
16154
+ ], 32),
16149
16155
  createElementVNode("div", {
16150
16156
  class: "mce-timeline__right",
16151
16157
  onWheel,
16152
16158
  onMousedown
16153
16159
  }, [
16154
- createElementVNode("div", _hoisted_5, [
16155
- createElementVNode("div", _hoisted_6, [
16160
+ createElementVNode("div", _hoisted_4, [
16161
+ createElementVNode("div", _hoisted_5, [
16156
16162
  createVNode(_sfc_main$q, {
16157
16163
  ref: "rulerTpl",
16158
16164
  zoom: 1 / unref(msPerPx) * fps.value,
@@ -16163,7 +16169,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
16163
16169
  "label-format": rulerLabelFormat
16164
16170
  }, null, 8, ["zoom", "position"])
16165
16171
  ]),
16166
- createElementVNode("div", _hoisted_7, [
16172
+ createElementVNode("div", _hoisted_6, [
16167
16173
  createElementVNode("div", {
16168
16174
  style: normalizeStyle$1({
16169
16175
  width: `${unref(endTime) / unref(msPerPx)}px`,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mce",
3
3
  "type": "module",
4
- "version": "0.16.5",
4
+ "version": "0.16.6",
5
5
  "description": "A headless infinite canvas editor framework built on WebGL rendering, supports exporting to image, video, and PPT. Only the ESM.",
6
6
  "author": "wxm",
7
7
  "license": "MIT",