From 3f29f1a82dcd54f8230ff51a1cc83917538c14bf Mon Sep 17 00:00:00 2001 From: deadlink Date: Sat, 24 Feb 2024 19:21:14 +0400 Subject: [PATCH 01/38] WIP: rounded rectangle --- src/core/layers/rectangle.layer.ts | 16 ++++++- src/draw/draw-context.ts | 76 ++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+), 1 deletion(-) diff --git a/src/core/layers/rectangle.layer.ts b/src/core/layers/rectangle.layer.ts index de4884d3..f34173a9 100644 --- a/src/core/layers/rectangle.layer.ts +++ b/src/core/layers/rectangle.layer.ts @@ -7,6 +7,7 @@ type TRectangleState = TLayerState & { p: number[]; // position [x, y] s: number[]; // size [w, h] f: boolean; // fill + r: number; // radius }; export class RectangleLayer extends AbstractLayer { @@ -36,6 +37,7 @@ export class RectangleLayer extends AbstractLayer { public position: Point = new Point(); public size: Point = new Point(); public fill: boolean = false; + public radius: number = 0; modifiers: TLayerModifiers = { x: { @@ -79,6 +81,16 @@ export class RectangleLayer extends AbstractLayer { }, type: TModifierType.number }, + radius: { + getValue: () => this.radius, + setValue: (v: number) => { + this.radius = v; + this.updateBounds(); + this.saveState(); + this.draw(); + }, + type: TModifierType.number + }, fill: { getValue: () => this.fill, setValue: (v: boolean) => { @@ -221,13 +233,14 @@ export class RectangleLayer extends AbstractLayer { dc.clear(); dc.ctx.fillStyle = this.color; dc.ctx.strokeStyle = this.color; - dc.rect(position, size, this.fill); + dc.pixelateRoundedRect(position, size, this.radius, this.fill); } saveState() { const state: TRectangleState = { p: this.position.xy, s: this.size.xy, + r: this.radius, n: this.name, i: this.index, g: this.group, @@ -243,6 +256,7 @@ export class RectangleLayer extends AbstractLayer { loadState(state: TRectangleState) { this.position = new Point(state.p); this.size = new Point(state.s); + this.radius = state.r ?? 0; this.name = state.n; this.index = state.i; this.group = state.g; diff --git a/src/draw/draw-context.ts b/src/draw/draw-context.ts index 795ba242..9fc9e4a3 100644 --- a/src/draw/draw-context.ts +++ b/src/draw/draw-context.ts @@ -134,6 +134,82 @@ export class DrawContext { return this; } + pixelateCircleSection( + center: Point, + radius: number, + startAngle: number, + endAngle: number, + fill: boolean + ): DrawContext { + // arc pixelated + const xStart = center.x + radius * Math.cos(startAngle); + const yStart = center.y + radius * Math.sin(startAngle); + const xEnd = center.x + radius * Math.cos(endAngle); + const yEnd = center.y + radius * Math.sin(endAngle); + const xCenter = center.x; + const yCenter = center.y; + // this.pixelateLine(center, new Point(xStart, yStart), 1); + // this.pixelateLine(center, new Point(xEnd, yEnd), 1); + this.ctx.beginPath(); + this.ctx.arc(xCenter, yCenter, radius, startAngle, endAngle); + if (fill) { + this.ctx.fill(); + } + this.ctx.stroke(); + this.ctx.closePath(); + return this; + } + + pixelateRoundedRect(position: Point, size: Point, radius: number, fill: boolean): DrawContext { + // using pixelateCircleSection + const topLeft = position.clone(); + const topRight = position.clone().add(new Point(size.x, 0)); + const bottomRight = position.clone().add(size); + const bottomLeft = position.clone().add(new Point(0, size.y)); + this.pixelateCircleSection( + topLeft.clone().add(new Point(radius, radius)), + radius, + Math.PI, + Math.PI * 1.5, + fill + ); + this.pixelateCircleSection( + topRight.clone().add(new Point(-radius, radius)), + radius, + Math.PI * 1.5, + Math.PI * 2, + fill + ); + this.pixelateCircleSection( + bottomRight.clone().add(new Point(-radius, -radius)), + radius, + 0, + Math.PI * 0.5, + fill + ); + this.pixelateCircleSection( + bottomLeft.clone().add(new Point(radius, -radius)), + radius, + Math.PI * 0.5, + Math.PI, + fill + ); + this.pixelateLine(topLeft.clone().add(new Point(radius, 0)), topRight.clone().add(new Point(-radius, 0)), 1); + this.pixelateLine( + topRight.clone().add(new Point(-1, radius)), + bottomRight.clone().add(new Point(-1, -radius)), + 1 + ); + this.pixelateLine( + bottomRight.clone().add(new Point(-radius, -1)), + bottomLeft.clone().add(new Point(radius, -1)), + 1 + ); + this.pixelateLine(bottomLeft.clone().add(new Point(0, -radius)), topLeft.clone().add(new Point(0, radius)), 1); + + return this; + } + pixelateEllipse(center: Point, radiusX: number, radiusY: number, fill: boolean): DrawContext { this.ctx.beginPath(); for (let n = 0; n < radiusX; n++) { From 2e8316d635f5ec44c124728ec905d76551f822c8 Mon Sep 17 00:00:00 2001 From: deadlink Date: Tue, 2 Apr 2024 15:15:14 +0400 Subject: [PATCH 02/38] Drawing method for rounded rect --- src/core/layers/rectangle.layer.ts | 2 +- src/draw/draw-context.ts | 149 ++++++++++++++--------------- 2 files changed, 74 insertions(+), 77 deletions(-) diff --git a/src/core/layers/rectangle.layer.ts b/src/core/layers/rectangle.layer.ts index f34173a9..0521b660 100644 --- a/src/core/layers/rectangle.layer.ts +++ b/src/core/layers/rectangle.layer.ts @@ -84,7 +84,7 @@ export class RectangleLayer extends AbstractLayer { radius: { getValue: () => this.radius, setValue: (v: number) => { - this.radius = v; + this.radius = Math.min(v, Math.round(this.size.x / 2), Math.round(this.size.y / 2)); this.updateBounds(); this.saveState(); this.draw(); diff --git a/src/draw/draw-context.ts b/src/draw/draw-context.ts index 9fc9e4a3..5169cb8c 100644 --- a/src/draw/draw-context.ts +++ b/src/draw/draw-context.ts @@ -122,91 +122,88 @@ export class DrawContext { } } this.ctx.fill(); - if (!fill) { - this.ctx.save(); - this.ctx.fillStyle = 'rgba(0,0,0,0)'; - this.ctx.beginPath(); - this.ctx.arc(center.x + 0.5, center.y + 0.5, radius + 0.5, 0, 2 * Math.PI); - this.ctx.fill(); - this.ctx.restore(); - } this.ctx.closePath(); return this; } - pixelateCircleSection( - center: Point, - radius: number, - startAngle: number, - endAngle: number, - fill: boolean - ): DrawContext { - // arc pixelated - const xStart = center.x + radius * Math.cos(startAngle); - const yStart = center.y + radius * Math.sin(startAngle); - const xEnd = center.x + radius * Math.cos(endAngle); - const yEnd = center.y + radius * Math.sin(endAngle); - const xCenter = center.x; - const yCenter = center.y; - // this.pixelateLine(center, new Point(xStart, yStart), 1); - // this.pixelateLine(center, new Point(xEnd, yEnd), 1); - this.ctx.beginPath(); - this.ctx.arc(xCenter, yCenter, radius, startAngle, endAngle); - if (fill) { - this.ctx.fill(); + // draw pixelated corner with corner point, radius, and fill in quadrant + pixelateRectCorner(point: Point, radius: number, quadrant: number, fill: boolean): DrawContext { + const radiusPoint = new Point(radius); + switch (quadrant) { + case 1: + radiusPoint.multiply(-1, 1); + break; + case 2: + radiusPoint.multiply(-1, -1); + break; + case 3: + radiusPoint.multiply(1, -1); + break; + } + const center = point.clone().add(radiusPoint); + for (let n = 0; n < radius; n++) { + const x = n; + let y = Math.ceil(Math.sqrt(radius * radius - x * x)); + const p1 = center.clone(); + const p2 = center.clone(); + const r = new Point(radius); + switch (quadrant) { + case 0: + p1.add(-x, -y); + p2.add(-y, -x); + r.subtract(p2.x - point.x - 1, radius); + break; + case 1: + p1.add(x, -y); + p2.add(y, -x); + r.subtract(point.x - p2.x - 1, radius); + break; + case 2: + p1.add(x, y); + p2.add(y, x); + r.subtract(point.x - p2.x, radius).multiply(-1); + break; + case 3: + p1.add(-x, y); + p2.add(-y, x); + r.subtract(p2.x - point.x, radius).multiply(-1); + break; + } + this.ctx.rect(p1.x, p1.y, 1, 1); + this.ctx.rect(p2.x, p2.y, 1, 1); + if (fill) { + this.ctx.rect(p1.x, p1.y, 1, r.x); + this.ctx.rect(p2.x, p2.y, r.y, 1); + } } - this.ctx.stroke(); - this.ctx.closePath(); return this; } pixelateRoundedRect(position: Point, size: Point, radius: number, fill: boolean): DrawContext { - // using pixelateCircleSection - const topLeft = position.clone(); - const topRight = position.clone().add(new Point(size.x, 0)); - const bottomRight = position.clone().add(size); - const bottomLeft = position.clone().add(new Point(0, size.y)); - this.pixelateCircleSection( - topLeft.clone().add(new Point(radius, radius)), - radius, - Math.PI, - Math.PI * 1.5, - fill - ); - this.pixelateCircleSection( - topRight.clone().add(new Point(-radius, radius)), - radius, - Math.PI * 1.5, - Math.PI * 2, - fill - ); - this.pixelateCircleSection( - bottomRight.clone().add(new Point(-radius, -radius)), - radius, - 0, - Math.PI * 0.5, - fill - ); - this.pixelateCircleSection( - bottomLeft.clone().add(new Point(radius, -radius)), - radius, - Math.PI * 0.5, - Math.PI, - fill - ); - this.pixelateLine(topLeft.clone().add(new Point(radius, 0)), topRight.clone().add(new Point(-radius, 0)), 1); - this.pixelateLine( - topRight.clone().add(new Point(-1, radius)), - bottomRight.clone().add(new Point(-1, -radius)), - 1 - ); - this.pixelateLine( - bottomRight.clone().add(new Point(-radius, -1)), - bottomLeft.clone().add(new Point(radius, -1)), - 1 - ); - this.pixelateLine(bottomLeft.clone().add(new Point(0, -radius)), topLeft.clone().add(new Point(0, radius)), 1); - + this.ctx.beginPath(); + if (fill) { + this.ctx.rect(position.x + radius, position.y, size.x - 2 * radius, size.y); + this.ctx.rect(position.x, position.y + radius, size.x, size.y - 2 * radius); + } else { + this.ctx.rect(position.x + radius, position.y, size.x - 2 * radius, 1); + this.ctx.rect(position.x + radius, position.y + size.y - 1, size.x - 2 * radius, 1); + this.ctx.rect(position.x, position.y + radius, 1, size.y - 2 * radius); + this.ctx.rect(position.x + size.x - 1, position.y + radius, 1, size.y - 2 * radius); + } + this.ctx.fill(); + this.ctx.closePath(); + this.ctx.beginPath(); + this.pixelateRectCorner(position, radius, 0, fill); + this.pixelateRectCorner(new Point(position.x + size.x - 1, position.y), radius, 1, fill); + this.pixelateRectCorner(new Point(position.x + size.x - 1, position.y + size.y - 1), radius, 2, fill); + this.pixelateRectCorner(new Point(position.x, position.y + size.y - 1), radius, 3, fill); + this.ctx.fill(); + this.ctx.save(); + this.ctx.fillStyle = 'rgba(0,0,0,0)'; + this.ctx.beginPath(); + this.ctx.rect(position.x, position.y, size.x, size.y); + this.ctx.fill(); + this.ctx.restore(); return this; } From a5b5dbbd3120790e35c961c45b3295f452f213e8 Mon Sep 17 00:00:00 2001 From: deadlink Date: Fri, 5 Apr 2024 00:23:13 +0400 Subject: [PATCH 03/38] Fix runded rect draw --- src/core/layers/rectangle.layer.ts | 2 +- src/core/point.ts | 9 ++++ src/draw/draw-context.ts | 84 ++++++++---------------------- 3 files changed, 32 insertions(+), 63 deletions(-) diff --git a/src/core/layers/rectangle.layer.ts b/src/core/layers/rectangle.layer.ts index 694ec895..2776017f 100644 --- a/src/core/layers/rectangle.layer.ts +++ b/src/core/layers/rectangle.layer.ts @@ -62,7 +62,7 @@ export class RectangleLayer extends AbstractLayer { radius: { getValue: () => this.radius, setValue: (v: number) => { - this.radius = Math.min(v, Math.round(this.size.x / 2), Math.round(this.size.y / 2)); + this.radius = Math.max(0, Math.min(v, Math.round(this.size.x / 2), Math.round(this.size.y / 2))); this.draw(); }, type: TModifierType.number diff --git a/src/core/point.ts b/src/core/point.ts index 02280ae8..4c25cb08 100644 --- a/src/core/point.ts +++ b/src/core/point.ts @@ -176,6 +176,15 @@ export class Point { this[y] = Math.ceil(this[y]); return this; } + swap(): Point { + const t = this[x]; + this[x] = this[y]; + this[y] = t; + return this; + } + sign(): [number, number] { + return [Math.sign(this[x]), Math.sign(this[y])]; + } distanceTo(p: Point): number { return Math.hypot(this.x - p.x, this.y - p.y); } diff --git a/src/draw/draw-context.ts b/src/draw/draw-context.ts index 5169cb8c..0ae953c6 100644 --- a/src/draw/draw-context.ts +++ b/src/draw/draw-context.ts @@ -126,78 +126,38 @@ export class DrawContext { return this; } - // draw pixelated corner with corner point, radius, and fill in quadrant pixelateRectCorner(point: Point, radius: number, quadrant: number, fill: boolean): DrawContext { - const radiusPoint = new Point(radius); - switch (quadrant) { - case 1: - radiusPoint.multiply(-1, 1); - break; - case 2: - radiusPoint.multiply(-1, -1); - break; - case 3: - radiusPoint.multiply(1, -1); - break; - } - const center = point.clone().add(radiusPoint); - for (let n = 0; n < radius; n++) { - const x = n; - let y = Math.ceil(Math.sqrt(radius * radius - x * x)); - const p1 = center.clone(); - const p2 = center.clone(); - const r = new Point(radius); - switch (quadrant) { - case 0: - p1.add(-x, -y); - p2.add(-y, -x); - r.subtract(p2.x - point.x - 1, radius); - break; - case 1: - p1.add(x, -y); - p2.add(y, -x); - r.subtract(point.x - p2.x - 1, radius); - break; - case 2: - p1.add(x, y); - p2.add(y, x); - r.subtract(point.x - p2.x, radius).multiply(-1); - break; - case 3: - p1.add(-x, y); - p2.add(-y, x); - r.subtract(p2.x - point.x, radius).multiply(-1); - break; - } - this.ctx.rect(p1.x, p1.y, 1, 1); - this.ctx.rect(p2.x, p2.y, 1, 1); - if (fill) { - this.ctx.rect(p1.x, p1.y, 1, r.x); - this.ctx.rect(p2.x, p2.y, r.y, 1); - } + const signs = new Point(quadrant == 0 || quadrant == 3 ? 1 : -1, quadrant == 0 || quadrant == 1 ? 1 : -1); + const center = point.clone().add(new Point(radius).multiply(signs)); + this.ctx.beginPath(); + for (let x = 0; x < radius; x++) { + let y = Math.sqrt(radius * radius - x * x); + let p = center.clone().subtract(new Point(x, y).multiply(signs)).round(); + this.ctx.rect(p.x, p.y, 1, 1); + fill && this.ctx.fillRect(p.x, p.y, 1, signs.y * (radius - Math.abs(p.y - point.y))); + p = center.clone().subtract(new Point(y, x).multiply(signs)).round(); + this.ctx.rect(p.x, p.y, 1, 1); } + this.ctx.fill(); return this; } pixelateRoundedRect(position: Point, size: Point, radius: number, fill: boolean): DrawContext { this.ctx.beginPath(); + + this.ctx.rect(position.x + radius, position.y, size.x - 2 * radius, 1); + this.ctx.rect(position.x + radius, position.y + size.y - 1, size.x - 2 * radius, 1); + this.ctx.rect(position.x, position.y + radius, 1, size.y - 2 * radius); + this.ctx.rect(position.x + size.x - 1, position.y + radius, 1, size.y - 2 * radius); if (fill) { - this.ctx.rect(position.x + radius, position.y, size.x - 2 * radius, size.y); - this.ctx.rect(position.x, position.y + radius, size.x, size.y - 2 * radius); - } else { - this.ctx.rect(position.x + radius, position.y, size.x - 2 * radius, 1); - this.ctx.rect(position.x + radius, position.y + size.y - 1, size.x - 2 * radius, 1); - this.ctx.rect(position.x, position.y + radius, 1, size.y - 2 * radius); - this.ctx.rect(position.x + size.x - 1, position.y + radius, 1, size.y - 2 * radius); + this.ctx.fillRect(position.x + radius, position.y, size.x - 2 * radius, size.y); + this.ctx.fillRect(position.x, position.y + radius, size.x, size.y - 2 * radius); } this.ctx.fill(); - this.ctx.closePath(); - this.ctx.beginPath(); - this.pixelateRectCorner(position, radius, 0, fill); - this.pixelateRectCorner(new Point(position.x + size.x - 1, position.y), radius, 1, fill); - this.pixelateRectCorner(new Point(position.x + size.x - 1, position.y + size.y - 1), radius, 2, fill); - this.pixelateRectCorner(new Point(position.x, position.y + size.y - 1), radius, 3, fill); - this.ctx.fill(); + this.pixelateRectCorner(position, radius + 1, 0, fill); + this.pixelateRectCorner(new Point(position.x + size.x - 1, position.y), radius + 1, 1, fill); + this.pixelateRectCorner(new Point(position.x + size.x - 1, position.y + size.y - 1), radius + 1, 2, fill); + this.pixelateRectCorner(new Point(position.x, position.y + size.y - 1), radius + 1, 3, fill); this.ctx.save(); this.ctx.fillStyle = 'rgba(0,0,0,0)'; this.ctx.beginPath(); From 0c0e82e1e10a399fab97f72b68b32296cb7d79d9 Mon Sep 17 00:00:00 2001 From: deadlink Date: Fri, 5 Apr 2024 13:08:23 +0400 Subject: [PATCH 04/38] code generation for rounded rect --- src/platforms/templates/adafruit/default.pug | 4 ++-- src/platforms/templates/adafruit/inkplate.pug | 4 ++-- src/platforms/templates/flipper/default.pug | 4 ++-- src/platforms/templates/u8g2/c_esp_idf.pug | 4 ++-- src/platforms/templates/u8g2/default.pug | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/platforms/templates/adafruit/default.pug b/src/platforms/templates/adafruit/default.pug index ae9ce604..efafd4f3 100644 --- a/src/platforms/templates/adafruit/default.pug +++ b/src/platforms/templates/adafruit/default.pug @@ -19,8 +19,8 @@ each layer in layers when 'line' | @!{layer.uid};!{pad}display.drawLine(!{layer.p1[0]}, !{layer.p1[1]}, !{layer.p2[0]}, !{layer.p2[1]}, !{packColor(layer.color)}); when 'rect' - - var func = layer.fill ? 'fillRect' : 'drawRect' - | @!{layer.uid};!{pad}display.!{func}(!{layer.position[0]}, !{layer.position[1]}, !{layer.size[0]}, !{layer.size[1]}, !{packColor(layer.color)}); + - var func = (layer.fill ? 'fill' : 'draw') + (layer.radius? 'Round' : '') + 'Rect' + | @!{layer.uid};!{pad}display.!{func}(!{layer.position[0]}, !{layer.position[1]}, !{layer.size[0]}, !{layer.size[1]}!{layer.radius? `, ${layer.radius}`: ''}, !{packColor(layer.color)}); when 'circle' - var func = layer.fill ? 'fillCircle' : 'drawCircle' | @!{layer.uid};!{pad}display.!{func}(!{layer.position[0] + layer.radius}, !{layer.position[1] + layer.radius}, !{layer.radius}, !{packColor(layer.color)}); diff --git a/src/platforms/templates/adafruit/inkplate.pug b/src/platforms/templates/adafruit/inkplate.pug index ae9ce604..efafd4f3 100644 --- a/src/platforms/templates/adafruit/inkplate.pug +++ b/src/platforms/templates/adafruit/inkplate.pug @@ -19,8 +19,8 @@ each layer in layers when 'line' | @!{layer.uid};!{pad}display.drawLine(!{layer.p1[0]}, !{layer.p1[1]}, !{layer.p2[0]}, !{layer.p2[1]}, !{packColor(layer.color)}); when 'rect' - - var func = layer.fill ? 'fillRect' : 'drawRect' - | @!{layer.uid};!{pad}display.!{func}(!{layer.position[0]}, !{layer.position[1]}, !{layer.size[0]}, !{layer.size[1]}, !{packColor(layer.color)}); + - var func = (layer.fill ? 'fill' : 'draw') + (layer.radius? 'Round' : '') + 'Rect' + | @!{layer.uid};!{pad}display.!{func}(!{layer.position[0]}, !{layer.position[1]}, !{layer.size[0]}, !{layer.size[1]}!{layer.radius? `, ${layer.radius}`: ''}, !{packColor(layer.color)}); when 'circle' - var func = layer.fill ? 'fillCircle' : 'drawCircle' | @!{layer.uid};!{pad}display.!{func}(!{layer.position[0] + layer.radius}, !{layer.position[1] + layer.radius}, !{layer.radius}, !{packColor(layer.color)}); diff --git a/src/platforms/templates/flipper/default.pug b/src/platforms/templates/flipper/default.pug index 2b1a970d..6cd49279 100644 --- a/src/platforms/templates/flipper/default.pug +++ b/src/platforms/templates/flipper/default.pug @@ -17,8 +17,8 @@ each layer in layers when 'line' | @!{layer.uid};canvas_draw_line(canvas, !{layer.p1[0]}, !{layer.p1[1]}, !{layer.p2[0]}, !{layer.p2[1]}); when 'rect' - - var func = layer.fill ? 'canvas_draw_box' : 'canvas_draw_frame' - | @!{layer.uid};!{func}(canvas, !{layer.position[0]}, !{layer.position[1]}, !{layer.size[0]}, !{layer.size[1]}); + - var func = `canvas_draw_${layer.radius? 'r_': ''}${layer.fill ? 'box' : 'frame'}`; + | @!{layer.uid};!{func}(canvas, !{layer.position[0]}, !{layer.position[1]}, !{layer.size[0]}, !{layer.size[1]}!{layer.radius? `, ${layer.radius}`: ''}); when 'circle' - var func = layer.fill ? 'canvas_draw_disc' : 'canvas_draw_circle' | @!{layer.uid};!{func}(canvas, !{layer.position[0] + layer.radius}, !{layer.position[1] + layer.radius}, !{layer.radius}); diff --git a/src/platforms/templates/u8g2/c_esp_idf.pug b/src/platforms/templates/u8g2/c_esp_idf.pug index 65b163fd..508a7d79 100644 --- a/src/platforms/templates/u8g2/c_esp_idf.pug +++ b/src/platforms/templates/u8g2/c_esp_idf.pug @@ -32,8 +32,8 @@ each layer in layers when 'line' | @!{layer.uid};!{pad}u8g2_DrawLine(&u8g2, !{layer.p1[0]}, !{layer.p1[1]}, !{layer.p2[0]}, !{layer.p2[1]}); when 'rect' - - var func = layer.fill ? 'DrawBox' : 'DrawFrame' - | @!{layer.uid};!{pad}u8g2_!{func}(&u8g2, !{layer.position[0]}, !{layer.position[1]}, !{layer.size[0]}, !{layer.size[1]}); + - var func = 'Draw' + (layer.radius? 'R': '') + (layer.fill ? 'Box' : 'Frame') + | @!{layer.uid};!{pad}u8g2_!{func}(&u8g2, !{layer.position[0]}, !{layer.position[1]}, !{layer.size[0]}, !{layer.size[1]}!{layer.radius? `, ${layer.radius}`: ''}); when 'circle' - var func = layer.fill ? 'DrawDisc' : 'DrawCircle' | @!{layer.uid};!{pad}u8g2_!{func}(&u8g2, !{layer.position[0] + layer.radius}, !{layer.position[1] + layer.radius}, !{layer.radius}); diff --git a/src/platforms/templates/u8g2/default.pug b/src/platforms/templates/u8g2/default.pug index f6f302dd..ac00b8bb 100644 --- a/src/platforms/templates/u8g2/default.pug +++ b/src/platforms/templates/u8g2/default.pug @@ -32,8 +32,8 @@ each layer in layers when 'line' | @!{layer.uid};!{pad}u8g2.drawLine(@x1:!{layer.p1[0]}, @y1:!{layer.p1[1]}, @x2:!{layer.p2[0]}, @y2:!{layer.p2[1]}); when 'rect' - - var func = layer.fill ? 'drawBox' : 'drawFrame' - | @!{layer.uid};!{pad}u8g2.!{func}(@x:!{layer.position[0]}, @y:!{layer.position[1]}, @w:!{layer.size[0]}, @h:!{layer.size[1]}); + - var func = 'draw' + (layer.radius? 'R': '') + (layer.fill ? 'Box' : 'Frame') + | @!{layer.uid};!{pad}u8g2.!{func}(@x:!{layer.position[0]}, @y:!{layer.position[1]}, @w:!{layer.size[0]}, @h:!{layer.size[1]}!{layer.radius? `, @r:${layer.radius}`: ''}); when 'circle' - var func = layer.fill ? 'drawDisc' : 'drawCircle' | @!{layer.uid};!{pad}u8g2.!{func}(@x:!{layer.position[0] + layer.radius}, @y:!{layer.position[1] + layer.radius}, @r:!{layer.radius}); From a33daa3b847806d533b200db2e64b667ebdb5c3c Mon Sep 17 00:00:00 2001 From: deadlink Date: Fri, 5 Apr 2024 13:11:26 +0400 Subject: [PATCH 05/38] Tests --- .../__snapshots__/adafruit.test.ts.snap | 2 ++ .../__snapshots__/adafruit_mono.test.ts.snap | 2 ++ .../__snapshots__/flipper.test.ts.snap | 2 ++ .../__snapshots__/inkplate.test.ts.snap | 2 ++ src/platforms/__snapshots__/u8g2.test.ts.snap | 6 +++++ src/platforms/layers.mock.ts | 22 +++++++++++++++++++ 6 files changed, 36 insertions(+) diff --git a/src/platforms/__snapshots__/adafruit.test.ts.snap b/src/platforms/__snapshots__/adafruit.test.ts.snap index 3a5f2a46..070a9768 100644 --- a/src/platforms/__snapshots__/adafruit.test.ts.snap +++ b/src/platforms/__snapshots__/adafruit.test.ts.snap @@ -24,5 +24,7 @@ display.setCursor(3, 10); // Unknown layer type ellipse @rrsjcz4oz2ln6jx4y4;display.drawBitmap(0, 0, image_paint_0_bits, 128, 64, 0xF800); +@njsoidnfijoinisn;display.fillRoundRect(10, 4, 12, 19, 3, 0x7E0); +@jnijisniijaojosd;display.drawRoundRect(45, 20, 14, 12, 5, 0x7E0); " `; diff --git a/src/platforms/__snapshots__/adafruit_mono.test.ts.snap b/src/platforms/__snapshots__/adafruit_mono.test.ts.snap index b9a3aac0..867fabd3 100644 --- a/src/platforms/__snapshots__/adafruit_mono.test.ts.snap +++ b/src/platforms/__snapshots__/adafruit_mono.test.ts.snap @@ -24,5 +24,7 @@ display.setCursor(3, 10); // Unknown layer type ellipse @rrsjcz4oz2ln6jx4y4;display.drawBitmap(0, 0, image_paint_0_bits, 128, 64, 1); +@njsoidnfijoinisn;display.fillRoundRect(10, 4, 12, 19, 3, 1); +@jnijisniijaojosd;display.drawRoundRect(45, 20, 14, 12, 5, 1); " `; diff --git a/src/platforms/__snapshots__/flipper.test.ts.snap b/src/platforms/__snapshots__/flipper.test.ts.snap index 775b101e..8f1113ce 100644 --- a/src/platforms/__snapshots__/flipper.test.ts.snap +++ b/src/platforms/__snapshots__/flipper.test.ts.snap @@ -22,5 +22,7 @@ canvas_set_font(canvas, profont22); // Unknown layer type ellipse @rrsjcz4oz2ln6jx4y4;canvas_draw_xbm(canvas, 0, 0, 128, 64, image_1_bits); +@njsoidnfijoinisn;canvas_draw_r_box(canvas, 10, 4, 12, 19, 3); +@jnijisniijaojosd;canvas_draw_r_frame(canvas, 45, 20, 14, 12, 5); " `; diff --git a/src/platforms/__snapshots__/inkplate.test.ts.snap b/src/platforms/__snapshots__/inkplate.test.ts.snap index 5d6f5b6c..ea3b13cc 100644 --- a/src/platforms/__snapshots__/inkplate.test.ts.snap +++ b/src/platforms/__snapshots__/inkplate.test.ts.snap @@ -24,5 +24,7 @@ display.setCursor(3, 10); // Unknown layer type ellipse @rrsjcz4oz2ln6jx4y4;display.drawBitmap(0, 0, image_paint_0_bits, 128, 64, 0); +@njsoidnfijoinisn;display.fillRoundRect(10, 4, 12, 19, 3, 0); +@jnijisniijaojosd;display.drawRoundRect(45, 20, 14, 12, 5, 0); " `; diff --git a/src/platforms/__snapshots__/u8g2.test.ts.snap b/src/platforms/__snapshots__/u8g2.test.ts.snap index ae9300b2..84b7b99f 100644 --- a/src/platforms/__snapshots__/u8g2.test.ts.snap +++ b/src/platforms/__snapshots__/u8g2.test.ts.snap @@ -20,6 +20,8 @@ u8g2.setFont(u8g2_font_profont22_tr); @g7pk1wfbqqkln6jwxby;u8g2.drawFrame(@x:44, @y:29, @w:44, @h:28); @u9uidj9d90fu9sj9jj9;u8g2.drawEllipse(@x:15, @y:36, @rx:7, @ry:7); @rrsjcz4oz2ln6jx4y4;u8g2.drawXBM(@x:0, @y:0, @w:128, @h:64, @image:image_paint_0_bits); +@njsoidnfijoinisn;u8g2.drawRBox(@x:10, @y:4, @w:12, @h:19, @r:3); +@jnijisniijaojosd;u8g2.drawRFrame(@x:45, @y:20, @w:14, @h:12, @r:5); u8g2.sendBuffer();" `; @@ -43,6 +45,8 @@ u8g2_SetFont(&u8g2, u8g2_font_profont22_tr); @g7pk1wfbqqkln6jwxby;u8g2_DrawFrame(&u8g2, 44, 29, 44, 28); @u9uidj9d90fu9sj9jj9;u8g2_DrawEllipse(&u8g2, 15, 36, 7, 7); @rrsjcz4oz2ln6jx4y4;u8g2_DrawXBM(&u8g2, 0, 0, 128, 64, image_paint_0_bits); +@njsoidnfijoinisn;u8g2_DrawRBox(&u8g2, 10, 4, 12, 19, 3); +@jnijisniijaojosd;u8g2_DrawRFrame(&u8g2, 45, 20, 14, 12, 5); u8g2_SendBuffer(&u8g2); " `; @@ -66,5 +70,7 @@ u8g2.setFont(u8g2_font_profont22_tr); @g7pk1wfbqqkln6jwxby;u8g2.drawFrame(@x:44, @y:29, @w:44, @h:28); @u9uidj9d90fu9sj9jj9;u8g2.drawEllipse(@x:15, @y:36, @rx:7, @ry:7); @rrsjcz4oz2ln6jx4y4;u8g2.drawXBM(@x:0, @y:0, @w:128, @h:64, @image:image_paint_0_bits); +@njsoidnfijoinisn;u8g2.drawRBox(@x:10, @y:4, @w:12, @h:19, @r:3); +@jnijisniijaojosd;u8g2.drawRFrame(@x:45, @y:20, @w:14, @h:12, @r:5); u8g2.sendBuffer();" `; diff --git a/src/platforms/layers.mock.ts b/src/platforms/layers.mock.ts index d9fa954f..29ca9628 100644 --- a/src/platforms/layers.mock.ts +++ b/src/platforms/layers.mock.ts @@ -158,6 +158,28 @@ export const layersMock: AbstractLayer[] = [ rx: 7, ry: 7, f: false + }, + { + n: 'box_njsoidnfijoinisn', + t: 'rect', + c: '#00FF00', + r: 3, + f: true, + i: 15, + p: [10, 4], + u: 'njsoidnfijoinisn', + s: [12, 19] + }, + { + n: 'box_jnijisniijaojosd', + t: 'rect', + c: '#00FF00', + r: 5, + f: false, + i: 16, + p: [45, 20], + u: 'jnijisniijaojosd', + s: [14, 12] } ].map((l) => { const type: ELayerType = l.t as any; From 5225ee6a27bf2e66aeb6ae2c9a83f750eec4c21d Mon Sep 17 00:00:00 2001 From: deadlink Date: Fri, 5 Apr 2024 14:16:16 +0400 Subject: [PATCH 06/38] Fixed image dnd --- src/core/layers/icon.layer.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/core/layers/icon.layer.ts b/src/core/layers/icon.layer.ts index f91138b0..e8ca5c35 100644 --- a/src/core/layers/icon.layer.ts +++ b/src/core/layers/icon.layer.ts @@ -39,13 +39,15 @@ export class IconLayer extends AbstractImageLayer { setValue: (v: HTMLImageElement) => { this.imageName = v.dataset.name; const [w, h] = [Number(v.dataset.w), Number(v.dataset.h)]; + if (w && h) { + this.size = new Point(w, h); + } const buf = document.createElement('canvas'); const ctx = buf.getContext('2d'); - buf.width = w; - buf.height = h; + buf.width = this.size.x; + buf.height = this.size.y; ctx.drawImage(v, 0, 0); - this.data = addAlphaChannelToImageData(ctx.getImageData(0, 0, w, h), this.color); - this.size = new Point(w, h); + this.data = addAlphaChannelToImageData(ctx.getImageData(0, 0, this.size.x, this.size.y), this.color); this.updateBounds(); this.applyColor(); this.draw(); From 2cf5634323bed0da52faded54f5f4e7d2213f821 Mon Sep 17 00:00:00 2001 From: deadlink Date: Thu, 18 Apr 2024 20:45:31 +0400 Subject: [PATCH 07/38] Fixed rectangle resizing --- src/core/layers/rectangle.layer.ts | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/core/layers/rectangle.layer.ts b/src/core/layers/rectangle.layer.ts index 2776017f..f83e52b0 100644 --- a/src/core/layers/rectangle.layer.ts +++ b/src/core/layers/rectangle.layer.ts @@ -26,7 +26,6 @@ export class RectangleLayer extends AbstractLayer { getValue: () => this.position.x, setValue: (v: number) => { this.position.x = v; - this.updateBounds(); this.draw(); }, @@ -44,7 +43,7 @@ export class RectangleLayer extends AbstractLayer { w: { getValue: () => this.size.x, setValue: (v: number) => { - this.size.x = v; + this.size.x = Math.max(v, 1); this.updateBounds(); this.draw(); }, @@ -53,7 +52,7 @@ export class RectangleLayer extends AbstractLayer { h: { getValue: () => this.size.y, setValue: (v: number) => { - this.size.y = v; + this.size.y = Math.max(v, 1); this.updateBounds(); this.draw(); }, @@ -106,7 +105,9 @@ export class RectangleLayer extends AbstractLayer { ), move: (offset: Point): void => { this.position = this.editState.position.clone().subtract(0, offset.y); - this.size = new Point(this.editState.size.x - offset.x, this.editState.size.y + offset.y); + this.size = new Point(this.editState.size.x - offset.x, this.editState.size.y + offset.y).max( + new Point(1) + ); } }, { @@ -117,7 +118,10 @@ export class RectangleLayer extends AbstractLayer { new Point(3) ).subtract(1.5, 1.5, 0, 0), move: (offset: Point): void => { - this.size = this.editState.size.clone().subtract(offset); + this.size = this.editState.size + .clone() + .subtract(offset) + .max(new Point(this.radius * 2)); } }, { @@ -131,7 +135,10 @@ export class RectangleLayer extends AbstractLayer { ), move: (offset: Point): void => { this.position = this.editState.position.clone().subtract(offset.x, 0); - this.size = this.editState.size.clone().add(offset.x, -offset.y); + this.size = this.editState.size + .clone() + .add(offset.x, -offset.y) + .max(new Point(this.radius * 2)); } }, { @@ -140,7 +147,10 @@ export class RectangleLayer extends AbstractLayer { new Rect(new Point(this.bounds.x, this.bounds.y), new Point(3)).subtract(1.5, 1.5, 0, 0), move: (offset: Point): void => { this.position = this.editState.position.clone().subtract(offset); - this.size = this.editState.size.clone().add(offset); + this.size = this.editState.size + .clone() + .add(offset) + .max(new Point(this.radius * 2)); } } ]; From dff6a38809b94b8676550eaf459156008a74ea63 Mon Sep 17 00:00:00 2001 From: Mikahil Ilin Date: Thu, 18 Apr 2024 20:37:32 +0100 Subject: [PATCH 08/38] Add TFT_eSPI platform, minor fix for adafruit code template --- src/core/platforms.ts | 4 +- src/core/session.ts | 2 - src/editor/tools/circle.tool.ts | 3 +- src/editor/tools/ellipse.tool.ts | 3 +- .../__snapshots__/tft-espi.test.ts.snap | 21 ++++++ src/platforms/templates/adafruit/default.pug | 12 +-- src/platforms/templates/adafruit/inkplate.pug | 12 +-- src/platforms/templates/tft-espi/default.pug | 55 ++++++++++++++ src/platforms/tft-espi.test.ts | 10 +++ src/platforms/tft-espi.ts | 73 +++++++++++++++++++ 10 files changed, 178 insertions(+), 17 deletions(-) create mode 100644 src/platforms/__snapshots__/tft-espi.test.ts.snap create mode 100644 src/platforms/templates/tft-espi/default.pug create mode 100644 src/platforms/tft-espi.test.ts create mode 100644 src/platforms/tft-espi.ts diff --git a/src/core/platforms.ts b/src/core/platforms.ts index 1a864981..4239fe53 100644 --- a/src/core/platforms.ts +++ b/src/core/platforms.ts @@ -2,6 +2,7 @@ import {AdafruitPlatform} from '../platforms/adafruit'; import {AdafruitMonochromePlatform} from '../platforms/adafruit_mono'; import {FlipperPlatform} from '../platforms/flipper'; import {InkplatePlatform} from '../platforms/inkplate'; +import { TFTeSPIPlatform } from "../platforms/tft-espi"; import {U8g2Platform} from '../platforms/u8g2'; import {Uint32RawPlatform} from '../platforms/uint32-raw'; @@ -9,9 +10,10 @@ const platforms = { [U8g2Platform.id]: new U8g2Platform(), [AdafruitPlatform.id]: new AdafruitPlatform(), [AdafruitMonochromePlatform.id]: new AdafruitMonochromePlatform(), + [TFTeSPIPlatform.id]: new TFTeSPIPlatform(), [Uint32RawPlatform.id]: new Uint32RawPlatform(), [FlipperPlatform.id]: new FlipperPlatform(), - [InkplatePlatform.id]: new InkplatePlatform() + [InkplatePlatform.id]: new InkplatePlatform(), }; export function getTemplates(platform: string): string[] { diff --git a/src/core/session.ts b/src/core/session.ts index 6f1fec44..8bbe64a8 100644 --- a/src/core/session.ts +++ b/src/core/session.ts @@ -320,8 +320,6 @@ export function saveLayers() { } else { localStorage.setItem(`${session.state.platform}_lopaka_layers`, packedSession); } - console.log('Saved session size', packedSession.length, 'bytes'); - console.log('Saved session', packedSession); } export function useSession(id?: string) { diff --git a/src/editor/tools/circle.tool.ts b/src/editor/tools/circle.tool.ts index c02c48be..bfbafa9c 100644 --- a/src/editor/tools/circle.tool.ts +++ b/src/editor/tools/circle.tool.ts @@ -1,5 +1,6 @@ import {AbstractLayer} from '../../core/layers/abstract.layer'; import {CircleLayer} from '../../core/layers/circle.layer'; +import { TFTeSPIPlatform } from "../../platforms/tft-espi"; import {U8g2Platform} from '../../platforms/u8g2'; import {Uint32RawPlatform} from '../../platforms/uint32-raw'; import {AbstractTool} from './abstract.tool'; @@ -13,6 +14,6 @@ export class CircleTool extends AbstractTool { } isSupported(platform: string): boolean { - return platform !== U8g2Platform.id && platform !== Uint32RawPlatform.id; + return ![U8g2Platform.id, Uint32RawPlatform.id, TFTeSPIPlatform.id].includes(platform); } } diff --git a/src/editor/tools/ellipse.tool.ts b/src/editor/tools/ellipse.tool.ts index 73864e2a..6b62b955 100644 --- a/src/editor/tools/ellipse.tool.ts +++ b/src/editor/tools/ellipse.tool.ts @@ -1,5 +1,6 @@ import {AbstractLayer} from '../../core/layers/abstract.layer'; import {EllipseLayer} from '../../core/layers/ellipse.layer'; +import { TFTeSPIPlatform } from "../../platforms/tft-espi"; import {U8g2Platform} from '../../platforms/u8g2'; import {Uint32RawPlatform} from '../../platforms/uint32-raw'; import {AbstractTool} from './abstract.tool'; @@ -13,6 +14,6 @@ export class EllipseTool extends AbstractTool { } isSupported(platform: string): boolean { - return platform === U8g2Platform.id || platform === Uint32RawPlatform.id; + return [U8g2Platform.id, Uint32RawPlatform.id, TFTeSPIPlatform.id].includes(platform); } } diff --git a/src/platforms/__snapshots__/tft-espi.test.ts.snap b/src/platforms/__snapshots__/tft-espi.test.ts.snap new file mode 100644 index 00000000..eadc8bee --- /dev/null +++ b/src/platforms/__snapshots__/tft-espi.test.ts.snap @@ -0,0 +1,21 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`TFT_eSPI platform > generating source code 1`] = ` +"static const unsigned char PROGMEM image_paint_0_bits[] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; +@veqtjp8jf9ln6isyfz;tft.fillRect(107, 46, 18, 15, 0xF800); +@utlxpqvhdxnln6it5pw;tft.fillRect(97, 2, 27, 11, 0x7E0); +@eu6bpe0xpvvln6itc2e;tft.fillRect(106, 19, 19, 18, 0x1F); +tft.setTextColor(0x0); +@s3m4u762qpln6jvm90;tft.drawString(\\"Text\\", 3, 10); +@b11j6xs5t46ln6jw96h;tft.drawLine(2, 16, 68, 16, 0xFFFF); +@6n8rac0nxpcln6jwdwr;tft.drawPixel(62, 4, 0x0); +@ema2hee85mln6jweht;tft.drawPixel(67, 8, 0x0); +@j1ol1lo5nkln6jwfmg;tft.drawPixel(72, 12, 0x0); +@6uf3k6wj82ln6jwi73;tft.drawCircle(20, 41, 12, 0x1F); +@87y8hf8sh8dhf8d98sd;tft.fillEllipse(@x:21, @y:37, @rx:13, @ry:8, 0x1F); +@aibkefmz3cln6jwlit;tft.fillCircle(17, 43, 3, 0xF800); +@g7pk1wfbqqkln6jwxby;tft.drawRect(44, 29, 44, 28, 0x7E0); +@u9uidj9d90fu9sj9jj9;tft.drawEllipse(@x:15, @y:36, @rx:7, @ry:7, 0x1F); +@rrsjcz4oz2ln6jx4y4;tft.drawBitmap(0, 0, image_paint_0_bits, 128, 64, 0xF800); +" +`; diff --git a/src/platforms/templates/adafruit/default.pug b/src/platforms/templates/adafruit/default.pug index ae9ce604..c3008c04 100644 --- a/src/platforms/templates/adafruit/default.pug +++ b/src/platforms/templates/adafruit/default.pug @@ -8,8 +8,8 @@ each decl in declarations if settings.wrap | void draw(void) { | -- var textColor = '' -- var textSize = '' +- var textColor = '#ffffff' +- var textSize = '1' - var textWrap = true - var pad = settings.wrap ? ' ' : '' each layer in layers @@ -33,10 +33,10 @@ each layer in layers - textSize = layer.scaleFactor | !{pad}display.setTextSize(!{layer.scaleFactor}); | - if layer.wrap != textWrap - - textWrap = layer.wrap - | !{pad}display.setTextWrap(false); - | + //- if layer.wrap != textWrap + //- - textWrap = layer.wrap + //- | !{pad}display.setTextWrap(false); + //- | | !{pad}display.setCursor(!{layer.position[0]}, !{layer.position[1] - layer.bounds[3]}); | @!{layer.uid};!{pad}display.print("!{layer.text}"); when 'paint' diff --git a/src/platforms/templates/adafruit/inkplate.pug b/src/platforms/templates/adafruit/inkplate.pug index ae9ce604..7f3a63cb 100644 --- a/src/platforms/templates/adafruit/inkplate.pug +++ b/src/platforms/templates/adafruit/inkplate.pug @@ -8,8 +8,8 @@ each decl in declarations if settings.wrap | void draw(void) { | -- var textColor = '' -- var textSize = '' +- var textColor = '#000000' +- var textSize = '1' - var textWrap = true - var pad = settings.wrap ? ' ' : '' each layer in layers @@ -33,10 +33,10 @@ each layer in layers - textSize = layer.scaleFactor | !{pad}display.setTextSize(!{layer.scaleFactor}); | - if layer.wrap != textWrap - - textWrap = layer.wrap - | !{pad}display.setTextWrap(false); - | + //- if layer.wrap != textWrap + //- - textWrap = layer.wrap + //- | !{pad}display.setTextWrap(false); + //- | | !{pad}display.setCursor(!{layer.position[0]}, !{layer.position[1] - layer.bounds[3]}); | @!{layer.uid};!{pad}display.print("!{layer.text}"); when 'paint' diff --git a/src/platforms/templates/tft-espi/default.pug b/src/platforms/templates/tft-espi/default.pug new file mode 100644 index 00000000..3c70e17d --- /dev/null +++ b/src/platforms/templates/tft-espi/default.pug @@ -0,0 +1,55 @@ +each decl in declarations + if decl.type == 'bitmap' + | static const unsigned char PROGMEM !{decl.data.name}[] = {!{decl.data.value}}; + | + else + | !{decl} + | +if settings.wrap + | void draw(void) { + | +- var textColor = '#ffffff' +- var textSize = '1' +- var textWrap = true +- var pad = settings.wrap ? ' ' : '' +each layer in layers + case layer.type + when 'dot' + | @!{layer.uid};!{pad}tft.drawPixel(!{layer.position[0]}, !{layer.position[1]}, !{packColor(layer.color)}); + when 'line' + | @!{layer.uid};!{pad}tft.drawLine(!{layer.p1[0]}, !{layer.p1[1]}, !{layer.p2[0]}, !{layer.p2[1]}, !{packColor(layer.color)}); + when 'rect' + - var func = layer.fill ? 'fillRect' : 'drawRect' + | @!{layer.uid};!{pad}tft.!{func}(!{layer.position[0]}, !{layer.position[1]}, !{layer.size[0]}, !{layer.size[1]}, !{packColor(layer.color)}); + when 'circle' + - var func = layer.fill ? 'fillCircle' : 'drawCircle' + | @!{layer.uid};!{pad}tft.!{func}(!{layer.position[0] + layer.radius}, !{layer.position[1] + layer.radius}, !{layer.radius}, !{packColor(layer.color)}); + when 'ellipse' + - var func = layer.fill ? 'fillEllipse' : 'drawEllipse' + | @!{layer.uid};!{pad}tft.!{func}(@x:!{layer.position[0] + layer.rx}, @y:!{layer.position[1] + layer.ry}, @rx:!{layer.rx}, @ry:!{layer.ry}, !{packColor(layer.color)}); + when 'string' + if layer.color != textColor + - textColor = layer.color + | !{pad}tft.setTextColor(!{packColor(layer.color)}); + | + if layer.scaleFactor != textSize + - textSize = layer.scaleFactor + | !{pad}tft.setTextSize(!{layer.scaleFactor}); + | + //- if layer.wrap != textWrap + //- - textWrap = layer.wrap + //- | !{pad}tft.setTextWrap(false); + //- | + | @!{layer.uid};!{pad}tft.drawString("!{layer.text}", !{layer.position[0]}, !{layer.position[1] - layer.bounds[3]}); + when 'paint' + when 'icon' + | @!{layer.uid};!{pad}tft.drawBitmap(!{layer.position[0]}, !{layer.position[1]}, !{layer.imageName}, !{layer.size[0]}, !{layer.size[1]}, !{packColor(layer.color)}); + default + | + | // Unknown layer type !{layer.type} + | + | + | +if settings.wrap + | } + | \ No newline at end of file diff --git a/src/platforms/tft-espi.test.ts b/src/platforms/tft-espi.test.ts new file mode 100644 index 00000000..397db000 --- /dev/null +++ b/src/platforms/tft-espi.test.ts @@ -0,0 +1,10 @@ +import {describe, expect, it} from 'vitest'; +import {layersMock} from './layers.mock'; +import { TFTeSPIPlatform } from "./tft-espi"; + +describe('TFT_eSPI platform', () => { + it('generating source code', () => { + const platform = new TFTeSPIPlatform(); + expect(platform.generateSourceCode(layersMock)).toMatchSnapshot(); + }); +}); diff --git a/src/platforms/tft-espi.ts b/src/platforms/tft-espi.ts new file mode 100644 index 00000000..83ec225b --- /dev/null +++ b/src/platforms/tft-espi.ts @@ -0,0 +1,73 @@ +import { getLayerProperties } from "../core/decorators/mapping"; +import {AbstractImageLayer} from '../core/layers/abstract-image.layer'; +import {AbstractLayer} from '../core/layers/abstract.layer'; +import {fontTypes} from '../draw/fonts/fontTypes'; +import {imgDataToXBMP, packedHexColor565, toCppVariableName} from '../utils'; +import {Platform} from './platform'; +import defaultTemplate from './templates/tft-espi/default.pug'; + +export class TFTeSPIPlatform extends Platform { + public static id = 'tft-espi'; + protected name = 'TFT_eSPI'; + protected description = 'TFT_eSPI'; + protected fonts: TPlatformFont[] = [fontTypes['adafruit']]; + + constructor() { + super(); + this.features.hasCustomFontSize = true; + this.features.hasRGBSupport = true; + this.features.defaultColor = '#FFFFFF'; + } + + protected templates = { + Default: { + template: defaultTemplate, + settings: { + wrap: false + } + } + }; + + generateSourceCode(layers: AbstractLayer[], ctx?: OffscreenCanvasRenderingContext2D): string { + const declarations: {type: string; data: any}[] = []; + const xbmps = []; + const xbmpsNames = []; + const layerData = layers + .sort((a: AbstractLayer, b: AbstractLayer) => a.index - b.index) + .map((layer) => { + const props = getLayerProperties(layer); + if (layer instanceof AbstractImageLayer) { + const XBMP = imgDataToXBMP(layer.data, 0, 0, layer.size.x, layer.size.y, true).join(','); + if (xbmps.includes(XBMP)) { + props.imageName = xbmpsNames[xbmps.indexOf(XBMP)]; + } else { + const name = layer.imageName ? toCppVariableName(layer.imageName) : 'paint'; + const nameRegexp = new RegExp(`${name}_?\d*`); + const countWithSameName = xbmpsNames.filter((n) => nameRegexp.test(n)).length; + const varName = `image_${name + (countWithSameName || name == 'paint' ? `_${countWithSameName}` : '')}_bits`; + declarations.push({ + type: 'bitmap', + data: { + name: varName, + value: XBMP + } + }); + xbmps.push(XBMP); + xbmpsNames.push(varName); + props.imageName = varName; + } + } + return props; + }); + const source = this.templates[this.currentTemplate].template({ + declarations, + layers: layerData, + settings: Object.assign({}, this.settings, this.templates[this.currentTemplate].settings), + packColor: (color) => this.packColor(color) + }); + return source; + } + protected packColor(color: string): string { + return packedHexColor565(color); + } +} From 5c705096a2429a0bb9cc60ecff1d52677c3ddf9b Mon Sep 17 00:00:00 2001 From: Mikahil Ilin Date: Thu, 18 Apr 2024 20:45:08 +0100 Subject: [PATCH 09/38] Update snapshots --- src/platforms/__snapshots__/adafruit.test.ts.snap | 2 -- src/platforms/__snapshots__/adafruit_mono.test.ts.snap | 2 -- src/platforms/__snapshots__/inkplate.test.ts.snap | 3 --- 3 files changed, 7 deletions(-) diff --git a/src/platforms/__snapshots__/adafruit.test.ts.snap b/src/platforms/__snapshots__/adafruit.test.ts.snap index 3a5f2a46..7dcd1a26 100644 --- a/src/platforms/__snapshots__/adafruit.test.ts.snap +++ b/src/platforms/__snapshots__/adafruit.test.ts.snap @@ -6,8 +6,6 @@ exports[`Adafruit platform > generating source code 1`] = ` @utlxpqvhdxnln6it5pw;display.fillRect(97, 2, 27, 11, 0x7E0); @eu6bpe0xpvvln6itc2e;display.fillRect(106, 19, 19, 18, 0x1F); display.setTextColor(0x0); -display.setTextSize(1); -display.setTextWrap(false); display.setCursor(3, 10); @s3m4u762qpln6jvm90;display.print(\\"Text\\"); @b11j6xs5t46ln6jw96h;display.drawLine(2, 16, 68, 16, 0xFFFF); diff --git a/src/platforms/__snapshots__/adafruit_mono.test.ts.snap b/src/platforms/__snapshots__/adafruit_mono.test.ts.snap index b9a3aac0..25d7d2bc 100644 --- a/src/platforms/__snapshots__/adafruit_mono.test.ts.snap +++ b/src/platforms/__snapshots__/adafruit_mono.test.ts.snap @@ -6,8 +6,6 @@ exports[`Adafruit monochrome platform > generating source code 1`] = ` @utlxpqvhdxnln6it5pw;display.fillRect(97, 2, 27, 11, 1); @eu6bpe0xpvvln6itc2e;display.fillRect(106, 19, 19, 18, 1); display.setTextColor(1); -display.setTextSize(1); -display.setTextWrap(false); display.setCursor(3, 10); @s3m4u762qpln6jvm90;display.print(\\"Text\\"); @b11j6xs5t46ln6jw96h;display.drawLine(2, 16, 68, 16, 1); diff --git a/src/platforms/__snapshots__/inkplate.test.ts.snap b/src/platforms/__snapshots__/inkplate.test.ts.snap index 5d6f5b6c..eeba2c58 100644 --- a/src/platforms/__snapshots__/inkplate.test.ts.snap +++ b/src/platforms/__snapshots__/inkplate.test.ts.snap @@ -5,9 +5,6 @@ exports[`Inkplate platform > generating source code 1`] = ` @veqtjp8jf9ln6isyfz;display.fillRect(107, 46, 18, 15, 0); @utlxpqvhdxnln6it5pw;display.fillRect(97, 2, 27, 11, 0); @eu6bpe0xpvvln6itc2e;display.fillRect(106, 19, 19, 18, 0); -display.setTextColor(0); -display.setTextSize(1); -display.setTextWrap(false); display.setCursor(3, 10); @s3m4u762qpln6jvm90;display.print(\\"Text\\"); @b11j6xs5t46ln6jw96h;display.drawLine(2, 16, 68, 16, 0); From 7c970065811a3dfc7591d228df80e9aeb5ef31f4 Mon Sep 17 00:00:00 2001 From: deadlink Date: Fri, 19 Apr 2024 03:34:59 +0400 Subject: [PATCH 10/38] Fix radius limit --- src/core/layers/rectangle.layer.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/core/layers/rectangle.layer.ts b/src/core/layers/rectangle.layer.ts index f83e52b0..0bb8e127 100644 --- a/src/core/layers/rectangle.layer.ts +++ b/src/core/layers/rectangle.layer.ts @@ -43,7 +43,7 @@ export class RectangleLayer extends AbstractLayer { w: { getValue: () => this.size.x, setValue: (v: number) => { - this.size.x = Math.max(v, 1); + this.size.x = Math.max(v, this.radius * 2 + 2); this.updateBounds(); this.draw(); }, @@ -52,7 +52,7 @@ export class RectangleLayer extends AbstractLayer { h: { getValue: () => this.size.y, setValue: (v: number) => { - this.size.y = Math.max(v, 1); + this.size.y = Math.max(v, this.radius * 2 + 2); this.updateBounds(); this.draw(); }, @@ -61,7 +61,10 @@ export class RectangleLayer extends AbstractLayer { radius: { getValue: () => this.radius, setValue: (v: number) => { - this.radius = Math.max(0, Math.min(v, Math.round(this.size.x / 2), Math.round(this.size.y / 2))); + this.radius = Math.max( + 0, + Math.min(v, Math.round(this.size.x / 2 - 1), Math.round(this.size.y / 2 - 1)) + ); this.draw(); }, type: TModifierType.number @@ -121,7 +124,7 @@ export class RectangleLayer extends AbstractLayer { this.size = this.editState.size .clone() .subtract(offset) - .max(new Point(this.radius * 2)); + .max(new Point(this.radius * 2 + 2)); } }, { @@ -138,7 +141,7 @@ export class RectangleLayer extends AbstractLayer { this.size = this.editState.size .clone() .add(offset.x, -offset.y) - .max(new Point(this.radius * 2)); + .max(new Point(this.radius * 2 + 2)); } }, { @@ -150,7 +153,7 @@ export class RectangleLayer extends AbstractLayer { this.size = this.editState.size .clone() .add(offset) - .max(new Point(this.radius * 2)); + .max(new Point(this.radius * 2 + 2)); } } ]; From 2e9e1cd45b80ae25d0b87ac9cdbd62ebf3b1b18a Mon Sep 17 00:00:00 2001 From: deadlink Date: Mon, 6 May 2024 06:53:06 +0900 Subject: [PATCH 11/38] Fixed edititng rounded rect --- src/core/layers/rectangle.layer.ts | 57 +++++++++++++++++++----------- src/draw/draw-context.ts | 19 +++++----- 2 files changed, 47 insertions(+), 29 deletions(-) diff --git a/src/core/layers/rectangle.layer.ts b/src/core/layers/rectangle.layer.ts index 0bb8e127..22d8e334 100644 --- a/src/core/layers/rectangle.layer.ts +++ b/src/core/layers/rectangle.layer.ts @@ -21,6 +21,10 @@ export class RectangleLayer extends AbstractLayer { @mapping('f') public fill: boolean = false; + get minLen(): number { + return this.radius * 2 + 2; + } + modifiers: TLayerModifiers = { x: { getValue: () => this.position.x, @@ -43,7 +47,7 @@ export class RectangleLayer extends AbstractLayer { w: { getValue: () => this.size.x, setValue: (v: number) => { - this.size.x = Math.max(v, this.radius * 2 + 2); + this.size.x = Math.max(v, this.minLen); this.updateBounds(); this.draw(); }, @@ -52,7 +56,7 @@ export class RectangleLayer extends AbstractLayer { h: { getValue: () => this.size.y, setValue: (v: number) => { - this.size.y = Math.max(v, this.radius * 2 + 2); + this.size.y = Math.max(v, this.minLen); this.updateBounds(); this.draw(); }, @@ -107,10 +111,16 @@ export class RectangleLayer extends AbstractLayer { 0 ), move: (offset: Point): void => { - this.position = this.editState.position.clone().subtract(0, offset.y); - this.size = new Point(this.editState.size.x - offset.x, this.editState.size.y + offset.y).max( - new Point(1) - ); + const size = new Point(this.editState.size.x - offset.x, this.editState.size.y + offset.y); + const position = this.editState.position.clone().subtract(0, offset.y); + if (size.x != this.size.x && size.x >= this.minLen) { + this.position.x = position.x; + this.size.x = size.x; + } + if (size.y != this.size.y && size.y >= this.minLen) { + this.position.y = position.y; + this.size.y = size.y; + } } }, { @@ -121,10 +131,7 @@ export class RectangleLayer extends AbstractLayer { new Point(3) ).subtract(1.5, 1.5, 0, 0), move: (offset: Point): void => { - this.size = this.editState.size - .clone() - .subtract(offset) - .max(new Point(this.radius * 2 + 2)); + this.size = this.editState.size.clone().subtract(offset).max(new Point(this.minLen)); } }, { @@ -137,11 +144,16 @@ export class RectangleLayer extends AbstractLayer { 0 ), move: (offset: Point): void => { - this.position = this.editState.position.clone().subtract(offset.x, 0); - this.size = this.editState.size - .clone() - .add(offset.x, -offset.y) - .max(new Point(this.radius * 2 + 2)); + const position = this.editState.position.clone().subtract(offset.x, 0); + const size = this.editState.size.clone().add(offset.x, -offset.y); + if (size.x != this.size.x && size.x >= this.minLen) { + this.position.x = position.x; + this.size.x = size.x; + } + if (size.y != this.size.y && size.y >= this.minLen) { + this.position.y = position.y; + this.size.y = size.y; + } } }, { @@ -149,11 +161,16 @@ export class RectangleLayer extends AbstractLayer { getRect: (): Rect => new Rect(new Point(this.bounds.x, this.bounds.y), new Point(3)).subtract(1.5, 1.5, 0, 0), move: (offset: Point): void => { - this.position = this.editState.position.clone().subtract(offset); - this.size = this.editState.size - .clone() - .add(offset) - .max(new Point(this.radius * 2 + 2)); + const position = this.editState.position.clone().subtract(offset); + const size = this.editState.size.clone().add(offset); + if (size.x != this.size.x && size.x >= this.minLen) { + this.position.x = position.x; + this.size.x = size.x; + } + if (size.y != this.size.y && size.y >= this.minLen) { + this.size.y = size.y; + this.position.y = position.y; + } } } ]; diff --git a/src/draw/draw-context.ts b/src/draw/draw-context.ts index 0ae953c6..33a07169 100644 --- a/src/draw/draw-context.ts +++ b/src/draw/draw-context.ts @@ -129,7 +129,6 @@ export class DrawContext { pixelateRectCorner(point: Point, radius: number, quadrant: number, fill: boolean): DrawContext { const signs = new Point(quadrant == 0 || quadrant == 3 ? 1 : -1, quadrant == 0 || quadrant == 1 ? 1 : -1); const center = point.clone().add(new Point(radius).multiply(signs)); - this.ctx.beginPath(); for (let x = 0; x < radius; x++) { let y = Math.sqrt(radius * radius - x * x); let p = center.clone().subtract(new Point(x, y).multiply(signs)).round(); @@ -138,13 +137,11 @@ export class DrawContext { p = center.clone().subtract(new Point(y, x).multiply(signs)).round(); this.ctx.rect(p.x, p.y, 1, 1); } - this.ctx.fill(); return this; } pixelateRoundedRect(position: Point, size: Point, radius: number, fill: boolean): DrawContext { this.ctx.beginPath(); - this.ctx.rect(position.x + radius, position.y, size.x - 2 * radius, 1); this.ctx.rect(position.x + radius, position.y + size.y - 1, size.x - 2 * radius, 1); this.ctx.rect(position.x, position.y + radius, 1, size.y - 2 * radius); @@ -153,17 +150,21 @@ export class DrawContext { this.ctx.fillRect(position.x + radius, position.y, size.x - 2 * radius, size.y); this.ctx.fillRect(position.x, position.y + radius, size.x, size.y - 2 * radius); } - this.ctx.fill(); this.pixelateRectCorner(position, radius + 1, 0, fill); this.pixelateRectCorner(new Point(position.x + size.x - 1, position.y), radius + 1, 1, fill); this.pixelateRectCorner(new Point(position.x + size.x - 1, position.y + size.y - 1), radius + 1, 2, fill); this.pixelateRectCorner(new Point(position.x, position.y + size.y - 1), radius + 1, 3, fill); - this.ctx.save(); - this.ctx.fillStyle = 'rgba(0,0,0,0)'; - this.ctx.beginPath(); - this.ctx.rect(position.x, position.y, size.x, size.y); this.ctx.fill(); - this.ctx.restore(); + if (fill) { + this.ctx.save(); + this.ctx.fillStyle = 'rgba(0,0,0,0)'; + this.ctx.beginPath(); + this.ctx.arc(position.x + radius, position.y + radius, radius, Math.PI, 1.5 * Math.PI); + this.ctx.arc(position.x + size.x - radius, position.y + radius, radius, 1.5 * Math.PI, 2 * Math.PI); + this.ctx.arc(position.x + size.x - radius, position.y + size.y - radius, radius, 0, 0.5 * Math.PI); + this.ctx.arc(position.x + radius, position.y + size.y - radius, radius, 0.5 * Math.PI, Math.PI); + this.ctx.fill(); + } return this; } From aa84695e25342f26da9967e6d75d34a38b4ac166 Mon Sep 17 00:00:00 2001 From: deadlink Date: Mon, 6 May 2024 07:14:45 +0900 Subject: [PATCH 12/38] TFT espi support --- src/platforms/templates/tft-espi/default.pug | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platforms/templates/tft-espi/default.pug b/src/platforms/templates/tft-espi/default.pug index 3c70e17d..dec81709 100644 --- a/src/platforms/templates/tft-espi/default.pug +++ b/src/platforms/templates/tft-espi/default.pug @@ -19,8 +19,8 @@ each layer in layers when 'line' | @!{layer.uid};!{pad}tft.drawLine(!{layer.p1[0]}, !{layer.p1[1]}, !{layer.p2[0]}, !{layer.p2[1]}, !{packColor(layer.color)}); when 'rect' - - var func = layer.fill ? 'fillRect' : 'drawRect' - | @!{layer.uid};!{pad}tft.!{func}(!{layer.position[0]}, !{layer.position[1]}, !{layer.size[0]}, !{layer.size[1]}, !{packColor(layer.color)}); + - var func = (layer.fill ? 'fill' : 'draw') + (layer.radius? 'Round' : '') + 'Rect' + | @!{layer.uid};!{pad}tft.!{func}(!{layer.position[0]}, !{layer.position[1]}, !{layer.size[0]}, !{layer.size[1]}!{layer.radius? `, ${layer.radius}`: ''}, !{packColor(layer.color)}); when 'circle' - var func = layer.fill ? 'fillCircle' : 'drawCircle' | @!{layer.uid};!{pad}tft.!{func}(!{layer.position[0] + layer.radius}, !{layer.position[1] + layer.radius}, !{layer.radius}, !{packColor(layer.color)}); From 407854e25aeaed2176c65869d5fd2fee4ea8f90f Mon Sep 17 00:00:00 2001 From: deadlink Date: Mon, 6 May 2024 07:15:26 +0900 Subject: [PATCH 13/38] Snapshot update --- src/platforms/__snapshots__/tft-espi.test.ts.snap | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/platforms/__snapshots__/tft-espi.test.ts.snap b/src/platforms/__snapshots__/tft-espi.test.ts.snap index eadc8bee..4f4e8130 100644 --- a/src/platforms/__snapshots__/tft-espi.test.ts.snap +++ b/src/platforms/__snapshots__/tft-espi.test.ts.snap @@ -17,5 +17,7 @@ tft.setTextColor(0x0); @g7pk1wfbqqkln6jwxby;tft.drawRect(44, 29, 44, 28, 0x7E0); @u9uidj9d90fu9sj9jj9;tft.drawEllipse(@x:15, @y:36, @rx:7, @ry:7, 0x1F); @rrsjcz4oz2ln6jx4y4;tft.drawBitmap(0, 0, image_paint_0_bits, 128, 64, 0xF800); +@njsoidnfijoinisn;tft.fillRoundRect(10, 4, 12, 19, 3, 0x7E0); +@jnijisniijaojosd;tft.drawRoundRect(45, 20, 14, 12, 5, 0x7E0); " `; From bc65227000dd73fe2a4686907adc2a572df62816 Mon Sep 17 00:00:00 2001 From: deadlink Date: Tue, 21 May 2024 21:23:32 +0400 Subject: [PATCH 14/38] tailwind + daisyui --- package.json | 4 + postcss.config.cjs | 6 + styles.css | 7 +- tailwind.config.js | 42 ++++ vite.config.ts | 5 - yarn.lock | 580 ++++++++++++++++++++++++++++++++++++++++++++- 6 files changed, 629 insertions(+), 15 deletions(-) create mode 100644 postcss.config.cjs create mode 100644 tailwind.config.js diff --git a/package.json b/package.json index db0b3eec..21d1970e 100644 --- a/package.json +++ b/package.json @@ -32,14 +32,18 @@ }, "homepage": "https://github.com/sbrin/lopaka#readme", "devDependencies": { + "@tailwindcss/typography": "^0.5.13", "@vitejs/plugin-basic-ssl": "^1.0.1", "@vitejs/plugin-vue": "^4.3.4", "@vitest/coverage-v8": "^0.34.4", "@vitest/ui": "^0.34.4", "@vue/test-utils": "^2.4.1", + "autoprefixer": "^10.4.19", + "daisyui": "^4.11.1", "jsdom": "^22.1.0", "prettier": "^3.0.3", "probe-image-size": "^7.2.3", + "tailwindcss": "^3.4.3", "vite": "^4.4.9", "vitest": "^0.34.5" }, diff --git a/postcss.config.cjs b/postcss.config.cjs new file mode 100644 index 00000000..fe66dd61 --- /dev/null +++ b/postcss.config.cjs @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {} + } +}; diff --git a/styles.css b/styles.css index 394b1704..4ed78811 100644 --- a/styles.css +++ b/styles.css @@ -5,6 +5,11 @@ font-style: normal; } +@tailwind base; +@tailwind components; +@tailwind utilities; +@tailwind variants; + :root { --primary-color: #ff8200; --secondary-color: #441f07; @@ -33,7 +38,6 @@ body { visibility: hidden; } - #lopaka_app { display: flex; } @@ -44,7 +48,6 @@ body { align-items: center; } - .title { margin: 0 0 8px 0; font-size: 32px; diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 00000000..99b9fd05 --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,42 @@ +const daisyui = require('daisyui'); +const typography = require('@tailwindcss/typography'); +// const tailwind_theme = require('tailwindcss/defaultTheme'); + +module.exports = { + content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'], + darkMode: 'class', // or 'media' or 'class' + theme: { + extend: {} + }, + variants: { + extend: {} + }, + plugins: [typography, daisyui], + corePlugins: { + preflight: false + }, + daisyui: { + darkTheme: 'dark', // name of one of the included themes for dark mode + base: true, // applies background color and foreground color for root element by default + styled: true, // include daisyUI colors and design decisions for all components + utils: true, // adds responsive and modifier utility classes + prefix: '', // prefix for daisyUI classnames (components, modifiers and responsive class names. Not colors) + logs: true, // Shows info about daisyUI version and used config in the console when building your CSS + themeRoot: ':root', + themes: [ + { + lopaka: { + primary: '#d97706', + secondary: '#7dd3fc', + accent: '#047857', + neutral: '#1f2937', + 'base-100': '#111827', + info: '#00c9ff', + success: '#a0d100', + warning: '#f59e0b', + error: '#dc2626' + } + } + ] + } +}; diff --git a/vite.config.ts b/vite.config.ts index 46d71c09..e96021e3 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -19,11 +19,6 @@ export default defineConfig({ } } }, - resolve: { - alias: { - vue: 'vue/dist/vue.esm-bundler.js' - } - }, build: { assetsInlineLimit: 0, sourcemap: true, diff --git a/yarn.lock b/yarn.lock index e79d099d..3cd13bf8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,11 @@ # yarn lockfile v1 +"@alloc/quick-lru@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@alloc/quick-lru/-/quick-lru-5.2.0.tgz#7bf68b20c0a350f936915fcae06f58e32007ce30" + integrity sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw== + "@ampproject/remapping@^2.2.1": version "2.2.1" resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630" @@ -297,6 +302,15 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.9" +"@jridgewell/gen-mapping@^0.3.2": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" + integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== + dependencies: + "@jridgewell/set-array" "^1.2.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.24" + "@jridgewell/resolve-uri@^3.1.0": version "3.1.2" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" @@ -307,6 +321,11 @@ resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== +"@jridgewell/set-array@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" + integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== + "@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.4.15": version "1.4.15" resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" @@ -320,6 +339,14 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@jridgewell/trace-mapping@^0.3.24": + version "0.3.25" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" + integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -426,6 +453,16 @@ resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== +"@tailwindcss/typography@^0.5.13": + version "0.5.13" + resolved "https://registry.yarnpkg.com/@tailwindcss/typography/-/typography-0.5.13.tgz#cd788a4fa4d0ca2506e242d512f377b22c1f7932" + integrity sha512-ADGcJ8dX21dVVHIwTRgzrcunY6YY9uSlAHHGVKvkA+vLc5qLwEszvKts40lx7z0qc4clpjclwLeK5rVCV2P/uw== + dependencies: + lodash.castarray "^4.4.0" + lodash.isplainobject "^4.0.6" + lodash.merge "^4.6.2" + postcss-selector-parser "6.0.10" + "@tootallnate/once@2": version "2.0.0" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" @@ -708,6 +745,24 @@ ansi-styles@^6.1.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== +any-promise@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" + integrity sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A== + +anymatch@~3.1.2: + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +arg@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.2.tgz#c81433cc427c92c4dcf4865142dbca6f15acd59c" + integrity sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg== + asap@~2.0.3: version "2.0.6" resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" @@ -728,6 +783,18 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== +autoprefixer@^10.4.19: + version "10.4.19" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.19.tgz#ad25a856e82ee9d7898c59583c1afeb3fa65f89f" + integrity sha512-BaENR2+zBZ8xXhM4pUaKUxlVdxZ0EZhjvbopwnXmxRUfqDmwSpC2lAi/QXvx7NRdPCo1WKEcEF6mV64si1z4Ew== + dependencies: + browserslist "^4.23.0" + caniuse-lite "^1.0.30001599" + fraction.js "^4.3.7" + normalize-range "^0.1.2" + picocolors "^1.0.0" + postcss-value-parser "^4.2.0" + babel-walk@3.0.0-canary-5: version "3.0.0-canary-5" resolved "https://registry.yarnpkg.com/babel-walk/-/babel-walk-3.0.0-canary-5.tgz#f66ecd7298357aee44955f235a6ef54219104b11" @@ -745,6 +812,11 @@ base64-arraybuffer@^1.0.2: resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz#1c37589a7c4b0746e34bd1feb951da2df01c1bdc" integrity sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ== +binary-extensions@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522" + integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -767,6 +839,23 @@ braces@^3.0.2: dependencies: fill-range "^7.0.1" +braces@^3.0.3, braces@~3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== + dependencies: + fill-range "^7.1.1" + +browserslist@^4.23.0: + version "4.23.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.0.tgz#8f3acc2bbe73af7213399430890f86c63a5674ab" + integrity sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ== + dependencies: + caniuse-lite "^1.0.30001587" + electron-to-chromium "^1.4.668" + node-releases "^2.0.14" + update-browserslist-db "^1.0.13" + cac@^6.7.14: version "6.7.14" resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.14.tgz#804e1e6f506ee363cb0e3ccbb09cad5dd9870959" @@ -783,6 +872,16 @@ call-bind@^1.0.2: get-intrinsic "^1.2.4" set-function-length "^1.2.1" +camelcase-css@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/camelcase-css/-/camelcase-css-2.0.1.tgz#ee978f6947914cc30c6b44741b6ed1df7f043fd5" + integrity sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA== + +caniuse-lite@^1.0.30001587, caniuse-lite@^1.0.30001599: + version "1.0.30001620" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001620.tgz#78bb6f35b8fe315b96b8590597094145d0b146b4" + integrity sha512-WJvYsOjd1/BYUY6SNGUosK9DUidBPDTnOARHp3fSmFO1ekdxaY6nKRttEVrfMmYi80ctS0kz1wiWmm14fVc3ew== + chai@^4.3.10: version "4.4.1" resolved "https://registry.yarnpkg.com/chai/-/chai-4.4.1.tgz#3603fa6eba35425b0f2ac91a009fe924106e50d1" @@ -810,6 +909,21 @@ check-error@^1.0.3: dependencies: get-func-name "^2.0.2" +chokidar@^3.5.3: + version "3.6.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" + integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + color-convert@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" @@ -834,6 +948,11 @@ commander@^10.0.0: resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== +commander@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" + integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -860,6 +979,13 @@ convert-source-map@^2.0.0: resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== +copy-anything@^2.0.1: + version "2.0.6" + resolved "https://registry.yarnpkg.com/copy-anything/-/copy-anything-2.0.6.tgz#092454ea9584a7b7ad5573062b2a87f5900fc480" + integrity sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw== + dependencies: + is-what "^3.14.1" + cross-spawn@^7.0.0: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" @@ -869,6 +995,19 @@ cross-spawn@^7.0.0: shebang-command "^2.0.0" which "^2.0.1" +css-selector-tokenizer@^0.8: + version "0.8.0" + resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.8.0.tgz#88267ef6238e64f2215ea2764b3e2cf498b845dd" + integrity sha512-Jd6Ig3/pe62/qe5SBPTN8h8LeUg/pT4lLgtavPf7updwwHpvFzxvOQBHYj2LZDMjUnBzgvIUSjRcf6oT5HzHFg== + dependencies: + cssesc "^3.0.0" + fastparse "^1.1.2" + +cssesc@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" + integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== + cssstyle@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-3.0.0.tgz#17ca9c87d26eac764bb8cfd00583cff21ce0277a" @@ -881,6 +1020,21 @@ csstype@^3.1.3: resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81" integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw== +culori@^3: + version "3.3.0" + resolved "https://registry.yarnpkg.com/culori/-/culori-3.3.0.tgz#e33530adbd124d53bd6550394397e695eaaed739" + integrity sha512-pHJg+jbuFsCjz9iclQBqyL3B2HLCBF71BwVNujUYEvCeQMvV97R59MNK3R2+jgJ3a1fcZgI9B3vYgz8lzr/BFQ== + +daisyui@^4.11.1: + version "4.11.1" + resolved "https://registry.yarnpkg.com/daisyui/-/daisyui-4.11.1.tgz#9216de97107bffe2b7c6e4dfa28dbe7147e89e9d" + integrity sha512-obT9CUbQdW6eoHwSeT5VwaRrWlwrM4OT5qlfdJ0oQlSIEYhwnEl2+L2fwu5PioLbitwuMdYC2X8I1cyy8Pf6LQ== + dependencies: + css-selector-tokenizer "^0.8" + culori "^3" + picocolors "^1" + postcss-js "^4" + data-urls@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-4.0.0.tgz#333a454eca6f9a5b7b0f1013ff89074c3f522dd4" @@ -937,11 +1091,21 @@ delayed-stream@~1.0.0: resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== +didyoumean@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.2.tgz#989346ffe9e839b4555ecf5666edea0d3e8ad037" + integrity sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw== + diff-sequences@^29.4.3: version "29.6.3" resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== +dlv@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/dlv/-/dlv-1.1.3.tgz#5c198a8a11453596e751494d49874bc7732f2e79" + integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA== + doctypes@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/doctypes/-/doctypes-1.1.0.tgz#ea80b106a87538774e8a3a4a5afe293de489e0a9" @@ -969,6 +1133,11 @@ editorconfig@^1.0.3: minimatch "9.0.1" semver "^7.5.3" +electron-to-chromium@^1.4.668: + version "1.4.776" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.776.tgz#1580009f42f9f2ffc1b238e3d8d6e6baa7ca1682" + integrity sha512-s694bi3+gUzlliqxjPHpa9NRTlhzTgB34aan+pVKZmOTGy2xoZXl+8E1B8i5p5rtev3PKMK/H4asgNejC+YHNg== + emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" @@ -984,6 +1153,13 @@ entities@^4.4.0, entities@^4.5.0: resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== +errno@^0.1.1: + version "0.1.8" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" + integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== + dependencies: + prr "~1.0.1" + es-define-property@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" @@ -1053,6 +1229,11 @@ esbuild@^0.19.3: "@esbuild/win32-ia32" "0.19.12" "@esbuild/win32-x64" "0.19.12" +escalade@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" + integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== + estree-walker@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" @@ -1069,6 +1250,11 @@ fast-glob@^3.3.0: merge2 "^1.3.0" micromatch "^4.0.4" +fastparse@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.2.tgz#91728c5a5942eced8531283c79441ee4122c35a9" + integrity sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ== + fastq@^1.6.0: version "1.17.1" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.17.1.tgz#2a523f07a4e7b1e81a42b91b8bf2254107753b47" @@ -1088,6 +1274,13 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== + dependencies: + to-regex-range "^5.0.1" + flatted@^3.2.7: version "3.2.9" resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.9.tgz#7eb4c67ca1ba34232ca9d2d93e9886e611ad7daf" @@ -1110,6 +1303,11 @@ form-data@^4.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" +fraction.js@^4.3.7: + version "4.3.7" + resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.3.7.tgz#06ca0085157e42fda7f9e726e79fefc4068840f7" + integrity sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew== + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -1141,13 +1339,31 @@ get-intrinsic@^1.1.3, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4: has-symbols "^1.0.3" hasown "^2.0.0" -glob-parent@^5.1.2: +glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== dependencies: is-glob "^4.0.1" +glob-parent@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + +glob@^10.3.10: + version "10.3.15" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.15.tgz#e72bc61bc3038c90605f5dd48543dc67aaf3b50d" + integrity sha512-0c6RlJt1TICLyvJYIApxb8GsXoai0KUP7AxKKAtsYXdgJR1mGEUa7DgwShbdk1nly0PYoZj01xd4hzbq3fsjpw== + dependencies: + foreground-child "^3.1.0" + jackspeak "^2.3.6" + minimatch "^9.0.1" + minipass "^7.0.4" + path-scurry "^1.11.0" + glob@^10.3.3: version "10.3.10" resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.10.tgz#0351ebb809fd187fe421ab96af83d3a70715df4b" @@ -1178,6 +1394,11 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" +graceful-fs@^4.1.2: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + has-flag@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" @@ -1243,7 +1464,7 @@ https-proxy-agent@^5.0.1: agent-base "6" debug "4" -iconv-lite@0.6.3: +iconv-lite@0.6.3, iconv-lite@^0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== @@ -1257,6 +1478,11 @@ iconv-lite@^0.4.4: dependencies: safer-buffer ">= 2.1.2 < 3" +image-size@~0.5.0: + version "0.5.5" + resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c" + integrity sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ== + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -1275,6 +1501,13 @@ ini@^1.3.4: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + is-core-module@^2.13.0: version "2.13.1" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" @@ -1300,7 +1533,7 @@ is-fullwidth-code-point@^3.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== -is-glob@^4.0.1: +is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== @@ -1330,6 +1563,11 @@ is-regex@^1.0.3: call-bind "^1.0.2" has-tostringtag "^1.0.0" +is-what@^3.14.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/is-what/-/is-what-3.14.1.tgz#e1222f46ddda85dead0fd1c9df131760e77755c1" + integrity sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA== + isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -1366,7 +1604,7 @@ istanbul-reports@^3.1.5: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -jackspeak@^2.3.5: +jackspeak@^2.3.5, jackspeak@^2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.3.6.tgz#647ecc472238aee4b06ac0e461acc21a8c505ca8" integrity sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ== @@ -1375,6 +1613,11 @@ jackspeak@^2.3.5: optionalDependencies: "@pkgjs/parseargs" "^0.11.0" +jiti@^1.21.0: + version "1.21.0" + resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.21.0.tgz#7c97f8fe045724e136a397f7340475244156105d" + integrity sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q== + js-beautify@^1.14.9: version "1.14.11" resolved "https://registry.yarnpkg.com/js-beautify/-/js-beautify-1.14.11.tgz#57b17e009549ac845bdc58eddf8e1862e311314e" @@ -1432,11 +1675,53 @@ jstransformer@1.0.0: is-promise "^2.0.0" promise "^7.0.1" +less@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/less/-/less-4.2.0.tgz#cbefbfaa14a4cd388e2099b2b51f956e1465c450" + integrity sha512-P3b3HJDBtSzsXUl0im2L7gTO5Ubg8mEN6G8qoTS77iXxXX4Hvu4Qj540PZDvQ8V6DmX6iXo98k7Md0Cm1PrLaA== + dependencies: + copy-anything "^2.0.1" + parse-node-version "^1.0.1" + tslib "^2.3.0" + optionalDependencies: + errno "^0.1.1" + graceful-fs "^4.1.2" + image-size "~0.5.0" + make-dir "^2.1.0" + mime "^1.4.1" + needle "^3.1.0" + source-map "~0.6.0" + +lilconfig@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.1.0.tgz#78e23ac89ebb7e1bfbf25b18043de756548e7f52" + integrity sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ== + +lilconfig@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.1.1.tgz#9d8a246fa753106cfc205fd2d77042faca56e5e3" + integrity sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ== + +lines-and-columns@^1.1.6: + version "1.2.4" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" + integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== + local-pkg@^0.4.3: version "0.4.3" resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.4.3.tgz#0ff361ab3ae7f1c19113d9bb97b98b905dbc4963" integrity sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g== +lodash.castarray@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.castarray/-/lodash.castarray-4.4.0.tgz#c02513515e309daddd4c24c60cfddcf5976d9115" + integrity sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q== + +lodash.isplainobject@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA== + lodash.merge@^4.6.2: version "4.6.2" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" @@ -1449,6 +1734,11 @@ loupe@^2.3.6: dependencies: get-func-name "^2.0.1" +lru-cache@^10.2.0: + version "10.2.2" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.2.tgz#48206bc114c1252940c41b25b41af5b545aca878" + integrity sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ== + lru-cache@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" @@ -1468,6 +1758,14 @@ magic-string@^0.30.1, magic-string@^0.30.6: dependencies: "@jridgewell/sourcemap-codec" "^1.4.15" +make-dir@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" + integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== + dependencies: + pify "^4.0.1" + semver "^5.6.0" + make-dir@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" @@ -1488,6 +1786,14 @@ micromatch@^4.0.4: braces "^3.0.2" picomatch "^2.3.1" +micromatch@^4.0.5: + version "4.0.6" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.6.tgz#ab4e37c42726b9cd788181ba4a2a4fead8e394a3" + integrity sha512-Y4Ypn3oujJYxJcMacVgcs92wofTHxp9FzfDpQON4msDefoC0lb3ETvQLOdLcbhSwU1bz8HrL/1sygfBIHudrkQ== + dependencies: + braces "^3.0.3" + picomatch "^4.0.2" + mime-db@1.52.0: version "1.52.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" @@ -1500,6 +1806,11 @@ mime-types@^2.1.12: dependencies: mime-db "1.52.0" +mime@^1.4.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + minimatch@9.0.1: version "9.0.1" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.1.tgz#8a555f541cf976c622daf078bb28f29fb927c253" @@ -1526,6 +1837,11 @@ minimatch@^9.0.1: resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.4.tgz#dbce03740f50a4786ba994c1fb908844d27b038c" integrity sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ== +minipass@^7.0.4: + version "7.1.1" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.1.tgz#f7f85aff59aa22f110b20e27692465cf3bf89481" + integrity sha512-UZ7eQ+h8ywIRAW1hIEl2AqdwzJucU/Kp59+8kkZeSvafXhZjul247BvIJjEVFVeON6d7lM46XX1HXCduKAS8VA== + mlly@^1.2.0, mlly@^1.4.0: version "1.5.0" resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.5.0.tgz#8428a4617d54cc083d3009030ac79739a0e5447a" @@ -1556,6 +1872,15 @@ ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== +mz@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" + integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== + dependencies: + any-promise "^1.0.0" + object-assign "^4.0.1" + thenify-all "^1.0.0" + nanoid@^3.3.7: version "3.3.7" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" @@ -1570,6 +1895,19 @@ needle@^2.5.2: iconv-lite "^0.4.4" sax "^1.2.4" +needle@^3.1.0: + version "3.3.1" + resolved "https://registry.yarnpkg.com/needle/-/needle-3.3.1.tgz#63f75aec580c2e77e209f3f324e2cdf3d29bd049" + integrity sha512-6k0YULvhpw+RoLNiQCRKOl09Rv1dPLr8hHnVjHqdolKwDrdNyk+Hmrthi4lIGPPz3r39dLx0hsF5s40sZ3Us4Q== + dependencies: + iconv-lite "^0.6.3" + sax "^1.2.4" + +node-releases@^2.0.14: + version "2.0.14" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" + integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== + nopt@^7.2.0: version "7.2.0" resolved "https://registry.yarnpkg.com/nopt/-/nopt-7.2.0.tgz#067378c68116f602f552876194fd11f1292503d7" @@ -1577,16 +1915,31 @@ nopt@^7.2.0: dependencies: abbrev "^2.0.0" +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +normalize-range@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" + integrity sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA== + nwsapi@^2.2.4: version "2.2.7" resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.7.tgz#738e0707d3128cb750dddcfe90e4610482df0f30" integrity sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ== -object-assign@^4.1.1: +object-assign@^4.0.1, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== +object-hash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9" + integrity sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw== + once@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -1606,6 +1959,11 @@ pako@^2.1.0: resolved "https://registry.yarnpkg.com/pako/-/pako-2.1.0.tgz#266cc37f98c7d883545d11335c00fbd4062c9a86" integrity sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug== +parse-node-version@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parse-node-version/-/parse-node-version-1.0.1.tgz#e2b5dbede00e7fa9bc363607f53327e8b073189b" + integrity sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA== + parse5@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" @@ -1636,6 +1994,14 @@ path-scurry@^1.10.1: lru-cache "^9.1.1 || ^10.0.0" minipass "^5.0.0 || ^6.0.2 || ^7.0.0" +path-scurry@^1.11.0: + version "1.11.1" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.11.1.tgz#7960a668888594a0720b12a911d1a742ab9f11d2" + integrity sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA== + dependencies: + lru-cache "^10.2.0" + minipass "^5.0.0 || ^6.0.2 || ^7.0.0" + pathe@^1.1.0, pathe@^1.1.1, pathe@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.2.tgz#6c4cb47a945692e48a1ddd6e4094d170516437ec" @@ -1646,16 +2012,41 @@ pathval@^1.1.1: resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== +picocolors@^1, picocolors@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" + integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== + picocolors@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== -picomatch@^2.3.1: +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +picomatch@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.2.tgz#77c742931e8f3b8820946c76cd0c1f13730d1dab" + integrity sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg== + +pify@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== + +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + +pirates@^4.0.1: + version "4.0.6" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" + integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== + pkg-types@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-1.0.3.tgz#988b42ab19254c01614d13f4f65a2cfc7880f868" @@ -1665,6 +2056,67 @@ pkg-types@^1.0.3: mlly "^1.2.0" pathe "^1.1.0" +postcss-import@^15.1.0: + version "15.1.0" + resolved "https://registry.yarnpkg.com/postcss-import/-/postcss-import-15.1.0.tgz#41c64ed8cc0e23735a9698b3249ffdbf704adc70" + integrity sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew== + dependencies: + postcss-value-parser "^4.0.0" + read-cache "^1.0.0" + resolve "^1.1.7" + +postcss-js@^4, postcss-js@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/postcss-js/-/postcss-js-4.0.1.tgz#61598186f3703bab052f1c4f7d805f3991bee9d2" + integrity sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw== + dependencies: + camelcase-css "^2.0.1" + +postcss-load-config@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-4.0.2.tgz#7159dcf626118d33e299f485d6afe4aff7c4a3e3" + integrity sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ== + dependencies: + lilconfig "^3.0.0" + yaml "^2.3.4" + +postcss-nested@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-6.0.1.tgz#f83dc9846ca16d2f4fa864f16e9d9f7d0961662c" + integrity sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ== + dependencies: + postcss-selector-parser "^6.0.11" + +postcss-selector-parser@6.0.10: + version "6.0.10" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz#79b61e2c0d1bfc2602d549e11d0876256f8df88d" + integrity sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w== + dependencies: + cssesc "^3.0.0" + util-deprecate "^1.0.2" + +postcss-selector-parser@^6.0.11: + version "6.0.16" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.16.tgz#3b88b9f5c5abd989ef4e2fc9ec8eedd34b20fb04" + integrity sha512-A0RVJrX+IUkVZbW3ClroRWurercFhieevHB38sr2+l9eUClMqome3LmEmnhlNy+5Mr2EYN6B2Kaw9wYdd+VHiw== + dependencies: + cssesc "^3.0.0" + util-deprecate "^1.0.2" + +postcss-value-parser@^4.0.0, postcss-value-parser@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" + integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== + +postcss@^8.4.23: + version "8.4.38" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.38.tgz#b387d533baf2054288e337066d81c6bee9db9e0e" + integrity sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A== + dependencies: + nanoid "^3.3.7" + picocolors "^1.0.0" + source-map-js "^1.2.0" + postcss@^8.4.27, postcss@^8.4.33, postcss@^8.4.35: version "8.4.35" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.35.tgz#60997775689ce09011edf083a549cea44aabe2f7" @@ -1709,6 +2161,11 @@ proto-list@~1.2.1: resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" integrity sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA== +prr@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" + integrity sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw== + psl@^1.1.33: version "1.9.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" @@ -1837,6 +2294,20 @@ react-is@^18.0.0: resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== +read-cache@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774" + integrity sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA== + dependencies: + pify "^2.3.0" + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + requires-port@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" @@ -1847,7 +2318,7 @@ resize-observer-polyfill@^1.5.1: resolved "https://registry.yarnpkg.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz#0e9020dd3d21024458d4ebd27e23e40269810464" integrity sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg== -resolve@^1.15.1: +resolve@^1.1.7, resolve@^1.15.1, resolve@^1.22.2: version "1.22.8" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== @@ -1919,6 +2390,11 @@ saxes@^6.0.0: dependencies: xmlchars "^2.2.0" +semver@^5.6.0: + version "5.7.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" + integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== + semver@^7.5.3: version "7.6.0" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d" @@ -1979,7 +2455,12 @@ source-map-js@^1.0.2: resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== -source-map@^0.6.1: +source-map-js@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af" + integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg== + +source-map@^0.6.1, source-map@~0.6.0: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== @@ -2042,6 +2523,19 @@ strip-literal@^1.0.1: dependencies: acorn "^8.10.0" +sucrase@^3.32.0: + version "3.35.0" + resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.35.0.tgz#57f17a3d7e19b36d8995f06679d121be914ae263" + integrity sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA== + dependencies: + "@jridgewell/gen-mapping" "^0.3.2" + commander "^4.0.0" + glob "^10.3.10" + lines-and-columns "^1.1.6" + mz "^2.7.0" + pirates "^4.0.1" + ts-interface-checker "^0.1.9" + supports-color@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" @@ -2059,6 +2553,34 @@ symbol-tree@^3.2.4: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== +tailwindcss@^3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.4.3.tgz#be48f5283df77dfced705451319a5dffb8621519" + integrity sha512-U7sxQk/n397Bmx4JHbJx/iSOOv5G+II3f1kpLpY2QeUv5DcPdcTsYLlusZfq1NthHS1c1cZoyFmmkex1rzke0A== + dependencies: + "@alloc/quick-lru" "^5.2.0" + arg "^5.0.2" + chokidar "^3.5.3" + didyoumean "^1.2.2" + dlv "^1.1.3" + fast-glob "^3.3.0" + glob-parent "^6.0.2" + is-glob "^4.0.3" + jiti "^1.21.0" + lilconfig "^2.1.0" + micromatch "^4.0.5" + normalize-path "^3.0.0" + object-hash "^3.0.0" + picocolors "^1.0.0" + postcss "^8.4.23" + postcss-import "^15.1.0" + postcss-js "^4.0.1" + postcss-load-config "^4.0.1" + postcss-nested "^6.0.1" + postcss-selector-parser "^6.0.11" + resolve "^1.22.2" + sucrase "^3.32.0" + test-exclude@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" @@ -2068,6 +2590,20 @@ test-exclude@^6.0.0: glob "^7.1.4" minimatch "^3.0.4" +thenify-all@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" + integrity sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA== + dependencies: + thenify ">= 3.1.0 < 4" + +"thenify@>= 3.1.0 < 4": + version "3.3.1" + resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.1.tgz#8932e686a4066038a016dd9e2ca46add9838a95f" + integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw== + dependencies: + any-promise "^1.0.0" + tinybench@^2.5.0: version "2.6.0" resolved "https://registry.yarnpkg.com/tinybench/-/tinybench-2.6.0.tgz#1423284ee22de07c91b3752c048d2764714b341b" @@ -2122,6 +2658,16 @@ tr46@^4.1.1: dependencies: punycode "^2.3.0" +ts-interface-checker@^0.1.9: + version "0.1.13" + resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699" + integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== + +tslib@^2.3.0: + version "2.6.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== + type-detect@^4.0.0, type-detect@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" @@ -2147,6 +2693,14 @@ universalify@^0.2.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== +update-browserslist-db@^1.0.13: + version "1.0.16" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz#f6d489ed90fb2f07d67784eb3f53d7891f736356" + integrity sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ== + dependencies: + escalade "^3.1.2" + picocolors "^1.0.1" + url-parse@^1.5.3: version "1.5.10" resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" @@ -2155,6 +2709,11 @@ url-parse@^1.5.3: querystringify "^2.1.1" requires-port "^1.0.0" +util-deprecate@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + v8-to-istanbul@^9.1.0: version "9.2.0" resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz#2ed7644a245cddd83d4e087b9b33b3e62dfd10ad" @@ -2363,6 +2922,11 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== +yaml@^2.3.4: + version "2.4.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.4.2.tgz#7a2b30f2243a5fc299e1f14ca58d475ed4bc5362" + integrity sha512-B3VqDZ+JAg1nZpaEmWtTXUlBneoGx6CPM9b0TENK6aoSu5t73dItudwdgmi6tHlIZZId4dZ9skcAQ2UbcyAeVA== + yocto-queue@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-1.0.0.tgz#7f816433fb2cbc511ec8bf7d263c3b58a1a3c251" From 79a956bb6d0517d6f92ac7a77e627b460eea21d0 Mon Sep 17 00:00:00 2001 From: Mikahil Ilin Date: Tue, 21 May 2024 20:06:41 +0100 Subject: [PATCH 15/38] Refactor CSS, test daisyUI --- index.html | 171 +++++++++++++++++++++++++++++++ src/components/App.vue | 1 - src/components/fui/FuiCode.vue | 23 ++++- src/components/fui/FuiLayers.vue | 47 +++++++++ styles.css | 84 ++------------- tailwind.config.js | 9 +- 6 files changed, 252 insertions(+), 83 deletions(-) diff --git a/index.html b/index.html index 4b01c653..a76f0cdd 100644 --- a/index.html +++ b/index.html @@ -12,6 +12,177 @@ +
+
+
+ + + + + + + + +
+
+ Default + Primary + Secondary + Accent + Info + Success + Warning + Error +
+
+
+
+
+ + + +
+
+ I 'm a simple link + I 'm a simple link + I 'm a simple link + I 'm a simple link +
+
+
+ Default + Primary + Secondary + Accent + Info + Success + Warning + Error +
+
+
+
+
+
Total Page Views
+
89,400
+
21% more than last month
+
+
+
+
60%
+
75%
+
90%
+
+
+
+
+
+
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+
+ + + + +
+
+
+
+ + + + +
+
+ + + + +
+
+ +
+
+
Text Size 1
+
Text Size 2
+
Text Size 3
+
Text Size 4
+
Text Size 5
+
Text Size 6
+
Text Size 7
+
+
    +
  • Step 1
  • +
  • Step 2
  • +
  • Step 3
  • +
  • Step 4
  • +
+
+
+
+
+ + + + 12 unread messages. Tap to see. +
+
+ + + + New software update available. +
+
+ + + + Your purchase has been confirmed! +
+
+ + + + Warning: Invalid email address! +
+
+ + + + Error! Task failed successfully. +
+
+
+
+
diff --git a/src/components/App.vue b/src/components/App.vue index 633af6b7..a13aecf6 100644 --- a/src/components/App.vue +++ b/src/components/App.vue @@ -230,7 +230,6 @@ navigator.serial?.addEventListener('disconnect', flipperDisconnect); diff --git a/styles.css b/styles.css index 4ed78811..d15a2347 100644 --- a/styles.css +++ b/styles.css @@ -10,7 +10,7 @@ @tailwind utilities; @tailwind variants; -:root { +/* :root { --primary-color: #ff8200; --secondary-color: #441f07; --bg-color: #1c0e02; @@ -25,19 +25,21 @@ h1, h2, h3 { - /* font-family: "helvB08_tr"; */ font-weight: normal; } body { margin: 0; padding: 0; - background: var(--bg-color); color: var(--primary-color); font-family: 'haxrcorp4089_tr'; visibility: hidden; } +a { + color: var(--primary-color); +} + #lopaka_app { display: flex; } @@ -51,7 +53,6 @@ body { .title { margin: 0 0 8px 0; font-size: 32px; - /* font-family: "helvB08_tr"; */ font-weight: normal; } @@ -67,74 +68,6 @@ body { margin: 0 8px 8px 0; } -.layer { - display: flex; - align-items: center; - cursor: pointer; - height: 20px; - padding: 2px 0 2px 8px; - margin-bottom: 1px; - border-radius: 4px; - justify-content: space-between; -} - -.layer:hover { - background-color: var(--secondary-color); -} - -.layer:hover .layer__remove { - display: block; -} - -.layer__name { - max-width: 132px; - overflow: hidden; - white-space: nowrap; -} - -.layer_ignored { - color: #999; -} - -.layer_selected .layer__name:before { - display: inline-block; - content: ''; - background: var(--success-color); - transform: translateY(-4px); - width: 4px; - height: 4px; - margin-right: 4px; -} - -.layer__remove { - display: none; - color: var(--danger-color); - margin: 0 8px; - padding-bottom: 4px; -} - -.fui-code { - background: var(--primary-color); - border: 2px solid var(--border-dark-color); - border-radius: 0 10px 10px 10px; - border-top: 0; - margin: 0 0 8px 0; - padding: 8px; - height: 350px; - color: var(--secondary-color); - text-transform: none; - overflow: auto; - white-space: pre; -} - -.fui-code:focus { - outline: none; -} - -.fui-code pre { - margin: 0; -} - .fui-tabs { display: flex; } @@ -196,10 +129,6 @@ body { font-size: 24px; } -a { - color: var(--primary-color); -} - .fui-form-column { margin-left: 16px; } @@ -211,7 +140,6 @@ a { } .fui-form-label { font-size: 24px; - /* padding: 0 8px 4px 0; */ } .fui-form-header { font-size: 32px; @@ -228,4 +156,4 @@ a { order: -1; padding: 0 10px 0 0; width: 12px; -} +} */ diff --git a/tailwind.config.js b/tailwind.config.js index 99b9fd05..d82f1184 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -26,11 +26,14 @@ module.exports = { themes: [ { lopaka: { - primary: '#d97706', + primary: '#FF8200', + neutral: '#441F07', + 'base-100': '#120800', // bg + "base-200": "#441F07", // default button + "base-300": "#FF8200", // default tabs + "base-content": "#f3f4f6", secondary: '#7dd3fc', accent: '#047857', - neutral: '#1f2937', - 'base-100': '#111827', info: '#00c9ff', success: '#a0d100', warning: '#f59e0b', From 295d07118106a1b5ad434c3250446841925d53cd Mon Sep 17 00:00:00 2001 From: deadlink Date: Tue, 21 May 2024 23:58:05 +0400 Subject: [PATCH 16/38] Fix theme --- tailwind.config.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tailwind.config.js b/tailwind.config.js index d82f1184..8cca7211 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -26,12 +26,13 @@ module.exports = { themes: [ { lopaka: { + ...require('daisyui/src/theming/themes').dark, primary: '#FF8200', neutral: '#441F07', 'base-100': '#120800', // bg - "base-200": "#441F07", // default button - "base-300": "#FF8200", // default tabs - "base-content": "#f3f4f6", + 'base-200': '#441F07', // default button + 'base-300': '#FF8200', // default tabs + 'base-content': '#f3f4f6', secondary: '#7dd3fc', accent: '#047857', info: '#00c9ff', From b98db802ac3ab6fc362cd644c98060497f5e7a3d Mon Sep 17 00:00:00 2001 From: deadlink Date: Wed, 22 May 2024 00:13:24 +0400 Subject: [PATCH 17/38] Fix tw config --- tailwind.config.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/tailwind.config.js b/tailwind.config.js index 8cca7211..6754505a 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -4,29 +4,11 @@ const typography = require('@tailwindcss/typography'); module.exports = { content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'], - darkMode: 'class', // or 'media' or 'class' - theme: { - extend: {} - }, - variants: { - extend: {} - }, plugins: [typography, daisyui], - corePlugins: { - preflight: false - }, daisyui: { - darkTheme: 'dark', // name of one of the included themes for dark mode - base: true, // applies background color and foreground color for root element by default - styled: true, // include daisyUI colors and design decisions for all components - utils: true, // adds responsive and modifier utility classes - prefix: '', // prefix for daisyUI classnames (components, modifiers and responsive class names. Not colors) - logs: true, // Shows info about daisyUI version and used config in the console when building your CSS - themeRoot: ':root', themes: [ { lopaka: { - ...require('daisyui/src/theming/themes').dark, primary: '#FF8200', neutral: '#441F07', 'base-100': '#120800', // bg From 65b7bf67f3a4f1aebf649e13ab71ac619c1d034c Mon Sep 17 00:00:00 2001 From: Mikahil Ilin Date: Tue, 21 May 2024 21:31:19 +0100 Subject: [PATCH 18/38] Remove test markup, return css TODO: fix inputs --- index.html | 171 ----------------------------------------------------- styles.css | 7 ++- 2 files changed, 5 insertions(+), 173 deletions(-) diff --git a/index.html b/index.html index a76f0cdd..4b01c653 100644 --- a/index.html +++ b/index.html @@ -12,177 +12,6 @@ -
-
-
- - - - - - - - -
-
- Default - Primary - Secondary - Accent - Info - Success - Warning - Error -
-
-
-
-
- - - -
-
- I 'm a simple link - I 'm a simple link - I 'm a simple link - I 'm a simple link -
-
-
- Default - Primary - Secondary - Accent - Info - Success - Warning - Error -
-
-
-
-
-
Total Page Views
-
89,400
-
21% more than last month
-
-
-
-
60%
-
75%
-
90%
-
-
-
-
-
-
-
- - - - -
-
- - - - -
-
- - - - -
-
-
- - - - -
-
-
-
- - - - -
-
- - - - -
-
- -
-
-
Text Size 1
-
Text Size 2
-
Text Size 3
-
Text Size 4
-
Text Size 5
-
Text Size 6
-
Text Size 7
-
-
    -
  • Step 1
  • -
  • Step 2
  • -
  • Step 3
  • -
  • Step 4
  • -
-
-
-
-
- - - - 12 unread messages. Tap to see. -
-
- - - - New software update available. -
-
- - - - Your purchase has been confirmed! -
-
- - - - Warning: Invalid email address! -
-
- - - - Error! Task failed successfully. -
-
-
-
-
diff --git a/styles.css b/styles.css index d15a2347..6a2720f3 100644 --- a/styles.css +++ b/styles.css @@ -10,7 +10,7 @@ @tailwind utilities; @tailwind variants; -/* :root { +:root { --primary-color: #ff8200; --secondary-color: #441f07; --bg-color: #1c0e02; @@ -151,9 +151,12 @@ a { padding: 8px; color: var(--primary-color); box-sizing: border-box; + font-family: sans-serif; + font-size: small; } .fui-form-checkbox { order: -1; padding: 0 10px 0 0; + height: 12px; width: 12px; -} */ +} From aa61a68e0a546806f8a13f56a0562a8d3699b29e Mon Sep 17 00:00:00 2001 From: Mikahil Ilin Date: Wed, 22 May 2024 13:47:04 +0100 Subject: [PATCH 19/38] Fix styles, refactor inputs --- src/components/fui/FuiCodeSettings.vue | 32 +++++++++--------- src/components/fui/FuiIcons.vue | 2 ++ src/components/fui/FuiInspector.vue | 46 ++++++++++++++------------ src/components/fui/FuiLayers.vue | 4 +-- styles.css | 3 +- 5 files changed, 45 insertions(+), 42 deletions(-) diff --git a/src/components/fui/FuiCodeSettings.vue b/src/components/fui/FuiCodeSettings.vue index d3e96b8f..8a983e11 100644 --- a/src/components/fui/FuiCodeSettings.vue +++ b/src/components/fui/FuiCodeSettings.vue @@ -39,26 +39,26 @@ const LABELS = { diff --git a/src/components/fui/FuiIcons.vue b/src/components/fui/FuiIcons.vue index cae1e198..5ae57c69 100644 --- a/src/components/fui/FuiIcons.vue +++ b/src/components/fui/FuiIcons.vue @@ -154,5 +154,7 @@ function iconDragStart(e: DragEvent) { border: 1px solid var(--border-dark-color); border-radius: 4px; text-align: center; + height: 18px; + line-height: 18px; } diff --git a/src/components/fui/FuiInspector.vue b/src/components/fui/FuiInspector.vue index 773c2ede..604c0eb4 100644 --- a/src/components/fui/FuiInspector.vue +++ b/src/components/fui/FuiInspector.vue @@ -102,7 +102,13 @@ const LABELS = { fill: 'Filled', color: 'Color', overlay: 'Overlay', - radius: 'Radius' + radius: 'Radius', + radiusX: 'RX', + radiusY: 'RY', + x: "X", + y: "Y", + w: "W", + h: "H", };