@duet3d/monacotokens 3.7.0-alpha.15 → 3.7.0-alpha.17

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.
@@ -123,7 +123,7 @@
123
123
  {
124
124
  "name": "round",
125
125
  "syntax": "round(x)",
126
- "description": "Round x to nearest integer (rounds to even when exactly halfway); returns int if it fits in 32 bits"
126
+ "description": "Round x to nearest integer (rounds to even when exactly halfway); returns int if it fits in 32 bits, else float"
127
127
  },
128
128
  {
129
129
  "name": "sin",
@@ -230,7 +230,7 @@
230
230
  "description": "Information about the current job"
231
231
  },
232
232
  {
233
- "name": "ledstrips",
233
+ "name": "ledStrips",
234
234
  "description": "List of configured LED strips"
235
235
  },
236
236
  {
@@ -1576,16 +1576,6 @@
1576
1576
  }
1577
1577
  ]
1578
1578
  },
1579
- {
1580
- "code": "M135",
1581
- "summary": "Set PID sample interval",
1582
- "parameters": [
1583
- {
1584
- "letter": "S",
1585
- "description": "Heat sample time in milliseconds"
1586
- }
1587
- ]
1588
- },
1589
1579
  {
1590
1580
  "code": "M140",
1591
1581
  "summary": "Set bed temperature (no wait)",
@@ -2644,10 +2634,6 @@
2644
2634
  {
2645
2635
  "letter": "A",
2646
2636
  "description": "Gain (deprecated, use R)"
2647
- },
2648
- {
2649
- "letter": "F",
2650
- "description": "PWM frequency (Hz)only, use M950 in"
2651
2637
  }
2652
2638
  ]
2653
2639
  },
@@ -4253,14 +4239,6 @@
4253
4239
  "letter": "S",
4254
4240
  "description": "Output PWM value (0..1; <=0 = off)"
4255
4241
  },
4256
- {
4257
- "letter": "F",
4258
- "description": "Output PWM frequency"
4259
- },
4260
- {
4261
- "letter": "Q",
4262
- "description": "Output PWM frequency"
4263
- },
4264
4242
  {
4265
4243
  "letter": "P",
4266
4244
  "description": "GpOut port number; pin name; logical pin number"
@@ -4475,20 +4453,6 @@
4475
4453
  "description": "{axis} axis endstop to wait for"
4476
4454
  }
4477
4455
  },
4478
- {
4479
- "code": "M578",
4480
- "summary": "Fire inkjet bits",
4481
- "parameters": [
4482
- {
4483
- "letter": "P",
4484
- "description": "Inkjet head number"
4485
- },
4486
- {
4487
- "letter": "S",
4488
- "description": "Bit pattern"
4489
- }
4490
- ]
4491
- },
4492
4456
  {
4493
4457
  "code": "M579",
4494
4458
  "summary": "Scale Cartesian axes",
@@ -5916,26 +5880,6 @@
5916
5880
  "description": "Percentage of normal current for {axis} motor(s)"
5917
5881
  }
5918
5882
  },
