@particle-academy/holy-sheet 2.10.0 → 2.10.1
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/CHANGELOG.md +11 -0
- package/dist/index.cjs +8 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -264,7 +264,7 @@ interface SetMetaOp {
|
|
|
264
264
|
}
|
|
265
265
|
|
|
266
266
|
/** This package's own version, pinned to package.json by `version.test.ts`. */
|
|
267
|
-
declare const VERSION = "2.10.
|
|
267
|
+
declare const VERSION = "2.10.1";
|
|
268
268
|
type Any$6 = any;
|
|
269
269
|
/**
|
|
270
270
|
* Agent — the structured-tool surface for Holy Sheet. Mirrors PHP `Agent`.
|
|
@@ -342,7 +342,7 @@ type Any$5 = any;
|
|
|
342
342
|
* over `Agent`. Provided for parity / DI ergonomics; most callers use `Agent`.
|
|
343
343
|
*/
|
|
344
344
|
declare class HolySheet {
|
|
345
|
-
static readonly VERSION = "2.10.
|
|
345
|
+
static readonly VERSION = "2.10.1";
|
|
346
346
|
validate(schema: Any$5): ValidationError[];
|
|
347
347
|
toBytes(schema: Any$5): Uint8Array;
|
|
348
348
|
write(schema: Any$5, path: string): Promise<WriteResult>;
|
package/dist/index.d.ts
CHANGED
|
@@ -264,7 +264,7 @@ interface SetMetaOp {
|
|
|
264
264
|
}
|
|
265
265
|
|
|
266
266
|
/** This package's own version, pinned to package.json by `version.test.ts`. */
|
|
267
|
-
declare const VERSION = "2.10.
|
|
267
|
+
declare const VERSION = "2.10.1";
|
|
268
268
|
type Any$6 = any;
|
|
269
269
|
/**
|
|
270
270
|
* Agent — the structured-tool surface for Holy Sheet. Mirrors PHP `Agent`.
|
|
@@ -342,7 +342,7 @@ type Any$5 = any;
|
|
|
342
342
|
* over `Agent`. Provided for parity / DI ergonomics; most callers use `Agent`.
|
|
343
343
|
*/
|
|
344
344
|
declare class HolySheet {
|
|
345
|
-
static readonly VERSION = "2.10.
|
|
345
|
+
static readonly VERSION = "2.10.1";
|
|
346
346
|
validate(schema: Any$5): ValidationError[];
|
|
347
347
|
toBytes(schema: Any$5): Uint8Array;
|
|
348
348
|
write(schema: Any$5, path: string): Promise<WriteResult>;
|
package/dist/index.js
CHANGED
|
@@ -4477,7 +4477,8 @@ var ChartXml = {
|
|
|
4477
4477
|
} else {
|
|
4478
4478
|
plot = `<c:barChart><c:barDir val="${type === "bar" ? "bar" : "col"}"/><c:grouping val="clustered"/><c:varyColors val="0"/>` + series + labels + '<c:gapWidth val="80"/><c:axId val="10"/><c:axId val="20"/></c:barChart>';
|
|
4479
4479
|
}
|
|
4480
|
-
const
|
|
4480
|
+
const zeroBase = type !== "line" && nonNegative(chart, workbook);
|
|
4481
|
+
const axesXml = type === "pie" ? "" : axes(type === "bar", chart.format, zeroBase);
|
|
4481
4482
|
const legend = chart.legend ?? (chart.series.length > 1 || type === "pie");
|
|
4482
4483
|
const title = chart.title !== null ? `<c:title><c:tx><c:rich><a:bodyPr/><a:lstStyle/><a:p><a:pPr><a:defRPr sz="1200" b="1"/></a:pPr><a:r><a:rPr lang="en-US" sz="1200" b="1"/><a:t>${text(chart.title)}</a:t></a:r></a:p></c:rich></c:tx><c:overlay val="0"/></c:title><c:autoTitleDeleted val="0"/>` : '<c:autoTitleDeleted val="1"/>';
|
|
4483
4484
|
return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?><c:chartSpace xmlns:c="${NS_C}" xmlns:a="${NS_A}" xmlns:r="${NS_R}"><c:roundedCorners val="0"/><c:chart>` + title + "<c:plotArea><c:layout/>" + plot + axesXml + "</c:plotArea>" + (legend ? '<c:legend><c:legendPos val="b"/><c:overlay val="0"/></c:legend>' : "") + '<c:plotVisOnly val="1"/><c:dispBlanksAs val="gap"/></c:chart><c:spPr><a:noFill/><a:ln><a:noFill/></a:ln></c:spPr>' + textProps("595959", 900) + "</c:chartSpace>";
|
|
@@ -4538,11 +4539,14 @@ function dataLabels(type, format) {
|
|
|
4538
4539
|
const pos = type === "line" ? "t" : type === "pie" ? "bestFit" : "outEnd";
|
|
4539
4540
|
return "<c:dLbls>" + (format !== null ? `<c:numFmt formatCode="${attr2(format)}" sourceLinked="0"/>` : "") + "<c:spPr><a:noFill/><a:ln><a:noFill/></a:ln></c:spPr>" + textProps("404040", 900) + `<c:dLblPos val="${pos}"/><c:showLegendKey val="0"/><c:showVal val="1"/><c:showCatName val="0"/><c:showSerName val="0"/><c:showPercent val="0"/><c:showBubbleSize val="0"/></c:dLbls>`;
|
|
4540
4541
|
}
|
|
4541
|
-
function
|
|
4542
|
+
function nonNegative(chart, workbook) {
|
|
4543
|
+
return chart.series.every((s) => values(s.values, workbook).every((v) => typeof v !== "number" || !(v < 0)));
|
|
4544
|
+
}
|
|
4545
|
+
function axes(horizontal, format, zeroBase = false) {
|
|
4542
4546
|
const catPos = horizontal ? "l" : "b";
|
|
4543
4547
|
const valPos = horizontal ? "b" : "l";
|
|
4544
4548
|
const numFmt = format !== null ? `<c:numFmt formatCode="${attr2(format)}" sourceLinked="0"/>` : '<c:numFmt formatCode="General" sourceLinked="1"/>';
|
|
4545
|
-
return `<c:catAx><c:axId val="10"/><c:scaling><c:orientation val="${horizontal ? "maxMin" : "minMax"}"/></c:scaling><c:delete val="0"/><c:axPos val="${catPos}"/><c:numFmt formatCode="General" sourceLinked="1"/><c:majorTickMark val="none"/><c:minorTickMark val="none"/><c:tickLblPos val="low"/><c:spPr><a:ln w="9525"><a:solidFill><a:srgbClr val="BFBFBF"/></a:solidFill></a:ln></c:spPr><c:crossAx val="20"/><c:crosses val="autoZero"/><c:auto val="1"/><c:lblAlgn val="ctr"/><c:lblOffset val="100"/><c:noMultiLvlLbl val="0"/></c:catAx><c:valAx><c:axId val="20"/><c:scaling><c:orientation val="minMax"
|
|
4549
|
+
return `<c:catAx><c:axId val="10"/><c:scaling><c:orientation val="${horizontal ? "maxMin" : "minMax"}"/></c:scaling><c:delete val="0"/><c:axPos val="${catPos}"/><c:numFmt formatCode="General" sourceLinked="1"/><c:majorTickMark val="none"/><c:minorTickMark val="none"/><c:tickLblPos val="low"/><c:spPr><a:ln w="9525"><a:solidFill><a:srgbClr val="BFBFBF"/></a:solidFill></a:ln></c:spPr><c:crossAx val="20"/><c:crosses val="autoZero"/><c:auto val="1"/><c:lblAlgn val="ctr"/><c:lblOffset val="100"/><c:noMultiLvlLbl val="0"/></c:catAx><c:valAx><c:axId val="20"/><c:scaling><c:orientation val="minMax"/>` + (zeroBase ? '<c:min val="0"/>' : "") + `</c:scaling><c:delete val="0"/><c:axPos val="${valPos}"/><c:majorGridlines><c:spPr><a:ln w="9525"><a:solidFill><a:srgbClr val="E5E7EB"/></a:solidFill></a:ln></c:spPr></c:majorGridlines>` + numFmt + `<c:majorTickMark val="none"/><c:minorTickMark val="none"/><c:tickLblPos val="nextTo"/><c:spPr><a:ln><a:noFill/></a:ln></c:spPr><c:crossAx val="10"/><c:crosses val="${horizontal ? "max" : "autoZero"}"/><c:crossBetween val="between"/></c:valAx>`;
|
|
4546
4550
|
}
|
|
4547
4551
|
function textProps(color2, size) {
|
|
4548
4552
|
return `<c:txPr><a:bodyPr/><a:lstStyle/><a:p><a:pPr><a:defRPr sz="${size}"><a:solidFill><a:srgbClr val="${color2}"/></a:solidFill></a:defRPr></a:pPr><a:endParaRPr lang="en-US"/></a:p></c:txPr>`;
|
|
@@ -6125,7 +6129,7 @@ var holy_sheet_schema_default = {
|
|
|
6125
6129
|
};
|
|
6126
6130
|
|
|
6127
6131
|
// src/agent.ts
|
|
6128
|
-
var VERSION = "2.10.
|
|
6132
|
+
var VERSION = "2.10.1";
|
|
6129
6133
|
function toU8(input) {
|
|
6130
6134
|
return input instanceof Uint8Array ? input : new Uint8Array(input);
|
|
6131
6135
|
}
|