@jokerized/decksmith 0.9.8 → 0.9.10
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/cli.js +12 -4
- package/dist/index.js +12 -4
- package/dist/mcp.js +12 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -20493,9 +20493,19 @@ function layoutPoints(c, mode, stacked = false, refs = [], short = false) {
|
|
|
20493
20493
|
);
|
|
20494
20494
|
const sideW = below ? 0 : keyW;
|
|
20495
20495
|
const plot = two ? { x: 24 + yTickW, y: top, w: W2 - 48 - yTickW - sideW, h: H - top - 72 - nameH - 8 - keyH } : { x: 24, y: top, w: W2 - 48 - sideW, h: H - top - 24 - keyH };
|
|
20496
|
-
|
|
20496
|
+
const PLOT_MIN = 240;
|
|
20497
|
+
if (plot.h < PLOT_MIN && below) {
|
|
20498
|
+
const sideLine = Math.floor(W2 * KEY_SHARE) - 32;
|
|
20499
|
+
const fit = Math.max(0, Math.floor((plot.h + keyH - PLOT_MIN - 16) / KEY_LH));
|
|
20500
|
+
const besideRows = Math.floor((H - top) / KEY_LH);
|
|
20501
|
+
const why3 = keyW - 32 > sideLine ? `its longest line is ${Math.ceil(keyW - 32)}px and a line beside the plot may be ${sideLine}px` : `${keyLines.length} lines are more than the ${besideRows} that fit beside the plot`;
|
|
20497
20502
|
throw new Error(
|
|
20498
|
-
`place: the key
|
|
20503
|
+
`place: the numbered key fits neither beside the plot (${why3}) nor under it (${fit} of its ${keyLines.length} lines fit before the plot is under ${PLOT_MIN}px). Each line is an item's number, name and values: shorten the names${fit >= 2 ? `, or give at most ${fit} items` : ""}`
|
|
20504
|
+
);
|
|
20505
|
+
}
|
|
20506
|
+
if (plot.h < PLOT_MIN)
|
|
20507
|
+
throw new Error(
|
|
20508
|
+
`place: the plot is left ${Math.floor(plot.h)}px tall, under ${PLOT_MIN}px; give fewer legend entries or shorter names`
|
|
20499
20509
|
);
|
|
20500
20510
|
const X = (v) => {
|
|
20501
20511
|
const t2 = (tr(0)(v) - rx[0]) / (rx[1] - rx[0]);
|
|
@@ -24891,8 +24901,6 @@ var UNSUPPORTED = /* @__PURE__ */ new Set([
|
|
|
24891
24901
|
"multipleOf",
|
|
24892
24902
|
"minLength",
|
|
24893
24903
|
"maxLength",
|
|
24894
|
-
"minItems",
|
|
24895
|
-
"maxItems",
|
|
24896
24904
|
"uniqueItems"
|
|
24897
24905
|
]);
|
|
24898
24906
|
function forStructuredOutput(node) {
|
package/dist/index.js
CHANGED
|
@@ -22877,9 +22877,19 @@ function layoutPoints(c, mode, stacked = false, refs = [], short = false) {
|
|
|
22877
22877
|
);
|
|
22878
22878
|
const sideW = below ? 0 : keyW;
|
|
22879
22879
|
const plot = two ? { x: 24 + yTickW, y: top, w: W2 - 48 - yTickW - sideW, h: H - top - 72 - nameH - 8 - keyH } : { x: 24, y: top, w: W2 - 48 - sideW, h: H - top - 24 - keyH };
|
|
22880
|
-
|
|
22880
|
+
const PLOT_MIN = 240;
|
|
22881
|
+
if (plot.h < PLOT_MIN && below) {
|
|
22882
|
+
const sideLine = Math.floor(W2 * KEY_SHARE) - 32;
|
|
22883
|
+
const fit = Math.max(0, Math.floor((plot.h + keyH - PLOT_MIN - 16) / KEY_LH));
|
|
22884
|
+
const besideRows = Math.floor((H - top) / KEY_LH);
|
|
22885
|
+
const why3 = keyW - 32 > sideLine ? `its longest line is ${Math.ceil(keyW - 32)}px and a line beside the plot may be ${sideLine}px` : `${keyLines.length} lines are more than the ${besideRows} that fit beside the plot`;
|
|
22881
22886
|
throw new Error(
|
|
22882
|
-
`place: the key
|
|
22887
|
+
`place: the numbered key fits neither beside the plot (${why3}) nor under it (${fit} of its ${keyLines.length} lines fit before the plot is under ${PLOT_MIN}px). Each line is an item's number, name and values: shorten the names${fit >= 2 ? `, or give at most ${fit} items` : ""}`
|
|
22888
|
+
);
|
|
22889
|
+
}
|
|
22890
|
+
if (plot.h < PLOT_MIN)
|
|
22891
|
+
throw new Error(
|
|
22892
|
+
`place: the plot is left ${Math.floor(plot.h)}px tall, under ${PLOT_MIN}px; give fewer legend entries or shorter names`
|
|
22883
22893
|
);
|
|
22884
22894
|
const X = (v) => {
|
|
22885
22895
|
const t2 = (tr(0)(v) - rx[0]) / (rx[1] - rx[0]);
|
|
@@ -27238,8 +27248,6 @@ var UNSUPPORTED = /* @__PURE__ */ new Set([
|
|
|
27238
27248
|
"multipleOf",
|
|
27239
27249
|
"minLength",
|
|
27240
27250
|
"maxLength",
|
|
27241
|
-
"minItems",
|
|
27242
|
-
"maxItems",
|
|
27243
27251
|
"uniqueItems"
|
|
27244
27252
|
]);
|
|
27245
27253
|
function forStructuredOutput(node) {
|
package/dist/mcp.js
CHANGED
|
@@ -21389,9 +21389,19 @@ function layoutPoints(c, mode, stacked = false, refs = [], short = false) {
|
|
|
21389
21389
|
);
|
|
21390
21390
|
const sideW = below ? 0 : keyW;
|
|
21391
21391
|
const plot = two ? { x: 24 + yTickW, y: top, w: W2 - 48 - yTickW - sideW, h: H - top - 72 - nameH - 8 - keyH } : { x: 24, y: top, w: W2 - 48 - sideW, h: H - top - 24 - keyH };
|
|
21392
|
-
|
|
21392
|
+
const PLOT_MIN = 240;
|
|
21393
|
+
if (plot.h < PLOT_MIN && below) {
|
|
21394
|
+
const sideLine = Math.floor(W2 * KEY_SHARE) - 32;
|
|
21395
|
+
const fit = Math.max(0, Math.floor((plot.h + keyH - PLOT_MIN - 16) / KEY_LH));
|
|
21396
|
+
const besideRows = Math.floor((H - top) / KEY_LH);
|
|
21397
|
+
const why2 = keyW - 32 > sideLine ? `its longest line is ${Math.ceil(keyW - 32)}px and a line beside the plot may be ${sideLine}px` : `${keyLines.length} lines are more than the ${besideRows} that fit beside the plot`;
|
|
21393
21398
|
throw new Error(
|
|
21394
|
-
`place: the key
|
|
21399
|
+
`place: the numbered key fits neither beside the plot (${why2}) nor under it (${fit} of its ${keyLines.length} lines fit before the plot is under ${PLOT_MIN}px). Each line is an item's number, name and values: shorten the names${fit >= 2 ? `, or give at most ${fit} items` : ""}`
|
|
21400
|
+
);
|
|
21401
|
+
}
|
|
21402
|
+
if (plot.h < PLOT_MIN)
|
|
21403
|
+
throw new Error(
|
|
21404
|
+
`place: the plot is left ${Math.floor(plot.h)}px tall, under ${PLOT_MIN}px; give fewer legend entries or shorter names`
|
|
21395
21405
|
);
|
|
21396
21406
|
const X = (v) => {
|
|
21397
21407
|
const t2 = (tr(0)(v) - rx[0]) / (rx[1] - rx[0]);
|
|
@@ -25708,8 +25718,6 @@ var UNSUPPORTED = /* @__PURE__ */ new Set([
|
|
|
25708
25718
|
"multipleOf",
|
|
25709
25719
|
"minLength",
|
|
25710
25720
|
"maxLength",
|
|
25711
|
-
"minItems",
|
|
25712
|
-
"maxItems",
|
|
25713
25721
|
"uniqueItems"
|
|
25714
25722
|
]);
|
|
25715
25723
|
function forStructuredOutput(node) {
|