5919
- {
5920
- "code": "M914",
5921
- "summary": "Set/Get Expansion Voltage Level Translator",
5922
- "parameters": [
5923
- {
5924
- "letter": "S",
5925
- "description": "Expansion voltage signal level",
5926
- "values": [
5927
- {
5928
- "value": "3",
5929
- "description": "3V signal level"
5930
- },
5931
- {
5932
- "value": "5",
5933
- "description": "5V signal level"
5934
- }
5935
- ]
5936
- }
5937
- ]
5938
- },
5939
5883
  {
5940
5884
  "code": "M915",
5941
5885
  "summary": "Configure motor stall detection",
package/dist/providers.js CHANGED
@@ -752,18 +752,23 @@ function installSuggestWidgetWidth() {
752
752
  // Also relax Monaco's built-in max-height on the parameter-hints widget so our summary doc (which lists
753
753
  // all parameters when no parameter is active) can grow vertically instead of getting an internal scrollbar
754
754
  style.textContent = [
755
- ".monaco-editor .suggest-widget { min-width: min(600px, 90vw); }",
756
- ".monaco-editor .suggest-widget .monaco-list { min-width: min(600px, 90vw); }",
757
- ".monaco-editor .parameter-hints-widget { max-width: min(600px, 90vw) !important; }",
758
- ".monaco-editor .parameter-hints-widget > .phwrapper { max-width: min(600px, 90vw) !important; }",
759
- // Hover widget: widen to match the suggest-widget (90vw cap so phones don't overflow), and cap height
755
+ // suggest, parameter-hints and hover are overflow widgets: a consumer that sets
756
+ // `fixedOverflowWidgets: true` re-parents them to a body-level node outside `.monaco-editor`, so
757
+ // scoping selectors to `.monaco-editor <widget>` silently stops matching. Target the widget classes
758
+ // directly so the rules apply wherever the editor mounts its overflow widgets (and still match the
759
+ // in-editor case when the flag is off)
760
+ ".suggest-widget { min-width: min(600px, 90vw); }",
761
+ ".suggest-widget .monaco-list { min-width: min(600px, 90vw); }",
762
+ ".parameter-hints-widget { max-width: min(800px, 90vw) !important; }",
763
+ ".parameter-hints-widget > .phwrapper { max-width: min(800px, 90vw) !important; }",
764
+ // Hover widget: cap width at 800px (90vw on narrow screens so phones don't overflow), and cap height
760
765
  // at 50vh so Monaco's positioning math always finds a fit either above or below the cursor. Without
761
766
  // a height cap it can compute a height that doesn't fit above when hovering near the top of the file,
762
767
  // leaving the tooltip clipped at negative Y. Long docs (M106, M950) scroll internally, which is the
763
768
  // right trade-off - forcing inner containers to ignore the computed max-height makes the widget grow
764
769
  // past its reserved slot and overlap the source line, hiding the cursor
765
- ".monaco-editor .monaco-hover, .monaco-editor-hover { max-width: min(600px, 90vw) !important; max-height: 50vh !important; }",
766
- ".monaco-editor .monaco-hover .hover-contents, .monaco-editor-hover .hover-contents { overflow-wrap: break-word; }",
770
+ ".monaco-hover { max-width: min(800px, 90vw) !important; max-height: 50vh !important; }",
771
+ ".monaco-hover .hover-contents { overflow-wrap: break-word; }",
767
772
  // Pin every box in the hover to the same integer pixel height (19 px - matches Monaco's intended
768
773
  // `1.35714 * 14` line-height, just rounded). Monaco's default ratio resolves to 18.99996 px at 14 px
769
774
  // font; inline phrasing elements (<code>, <strong>, ...) have their own intrinsic metrics that
@@ -773,16 +778,24 @@ function installSuggestWidgetWidth() {
773
778
  // inline blocks + an explicit <li> height kills the rounding mismatch at every level. Also mirror
774
779
  // the implicit left gutter (from the <ul> bullet indent) on the right so text doesn't butt up against
775
780
  // the tooltip edge
776
- ".monaco-editor .monaco-hover .monaco-hover-content, .monaco-editor-hover .monaco-hover-content { line-height: 19px !important; box-sizing: border-box; overflow-x: hidden; }",
781
+ ".monaco-hover .monaco-hover-content { line-height: 19px !important; box-sizing: border-box; overflow-x: hidden; }",
777
782
  // Add right-side padding only when the hover renders more than a single line (multi-paragraph
778
783
  // content, or a bullet/numbered list). Single-line hovers (just one `<p>`) don't need it and the
779
784
  // extra gutter would look off-balance against the natural left margin
780
- ".monaco-editor .monaco-hover .monaco-hover-content:has(p + p, ul, ol), .monaco-editor-hover .monaco-hover-content:has(p + p, ul, ol) { padding-right: 12px; }",
785
+ ".monaco-hover .monaco-hover-content:has(p + p, ul, ol) { padding-right: 12px; }",
781
786
  // Pin <li> to a clean 19 px integer floor (matches the parent's pinned line-height). Browser default
782
787
  // padding/margin gives a fractional ~17.4167 px row that, in lists with many items, accumulates into a
783
788
  // half-pixel overflow at the bottom and brings back the phantom scrollbar. min-height (not height) so
784
789
  // long parameter descriptions that wrap can grow vertically instead of overlapping the next item
785
- ".monaco-editor .monaco-hover li, .monaco-editor-hover li { min-height: 19px; box-sizing: border-box; }"
790
+ ".monaco-hover li { min-height: 19px; box-sizing: border-box; }",
791
+ // Re-assert Monaco's own paragraph/list spacing (it ships margin: 8px 0 on these, with the first/last
792
+ // child gaps trimmed and a 20 px bullet indent). Host CSS resets - e.g. Vuetify 4's global reset, which
793
+ // zeroes <p>/<ul> margins - cascade into this body-level hover widget and collapse the gaps between the
794
+ // path, summary and value list. !important keeps the rhythm regardless of the embedding app's reset
795
+ ".monaco-hover p, .monaco-hover ul { margin: 8px 0 !important; }",
796
+ ".monaco-hover p:first-child, .monaco-hover ul:first-child { margin-top: 0 !important; }",
797
+ ".monaco-hover p:last-child, .monaco-hover ul:last-child { margin-bottom: 0 !important; }",
798
+ ".monaco-hover ul { padding-left: 20px !important; }"
786
799
  ].join(" ");
787
800
  document.head.appendChild(style);
788
801
  suggestWidgetStyleInstalled = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duet3d/monacotokens",
3
- "version": "3.7.0-alpha.15",
3
+ "version": "3.7.0-alpha.17",
4
4
  "description": "TypeScript library that holds syntax highlighting files for the Monaco editor",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",