@jvs-milkdown/crepe 1.2.32 → 1.2.34

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/lib/esm/index.js CHANGED
@@ -5835,8 +5835,7 @@ const Toolbar = defineComponent({
5835
5835
  siblingsWidth += s.offsetWidth;
5836
5836
  }
5837
5837
  }
5838
- const gapCount = Math.max(0, siblings.length);
5839
- containerWidth = parent.clientWidth - siblingsWidth - gapCount * 12;
5838
+ containerWidth = parent.clientWidth - siblingsWidth - 12;
5840
5839
  } else {
5841
5840
  containerWidth = container.clientWidth;
5842
5841
  }
@@ -8647,54 +8646,42 @@ const FixedToolbarComponent = defineComponent({
8647
8646
  }
8648
8647
  },
8649
8648
  /* @__PURE__ */ h(
8650
- "div",
8649
+ "button",
8651
8650
  {
8651
+ type: "button",
8652
+ class: "fixed-toolbar-expand-btn",
8653
+ title: "\u5C55\u5F00\u5DE5\u5177\u680F",
8654
+ onClick: (e) => {
8655
+ e.preventDefault();
8656
+ e.stopPropagation();
8657
+ viewState.fixedToolbarVisible = true;
8658
+ },
8652
8659
  style: {
8653
- position: "relative",
8654
- width: "100%",
8655
- maxWidth: isFull.value ? "100%" : maxWidth.value,
8656
- margin: isFull.value ? "0" : "0 auto",
8657
- height: "100%"
8660
+ position: "absolute",
8661
+ top: "0",
8662
+ right: "40px",
8663
+ display: "flex",
8664
+ alignItems: "center",
8665
+ justifyContent: "center",
8666
+ width: "28px",
8667
+ height: "24px",
8668
+ border: "1px solid var(--crepe-color-outline-variant, color-mix(in srgb, var(--crepe-color-outline), transparent 85%))",
8669
+ borderTop: "none",
8670
+ background: "var(--crepe-color-surface, #ffffff)",
8671
+ cursor: "pointer",
8672
+ borderRadius: "0 0 6px 6px",
8673
+ boxShadow: "0 4px 8px rgba(0, 0, 0, 0.06)",
8674
+ color: "var(--crepe-color-on-surface, #363b4c)",
8675
+ pointerEvents: "auto",
8676
+ zIndex: 200
8658
8677
  }
8659
8678
  },
8660
8679
  /* @__PURE__ */ h(
8661
- "button",
8680
+ "span",
8662
8681
  {
8663
- type: "button",
8664
- class: "fixed-toolbar-expand-btn",
8665
- title: "\u5C55\u5F00\u5DE5\u5177\u680F",
8666
- onClick: (e) => {
8667
- e.preventDefault();
8668
- e.stopPropagation();
8669
- viewState.fixedToolbarVisible = true;
8670
- },
8671
- style: {
8672
- position: "absolute",
8673
- top: "0",
8674
- right: "6px",
8675
- display: "flex",
8676
- alignItems: "center",
8677
- justifyContent: "center",
8678
- width: "28px",
8679
- height: "24px",
8680
- border: "1px solid var(--crepe-color-outline-variant, color-mix(in srgb, var(--crepe-color-outline), transparent 85%))",
8681
- borderTop: "none",
8682
- background: "var(--crepe-color-surface, #ffffff)",
8683
- cursor: "pointer",
8684
- borderRadius: "0 0 6px 6px",
8685
- boxShadow: "0 4px 8px rgba(0, 0, 0, 0.06)",
8686
- color: "var(--crepe-color-on-surface, #363b4c)",
8687
- pointerEvents: "auto",
8688
- zIndex: 200
8689
- }
8690
- },
8691
- /* @__PURE__ */ h(
8692
- "span",
8693
- {
8694
- style: { display: "inline-flex", alignItems: "center" },
8695
- innerHTML: chevronDownIcon
8696
- }
8697
- )
8682
+ style: { display: "inline-flex", alignItems: "center" },
8683
+ innerHTML: chevronDownIcon
8684
+ }
8698
8685
  )
8699
8686
  )
8700
8687
  );
@@ -8722,7 +8709,7 @@ const FixedToolbarComponent = defineComponent({
8722
8709
  width: "100%",
8723
8710
  maxWidth: isFull.value ? "100%" : maxWidth.value,
8724
8711
  margin: isFull.value ? "0" : "0 auto",
8725
- paddingRight: "40px",
8712
+ padding: "0px 10px",
8726
8713
  gap: "0px",
8727
8714
  minWidth: "0",
8728
8715
  overflow: "hidden"
@@ -8844,41 +8831,41 @@ const FixedToolbarComponent = defineComponent({
8844
8831
  isFixed: true
8845
8832
  }
8846
8833
  ),
8847
- showShortcuts.value && /* @__PURE__ */ h(ShortcutHelpModal, { ctx: props.ctx, visible: showShortcuts }),
8834
+ showShortcuts.value && /* @__PURE__ */ h(ShortcutHelpModal, { ctx: props.ctx, visible: showShortcuts })
8835
+ ),
8836
+ /* @__PURE__ */ h(
8837
+ "button",
8838
+ {
8839
+ type: "button",
8840
+ class: "toolbar-item collapse-btn",
8841
+ title: "\u6298\u53E0\u5DE5\u5177\u680F",
8842
+ onClick: (e) => {
8843
+ e.preventDefault();
8844
+ e.stopPropagation();
8845
+ viewState.fixedToolbarVisible = false;
8846
+ },
8847
+ style: {
8848
+ position: "absolute",
8849
+ top: "6px",
8850
+ right: "40px",
8851
+ margin: "0",
8852
+ display: "flex",
8853
+ alignItems: "center",
8854
+ justifyContent: "center",
8855
+ pointerEvents: "auto",
8856
+ zIndex: 200
8857
+ }
8858
+ },
8848
8859
  /* @__PURE__ */ h(
8849
- "button",
8860
+ "span",
8850
8861
  {
8851
- type: "button",
8852
- class: "toolbar-item collapse-btn",
8853
- title: "\u6298\u53E0\u5DE5\u5177\u680F",
8854
- onClick: (e) => {
8855
- e.preventDefault();
8856
- e.stopPropagation();
8857
- viewState.fixedToolbarVisible = false;
8858
- },
8859
8862
  style: {
8860
- position: "absolute",
8861
- top: "6px",
8862
- right: "6px",
8863
- margin: "0",
8864
- display: "flex",
8863
+ display: "inline-flex",
8865
8864
  alignItems: "center",
8866
- justifyContent: "center",
8867
- pointerEvents: "auto",
8868
- zIndex: 200
8869
- }
8870
- },
8871
- /* @__PURE__ */ h(
8872
- "span",
8873
- {
8874
- style: {
8875
- display: "inline-flex",
8876
- alignItems: "center",
8877
- transform: "rotate(180deg)"
8878
- },
8879
- innerHTML: chevronDownIcon
8880
- }
8881
- )
8865
+ transform: "rotate(180deg)"
8866
+ },
8867
+ innerHTML: chevronDownIcon
8868
+ }
8882
8869
  )
8883
8870
  )
8884
8871
  );