@ibodr/draw 0.2.9 → 0.2.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/index.d.ts +9 -0
- package/dist/index.mjs +25 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -2871,6 +2871,9 @@ declare class GeoShapeUtil extends BaseBoxShapeUtil<DrGeoShape> {
|
|
|
2871
2871
|
fill: string | null;
|
|
2872
2872
|
stroke: string;
|
|
2873
2873
|
strokeWidth: number;
|
|
2874
|
+
label: string;
|
|
2875
|
+
labelColor: string;
|
|
2876
|
+
labelSize: number;
|
|
2874
2877
|
};
|
|
2875
2878
|
getGeometry(shape: DrGeoShape): Group2d;
|
|
2876
2879
|
getHandleSnapGeometry(shape: DrGeoShape): HandleSnapGeometry;
|
|
@@ -3317,6 +3320,9 @@ declare class NoteShapeUtil extends ShapeUtil<DrNoteShape> {
|
|
|
3317
3320
|
fill: string;
|
|
3318
3321
|
stroke: null;
|
|
3319
3322
|
strokeWidth: number;
|
|
3323
|
+
label: string;
|
|
3324
|
+
labelColor: string;
|
|
3325
|
+
labelSize: number;
|
|
3320
3326
|
};
|
|
3321
3327
|
getGeometry(shape: DrNoteShape): Group2d;
|
|
3322
3328
|
getHandles(shape: DrNoteShape): DrHandle[];
|
|
@@ -3413,6 +3419,9 @@ declare class TextShapeUtil extends ShapeUtil<DrTextShape> {
|
|
|
3413
3419
|
stroke: string;
|
|
3414
3420
|
strokeWidth: number;
|
|
3415
3421
|
opacity: number;
|
|
3422
|
+
label: string;
|
|
3423
|
+
labelColor: string;
|
|
3424
|
+
labelSize: number;
|
|
3416
3425
|
};
|
|
3417
3426
|
getGeometry(shape: DrTextShape, opts: DrGeometryOpts): Rectangle2d;
|
|
3418
3427
|
getFontFaces(shape: DrTextShape): _ibodr_schema.DrFontFace[];
|
package/dist/index.mjs
CHANGED
|
@@ -30196,10 +30196,14 @@ var GeoShapeUtil = class extends BaseBoxShapeUtil {
|
|
|
30196
30196
|
getLodStyle(shape) {
|
|
30197
30197
|
const dv = getDisplayValues(this, shape);
|
|
30198
30198
|
const filled = shape.props.fill !== "none" && dv.fillColor !== "transparent";
|
|
30199
|
+
const text = renderPlaintextFromRichText(this.editor, shape.props.richText).trim();
|
|
30199
30200
|
return {
|
|
30200
30201
|
fill: filled ? dv.fillColor : null,
|
|
30201
30202
|
stroke: dv.strokeColor,
|
|
30202
|
-
strokeWidth: dv.strokeWidth
|
|
30203
|
+
strokeWidth: dv.strokeWidth,
|
|
30204
|
+
label: text,
|
|
30205
|
+
labelColor: dv.labelColor,
|
|
30206
|
+
labelSize: dv.labelFontSize * shape.props.scale
|
|
30203
30207
|
};
|
|
30204
30208
|
}
|
|
30205
30209
|
getGeometry(shape) {
|
|
@@ -32166,7 +32170,15 @@ var NoteShapeUtil = class extends ShapeUtil {
|
|
|
32166
32170
|
}
|
|
32167
32171
|
getLodStyle(shape) {
|
|
32168
32172
|
const dv = getDisplayValues(this, shape);
|
|
32169
|
-
|
|
32173
|
+
const text = renderPlaintextFromRichText(this.editor, shape.props.richText).trim();
|
|
32174
|
+
return {
|
|
32175
|
+
fill: dv.noteBackgroundColor,
|
|
32176
|
+
stroke: null,
|
|
32177
|
+
strokeWidth: 0,
|
|
32178
|
+
label: text,
|
|
32179
|
+
labelColor: dv.labelColor,
|
|
32180
|
+
labelSize: dv.labelFontSize * (shape.props.fontSizeAdjustment ?? 1) * shape.props.scale
|
|
32181
|
+
};
|
|
32170
32182
|
}
|
|
32171
32183
|
getGeometry(shape) {
|
|
32172
32184
|
const { labelHeight, labelWidth } = this.getLabelSize(shape);
|
|
@@ -32671,7 +32683,16 @@ var TextShapeUtil = class extends ShapeUtil {
|
|
|
32671
32683
|
}
|
|
32672
32684
|
getLodStyle(shape) {
|
|
32673
32685
|
const dv = getDisplayValues(this, shape);
|
|
32674
|
-
|
|
32686
|
+
const text = renderPlaintextFromRichText(this.editor, shape.props.richText).trim();
|
|
32687
|
+
return {
|
|
32688
|
+
fill: null,
|
|
32689
|
+
stroke: dv.color,
|
|
32690
|
+
strokeWidth: 1,
|
|
32691
|
+
opacity: 0.85,
|
|
32692
|
+
label: text,
|
|
32693
|
+
labelColor: dv.color,
|
|
32694
|
+
labelSize: dv.fontSize * shape.props.scale
|
|
32695
|
+
};
|
|
32675
32696
|
}
|
|
32676
32697
|
getGeometry(shape, opts) {
|
|
32677
32698
|
const { scale } = shape.props;
|
|
@@ -40273,7 +40294,7 @@ init_sanitizeSvg();
|
|
|
40273
40294
|
// src/index.ts
|
|
40274
40295
|
registerDrawLibraryVersion(
|
|
40275
40296
|
"@ibodr/draw",
|
|
40276
|
-
"0.2.
|
|
40297
|
+
"0.2.10",
|
|
40277
40298
|
"esm"
|
|
40278
40299
|
);
|
|
40279
40300
|
/*!
|