dissolve app/ into repo root (D-056)
Single Flutter package at the repo root. All code, tests, assets, and platform directories moved from app/ to root. Package renamed from clide_app to clide — all imports rewritten. Merged pubspec combines core (ffi) and app (flutter, yaml, xterm) dependencies. Makefile simplified: no APP_PRESENT conditionals, no cd, no daemon lifecycle. 317 tests pass. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import 'package:clide/widgets/src/clide_icon.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
class CheckIcon extends ClideIconPainter {
|
||||
const CheckIcon();
|
||||
|
||||
@override
|
||||
void paint(Canvas canvas, Color color) {
|
||||
final p = Paint()
|
||||
..color = color
|
||||
..strokeWidth = 0.14
|
||||
..style = PaintingStyle.stroke
|
||||
..strokeCap = StrokeCap.round
|
||||
..strokeJoin = StrokeJoin.round;
|
||||
final path = Path()
|
||||
..moveTo(0.18, 0.52)
|
||||
..lineTo(0.42, 0.74)
|
||||
..lineTo(0.82, 0.30);
|
||||
canvas.drawPath(path, p);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
import 'package:clide/widgets/src/clide_icon.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
class ChevronRightIcon extends ClideIconPainter {
|
||||
const ChevronRightIcon();
|
||||
|
||||
@override
|
||||
void paint(Canvas canvas, Color color) {
|
||||
final p = Paint()
|
||||
..color = color
|
||||
..style = PaintingStyle.stroke
|
||||
..strokeWidth = 0.12
|
||||
..strokeCap = StrokeCap.round
|
||||
..strokeJoin = StrokeJoin.round;
|
||||
final path = Path()
|
||||
..moveTo(0.36, 0.22)
|
||||
..lineTo(0.66, 0.50)
|
||||
..lineTo(0.36, 0.78);
|
||||
canvas.drawPath(path, p);
|
||||
}
|
||||
}
|
||||
|
||||
class ChevronDownIcon extends ClideIconPainter {
|
||||
const ChevronDownIcon();
|
||||
|
||||
@override
|
||||
void paint(Canvas canvas, Color color) {
|
||||
final p = Paint()
|
||||
..color = color
|
||||
..style = PaintingStyle.stroke
|
||||
..strokeWidth = 0.12
|
||||
..strokeCap = StrokeCap.round
|
||||
..strokeJoin = StrokeJoin.round;
|
||||
final path = Path()
|
||||
..moveTo(0.22, 0.36)
|
||||
..lineTo(0.50, 0.66)
|
||||
..lineTo(0.78, 0.36);
|
||||
canvas.drawPath(path, p);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import 'package:clide/widgets/src/clide_icon.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
class DotIcon extends ClideIconPainter {
|
||||
const DotIcon();
|
||||
|
||||
@override
|
||||
void paint(Canvas canvas, Color color) {
|
||||
canvas.drawCircle(const Offset(0.5, 0.5), 0.18, Paint()..color = color);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import 'package:clide/widgets/src/clide_icon.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
class FolderIcon extends ClideIconPainter {
|
||||
const FolderIcon();
|
||||
|
||||
@override
|
||||
void paint(Canvas canvas, Color color) {
|
||||
final p = Paint()
|
||||
..color = color
|
||||
..style = PaintingStyle.stroke
|
||||
..strokeWidth = 0.08;
|
||||
final path = Path()
|
||||
..moveTo(0.08, 0.30)
|
||||
..lineTo(0.40, 0.30)
|
||||
..lineTo(0.48, 0.22)
|
||||
..lineTo(0.92, 0.22)
|
||||
..lineTo(0.92, 0.80)
|
||||
..lineTo(0.08, 0.80)
|
||||
..close();
|
||||
canvas.drawPath(path, p);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
import 'dart:math' as math;
|
||||
|
||||
import 'package:clide/widgets/src/clide_icon.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
class GearIcon extends ClideIconPainter {
|
||||
const GearIcon();
|
||||
|
||||
@override
|
||||
void paint(Canvas canvas, Color color) {
|
||||
final p = Paint()
|
||||
..color = color
|
||||
..style = PaintingStyle.stroke
|
||||
..strokeWidth = 0.08
|
||||
..strokeCap = StrokeCap.round;
|
||||
const center = Offset(0.5, 0.5);
|
||||
const teeth = 8;
|
||||
const innerR = 0.25;
|
||||
const outerR = 0.40;
|
||||
|
||||
final path = Path();
|
||||
for (var i = 0; i < teeth; i++) {
|
||||
final a1 = (i / teeth) * 2 * math.pi;
|
||||
final a2 = ((i + 0.5) / teeth) * 2 * math.pi;
|
||||
final p1 = center + Offset(math.cos(a1) * innerR, math.sin(a1) * innerR);
|
||||
final p2 = center + Offset(math.cos(a1) * outerR, math.sin(a1) * outerR);
|
||||
final p3 = center + Offset(math.cos(a2) * outerR, math.sin(a2) * outerR);
|
||||
final p4 = center + Offset(math.cos(a2) * innerR, math.sin(a2) * innerR);
|
||||
path
|
||||
..moveTo(p1.dx, p1.dy)
|
||||
..lineTo(p2.dx, p2.dy)
|
||||
..lineTo(p3.dx, p3.dy)
|
||||
..lineTo(p4.dx, p4.dy);
|
||||
}
|
||||
canvas.drawPath(path, p);
|
||||
canvas.drawCircle(center, 0.12, p);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
import 'dart:ui';
|
||||
import 'package:clide/widgets/src/clide_icon.dart';
|
||||
|
||||
class GitBranchIcon extends ClideIconPainter {
|
||||
const GitBranchIcon();
|
||||
|
||||
@override
|
||||
void paint(Canvas canvas, Color color) {
|
||||
final paint = Paint()
|
||||
..color = color
|
||||
..style = PaintingStyle.stroke
|
||||
..strokeWidth = 0.08
|
||||
..strokeCap = StrokeCap.round;
|
||||
// Trunk line
|
||||
canvas.drawLine(const Offset(0.35, 0.2), const Offset(0.35, 0.8), paint);
|
||||
// Branch line
|
||||
canvas.drawLine(const Offset(0.65, 0.3), const Offset(0.65, 0.5), paint);
|
||||
canvas.drawLine(const Offset(0.65, 0.5), const Offset(0.35, 0.6), paint);
|
||||
// Dots at nodes
|
||||
final dot = Paint()
|
||||
..color = color
|
||||
..style = PaintingStyle.fill;
|
||||
canvas.drawCircle(const Offset(0.35, 0.2), 0.06, dot);
|
||||
canvas.drawCircle(const Offset(0.35, 0.8), 0.06, dot);
|
||||
canvas.drawCircle(const Offset(0.65, 0.3), 0.06, dot);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
import 'dart:ui' as ui;
|
||||
|
||||
import 'package:clide/widgets/src/clide_icon.dart';
|
||||
|
||||
class PhosphorIconPainter extends ClideIconPainter {
|
||||
const PhosphorIconPainter(this.codePoint, {this.family = 'Phosphor'});
|
||||
|
||||
final int codePoint;
|
||||
final String family;
|
||||
|
||||
@override
|
||||
void paint(ui.Canvas canvas, ui.Color color) {
|
||||
final builder = ui.ParagraphBuilder(
|
||||
ui.ParagraphStyle(fontFamily: family, fontSize: 1.0, height: 1.0, textAlign: ui.TextAlign.center),
|
||||
)
|
||||
..pushStyle(ui.TextStyle(color: color, fontFamily: family))
|
||||
..addText(String.fromCharCode(codePoint));
|
||||
final paragraph = builder.build()..layout(const ui.ParagraphConstraints(width: 1.0));
|
||||
final dy = (1.0 - paragraph.height) / 2;
|
||||
canvas.drawParagraph(paragraph, ui.Offset(0, dy));
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => other is PhosphorIconPainter && other.codePoint == codePoint && other.family == family;
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(codePoint, family);
|
||||
}
|
||||
|
||||
abstract class PhosphorIcons {
|
||||
static const folder = PhosphorIconPainter(0xe24a);
|
||||
static const fileText = PhosphorIconPainter(0xe23a);
|
||||
static const gitBranch = PhosphorIconPainter(0xe278);
|
||||
static const gitCommit = PhosphorIconPainter(0xe27a);
|
||||
static const gitDiff = PhosphorIconPainter(0xe27c);
|
||||
static const gitPullRequest = PhosphorIconPainter(0xe282);
|
||||
static const magnifyingGlass = PhosphorIconPainter(0xe30c);
|
||||
static const terminal = PhosphorIconPainter(0xe47e);
|
||||
static const terminalWindow = PhosphorIconPainter(0xeae8);
|
||||
static const code = PhosphorIconPainter(0xe1bc);
|
||||
static const codeBlock = PhosphorIconPainter(0xeafe);
|
||||
static const pencilSimple = PhosphorIconPainter(0xe3b4);
|
||||
static const eye = PhosphorIconPainter(0xe220);
|
||||
static const eyeSlash = PhosphorIconPainter(0xe224);
|
||||
static const arrowsOutSimple = PhosphorIconPainter(0xe0a6);
|
||||
static const arrowsInSimple = PhosphorIconPainter(0xe09e);
|
||||
static const list = PhosphorIconPainter(0xe2f0);
|
||||
static const listChecks = PhosphorIconPainter(0xeadc);
|
||||
static const gear = PhosphorIconPainter(0xe270);
|
||||
static const puzzlePiece = PhosphorIconPainter(0xe596);
|
||||
static const keyboard = PhosphorIconPainter(0xe2d8);
|
||||
static const palette = PhosphorIconPainter(0xe6c8);
|
||||
static const warning = PhosphorIconPainter(0xe4e0);
|
||||
static const warningCircle = PhosphorIconPainter(0xe4e2);
|
||||
static const check = PhosphorIconPainter(0xe182);
|
||||
static const checkCircle = PhosphorIconPainter(0xe184);
|
||||
static const caretLeft = PhosphorIconPainter(0xe138);
|
||||
static const caretRight = PhosphorIconPainter(0xe13a);
|
||||
static const caretDown = PhosphorIconPainter(0xe136);
|
||||
static const caretUp = PhosphorIconPainter(0xe13c);
|
||||
static const graph = PhosphorIconPainter(0xeb58);
|
||||
static const treeStructure = PhosphorIconPainter(0xe67c);
|
||||
static const image = PhosphorIconPainter(0xe2ca);
|
||||
static const link = PhosphorIconPainter(0xe2e2);
|
||||
static const chatCircle = PhosphorIconPainter(0xe168);
|
||||
static const robot = PhosphorIconPainter(0xe762);
|
||||
static const ticket = PhosphorIconPainter(0xe490);
|
||||
static const lightbulb = PhosphorIconPainter(0xe2dc);
|
||||
static const notepad = PhosphorIconPainter(0xe63e);
|
||||
static const bookOpen = PhosphorIconPainter(0xe0e6);
|
||||
static const xMark = PhosphorIconPainter(0xe4f6);
|
||||
static const circlesFour = PhosphorIconPainter(0xe190);
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import 'package:clide/widgets/src/clide_icon.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
/// Plug-shaped connection icon. Used by the ipc-status statusbar item
|
||||
/// and by future connection-state affordances.
|
||||
class PlugIcon extends ClideIconPainter {
|
||||
const PlugIcon();
|
||||
|
||||
@override
|
||||
void paint(Canvas canvas, Color color) {
|
||||
final p = Paint()
|
||||
..color = color
|
||||
..style = PaintingStyle.stroke
|
||||
..strokeWidth = 0.10
|
||||
..strokeCap = StrokeCap.round;
|
||||
// body
|
||||
final body = Path()
|
||||
..moveTo(0.30, 0.30)
|
||||
..lineTo(0.60, 0.30)
|
||||
..lineTo(0.60, 0.55)
|
||||
..arcToPoint(const Offset(0.30, 0.55),
|
||||
radius: const Radius.circular(0.15), clockwise: false)
|
||||
..close();
|
||||
canvas.drawPath(body, p);
|
||||
// cord
|
||||
canvas.drawLine(const Offset(0.45, 0.60), const Offset(0.45, 0.88), p);
|
||||
// prongs
|
||||
canvas.drawLine(const Offset(0.38, 0.18), const Offset(0.38, 0.30), p);
|
||||
canvas.drawLine(const Offset(0.52, 0.18), const Offset(0.52, 0.30), p);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import 'dart:ui';
|
||||
import 'package:clide/widgets/src/clide_icon.dart';
|
||||
|
||||
class SearchIcon extends ClideIconPainter {
|
||||
const SearchIcon();
|
||||
|
||||
@override
|
||||
void paint(Canvas canvas, Color color) {
|
||||
final paint = Paint()
|
||||
..color = color
|
||||
..style = PaintingStyle.stroke
|
||||
..strokeWidth = 0.08
|
||||
..strokeCap = StrokeCap.round;
|
||||
canvas.drawCircle(const Offset(0.42, 0.42), 0.22, paint);
|
||||
canvas.drawLine(const Offset(0.58, 0.58), const Offset(0.78, 0.78), paint);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import 'dart:ui';
|
||||
import 'package:clide/widgets/src/clide_icon.dart';
|
||||
|
||||
class TerminalIcon extends ClideIconPainter {
|
||||
const TerminalIcon();
|
||||
|
||||
@override
|
||||
void paint(Canvas canvas, Color color) {
|
||||
final paint = Paint()
|
||||
..color = color
|
||||
..style = PaintingStyle.stroke
|
||||
..strokeWidth = 0.08
|
||||
..strokeCap = StrokeCap.round;
|
||||
// Prompt chevron >_
|
||||
canvas.drawLine(const Offset(0.2, 0.3), const Offset(0.45, 0.5), paint);
|
||||
canvas.drawLine(const Offset(0.45, 0.5), const Offset(0.2, 0.7), paint);
|
||||
// Cursor line
|
||||
canvas.drawLine(const Offset(0.5, 0.7), const Offset(0.8, 0.7), paint);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import 'dart:ui';
|
||||
import 'package:clide/widgets/src/clide_icon.dart';
|
||||
|
||||
class WarningIcon extends ClideIconPainter {
|
||||
const WarningIcon();
|
||||
|
||||
@override
|
||||
void paint(Canvas canvas, Color color) {
|
||||
final paint = Paint()
|
||||
..color = color
|
||||
..style = PaintingStyle.stroke
|
||||
..strokeWidth = 0.08
|
||||
..strokeCap = StrokeCap.round
|
||||
..strokeJoin = StrokeJoin.round;
|
||||
final path = Path()
|
||||
..moveTo(0.5, 0.15)
|
||||
..lineTo(0.85, 0.8)
|
||||
..lineTo(0.15, 0.8)
|
||||
..close();
|
||||
canvas.drawPath(path, paint);
|
||||
// Exclamation
|
||||
canvas.drawLine(const Offset(0.5, 0.4), const Offset(0.5, 0.58), paint);
|
||||
final dot = Paint()
|
||||
..color = color
|
||||
..style = PaintingStyle.fill;
|
||||
canvas.drawCircle(const Offset(0.5, 0.68), 0.035, dot);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import 'package:clide/widgets/src/clide_icon.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
class CloseIcon extends ClideIconPainter {
|
||||
const CloseIcon();
|
||||
|
||||
@override
|
||||
void paint(Canvas canvas, Color color) {
|
||||
final p = Paint()
|
||||
..color = color
|
||||
..strokeWidth = 0.10
|
||||
..strokeCap = StrokeCap.round;
|
||||
canvas
|
||||
..drawLine(const Offset(0.22, 0.22), const Offset(0.78, 0.78), p)
|
||||
..drawLine(const Offset(0.78, 0.22), const Offset(0.22, 0.78), p);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user