@ship-ui/core 0.22.2 → 0.22.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
@@ -1034,7 +1034,7 @@ class ShipBlueprint {
1034
1034
  </div>
1035
1035
  }
1036
1036
  </div>
1037
- `, isInline: true, styles: ["sh-blueprint{--bp-bg: var(--base-1);--bp-icon-c: var(--base-6);--bp-stroke-c: var(--base-7);--bp-stroke-ca: var(--primary-8);display:flex;position:relative;width:100%;height:100%}sh-blueprint>*{box-sizing:border-box}sh-blueprint sh-icon{font-size:1rem;color:var(--bp-icon-c)}sh-blueprint sh-card.type-c{--card-bg: var(--base-1)}sh-blueprint .validation-errors{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);padding:1rem}sh-blueprint .midpoint-div{position:absolute;background-color:var(--base-2);border:var(--border-10);padding:.5rem;gap:.5rem;border-radius:var(--shape-2);transform:translate(-50%,-50%);z-index:100;display:flex;align-items:center;cursor:pointer}sh-blueprint .midpoint-div sh-icon{color:var(--base-12)}sh-blueprint .canvas-container{position:relative;width:100%;height:100%;overflow:hidden}sh-blueprint .canvas-container.hovering-connection{cursor:pointer}sh-blueprint .canvas-container.locked .node{pointer-events:none}sh-blueprint .action-panel{position:absolute;top:.5rem;right:.5rem;gap:.5rem;display:flex;align-items:center;z-index:1000}sh-blueprint canvas{position:absolute;top:0;left:0;width:100%;height:100%}sh-blueprint .nodes-wrapper{position:absolute;top:0;left:0;width:100%;height:100%;will-change:transform}sh-blueprint .canvas{height:100%;width:100%;background-color:var(--bp-bg);overflow:hidden;touch-action:none;position:relative}sh-blueprint .grid{position:absolute;inset:0;will-change:transform}sh-blueprint .tile{position:absolute;box-sizing:border-box;width:800px;height:800px;background-image:repeating-linear-gradient(0deg,var(--bp-grid-c) 0 2px,transparent 2px 100%),repeating-linear-gradient(90deg,var(--bp-grid-c) 0 2px,transparent 2px 100%);background-size:20px 20px}sh-blueprint .node{position:absolute;min-width:150px;padding:0;transition:box-shadow .2s ease-in-out;box-shadow:var(--box-shadow-10);will-change:transform;display:flex;flex-direction:column}sh-blueprint .node header{padding:.5rem;display:flex;align-items:center;justify-content:space-between;background-color:var(--base-2);border-bottom:var(--border-10);cursor:grab;-webkit-user-select:none;user-select:none}sh-blueprint .node header:active{cursor:grabbing}sh-blueprint .node:has(header:hover){box-shadow:0 0 10px 2px var(--primary-6)}sh-blueprint .ports{padding:.5rem 0;display:flex;gap:.5rem}sh-blueprint .inputs,sh-blueprint .outputs{display:flex;flex-direction:column;justify-content:space-around;flex:1 0;height:100%}sh-blueprint .inputs .port{border-radius:0 50% 50% 0;border-left-width:0}sh-blueprint .outputs{align-items:flex-end}sh-blueprint .outputs .port{border-radius:50% 0 0 50%;border-right-width:0}sh-blueprint .port-wrap{display:flex;gap:.25rem;align-items:center}sh-blueprint .port{width:.75rem;height:.75rem;background-color:var(--bp-stroke-c);border-radius:50%;border:var(--border-20);cursor:pointer;position:relative}sh-blueprint .port:hover{background-color:var(--bp-stroke-ca)}sh-blueprint .port-name{font:var(--paragraph-40);color:var(--base-12);white-space:nowrap}sh-blueprint .svg-wrap{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}sh-blueprint .connections-svg{width:100%;height:100%;pointer-events:none}sh-blueprint .connection-path{stroke:var(--bp-stroke-c);stroke-width:3;fill:none;pointer-events:none}sh-blueprint .drag-path{stroke:var(--bp-stroke-ca);stroke-width:3;fill:none;stroke-dasharray:5,5;pointer-events:none}\n"], dependencies: [{ kind: "component", type: ShipCard, selector: "sh-card", inputs: ["color", "variant"] }, { kind: "component", type: ShipIcon, selector: "sh-icon", inputs: ["color", "size"] }, { kind: "component", type: ShipButton, selector: "[shButton]", inputs: ["color", "variant", "size", "readonly"] }, { kind: "pipe", type: JsonPipe, name: "json" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1037
+ `, isInline: true, styles: ["sh-blueprint{--bp-bg: var(--base-1);--bp-icon-c: var(--base-6);--bp-stroke-c: var(--base-7);--bp-stroke-ca: var(--primary-8);display:flex;position:relative;width:100%;height:100%}sh-blueprint>*{box-sizing:border-box}sh-blueprint sh-icon{font-size:1rem;color:var(--bp-icon-c)}sh-blueprint sh-card.type-c{--card-bg: var(--base-1)}sh-blueprint .validation-errors{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);padding:1rem}sh-blueprint .midpoint-div{position:absolute;background-color:var(--base-2);border:var(--border-10);padding:.5rem;gap:.5rem;border-radius:var(--shape-2);transform:translate(-50%,-50%);z-index:100;display:flex;align-items:center;cursor:pointer}sh-blueprint .midpoint-div sh-icon{color:var(--base-12)}sh-blueprint .canvas-container{position:relative;width:100%;height:100%;overflow:hidden}sh-blueprint .canvas-container.hovering-connection{cursor:pointer}sh-blueprint .canvas-container.locked .node{pointer-events:none}sh-blueprint .action-panel{position:absolute;top:.5rem;right:.5rem;gap:.5rem;display:flex;align-items:center;z-index:1000}sh-blueprint canvas{position:absolute;top:0;left:0;width:100%;height:100%}sh-blueprint .nodes-wrapper{position:absolute;top:0;left:0;width:100%;height:100%;will-change:transform}sh-blueprint .canvas{height:100%;width:100%;background-color:var(--bp-bg);overflow:hidden;touch-action:none;position:relative}sh-blueprint .grid{position:absolute;inset:0;will-change:transform}sh-blueprint .tile{position:absolute;box-sizing:border-box;width:800px;height:800px;background-image:repeating-linear-gradient(0deg,var(--bp-grid-c) 0 2px,transparent 2px 100%),repeating-linear-gradient(90deg,var(--bp-grid-c) 0 2px,transparent 2px 100%);background-size:20px 20px}sh-blueprint .node{position:absolute;min-width:150px;padding:0;transition:box-shadow .2s ease-in-out;box-shadow:var(--box-shadow-10);will-change:transform;display:flex;flex-direction:column}sh-blueprint .node header{padding:.5rem;display:flex;align-items:center;justify-content:space-between;background-color:var(--base-2);border-bottom:var(--border-10);cursor:grab;-webkit-user-select:none;user-select:none}sh-blueprint .node header:active{cursor:grabbing}sh-blueprint .node:has(header:hover){box-shadow:0 0 10px 2px var(--primary-6)}sh-blueprint .ports{padding:.5rem 0;display:flex;gap:.5rem}sh-blueprint .inputs,sh-blueprint .outputs{display:flex;flex-direction:column;justify-content:space-around;flex:1 0;height:100%}sh-blueprint .inputs .port{border-radius:0 50% 50% 0;border-left-width:0}sh-blueprint .outputs{align-items:flex-end}sh-blueprint .outputs .port{border-radius:50% 0 0 50%;border-right-width:0}sh-blueprint .port-wrap{display:flex;gap:.25rem;align-items:center}sh-blueprint .port{width:.75rem;height:.75rem;background-color:var(--bp-stroke-c);border-radius:50%;border:var(--border-20);cursor:pointer;position:relative}sh-blueprint .port:hover{background-color:var(--bp-stroke-ca)}sh-blueprint .port-name{font:var(--paragraph-40);color:var(--base-12);white-space:nowrap}sh-blueprint .svg-wrap{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}sh-blueprint .connections-svg{width:100%;height:100%;pointer-events:none}sh-blueprint .connection-path{stroke:var(--bp-stroke-c);stroke-width:3;fill:none;pointer-events:none}sh-blueprint .drag-path{stroke:var(--bp-stroke-ca);stroke-width:3;fill:none;stroke-dasharray:5,5;pointer-events:none}\n"], dependencies: [{ kind: "component", type: ShipCard, selector: "sh-card", inputs: ["color", "variant"] }, { kind: "component", type: ShipIcon, selector: "sh-icon", inputs: ["color", "size"] }, { kind: "component", type: ShipButton, selector: "[shButton]", inputs: ["color", "variant", "size", "readonly", "noBg"] }, { kind: "pipe", type: JsonPipe, name: "json" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1038
1038
  }
1039
1039
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ShipBlueprint, decorators: [{
1040
1040
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"ship-ui-core-ship-blueprint.mjs","sources":["../../../projects/ship-ui/ship-blueprint/autolayout.ts","../../../projects/ship-ui/ship-blueprint/validatePorts.ts","../../../projects/ship-ui/ship-blueprint/ship-blueprint.ts","../../../projects/ship-ui/ship-blueprint/ship-ui-core-ship-blueprint.ts"],"sourcesContent":["import { BlueprintNode } from './ship-blueprint';\n\nexport function layoutNodes(nodes: BlueprintNode[]): BlueprintNode[] {\n if (!nodes || nodes.length === 0) return nodes;\n\n const layoutedNodes = structuredClone(nodes);\n const visited = new Set<string>();\n const unconnectedNodes: BlueprintNode[] = [];\n const connectedGraphs: BlueprintNode[][] = [];\n\n const allToNodes = new Set(layoutedNodes.flatMap((node) => node.connections).map((conn) => conn.toNode));\n const rootNodes = layoutedNodes.filter((node) => !allToNodes.has(node.id));\n\n for (const node of layoutedNodes) {\n if (!node.connections.length) {\n unconnectedNodes.push(node);\n }\n }\n\n for (const root of rootNodes) {\n if (!visited.has(root.id)) {\n const graph: BlueprintNode[] = [];\n traverseGraph(root, graph, visited, layoutedNodes);\n if (graph.length > 0) {\n connectedGraphs.push(graph);\n }\n }\n }\n\n positionUnconnectedNodes(unconnectedNodes);\n\n let currentX = 20;\n let currentY = 20;\n connectedGraphs.forEach((graph) => {\n const layoutedGraph = traverseAndLayout(graph);\n positionGraph(layoutedGraph, currentX, currentY);\n currentY += getGraphHeight(layoutedGraph) + 200;\n });\n\n return layoutedNodes;\n}\n\nfunction traverseGraph(\n startNode: BlueprintNode,\n graph: BlueprintNode[],\n visited: Set<string>,\n allNodes: BlueprintNode[]\n) {\n const queue = [startNode];\n visited.add(startNode.id);\n let head = 0;\n while (head < queue.length) {\n const node = queue[head++];\n graph.push(node);\n node.connections.forEach((conn) => {\n const toNode = allNodes.find((n) => n.id === conn.toNode);\n if (toNode && !visited.has(toNode.id)) {\n visited.add(toNode.id);\n queue.push(toNode);\n }\n });\n }\n}\n\nfunction positionUnconnectedNodes(nodes: BlueprintNode[]) {\n nodes.forEach((node, index) => {\n node.coordinates[0] = 20 + index * 200;\n node.coordinates[1] = 20;\n });\n}\n\nfunction traverseAndLayout(graph: BlueprintNode[]): BlueprintNode[] {\n const graphNodeMap = new Map<string, BlueprintNode>(graph.map((n) => [n.id, n]));\n const incomingConnectionCount = new Map<string, number>();\n\n graph.forEach((node) => {\n incomingConnectionCount.set(node.id, 0);\n });\n graph\n .flatMap((n) => n.connections)\n .forEach((conn) => {\n if (graphNodeMap.has(conn.toNode)) {\n incomingConnectionCount.set(conn.toNode, (incomingConnectionCount.get(conn.toNode) || 0) + 1);\n }\n });\n\n const roots = graph.filter((node) => (incomingConnectionCount.get(node.id) || 0) === 0);\n const layoutedNodes = new Set<string>();\n\n const queue = [...roots];\n let head = 0;\n\n while (head < queue.length) {\n const currentNode = queue[head++];\n layoutedNodes.add(currentNode.id);\n\n let outputConnectionIndex = 0;\n const connectedNodes: BlueprintNode[] = [];\n\n currentNode.connections.forEach((conn) => {\n const toNode = graphNodeMap.get(conn.toNode);\n if (toNode && !layoutedNodes.has(toNode.id)) {\n connectedNodes.push(toNode);\n }\n });\n\n connectedNodes.forEach((toNode) => {\n toNode.coordinates[0] = currentNode.coordinates[0] + 200;\n if (connectedNodes.length > 1) {\n const verticalOffset = (outputConnectionIndex - (connectedNodes.length - 1) / 2) * 200;\n toNode.coordinates[1] = currentNode.coordinates[1] + verticalOffset;\n } else {\n toNode.coordinates[1] = currentNode.coordinates[1];\n }\n\n queue.push(toNode);\n outputConnectionIndex++;\n });\n }\n return graph;\n}\n\nfunction positionGraph(graph: BlueprintNode[], startX: number, startY: number) {\n const minX = Math.min(...graph.map((n) => n.coordinates[0]));\n const minY = Math.min(...graph.map((n) => n.coordinates[1]));\n graph.forEach((node) => {\n node.coordinates[0] += startX - minX;\n node.coordinates[1] += startY - minY;\n });\n}\n\nfunction getGraphHeight(graph: BlueprintNode[]): number {\n if (!graph.length) return 0;\n const maxY = Math.max(...graph.map((n) => n.coordinates[1]));\n const minY = Math.min(...graph.map((n) => n.coordinates[1]));\n return maxY - minY;\n}\n","import { BlueprintNode } from './ship-blueprint';\n\nexport type PortValidationError = {\n nodeId: string;\n duplicatePortIds: string[];\n};\n\nexport function findDuplicatePortIDs(nodes: BlueprintNode[]): PortValidationError[] {\n const errors: PortValidationError[] = [];\n\n for (const node of nodes) {\n const portIdCounts = new Map<string, number>();\n const allPorts = [...node.inputs, ...node.outputs];\n\n for (const port of allPorts) {\n const count = portIdCounts.get(port.id) || 0;\n portIdCounts.set(port.id, count + 1);\n }\n\n const duplicatePortIds: string[] = [];\n for (const [id, count] of portIdCounts.entries()) {\n if (count > 1) {\n duplicatePortIds.push(id);\n }\n }\n\n if (duplicatePortIds.length > 0) {\n errors.push({\n nodeId: node.id,\n duplicatePortIds: duplicatePortIds,\n });\n }\n }\n\n return errors;\n}\n\nexport function findDuplicateNodeIDs(nodes: BlueprintNode[]): string[] {\n const nodeIdCounts = new Map<string, number>();\n\n for (const node of nodes) {\n const count = nodeIdCounts.get(node.id) || 0;\n nodeIdCounts.set(node.id, count + 1);\n }\n\n const duplicateNodeIds: string[] = [];\n for (const [id, count] of nodeIdCounts.entries()) {\n if (count > 1) {\n duplicateNodeIds.push(id);\n }\n }\n\n return duplicateNodeIds;\n}\n","import { isPlatformBrowser, JsonPipe } from '@angular/common';\nimport { AfterViewInit, ChangeDetectionStrategy, Component, computed, DOCUMENT, effect, ElementRef, HostListener, inject, input, model, OnDestroy, PLATFORM_ID, signal, ViewChild, ViewEncapsulation } from '@angular/core';\nimport { ShipButton } from '@ship-ui/core/ship-button';\nimport { ShipCard } from '@ship-ui/core/ship-card';\nimport { ShipIcon } from '@ship-ui/core/ship-icon';\nimport { classMutationSignal } from '@ship-ui/core';\nimport { layoutNodes } from './autolayout';\nimport { findDuplicateNodeIDs, findDuplicatePortIDs } from './validatePorts';\n\n// TODO - disallow infinite loops\n// TODO - Autolayout should take port order into account\n// TODO - drag and drop new nodes into the canvas (takes an input creatableNodes without coordinates) this are shown in a right side panel and can be dragged into the canvas\n\ntype Port = { id: string; name: string };\n\nexport type BlueprintNode = {\n id: string;\n name?: string;\n coordinates: Coordinates;\n inputs: Port[];\n outputs: Port[];\n connections: Connection[];\n};\n\ntype Connection = { fromNode: string; fromPort: string; toNode: string; toPort: string };\ntype DragState = { fromNode: string; fromPort: string; x2: number; y2: number };\n\nexport type Coordinates = [x: number, y: number];\n\nexport const TEST_NODES: BlueprintNode[] = [\n {\n id: 'a1',\n name: 'hello a1',\n coordinates: [0, 0],\n inputs: [],\n outputs: [{ id: 'out-1', name: 'Start Output' }],\n connections: [{ fromNode: 'a1', fromPort: 'out-1', toNode: 'b1', toPort: 'in-1' }],\n },\n {\n id: 'b1',\n coordinates: [0, 0],\n inputs: [\n { id: 'in-1', name: 'Input A' },\n { id: 'in-1', name: 'Another Input A' },\n ],\n outputs: [{ id: 'out-1', name: 'Output B' }],\n connections: [\n { fromNode: 'b1', fromPort: 'out-1', toNode: 'c6', toPort: 'in-1' },\n { fromNode: 'a1', fromPort: 'out-1', toNode: 'b1', toPort: 'in-1' },\n ],\n },\n {\n id: 'c6',\n name: 'hello c6',\n coordinates: [0, 0],\n inputs: [{ id: 'in-1', name: 'Input C' }],\n outputs: [{ id: 'out-1', name: 'Output D' }],\n connections: [{ fromNode: 'b1', fromPort: 'out-1', toNode: 'c6', toPort: 'in-1' }],\n },\n];\n\ntype ValidationErrors = {\n duplicateNodeIds: string[];\n duplicatePortIds: {\n nodeId: string;\n duplicatePortIds: string[];\n }[];\n};\n\n@Component({\n selector: 'sh-blueprint',\n styleUrl: './ship-blueprint.scss',\n encapsulation: ViewEncapsulation.None,\n imports: [ShipCard, ShipIcon, JsonPipe, ShipButton],\n template: `\n <div\n class=\"canvas-container\"\n [class.locked]=\"isLocked()\"\n [class.hovering-connection]=\"highlightedConnection()\"\n (mousedown)=\"startPan($event)\"\n (mousemove)=\"pan($event)\"\n (wheel)=\"zoom($event)\"\n (touchstart)=\"handleTouchStart($event)\"\n (touchmove)=\"handleTouchMove($event)\"\n (touchend)=\"handleTouchEnd()\">\n <div class=\"action-panel\">\n <button shButton (click)=\"applyAutolayout()\" class=\"small\">\n Autolayout\n <sh-icon>tree-structure</sh-icon>\n </button>\n\n <ng-content />\n </div>\n\n <canvas #blueprintCanvas></canvas>\n\n @if (validationErrors()) {\n <sh-card class=\"validation-errors type-c\">\n Something went wrong you have\n <br />\n duplicate node IDs or port IDs\n <pre>{{ validationErrors() | json }}</pre>\n </sh-card>\n } @else {\n <div\n class=\"nodes-wrapper\"\n [style.transform]=\"'translate(' + panX() + 'px, ' + panY() + 'px) scale(' + zoomLevel() + ')'\"\n [style.transform-origin]=\"'0 0'\">\n @for (node of visibleNodes(); track node.id) {\n <sh-card\n class=\"node type-c\"\n [style.transform]=\"getDisplayCoordinates(node)\"\n (mouseenter)=\"isHoveringNode.set(true)\"\n (mouseleave)=\"isHoveringNode.set(false)\">\n <header (mousedown)=\"startNodeDrag($event, node.id)\" (touchstart)=\"startNodeDrag($event, node.id)\">\n <span class=\"node-title\">{{ node.name ? node.name : node.id }}</span>\n <sh-icon>list</sh-icon>\n </header>\n <div class=\"ports\">\n <div class=\"inputs\">\n @for (inputPort of node.inputs; track inputPort.id) {\n <div\n class=\"port-wrap\"\n [attr.data-node-id]=\"node.id\"\n [attr.data-port-id]=\"inputPort.id\"\n (click)=\"endPortDrag($event, node.id, inputPort.id)\">\n <div class=\"port input-port\"></div>\n <span class=\"port-name\">{{ inputPort.name }}</span>\n </div>\n }\n </div>\n <div class=\"outputs\">\n @for (outputPort of node.outputs; track outputPort.id) {\n <div\n class=\"port-wrap\"\n [attr.data-node-id]=\"node.id\"\n [attr.data-port-id]=\"outputPort.id\"\n (click)=\"startPortDrag($event, node.id, outputPort.id)\">\n <span class=\"port-name\">{{ outputPort.name }}</span>\n <div class=\"port output-port\"></div>\n </div>\n }\n </div>\n </div>\n </sh-card>\n }\n\n @if (showMidpointDiv()) {\n <div\n class=\"midpoint-div\"\n (click)=\"removeConnection()\"\n [style.left.px]=\"midpointDivPosition()?.x\"\n [style.top.px]=\"midpointDivPosition()?.y\">\n Remove connection\n <sh-icon>trash</sh-icon>\n </div>\n }\n </div>\n }\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ShipBlueprint implements AfterViewInit, OnDestroy {\n readonly #ZOOM_SPEED = 0.01;\n readonly #MAX_ZOOM = 1.5;\n readonly #MIN_ZOOM = 0.5;\n readonly #NODE_WIDTH = 180;\n readonly #NODE_HEADER_HEIGHT = 40;\n readonly #PORT_ROW_HEIGHT = 28;\n\n #document = inject(DOCUMENT);\n #platformId = inject(PLATFORM_ID);\n #selfRef = inject(ElementRef<HTMLElement>);\n #currentClass = classMutationSignal();\n #htmlClass = classMutationSignal(this.#document.documentElement);\n\n asDots = computed(() => this.#currentClass().includes('dots'));\n lightMode = computed(() => this.#htmlClass().includes('light'));\n\n forceUnique = input<boolean>(true);\n autoLayout = input<boolean>(false);\n gridSize = input(20);\n snapToGrid = input<boolean>(true);\n gridColor = input<[string, string]>(['#d8d8d8', '#2c2c2c']);\n\n nodes = model<BlueprintNode[]>([]);\n\n #currentGridColor = computed(() => this.gridColor()[this.lightMode() ? 0 : 1]);\n\n panX = signal(0);\n panY = signal(0);\n zoomLevel = signal(1);\n gridSnapSize = signal(20);\n\n isHoveringNode = signal(false);\n midpointDivPosition = signal<{ x: number; y: number } | null>(null);\n showMidpointDiv = signal(false);\n isLocked = signal(false);\n draggingConnection = signal<DragState | null>(null);\n validationErrors = signal<ValidationErrors | null>(null);\n highlightedConnection = signal<Connection | null>(null);\n\n #draggingNodeCoordinates = signal<Coordinates | null>(null);\n #isDragging = signal(false);\n #lastMouseX = signal(0);\n #lastMouseY = signal(0);\n #initialPinchDistance = signal(0);\n #isNodeDragging = signal(false);\n #draggedNodeId = signal<string | null>(null);\n #dragOffset = signal<Coordinates | null>(null);\n #connections = signal<Connection[]>([]);\n #canvasWidth = signal(0);\n #canvasHeight = signal(0);\n\n @ViewChild('blueprintCanvas', { static: true }) canvasRef!: ElementRef<HTMLCanvasElement>;\n #ctx!: CanvasRenderingContext2D;\n #resizeObserver!: ResizeObserver;\n\n visibleNodes = computed(() => {\n const nodes = this.nodes();\n const panX = this.panX();\n const panY = this.panY();\n const zoom = this.zoomLevel();\n const width = this.#canvasWidth();\n const height = this.#canvasHeight();\n\n if (width === 0 || height === 0) {\n return nodes;\n }\n\n const bufferX = width / zoom;\n const bufferY = height / zoom;\n\n const viewbox = {\n x1: -panX / zoom - bufferX,\n y1: -panY / zoom - bufferY,\n x2: (-panX + width) / zoom + bufferX,\n y2: (-panY + height) / zoom + bufferY,\n };\n\n return nodes.filter((node) => {\n const [x, y] = node.coordinates;\n return x > viewbox.x1 && x < viewbox.x2 && y > viewbox.y1 && y < viewbox.y2;\n });\n });\n\n constructor() {\n if (isPlatformBrowser(this.#platformId)) {\n effect(() => {\n this.asDots();\n this.panX();\n this.panY();\n this.zoomLevel();\n this.nodes();\n this.#connections();\n this.draggingConnection();\n this.#currentGridColor();\n this.highlightedConnection();\n this.#draggingNodeCoordinates();\n\n requestAnimationFrame(() => this.drawCanvas());\n });\n\n effect(() => {\n const nodes = this.nodes();\n const connectionsFromNodes = nodes.flatMap((node) => node.connections);\n const uniqueConnections = connectionsFromNodes.filter(\n (conn, index, self) =>\n index ===\n self.findIndex(\n (c) =>\n c.fromNode === conn.fromNode &&\n c.fromPort === conn.fromPort &&\n c.toNode === conn.toNode &&\n c.toPort === conn.toPort\n )\n );\n\n this.#connections.set(uniqueConnections);\n });\n }\n }\n\n ngAfterViewInit() {\n if (isPlatformBrowser(this.#platformId)) {\n const canvas = this.canvasRef.nativeElement;\n this.#ctx = canvas.getContext('2d')!;\n if (typeof ResizeObserver !== 'undefined') {\n this.#resizeObserver = new ResizeObserver(() => this.updateCanvasSize());\n this.#resizeObserver.observe(this.#selfRef.nativeElement);\n }\n this.updateCanvasSize();\n\n if (this.autoLayout()) {\n this.applyAutolayout();\n }\n\n if (this.forceUnique()) {\n this.#removeDuplicatesAndReinitiate();\n } else {\n this.#validateNodes();\n }\n }\n }\n\n ngOnDestroy() {\n if (this.#resizeObserver) {\n this.#resizeObserver.disconnect();\n }\n }\n\n @HostListener('document:mouseup', ['$event']) onMouseUp(event: MouseEvent) {\n if (this.isLocked()) return;\n\n this.endPan();\n this.endNodeDrag();\n }\n\n @HostListener('document:click', ['$event']) onClick(event: MouseEvent) {\n const target = event.target as HTMLElement;\n\n if (this.draggingConnection()) {\n if (!target.closest('.port')) {\n this.cancelPortDrag();\n }\n } else if (this.isLocked() && !target.closest('.midpoint-div')) {\n this.closeMidpointDiv();\n } else {\n this.#handleConnectionClick(event);\n }\n }\n\n @HostListener('document:keydown.escape', []) onEscape() {\n if (this.draggingConnection()) {\n this.cancelPortDrag();\n } else if (this.isLocked()) {\n this.closeMidpointDiv();\n }\n }\n\n @HostListener('document:mousemove', ['$event']) onMouseMove(event: MouseEvent) {\n if (this.isLocked()) return;\n if (this.#isNodeDragging()) {\n this.nodeDrag(event);\n } else if (this.draggingConnection()) {\n this.updatePathOnMove(event);\n } else {\n this.pan(event);\n if (this.isHoveringNode()) {\n this.highlightedConnection.set(null);\n } else {\n this.#checkConnectionHover(event);\n }\n }\n }\n\n @HostListener('document:touchmove', ['$event']) onTouchMove(event: TouchEvent) {\n event.preventDefault();\n if (this.isLocked()) return;\n if (this.#isNodeDragging()) {\n this.nodeDrag(event.touches[0]);\n } else if (this.draggingConnection()) {\n this.updatePathOnMove(event.touches[0]);\n } else {\n this.handleTouchMove(event);\n }\n }\n\n @HostListener('document:touchend', ['$event']) onDocumentTouchEnd(event: TouchEvent) {\n if (this.isLocked()) return;\n\n this.handleTouchEnd();\n }\n\n applyAutolayout() {\n const newNodes = layoutNodes(this.nodes());\n this.nodes.set(newNodes);\n }\n\n updateCanvasSize() {\n const canvas = this.canvasRef.nativeElement;\n const rect = this.#selfRef.nativeElement.getBoundingClientRect();\n const dpr = window.devicePixelRatio || 1;\n canvas.width = rect.width * dpr;\n canvas.height = rect.height * dpr;\n this.#ctx.scale(dpr, dpr);\n canvas.style.width = `${rect.width}px`;\n canvas.style.height = `${rect.height}px`;\n\n this.#canvasWidth.set(rect.width);\n this.#canvasHeight.set(rect.height);\n\n this.drawCanvas();\n }\n\n drawCanvas() {\n if (!this.#ctx) return;\n\n const ctx = this.#ctx;\n const { width, height } = this.canvasRef.nativeElement;\n const dpr = window.devicePixelRatio || 1;\n ctx.clearRect(0, 0, width / dpr, height / dpr);\n ctx.save();\n ctx.translate(this.panX(), this.panY());\n ctx.scale(this.zoomLevel(), this.zoomLevel());\n this.drawGrid(ctx);\n this.drawConnections(ctx);\n\n if (this.draggingConnection()) {\n this.drawDraggingPath(ctx);\n }\n\n ctx.restore();\n }\n\n drawGrid(ctx: CanvasRenderingContext2D) {\n const { width, height } = this.canvasRef.nativeElement;\n const dpr = window.devicePixelRatio || 1;\n const zoom = this.zoomLevel();\n const panX = this.panX();\n const panY = this.panY();\n const gridSize = this.gridSize();\n const gridColor = this.#currentGridColor();\n const scaledGridSize = gridSize * zoom;\n const dynamicGridSize = scaledGridSize < 20 ? gridSize * 4 : gridSize;\n const startX = Math.floor(-panX / zoom / dynamicGridSize) * dynamicGridSize;\n const startY = Math.floor(-panY / zoom / dynamicGridSize) * dynamicGridSize;\n const endX = startX + width / dpr / zoom + dynamicGridSize;\n const endY = startY + height / dpr / zoom + dynamicGridSize;\n\n if (this.asDots()) {\n const dotRadius = 1 / zoom;\n ctx.fillStyle = gridColor;\n for (let x = startX; x < endX; x += dynamicGridSize) {\n for (let y = startY; y < endY; y += dynamicGridSize) {\n ctx.beginPath();\n ctx.arc(x, y, dotRadius, 0, 2 * Math.PI);\n ctx.fill();\n }\n }\n } else {\n ctx.beginPath();\n ctx.strokeStyle = gridColor;\n ctx.lineWidth = 1 / zoom;\n for (let x = startX; x < endX; x += dynamicGridSize) {\n ctx.moveTo(x, startY);\n ctx.lineTo(x, endY);\n }\n for (let y = startY; y < endY; y += dynamicGridSize) {\n ctx.moveTo(startX, y);\n ctx.lineTo(endX, y);\n }\n ctx.stroke();\n }\n }\n\n drawConnections(ctx: CanvasRenderingContext2D) {\n const highlighted = this.highlightedConnection();\n ctx.lineWidth = 2 / this.zoomLevel();\n\n for (const conn of this.#connections()) {\n const isHighlighted =\n highlighted?.fromNode === conn.fromNode &&\n highlighted?.fromPort === conn.fromPort &&\n highlighted?.toNode === conn.toNode &&\n highlighted?.toPort === conn.toPort;\n\n ctx.strokeStyle = isHighlighted ? '#ffc107' : '#888';\n ctx.beginPath();\n\n const startPos = this.getNodePortPosition(conn.fromNode, conn.fromPort);\n const endPos = this.getNodePortPosition(conn.toNode, conn.toPort);\n\n this.drawCurvedPath(ctx, startPos, endPos);\n ctx.stroke();\n }\n }\n\n drawDraggingPath(ctx: CanvasRenderingContext2D) {\n const conn = this.draggingConnection()!;\n const startPos = this.getNodePortPosition(conn.fromNode, conn.fromPort);\n const endPos = [conn.x2, conn.y2] as Coordinates;\n ctx.strokeStyle = '#5a9cf8';\n ctx.lineWidth = 2 / this.zoomLevel();\n ctx.beginPath();\n this.drawCurvedPath(ctx, startPos, endPos);\n ctx.stroke();\n }\n\n drawCurvedPath(ctx: CanvasRenderingContext2D, start: Coordinates, end: Coordinates) {\n const [x1, y1] = start;\n const [x2, y2] = end;\n const dx = Math.abs(x1 - x2) * 0.7;\n ctx.moveTo(x1, y1);\n ctx.bezierCurveTo(x1 + dx, y1, x2 - dx, y2, x2, y2);\n }\n\n startNodeDrag(event: MouseEvent | TouchEvent, nodeId: string) {\n event.stopPropagation();\n event.preventDefault();\n\n this.#isNodeDragging.set(true);\n this.#draggedNodeId.set(nodeId);\n\n const clientX = event instanceof MouseEvent ? event.clientX : event.touches[0].clientX;\n const clientY = event instanceof MouseEvent ? event.clientY : event.touches[0].clientY;\n\n const blueprintRect = this.#selfRef.nativeElement.getBoundingClientRect();\n const worldX = (clientX - blueprintRect.left - this.panX()) / this.zoomLevel();\n const worldY = (clientY - blueprintRect.top - this.panY()) / this.zoomLevel();\n const draggedNode = this.nodes().find((n) => n.id === nodeId);\n\n if (draggedNode) {\n this.#dragOffset.set([worldX - draggedNode.coordinates[0], worldY - draggedNode.coordinates[1]]);\n }\n\n this.#lastMouseX.set(clientX);\n this.#lastMouseY.set(clientY);\n }\n\n endNodeDrag() {\n const draggedId = this.#draggedNodeId();\n const finalCoords = this.#draggingNodeCoordinates();\n\n if (draggedId && finalCoords) {\n this.nodes.update((nodes) => {\n const node = nodes.find((n) => n.id === draggedId);\n if (node) {\n node.coordinates = finalCoords;\n }\n return [...nodes];\n });\n }\n\n this.#isNodeDragging.set(false);\n this.#draggedNodeId.set(null);\n this.#dragOffset.set(null);\n this.#draggingNodeCoordinates.set(null);\n }\n\n nodeDrag(event: MouseEvent | Touch) {\n const draggedId = this.#draggedNodeId();\n if (!this.#isNodeDragging() || !draggedId) return;\n\n const { clientX, clientY } = event;\n const blueprintRect = this.#selfRef.nativeElement.getBoundingClientRect();\n const worldX = (clientX - blueprintRect.left - this.panX()) / this.zoomLevel();\n const worldY = (clientY - blueprintRect.top - this.panY()) / this.zoomLevel();\n\n let newX = worldX - this.#dragOffset()![0];\n let newY = worldY - this.#dragOffset()![1];\n\n if (this.snapToGrid() || (event instanceof MouseEvent && event.shiftKey)) {\n const grid = this.gridSnapSize();\n newX = Math.round(newX / grid) * grid;\n newY = Math.round(newY / grid) * grid;\n }\n\n this.#draggingNodeCoordinates.set([newX, newY]);\n this.#lastMouseX.set(clientX);\n this.#lastMouseY.set(clientY);\n }\n\n startPortDrag(event: MouseEvent, nodeId: string, portId: string) {\n event.preventDefault();\n event.stopPropagation();\n\n if (this.draggingConnection()) this.cancelPortDrag();\n\n const node = this.nodes().find((n) => n.id === nodeId);\n\n if (node) {\n this.draggingConnection.set({\n fromNode: nodeId,\n fromPort: portId,\n x2: node.coordinates[0],\n y2: node.coordinates[1],\n });\n }\n\n this.updatePathOnMove(event);\n }\n\n endPortDrag(_: MouseEvent, toNodeId: string, toPortId: string) {\n if (!this.draggingConnection()) return;\n\n const from = this.draggingConnection()!;\n\n if (from.fromNode === toNodeId) {\n this.cancelPortDrag();\n return;\n }\n\n const newConnection: Connection = {\n fromNode: from.fromNode,\n fromPort: from.fromPort,\n toNode: toNodeId,\n toPort: toPortId,\n };\n\n this.nodes.update((nodes) => {\n const fromNode = nodes.find((n) => n.id === newConnection.fromNode);\n const toNode = nodes.find((n) => n.id === newConnection.toNode);\n\n if (fromNode && toNode) {\n const isDuplicateFrom = fromNode.connections.some(\n (c) =>\n c.fromNode === newConnection.fromNode &&\n c.fromPort === newConnection.fromPort &&\n c.toNode === newConnection.toNode &&\n c.toPort === newConnection.toPort\n );\n\n if (!isDuplicateFrom) {\n fromNode.connections = [...fromNode.connections, newConnection];\n }\n\n const isDuplicateTo = toNode.connections.some(\n (c) =>\n c.fromNode === newConnection.fromNode &&\n c.fromPort === newConnection.fromPort &&\n c.toNode === newConnection.toNode &&\n c.toPort === newConnection.toPort\n );\n\n if (!isDuplicateTo) {\n toNode.connections = [...toNode.connections, newConnection];\n }\n }\n return [...nodes];\n });\n\n this.cancelPortDrag();\n }\n\n cancelPortDrag() {\n this.draggingConnection.set(null);\n }\n\n updatePathOnMove(event: MouseEvent | Touch) {\n if (!this.draggingConnection()) return;\n\n const blueprintRect = this.#selfRef.nativeElement.getBoundingClientRect();\n const x2 = (event.clientX - blueprintRect.left - this.panX()) / this.zoomLevel();\n const y2 = (event.clientY - blueprintRect.top - this.panY()) / this.zoomLevel();\n\n this.draggingConnection.update((conn) => (conn ? { ...conn, x2, y2 } : conn));\n }\n\n getNodePortPosition(nodeId: string, portId: string): Coordinates {\n const node = this.nodes().find((n) => n.id === nodeId);\n\n if (!node) return [0, 0];\n\n const portEl = this.#selfRef.nativeElement.querySelector(`[data-node-id=\"${nodeId}\"][data-port-id=\"${portId}\"]`);\n\n if (portEl) {\n const nodeWrapper = this.#selfRef.nativeElement.querySelector('.nodes-wrapper')!;\n const wrapperRect = nodeWrapper.getBoundingClientRect();\n const portRect = portEl.getBoundingClientRect();\n const portCenterX = portRect.left + portRect.width / 2;\n const portCenterY = portRect.top + portRect.height / 2;\n const worldX = (portCenterX - wrapperRect.left) / this.zoomLevel();\n const worldY = (portCenterY - wrapperRect.top) / this.zoomLevel();\n\n return [worldX, worldY];\n }\n\n const isInput = node.inputs.some((p) => p.id === portId);\n const portIndex = isInput\n ? node.inputs.findIndex((p) => p.id === portId)\n : node.outputs.findIndex((p) => p.id === portId);\n\n if (portIndex === -1) return node.coordinates;\n\n const portYOffset = this.#NODE_HEADER_HEIGHT + portIndex * this.#PORT_ROW_HEIGHT + this.#PORT_ROW_HEIGHT / 2;\n const portXOffset = isInput ? 0 : this.#NODE_WIDTH;\n\n return [node.coordinates[0] + portXOffset, node.coordinates[1] + portYOffset];\n }\n\n startPan(event: MouseEvent) {\n if (this.isLocked()) return;\n if (event.target instanceof HTMLElement && event.target.closest('.node')) return;\n\n event.preventDefault();\n\n this.#isDragging.set(true);\n this.#lastMouseX.set(event.clientX);\n this.#lastMouseY.set(event.clientY);\n }\n\n endPan() {\n this.#isDragging.set(false);\n }\n\n pan(event: MouseEvent) {\n if (!this.#isDragging() || this.isLocked()) return;\n\n const dx = event.clientX - this.#lastMouseX();\n const dy = event.clientY - this.#lastMouseY();\n\n this.panX.update((x) => x + dx);\n this.panY.update((y) => y + dy);\n\n this.#lastMouseX.set(event.clientX);\n this.#lastMouseY.set(event.clientY);\n }\n\n zoom(event: WheelEvent) {\n event.preventDefault();\n const oldZoom = this.zoomLevel();\n const newZoom = this.#clamp(oldZoom * (1 - event.deltaY * this.#ZOOM_SPEED), this.#MIN_ZOOM, this.#MAX_ZOOM);\n\n const panRatio = newZoom / oldZoom;\n const newPanX = event.clientX - (event.clientX - this.panX()) * panRatio;\n const newPanY = event.clientY - (event.clientY - this.panY()) * panRatio;\n\n this.zoomLevel.set(newZoom);\n this.panX.set(newPanX);\n this.panY.set(newPanY);\n }\n\n handleTouchStart(event: TouchEvent) {\n if (event.target instanceof HTMLElement && event.target.closest('.node')) return;\n\n event.preventDefault();\n\n if (event.touches.length === 1) {\n this.#isDragging.set(true);\n this.#lastMouseX.set(event.touches[0].clientX);\n this.#lastMouseY.set(event.touches[0].clientY);\n } else if (event.touches.length === 2) {\n this.#isDragging.set(false);\n this.#initialPinchDistance.set(this.#getDistance(event.touches[0], event.touches[1]));\n }\n }\n\n handleTouchMove(event: TouchEvent) {\n event.preventDefault();\n\n if (event.touches.length === 1 && this.#isDragging()) {\n const dx = event.touches[0].clientX - this.#lastMouseX();\n const dy = event.touches[0].clientY - this.#lastMouseY();\n\n this.panX.update((x) => x + dx);\n this.panY.update((y) => y + dy);\n\n this.#lastMouseX.set(event.touches[0].clientX);\n this.#lastMouseY.set(event.touches[0].clientY);\n } else if (event.touches.length === 2) {\n const newPinchDistance = this.#getDistance(event.touches[0], event.touches[1]);\n const pinchRatio = newPinchDistance / this.#initialPinchDistance();\n const oldZoom = this.zoomLevel();\n const newZoom = this.#clamp(oldZoom * pinchRatio, this.#MIN_ZOOM, this.#MAX_ZOOM);\n\n const pinchCenterX = (event.touches[0].clientX + event.touches[1].clientX) / 2;\n const pinchCenterY = (event.touches[0].clientY + event.touches[1].clientY) / 2;\n\n const panRatio = newZoom / oldZoom;\n const newPanX = pinchCenterX - (pinchCenterX - this.panX()) * panRatio;\n const newPanY = pinchCenterY - (pinchCenterY - this.panY()) * panRatio;\n\n this.zoomLevel.set(newZoom);\n this.panX.set(newPanX);\n this.panY.set(newPanY);\n\n this.#initialPinchDistance.set(newPinchDistance);\n }\n }\n\n handleTouchEnd() {\n this.#isDragging.set(false);\n this.endNodeDrag();\n\n if (this.draggingConnection()) {\n this.cancelPortDrag();\n }\n }\n\n closeMidpointDiv() {\n this.showMidpointDiv.set(false);\n this.midpointDivPosition.set(null);\n this.isLocked.set(false);\n }\n\n getDisplayCoordinates(node: BlueprintNode) {\n const draggedId = this.#draggedNodeId();\n const draggingCoords = this.#draggingNodeCoordinates();\n\n if (draggedId === node.id && draggingCoords) {\n return `translate(${draggingCoords[0]}px, ${draggingCoords[1]}px)`;\n }\n\n return `translate(${node.coordinates[0]}px, ${node.coordinates[1]}px)`;\n }\n\n removeConnection() {\n const conn = this.highlightedConnection();\n\n if (!conn) return;\n\n this.#connections.update((conns) =>\n conns.filter(\n (c) =>\n !(\n c.fromNode === conn.fromNode &&\n c.fromPort === conn.fromPort &&\n c.toNode === conn.toNode &&\n c.toPort === conn.toPort\n )\n )\n );\n\n this.nodes.update((nodes) =>\n nodes.map((n) => ({\n ...n,\n connections: n.connections.filter(\n (c) =>\n !(\n c.fromNode === conn.fromNode &&\n c.fromPort === conn.fromPort &&\n c.toNode === conn.toNode &&\n c.toPort === conn.toPort\n )\n ),\n }))\n );\n this.highlightedConnection.set(null);\n this.closeMidpointDiv();\n }\n\n #removeDuplicatesAndReinitiate() {\n const nodes = this.nodes();\n const uniqueNodesMap = new Map<string, BlueprintNode>();\n const uniqueNodes: BlueprintNode[] = [];\n\n for (const node of nodes) {\n if (!uniqueNodesMap.has(node.id)) {\n uniqueNodesMap.set(node.id, node);\n uniqueNodes.push(node);\n }\n }\n\n const nodesWithUniquePorts = uniqueNodes.map((node) => {\n const uniqueInputs = new Map<string, Port>();\n const uniqueOutputs = new Map<string, Port>();\n\n const uniqueNodeInputs = node.inputs.filter((port) => {\n if (!uniqueInputs.has(port.id)) {\n uniqueInputs.set(port.id, port);\n return true;\n }\n return false;\n });\n\n const uniqueNodeOutputs = node.outputs.filter((port) => {\n if (!uniqueOutputs.has(port.id)) {\n uniqueOutputs.set(port.id, port);\n return true;\n }\n return false;\n });\n\n return {\n ...node,\n inputs: uniqueNodeInputs,\n outputs: uniqueNodeOutputs,\n };\n });\n\n const finalNodes = nodesWithUniquePorts.map((node) => {\n const validConnections = node.connections.filter((conn) => {\n const fromNodeExists = nodesWithUniquePorts.some((n) => n.id === conn.fromNode);\n const toNodeExists = nodesWithUniquePorts.some((n) => n.id === conn.toNode);\n const fromPortExists = nodesWithUniquePorts\n .find((n) => n.id === conn.fromNode)\n ?.outputs.some((p) => p.id === conn.fromPort);\n const toPortExists = nodesWithUniquePorts\n .find((n) => n.id === conn.toNode)\n ?.inputs.some((p) => p.id === conn.toPort);\n\n return fromNodeExists && toNodeExists && fromPortExists && toPortExists;\n });\n return { ...node, connections: validConnections };\n });\n\n this.nodes.set(finalNodes);\n }\n\n #handleConnectionClick(event: MouseEvent) {\n if (this.highlightedConnection()) {\n const conn = this.highlightedConnection()!;\n const startPos = this.getNodePortPosition(conn.fromNode, conn.fromPort);\n const endPos = this.getNodePortPosition(conn.toNode, conn.toPort);\n const midpoint = this.#getBezierMidpoint(startPos, endPos);\n\n this.midpointDivPosition.set({ x: midpoint[0], y: midpoint[1] });\n this.showMidpointDiv.set(true);\n this.isLocked.set(true);\n }\n }\n\n #getBezierMidpoint(start: Coordinates, end: Coordinates): Coordinates {\n const t = 0.5;\n const [x1, y1] = start;\n const [x2, y2] = end;\n const dx = Math.abs(x1 - x2) * 0.7;\n const cp1x = x1 + dx;\n const cp1y = y1;\n const cp2x = x2 - dx;\n const cp2y = y2;\n\n const mx =\n Math.pow(1 - t, 3) * x1 +\n 3 * Math.pow(1 - t, 2) * t * cp1x +\n 3 * (1 - t) * Math.pow(t, 2) * cp2x +\n Math.pow(t, 3) * x2;\n\n const my =\n Math.pow(1 - t, 3) * y1 +\n 3 * Math.pow(1 - t, 2) * t * cp1y +\n 3 * (1 - t) * Math.pow(t, 2) * cp2y +\n Math.pow(t, 3) * y2;\n\n return [mx, my];\n }\n\n #checkConnectionHover(event: MouseEvent) {\n const blueprintRect = this.#selfRef.nativeElement.getBoundingClientRect();\n const worldX = (event.clientX - blueprintRect.left - this.panX()) / this.zoomLevel();\n const worldY = (event.clientY - blueprintRect.top - this.panY()) / this.zoomLevel();\n const cursorPoint: Coordinates = [worldX, worldY];\n\n let hoveredConn: Connection | null = null;\n const tolerance = 10 / this.zoomLevel();\n\n for (const conn of this.#connections()) {\n const startPos = this.getNodePortPosition(conn.fromNode, conn.fromPort);\n const endPos = this.getNodePortPosition(conn.toNode, conn.toPort);\n\n if (this.#isPointNearBezierCurve(cursorPoint, startPos, endPos, tolerance)) {\n hoveredConn = conn;\n break;\n }\n }\n\n this.highlightedConnection.set(hoveredConn);\n }\n\n #isPointNearBezierCurve(point: Coordinates, start: Coordinates, end: Coordinates, tolerance: number = 10): boolean {\n const [x1, y1] = start;\n const [x2, y2] = end;\n const dx = Math.abs(x1 - x2) * 0.7;\n const cp1x = x1 + dx;\n const cp1y = y1;\n const cp2x = x2 - dx;\n const cp2y = y2;\n\n const steps = 20;\n for (let i = 0; i <= steps; i++) {\n const t = i / steps;\n\n const x =\n Math.pow(1 - t, 3) * x1 +\n 3 * Math.pow(1 - t, 2) * t * cp1x +\n 3 * (1 - t) * Math.pow(t, 2) * cp2x +\n Math.pow(t, 3) * x2;\n const y =\n Math.pow(1 - t, 3) * y1 +\n 3 * Math.pow(1 - t, 2) * t * cp1y +\n 3 * (1 - t) * Math.pow(t, 2) * cp2y +\n Math.pow(t, 3) * y2;\n\n const distance = Math.sqrt(Math.pow(point[0] - x, 2) + Math.pow(point[1] - y, 2));\n if (distance < tolerance) {\n return true;\n }\n }\n\n return false;\n }\n\n public getNewNodeCoordinates(panToCoordinates = false): Coordinates {\n let lowestY = 0;\n if (this.nodes().length > 0) {\n lowestY = this.nodes().reduce((max, node) => Math.max(max, node.coordinates[1]), 0);\n }\n\n const newCoordinates: Coordinates = [20, lowestY + 200];\n\n if (panToCoordinates) {\n this.#panToCoordinates(newCoordinates);\n }\n\n return newCoordinates;\n }\n\n #validateNodes() {\n const duplicatePortIds = findDuplicatePortIDs(this.nodes());\n const duplicateNodeIds = findDuplicateNodeIDs(this.nodes());\n\n this.validationErrors.set({\n duplicateNodeIds,\n duplicatePortIds,\n });\n }\n\n #panToCoordinates(coords: Coordinates): void {\n const [x, y] = coords;\n const rect = this.#selfRef.nativeElement.getBoundingClientRect();\n\n this.panX.set(rect.width / 2 - x * this.zoomLevel());\n this.panY.set(rect.height / 2 - y * this.zoomLevel());\n }\n\n #getDistance(touch1: Touch, touch2: Touch) {\n const dx = touch1.clientX - touch2.clientX;\n const dy = touch1.clientY - touch2.clientY;\n\n return Math.sqrt(dx * dx + dy * dy);\n }\n\n #clamp(value: number, min: number, max: number) {\n return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sBAQ1C,YAAY;uBAAC,oBAAoB,EAAE,CAAC,QAAQ,CAAC;;sBAgB7C,YAAY;uBAAC,oBAAoB,EAAE,CAAC,QAAQ,CAAC;;sBAY7C,YAAY;uBAAC,mBAAmB,EAAE,CAAC,QAAQ,CAAC;;;ACjX/C;;AAEG;;;;"}
1
+ {"version":3,"file":"ship-ui-core-ship-blueprint.mjs","sources":["../../../projects/ship-ui/ship-blueprint/autolayout.ts","../../../projects/ship-ui/ship-blueprint/validatePorts.ts","../../../projects/ship-ui/ship-blueprint/ship-blueprint.ts","../../../projects/ship-ui/ship-blueprint/ship-ui-core-ship-blueprint.ts"],"sourcesContent":["import { BlueprintNode } from './ship-blueprint';\n\nexport function layoutNodes(nodes: BlueprintNode[]): BlueprintNode[] {\n if (!nodes || nodes.length === 0) return nodes;\n\n const layoutedNodes = structuredClone(nodes);\n const visited = new Set<string>();\n const unconnectedNodes: BlueprintNode[] = [];\n const connectedGraphs: BlueprintNode[][] = [];\n\n const allToNodes = new Set(layoutedNodes.flatMap((node) => node.connections).map((conn) => conn.toNode));\n const rootNodes = layoutedNodes.filter((node) => !allToNodes.has(node.id));\n\n for (const node of layoutedNodes) {\n if (!node.connections.length) {\n unconnectedNodes.push(node);\n }\n }\n\n for (const root of rootNodes) {\n if (!visited.has(root.id)) {\n const graph: BlueprintNode[] = [];\n traverseGraph(root, graph, visited, layoutedNodes);\n if (graph.length > 0) {\n connectedGraphs.push(graph);\n }\n }\n }\n\n positionUnconnectedNodes(unconnectedNodes);\n\n let currentX = 20;\n let currentY = 20;\n connectedGraphs.forEach((graph) => {\n const layoutedGraph = traverseAndLayout(graph);\n positionGraph(layoutedGraph, currentX, currentY);\n currentY += getGraphHeight(layoutedGraph) + 200;\n });\n\n return layoutedNodes;\n}\n\nfunction traverseGraph(\n startNode: BlueprintNode,\n graph: BlueprintNode[],\n visited: Set<string>,\n allNodes: BlueprintNode[]\n) {\n const queue = [startNode];\n visited.add(startNode.id);\n let head = 0;\n while (head < queue.length) {\n const node = queue[head++];\n graph.push(node);\n node.connections.forEach((conn) => {\n const toNode = allNodes.find((n) => n.id === conn.toNode);\n if (toNode && !visited.has(toNode.id)) {\n visited.add(toNode.id);\n queue.push(toNode);\n }\n });\n }\n}\n\nfunction positionUnconnectedNodes(nodes: BlueprintNode[]) {\n nodes.forEach((node, index) => {\n node.coordinates[0] = 20 + index * 200;\n node.coordinates[1] = 20;\n });\n}\n\nfunction traverseAndLayout(graph: BlueprintNode[]): BlueprintNode[] {\n const graphNodeMap = new Map<string, BlueprintNode>(graph.map((n) => [n.id, n]));\n const incomingConnectionCount = new Map<string, number>();\n\n graph.forEach((node) => {\n incomingConnectionCount.set(node.id, 0);\n });\n graph\n .flatMap((n) => n.connections)\n .forEach((conn) => {\n if (graphNodeMap.has(conn.toNode)) {\n incomingConnectionCount.set(conn.toNode, (incomingConnectionCount.get(conn.toNode) || 0) + 1);\n }\n });\n\n const roots = graph.filter((node) => (incomingConnectionCount.get(node.id) || 0) === 0);\n const layoutedNodes = new Set<string>();\n\n const queue = [...roots];\n let head = 0;\n\n while (head < queue.length) {\n const currentNode = queue[head++];\n layoutedNodes.add(currentNode.id);\n\n let outputConnectionIndex = 0;\n const connectedNodes: BlueprintNode[] = [];\n\n currentNode.connections.forEach((conn) => {\n const toNode = graphNodeMap.get(conn.toNode);\n if (toNode && !layoutedNodes.has(toNode.id)) {\n connectedNodes.push(toNode);\n }\n });\n\n connectedNodes.forEach((toNode) => {\n toNode.coordinates[0] = currentNode.coordinates[0] + 200;\n if (connectedNodes.length > 1) {\n const verticalOffset = (outputConnectionIndex - (connectedNodes.length - 1) / 2) * 200;\n toNode.coordinates[1] = currentNode.coordinates[1] + verticalOffset;\n } else {\n toNode.coordinates[1] = currentNode.coordinates[1];\n }\n\n queue.push(toNode);\n outputConnectionIndex++;\n });\n }\n return graph;\n}\n\nfunction positionGraph(graph: BlueprintNode[], startX: number, startY: number) {\n const minX = Math.min(...graph.map((n) => n.coordinates[0]));\n const minY = Math.min(...graph.map((n) => n.coordinates[1]));\n graph.forEach((node) => {\n node.coordinates[0] += startX - minX;\n node.coordinates[1] += startY - minY;\n });\n}\n\nfunction getGraphHeight(graph: BlueprintNode[]): number {\n if (!graph.length) return 0;\n const maxY = Math.max(...graph.map((n) => n.coordinates[1]));\n const minY = Math.min(...graph.map((n) => n.coordinates[1]));\n return maxY - minY;\n}\n","import { BlueprintNode } from './ship-blueprint';\n\nexport type PortValidationError = {\n nodeId: string;\n duplicatePortIds: string[];\n};\n\nexport function findDuplicatePortIDs(nodes: BlueprintNode[]): PortValidationError[] {\n const errors: PortValidationError[] = [];\n\n for (const node of nodes) {\n const portIdCounts = new Map<string, number>();\n const allPorts = [...node.inputs, ...node.outputs];\n\n for (const port of allPorts) {\n const count = portIdCounts.get(port.id) || 0;\n portIdCounts.set(port.id, count + 1);\n }\n\n const duplicatePortIds: string[] = [];\n for (const [id, count] of portIdCounts.entries()) {\n if (count > 1) {\n duplicatePortIds.push(id);\n }\n }\n\n if (duplicatePortIds.length > 0) {\n errors.push({\n nodeId: node.id,\n duplicatePortIds: duplicatePortIds,\n });\n }\n }\n\n return errors;\n}\n\nexport function findDuplicateNodeIDs(nodes: BlueprintNode[]): string[] {\n const nodeIdCounts = new Map<string, number>();\n\n for (const node of nodes) {\n const count = nodeIdCounts.get(node.id) || 0;\n nodeIdCounts.set(node.id, count + 1);\n }\n\n const duplicateNodeIds: string[] = [];\n for (const [id, count] of nodeIdCounts.entries()) {\n if (count > 1) {\n duplicateNodeIds.push(id);\n }\n }\n\n return duplicateNodeIds;\n}\n","import { isPlatformBrowser, JsonPipe } from '@angular/common';\nimport { AfterViewInit, ChangeDetectionStrategy, Component, computed, DOCUMENT, effect, ElementRef, HostListener, inject, input, model, OnDestroy, PLATFORM_ID, signal, ViewChild, ViewEncapsulation } from '@angular/core';\nimport { ShipButton } from '@ship-ui/core/ship-button';\nimport { ShipCard } from '@ship-ui/core/ship-card';\nimport { ShipIcon } from '@ship-ui/core/ship-icon';\nimport { classMutationSignal } from '@ship-ui/core';\nimport { layoutNodes } from './autolayout';\nimport { findDuplicateNodeIDs, findDuplicatePortIDs } from './validatePorts';\n\n// TODO - disallow infinite loops\n// TODO - Autolayout should take port order into account\n// TODO - drag and drop new nodes into the canvas (takes an input creatableNodes without coordinates) this are shown in a right side panel and can be dragged into the canvas\n\ntype Port = { id: string; name: string };\n\nexport type BlueprintNode = {\n id: string;\n name?: string;\n coordinates: Coordinates;\n inputs: Port[];\n outputs: Port[];\n connections: Connection[];\n};\n\ntype Connection = { fromNode: string; fromPort: string; toNode: string; toPort: string };\ntype DragState = { fromNode: string; fromPort: string; x2: number; y2: number };\n\nexport type Coordinates = [x: number, y: number];\n\nexport const TEST_NODES: BlueprintNode[] = [\n {\n id: 'a1',\n name: 'hello a1',\n coordinates: [0, 0],\n inputs: [],\n outputs: [{ id: 'out-1', name: 'Start Output' }],\n connections: [{ fromNode: 'a1', fromPort: 'out-1', toNode: 'b1', toPort: 'in-1' }],\n },\n {\n id: 'b1',\n coordinates: [0, 0],\n inputs: [\n { id: 'in-1', name: 'Input A' },\n { id: 'in-1', name: 'Another Input A' },\n ],\n outputs: [{ id: 'out-1', name: 'Output B' }],\n connections: [\n { fromNode: 'b1', fromPort: 'out-1', toNode: 'c6', toPort: 'in-1' },\n { fromNode: 'a1', fromPort: 'out-1', toNode: 'b1', toPort: 'in-1' },\n ],\n },\n {\n id: 'c6',\n name: 'hello c6',\n coordinates: [0, 0],\n inputs: [{ id: 'in-1', name: 'Input C' }],\n outputs: [{ id: 'out-1', name: 'Output D' }],\n connections: [{ fromNode: 'b1', fromPort: 'out-1', toNode: 'c6', toPort: 'in-1' }],\n },\n];\n\ntype ValidationErrors = {\n duplicateNodeIds: string[];\n duplicatePortIds: {\n nodeId: string;\n duplicatePortIds: string[];\n }[];\n};\n\n@Component({\n selector: 'sh-blueprint',\n styleUrl: './ship-blueprint.scss',\n encapsulation: ViewEncapsulation.None,\n imports: [ShipCard, ShipIcon, JsonPipe, ShipButton],\n template: `\n <div\n class=\"canvas-container\"\n [class.locked]=\"isLocked()\"\n [class.hovering-connection]=\"highlightedConnection()\"\n (mousedown)=\"startPan($event)\"\n (mousemove)=\"pan($event)\"\n (wheel)=\"zoom($event)\"\n (touchstart)=\"handleTouchStart($event)\"\n (touchmove)=\"handleTouchMove($event)\"\n (touchend)=\"handleTouchEnd()\">\n <div class=\"action-panel\">\n <button shButton (click)=\"applyAutolayout()\" class=\"small\">\n Autolayout\n <sh-icon>tree-structure</sh-icon>\n </button>\n\n <ng-content />\n </div>\n\n <canvas #blueprintCanvas></canvas>\n\n @if (validationErrors()) {\n <sh-card class=\"validation-errors type-c\">\n Something went wrong you have\n <br />\n duplicate node IDs or port IDs\n <pre>{{ validationErrors() | json }}</pre>\n </sh-card>\n } @else {\n <div\n class=\"nodes-wrapper\"\n [style.transform]=\"'translate(' + panX() + 'px, ' + panY() + 'px) scale(' + zoomLevel() + ')'\"\n [style.transform-origin]=\"'0 0'\">\n @for (node of visibleNodes(); track node.id) {\n <sh-card\n class=\"node type-c\"\n [style.transform]=\"getDisplayCoordinates(node)\"\n (mouseenter)=\"isHoveringNode.set(true)\"\n (mouseleave)=\"isHoveringNode.set(false)\">\n <header (mousedown)=\"startNodeDrag($event, node.id)\" (touchstart)=\"startNodeDrag($event, node.id)\">\n <span class=\"node-title\">{{ node.name ? node.name : node.id }}</span>\n <sh-icon>list</sh-icon>\n </header>\n <div class=\"ports\">\n <div class=\"inputs\">\n @for (inputPort of node.inputs; track inputPort.id) {\n <div\n class=\"port-wrap\"\n [attr.data-node-id]=\"node.id\"\n [attr.data-port-id]=\"inputPort.id\"\n (click)=\"endPortDrag($event, node.id, inputPort.id)\">\n <div class=\"port input-port\"></div>\n <span class=\"port-name\">{{ inputPort.name }}</span>\n </div>\n }\n </div>\n <div class=\"outputs\">\n @for (outputPort of node.outputs; track outputPort.id) {\n <div\n class=\"port-wrap\"\n [attr.data-node-id]=\"node.id\"\n [attr.data-port-id]=\"outputPort.id\"\n (click)=\"startPortDrag($event, node.id, outputPort.id)\">\n <span class=\"port-name\">{{ outputPort.name }}</span>\n <div class=\"port output-port\"></div>\n </div>\n }\n </div>\n </div>\n </sh-card>\n }\n\n @if (showMidpointDiv()) {\n <div\n class=\"midpoint-div\"\n (click)=\"removeConnection()\"\n [style.left.px]=\"midpointDivPosition()?.x\"\n [style.top.px]=\"midpointDivPosition()?.y\">\n Remove connection\n <sh-icon>trash</sh-icon>\n </div>\n }\n </div>\n }\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ShipBlueprint implements AfterViewInit, OnDestroy {\n readonly #ZOOM_SPEED = 0.01;\n readonly #MAX_ZOOM = 1.5;\n readonly #MIN_ZOOM = 0.5;\n readonly #NODE_WIDTH = 180;\n readonly #NODE_HEADER_HEIGHT = 40;\n readonly #PORT_ROW_HEIGHT = 28;\n\n #document = inject(DOCUMENT);\n #platformId = inject(PLATFORM_ID);\n #selfRef = inject(ElementRef<HTMLElement>);\n #currentClass = classMutationSignal();\n #htmlClass = classMutationSignal(this.#document.documentElement);\n\n asDots = computed(() => this.#currentClass().includes('dots'));\n lightMode = computed(() => this.#htmlClass().includes('light'));\n\n forceUnique = input<boolean>(true);\n autoLayout = input<boolean>(false);\n gridSize = input(20);\n snapToGrid = input<boolean>(true);\n gridColor = input<[string, string]>(['#d8d8d8', '#2c2c2c']);\n\n nodes = model<BlueprintNode[]>([]);\n\n #currentGridColor = computed(() => this.gridColor()[this.lightMode() ? 0 : 1]);\n\n panX = signal(0);\n panY = signal(0);\n zoomLevel = signal(1);\n gridSnapSize = signal(20);\n\n isHoveringNode = signal(false);\n midpointDivPosition = signal<{ x: number; y: number } | null>(null);\n showMidpointDiv = signal(false);\n isLocked = signal(false);\n draggingConnection = signal<DragState | null>(null);\n validationErrors = signal<ValidationErrors | null>(null);\n highlightedConnection = signal<Connection | null>(null);\n\n #draggingNodeCoordinates = signal<Coordinates | null>(null);\n #isDragging = signal(false);\n #lastMouseX = signal(0);\n #lastMouseY = signal(0);\n #initialPinchDistance = signal(0);\n #isNodeDragging = signal(false);\n #draggedNodeId = signal<string | null>(null);\n #dragOffset = signal<Coordinates | null>(null);\n #connections = signal<Connection[]>([]);\n #canvasWidth = signal(0);\n #canvasHeight = signal(0);\n\n @ViewChild('blueprintCanvas', { static: true }) canvasRef!: ElementRef<HTMLCanvasElement>;\n #ctx!: CanvasRenderingContext2D;\n #resizeObserver!: ResizeObserver;\n\n visibleNodes = computed(() => {\n const nodes = this.nodes();\n const panX = this.panX();\n const panY = this.panY();\n const zoom = this.zoomLevel();\n const width = this.#canvasWidth();\n const height = this.#canvasHeight();\n\n if (width === 0 || height === 0) {\n return nodes;\n }\n\n const bufferX = width / zoom;\n const bufferY = height / zoom;\n\n const viewbox = {\n x1: -panX / zoom - bufferX,\n y1: -panY / zoom - bufferY,\n x2: (-panX + width) / zoom + bufferX,\n y2: (-panY + height) / zoom + bufferY,\n };\n\n return nodes.filter((node) => {\n const [x, y] = node.coordinates;\n return x > viewbox.x1 && x < viewbox.x2 && y > viewbox.y1 && y < viewbox.y2;\n });\n });\n\n constructor() {\n if (isPlatformBrowser(this.#platformId)) {\n effect(() => {\n this.asDots();\n this.panX();\n this.panY();\n this.zoomLevel();\n this.nodes();\n this.#connections();\n this.draggingConnection();\n this.#currentGridColor();\n this.highlightedConnection();\n this.#draggingNodeCoordinates();\n\n requestAnimationFrame(() => this.drawCanvas());\n });\n\n effect(() => {\n const nodes = this.nodes();\n const connectionsFromNodes = nodes.flatMap((node) => node.connections);\n const uniqueConnections = connectionsFromNodes.filter(\n (conn, index, self) =>\n index ===\n self.findIndex(\n (c) =>\n c.fromNode === conn.fromNode &&\n c.fromPort === conn.fromPort &&\n c.toNode === conn.toNode &&\n c.toPort === conn.toPort\n )\n );\n\n this.#connections.set(uniqueConnections);\n });\n }\n }\n\n ngAfterViewInit() {\n if (isPlatformBrowser(this.#platformId)) {\n const canvas = this.canvasRef.nativeElement;\n this.#ctx = canvas.getContext('2d')!;\n if (typeof ResizeObserver !== 'undefined') {\n this.#resizeObserver = new ResizeObserver(() => this.updateCanvasSize());\n this.#resizeObserver.observe(this.#selfRef.nativeElement);\n }\n this.updateCanvasSize();\n\n if (this.autoLayout()) {\n this.applyAutolayout();\n }\n\n if (this.forceUnique()) {\n this.#removeDuplicatesAndReinitiate();\n } else {\n this.#validateNodes();\n }\n }\n }\n\n ngOnDestroy() {\n if (this.#resizeObserver) {\n this.#resizeObserver.disconnect();\n }\n }\n\n @HostListener('document:mouseup', ['$event']) onMouseUp(event: MouseEvent) {\n if (this.isLocked()) return;\n\n this.endPan();\n this.endNodeDrag();\n }\n\n @HostListener('document:click', ['$event']) onClick(event: MouseEvent) {\n const target = event.target as HTMLElement;\n\n if (this.draggingConnection()) {\n if (!target.closest('.port')) {\n this.cancelPortDrag();\n }\n } else if (this.isLocked() && !target.closest('.midpoint-div')) {\n this.closeMidpointDiv();\n } else {\n this.#handleConnectionClick(event);\n }\n }\n\n @HostListener('document:keydown.escape', []) onEscape() {\n if (this.draggingConnection()) {\n this.cancelPortDrag();\n } else if (this.isLocked()) {\n this.closeMidpointDiv();\n }\n }\n\n @HostListener('document:mousemove', ['$event']) onMouseMove(event: MouseEvent) {\n if (this.isLocked()) return;\n if (this.#isNodeDragging()) {\n this.nodeDrag(event);\n } else if (this.draggingConnection()) {\n this.updatePathOnMove(event);\n } else {\n this.pan(event);\n if (this.isHoveringNode()) {\n this.highlightedConnection.set(null);\n } else {\n this.#checkConnectionHover(event);\n }\n }\n }\n\n @HostListener('document:touchmove', ['$event']) onTouchMove(event: TouchEvent) {\n event.preventDefault();\n if (this.isLocked()) return;\n if (this.#isNodeDragging()) {\n this.nodeDrag(event.touches[0]);\n } else if (this.draggingConnection()) {\n this.updatePathOnMove(event.touches[0]);\n } else {\n this.handleTouchMove(event);\n }\n }\n\n @HostListener('document:touchend', ['$event']) onDocumentTouchEnd(event: TouchEvent) {\n if (this.isLocked()) return;\n\n this.handleTouchEnd();\n }\n\n applyAutolayout() {\n const newNodes = layoutNodes(this.nodes());\n this.nodes.set(newNodes);\n }\n\n updateCanvasSize() {\n const canvas = this.canvasRef.nativeElement;\n const rect = this.#selfRef.nativeElement.getBoundingClientRect();\n const dpr = window.devicePixelRatio || 1;\n canvas.width = rect.width * dpr;\n canvas.height = rect.height * dpr;\n this.#ctx.scale(dpr, dpr);\n canvas.style.width = `${rect.width}px`;\n canvas.style.height = `${rect.height}px`;\n\n this.#canvasWidth.set(rect.width);\n this.#canvasHeight.set(rect.height);\n\n this.drawCanvas();\n }\n\n drawCanvas() {\n if (!this.#ctx) return;\n\n const ctx = this.#ctx;\n const { width, height } = this.canvasRef.nativeElement;\n const dpr = window.devicePixelRatio || 1;\n ctx.clearRect(0, 0, width / dpr, height / dpr);\n ctx.save();\n ctx.translate(this.panX(), this.panY());\n ctx.scale(this.zoomLevel(), this.zoomLevel());\n this.drawGrid(ctx);\n this.drawConnections(ctx);\n\n if (this.draggingConnection()) {\n this.drawDraggingPath(ctx);\n }\n\n ctx.restore();\n }\n\n drawGrid(ctx: CanvasRenderingContext2D) {\n const { width, height } = this.canvasRef.nativeElement;\n const dpr = window.devicePixelRatio || 1;\n const zoom = this.zoomLevel();\n const panX = this.panX();\n const panY = this.panY();\n const gridSize = this.gridSize();\n const gridColor = this.#currentGridColor();\n const scaledGridSize = gridSize * zoom;\n const dynamicGridSize = scaledGridSize < 20 ? gridSize * 4 : gridSize;\n const startX = Math.floor(-panX / zoom / dynamicGridSize) * dynamicGridSize;\n const startY = Math.floor(-panY / zoom / dynamicGridSize) * dynamicGridSize;\n const endX = startX + width / dpr / zoom + dynamicGridSize;\n const endY = startY + height / dpr / zoom + dynamicGridSize;\n\n if (this.asDots()) {\n const dotRadius = 1 / zoom;\n ctx.fillStyle = gridColor;\n for (let x = startX; x < endX; x += dynamicGridSize) {\n for (let y = startY; y < endY; y += dynamicGridSize) {\n ctx.beginPath();\n ctx.arc(x, y, dotRadius, 0, 2 * Math.PI);\n ctx.fill();\n }\n }\n } else {\n ctx.beginPath();\n ctx.strokeStyle = gridColor;\n ctx.lineWidth = 1 / zoom;\n for (let x = startX; x < endX; x += dynamicGridSize) {\n ctx.moveTo(x, startY);\n ctx.lineTo(x, endY);\n }\n for (let y = startY; y < endY; y += dynamicGridSize) {\n ctx.moveTo(startX, y);\n ctx.lineTo(endX, y);\n }\n ctx.stroke();\n }\n }\n\n drawConnections(ctx: CanvasRenderingContext2D) {\n const highlighted = this.highlightedConnection();\n ctx.lineWidth = 2 / this.zoomLevel();\n\n for (const conn of this.#connections()) {\n const isHighlighted =\n highlighted?.fromNode === conn.fromNode &&\n highlighted?.fromPort === conn.fromPort &&\n highlighted?.toNode === conn.toNode &&\n highlighted?.toPort === conn.toPort;\n\n ctx.strokeStyle = isHighlighted ? '#ffc107' : '#888';\n ctx.beginPath();\n\n const startPos = this.getNodePortPosition(conn.fromNode, conn.fromPort);\n const endPos = this.getNodePortPosition(conn.toNode, conn.toPort);\n\n this.drawCurvedPath(ctx, startPos, endPos);\n ctx.stroke();\n }\n }\n\n drawDraggingPath(ctx: CanvasRenderingContext2D) {\n const conn = this.draggingConnection()!;\n const startPos = this.getNodePortPosition(conn.fromNode, conn.fromPort);\n const endPos = [conn.x2, conn.y2] as Coordinates;\n ctx.strokeStyle = '#5a9cf8';\n ctx.lineWidth = 2 / this.zoomLevel();\n ctx.beginPath();\n this.drawCurvedPath(ctx, startPos, endPos);\n ctx.stroke();\n }\n\n drawCurvedPath(ctx: CanvasRenderingContext2D, start: Coordinates, end: Coordinates) {\n const [x1, y1] = start;\n const [x2, y2] = end;\n const dx = Math.abs(x1 - x2) * 0.7;\n ctx.moveTo(x1, y1);\n ctx.bezierCurveTo(x1 + dx, y1, x2 - dx, y2, x2, y2);\n }\n\n startNodeDrag(event: MouseEvent | TouchEvent, nodeId: string) {\n event.stopPropagation();\n event.preventDefault();\n\n this.#isNodeDragging.set(true);\n this.#draggedNodeId.set(nodeId);\n\n const clientX = event instanceof MouseEvent ? event.clientX : event.touches[0].clientX;\n const clientY = event instanceof MouseEvent ? event.clientY : event.touches[0].clientY;\n\n const blueprintRect = this.#selfRef.nativeElement.getBoundingClientRect();\n const worldX = (clientX - blueprintRect.left - this.panX()) / this.zoomLevel();\n const worldY = (clientY - blueprintRect.top - this.panY()) / this.zoomLevel();\n const draggedNode = this.nodes().find((n) => n.id === nodeId);\n\n if (draggedNode) {\n this.#dragOffset.set([worldX - draggedNode.coordinates[0], worldY - draggedNode.coordinates[1]]);\n }\n\n this.#lastMouseX.set(clientX);\n this.#lastMouseY.set(clientY);\n }\n\n endNodeDrag() {\n const draggedId = this.#draggedNodeId();\n const finalCoords = this.#draggingNodeCoordinates();\n\n if (draggedId && finalCoords) {\n this.nodes.update((nodes) => {\n const node = nodes.find((n) => n.id === draggedId);\n if (node) {\n node.coordinates = finalCoords;\n }\n return [...nodes];\n });\n }\n\n this.#isNodeDragging.set(false);\n this.#draggedNodeId.set(null);\n this.#dragOffset.set(null);\n this.#draggingNodeCoordinates.set(null);\n }\n\n nodeDrag(event: MouseEvent | Touch) {\n const draggedId = this.#draggedNodeId();\n if (!this.#isNodeDragging() || !draggedId) return;\n\n const { clientX, clientY } = event;\n const blueprintRect = this.#selfRef.nativeElement.getBoundingClientRect();\n const worldX = (clientX - blueprintRect.left - this.panX()) / this.zoomLevel();\n const worldY = (clientY - blueprintRect.top - this.panY()) / this.zoomLevel();\n\n let newX = worldX - this.#dragOffset()![0];\n let newY = worldY - this.#dragOffset()![1];\n\n if (this.snapToGrid() || (event instanceof MouseEvent && event.shiftKey)) {\n const grid = this.gridSnapSize();\n newX = Math.round(newX / grid) * grid;\n newY = Math.round(newY / grid) * grid;\n }\n\n this.#draggingNodeCoordinates.set([newX, newY]);\n this.#lastMouseX.set(clientX);\n this.#lastMouseY.set(clientY);\n }\n\n startPortDrag(event: MouseEvent, nodeId: string, portId: string) {\n event.preventDefault();\n event.stopPropagation();\n\n if (this.draggingConnection()) this.cancelPortDrag();\n\n const node = this.nodes().find((n) => n.id === nodeId);\n\n if (node) {\n this.draggingConnection.set({\n fromNode: nodeId,\n fromPort: portId,\n x2: node.coordinates[0],\n y2: node.coordinates[1],\n });\n }\n\n this.updatePathOnMove(event);\n }\n\n endPortDrag(_: MouseEvent, toNodeId: string, toPortId: string) {\n if (!this.draggingConnection()) return;\n\n const from = this.draggingConnection()!;\n\n if (from.fromNode === toNodeId) {\n this.cancelPortDrag();\n return;\n }\n\n const newConnection: Connection = {\n fromNode: from.fromNode,\n fromPort: from.fromPort,\n toNode: toNodeId,\n toPort: toPortId,\n };\n\n this.nodes.update((nodes) => {\n const fromNode = nodes.find((n) => n.id === newConnection.fromNode);\n const toNode = nodes.find((n) => n.id === newConnection.toNode);\n\n if (fromNode && toNode) {\n const isDuplicateFrom = fromNode.connections.some(\n (c) =>\n c.fromNode === newConnection.fromNode &&\n c.fromPort === newConnection.fromPort &&\n c.toNode === newConnection.toNode &&\n c.toPort === newConnection.toPort\n );\n\n if (!isDuplicateFrom) {\n fromNode.connections = [...fromNode.connections, newConnection];\n }\n\n const isDuplicateTo = toNode.connections.some(\n (c) =>\n c.fromNode === newConnection.fromNode &&\n c.fromPort === newConnection.fromPort &&\n c.toNode === newConnection.toNode &&\n c.toPort === newConnection.toPort\n );\n\n if (!isDuplicateTo) {\n toNode.connections = [...toNode.connections, newConnection];\n }\n }\n return [...nodes];\n });\n\n this.cancelPortDrag();\n }\n\n cancelPortDrag() {\n this.draggingConnection.set(null);\n }\n\n updatePathOnMove(event: MouseEvent | Touch) {\n if (!this.draggingConnection()) return;\n\n const blueprintRect = this.#selfRef.nativeElement.getBoundingClientRect();\n const x2 = (event.clientX - blueprintRect.left - this.panX()) / this.zoomLevel();\n const y2 = (event.clientY - blueprintRect.top - this.panY()) / this.zoomLevel();\n\n this.draggingConnection.update((conn) => (conn ? { ...conn, x2, y2 } : conn));\n }\n\n getNodePortPosition(nodeId: string, portId: string): Coordinates {\n const node = this.nodes().find((n) => n.id === nodeId);\n\n if (!node) return [0, 0];\n\n const portEl = this.#selfRef.nativeElement.querySelector(`[data-node-id=\"${nodeId}\"][data-port-id=\"${portId}\"]`);\n\n if (portEl) {\n const nodeWrapper = this.#selfRef.nativeElement.querySelector('.nodes-wrapper')!;\n const wrapperRect = nodeWrapper.getBoundingClientRect();\n const portRect = portEl.getBoundingClientRect();\n const portCenterX = portRect.left + portRect.width / 2;\n const portCenterY = portRect.top + portRect.height / 2;\n const worldX = (portCenterX - wrapperRect.left) / this.zoomLevel();\n const worldY = (portCenterY - wrapperRect.top) / this.zoomLevel();\n\n return [worldX, worldY];\n }\n\n const isInput = node.inputs.some((p) => p.id === portId);\n const portIndex = isInput\n ? node.inputs.findIndex((p) => p.id === portId)\n : node.outputs.findIndex((p) => p.id === portId);\n\n if (portIndex === -1) return node.coordinates;\n\n const portYOffset = this.#NODE_HEADER_HEIGHT + portIndex * this.#PORT_ROW_HEIGHT + this.#PORT_ROW_HEIGHT / 2;\n const portXOffset = isInput ? 0 : this.#NODE_WIDTH;\n\n return [node.coordinates[0] + portXOffset, node.coordinates[1] + portYOffset];\n }\n\n startPan(event: MouseEvent) {\n if (this.isLocked()) return;\n if (event.target instanceof HTMLElement && event.target.closest('.node')) return;\n\n event.preventDefault();\n\n this.#isDragging.set(true);\n this.#lastMouseX.set(event.clientX);\n this.#lastMouseY.set(event.clientY);\n }\n\n endPan() {\n this.#isDragging.set(false);\n }\n\n pan(event: MouseEvent) {\n if (!this.#isDragging() || this.isLocked()) return;\n\n const dx = event.clientX - this.#lastMouseX();\n const dy = event.clientY - this.#lastMouseY();\n\n this.panX.update((x) => x + dx);\n this.panY.update((y) => y + dy);\n\n this.#lastMouseX.set(event.clientX);\n this.#lastMouseY.set(event.clientY);\n }\n\n zoom(event: WheelEvent) {\n event.preventDefault();\n const oldZoom = this.zoomLevel();\n const newZoom = this.#clamp(oldZoom * (1 - event.deltaY * this.#ZOOM_SPEED), this.#MIN_ZOOM, this.#MAX_ZOOM);\n\n const panRatio = newZoom / oldZoom;\n const newPanX = event.clientX - (event.clientX - this.panX()) * panRatio;\n const newPanY = event.clientY - (event.clientY - this.panY()) * panRatio;\n\n this.zoomLevel.set(newZoom);\n this.panX.set(newPanX);\n this.panY.set(newPanY);\n }\n\n handleTouchStart(event: TouchEvent) {\n if (event.target instanceof HTMLElement && event.target.closest('.node')) return;\n\n event.preventDefault();\n\n if (event.touches.length === 1) {\n this.#isDragging.set(true);\n this.#lastMouseX.set(event.touches[0].clientX);\n this.#lastMouseY.set(event.touches[0].clientY);\n } else if (event.touches.length === 2) {\n this.#isDragging.set(false);\n this.#initialPinchDistance.set(this.#getDistance(event.touches[0], event.touches[1]));\n }\n }\n\n handleTouchMove(event: TouchEvent) {\n event.preventDefault();\n\n if (event.touches.length === 1 && this.#isDragging()) {\n const dx = event.touches[0].clientX - this.#lastMouseX();\n const dy = event.touches[0].clientY - this.#lastMouseY();\n\n this.panX.update((x) => x + dx);\n this.panY.update((y) => y + dy);\n\n this.#lastMouseX.set(event.touches[0].clientX);\n this.#lastMouseY.set(event.touches[0].clientY);\n } else if (event.touches.length === 2) {\n const newPinchDistance = this.#getDistance(event.touches[0], event.touches[1]);\n const pinchRatio = newPinchDistance / this.#initialPinchDistance();\n const oldZoom = this.zoomLevel();\n const newZoom = this.#clamp(oldZoom * pinchRatio, this.#MIN_ZOOM, this.#MAX_ZOOM);\n\n const pinchCenterX = (event.touches[0].clientX + event.touches[1].clientX) / 2;\n const pinchCenterY = (event.touches[0].clientY + event.touches[1].clientY) / 2;\n\n const panRatio = newZoom / oldZoom;\n const newPanX = pinchCenterX - (pinchCenterX - this.panX()) * panRatio;\n const newPanY = pinchCenterY - (pinchCenterY - this.panY()) * panRatio;\n\n this.zoomLevel.set(newZoom);\n this.panX.set(newPanX);\n this.panY.set(newPanY);\n\n this.#initialPinchDistance.set(newPinchDistance);\n }\n }\n\n handleTouchEnd() {\n this.#isDragging.set(false);\n this.endNodeDrag();\n\n if (this.draggingConnection()) {\n this.cancelPortDrag();\n }\n }\n\n closeMidpointDiv() {\n this.showMidpointDiv.set(false);\n this.midpointDivPosition.set(null);\n this.isLocked.set(false);\n }\n\n getDisplayCoordinates(node: BlueprintNode) {\n const draggedId = this.#draggedNodeId();\n const draggingCoords = this.#draggingNodeCoordinates();\n\n if (draggedId === node.id && draggingCoords) {\n return `translate(${draggingCoords[0]}px, ${draggingCoords[1]}px)`;\n }\n\n return `translate(${node.coordinates[0]}px, ${node.coordinates[1]}px)`;\n }\n\n removeConnection() {\n const conn = this.highlightedConnection();\n\n if (!conn) return;\n\n this.#connections.update((conns) =>\n conns.filter(\n (c) =>\n !(\n c.fromNode === conn.fromNode &&\n c.fromPort === conn.fromPort &&\n c.toNode === conn.toNode &&\n c.toPort === conn.toPort\n )\n )\n );\n\n this.nodes.update((nodes) =>\n nodes.map((n) => ({\n ...n,\n connections: n.connections.filter(\n (c) =>\n !(\n c.fromNode === conn.fromNode &&\n c.fromPort === conn.fromPort &&\n c.toNode === conn.toNode &&\n c.toPort === conn.toPort\n )\n ),\n }))\n );\n this.highlightedConnection.set(null);\n this.closeMidpointDiv();\n }\n\n #removeDuplicatesAndReinitiate() {\n const nodes = this.nodes();\n const uniqueNodesMap = new Map<string, BlueprintNode>();\n const uniqueNodes: BlueprintNode[] = [];\n\n for (const node of nodes) {\n if (!uniqueNodesMap.has(node.id)) {\n uniqueNodesMap.set(node.id, node);\n uniqueNodes.push(node);\n }\n }\n\n const nodesWithUniquePorts = uniqueNodes.map((node) => {\n const uniqueInputs = new Map<string, Port>();\n const uniqueOutputs = new Map<string, Port>();\n\n const uniqueNodeInputs = node.inputs.filter((port) => {\n if (!uniqueInputs.has(port.id)) {\n uniqueInputs.set(port.id, port);\n return true;\n }\n return false;\n });\n\n const uniqueNodeOutputs = node.outputs.filter((port) => {\n if (!uniqueOutputs.has(port.id)) {\n uniqueOutputs.set(port.id, port);\n return true;\n }\n return false;\n });\n\n return {\n ...node,\n inputs: uniqueNodeInputs,\n outputs: uniqueNodeOutputs,\n };\n });\n\n const finalNodes = nodesWithUniquePorts.map((node) => {\n const validConnections = node.connections.filter((conn) => {\n const fromNodeExists = nodesWithUniquePorts.some((n) => n.id === conn.fromNode);\n const toNodeExists = nodesWithUniquePorts.some((n) => n.id === conn.toNode);\n const fromPortExists = nodesWithUniquePorts\n .find((n) => n.id === conn.fromNode)\n ?.outputs.some((p) => p.id === conn.fromPort);\n const toPortExists = nodesWithUniquePorts\n .find((n) => n.id === conn.toNode)\n ?.inputs.some((p) => p.id === conn.toPort);\n\n return fromNodeExists && toNodeExists && fromPortExists && toPortExists;\n });\n return { ...node, connections: validConnections };\n });\n\n this.nodes.set(finalNodes);\n }\n\n #handleConnectionClick(event: MouseEvent) {\n if (this.highlightedConnection()) {\n const conn = this.highlightedConnection()!;\n const startPos = this.getNodePortPosition(conn.fromNode, conn.fromPort);\n const endPos = this.getNodePortPosition(conn.toNode, conn.toPort);\n const midpoint = this.#getBezierMidpoint(startPos, endPos);\n\n this.midpointDivPosition.set({ x: midpoint[0], y: midpoint[1] });\n this.showMidpointDiv.set(true);\n this.isLocked.set(true);\n }\n }\n\n #getBezierMidpoint(start: Coordinates, end: Coordinates): Coordinates {\n const t = 0.5;\n const [x1, y1] = start;\n const [x2, y2] = end;\n const dx = Math.abs(x1 - x2) * 0.7;\n const cp1x = x1 + dx;\n const cp1y = y1;\n const cp2x = x2 - dx;\n const cp2y = y2;\n\n const mx =\n Math.pow(1 - t, 3) * x1 +\n 3 * Math.pow(1 - t, 2) * t * cp1x +\n 3 * (1 - t) * Math.pow(t, 2) * cp2x +\n Math.pow(t, 3) * x2;\n\n const my =\n Math.pow(1 - t, 3) * y1 +\n 3 * Math.pow(1 - t, 2) * t * cp1y +\n 3 * (1 - t) * Math.pow(t, 2) * cp2y +\n Math.pow(t, 3) * y2;\n\n return [mx, my];\n }\n\n #checkConnectionHover(event: MouseEvent) {\n const blueprintRect = this.#selfRef.nativeElement.getBoundingClientRect();\n const worldX = (event.clientX - blueprintRect.left - this.panX()) / this.zoomLevel();\n const worldY = (event.clientY - blueprintRect.top - this.panY()) / this.zoomLevel();\n const cursorPoint: Coordinates = [worldX, worldY];\n\n let hoveredConn: Connection | null = null;\n const tolerance = 10 / this.zoomLevel();\n\n for (const conn of this.#connections()) {\n const startPos = this.getNodePortPosition(conn.fromNode, conn.fromPort);\n const endPos = this.getNodePortPosition(conn.toNode, conn.toPort);\n\n if (this.#isPointNearBezierCurve(cursorPoint, startPos, endPos, tolerance)) {\n hoveredConn = conn;\n break;\n }\n }\n\n this.highlightedConnection.set(hoveredConn);\n }\n\n #isPointNearBezierCurve(point: Coordinates, start: Coordinates, end: Coordinates, tolerance: number = 10): boolean {\n const [x1, y1] = start;\n const [x2, y2] = end;\n const dx = Math.abs(x1 - x2) * 0.7;\n const cp1x = x1 + dx;\n const cp1y = y1;\n const cp2x = x2 - dx;\n const cp2y = y2;\n\n const steps = 20;\n for (let i = 0; i <= steps; i++) {\n const t = i / steps;\n\n const x =\n Math.pow(1 - t, 3) * x1 +\n 3 * Math.pow(1 - t, 2) * t * cp1x +\n 3 * (1 - t) * Math.pow(t, 2) * cp2x +\n Math.pow(t, 3) * x2;\n const y =\n Math.pow(1 - t, 3) * y1 +\n 3 * Math.pow(1 - t, 2) * t * cp1y +\n 3 * (1 - t) * Math.pow(t, 2) * cp2y +\n Math.pow(t, 3) * y2;\n\n const distance = Math.sqrt(Math.pow(point[0] - x, 2) + Math.pow(point[1] - y, 2));\n if (distance < tolerance) {\n return true;\n }\n }\n\n return false;\n }\n\n public getNewNodeCoordinates(panToCoordinates = false): Coordinates {\n let lowestY = 0;\n if (this.nodes().length > 0) {\n lowestY = this.nodes().reduce((max, node) => Math.max(max, node.coordinates[1]), 0);\n }\n\n const newCoordinates: Coordinates = [20, lowestY + 200];\n\n if (panToCoordinates) {\n this.#panToCoordinates(newCoordinates);\n }\n\n return newCoordinates;\n }\n\n #validateNodes() {\n const duplicatePortIds = findDuplicatePortIDs(this.nodes());\n const duplicateNodeIds = findDuplicateNodeIDs(this.nodes());\n\n this.validationErrors.set({\n duplicateNodeIds,\n duplicatePortIds,\n });\n }\n\n #panToCoordinates(coords: Coordinates): void {\n const [x, y] = coords;\n const rect = this.#selfRef.nativeElement.getBoundingClientRect();\n\n this.panX.set(rect.width / 2 - x * this.zoomLevel());\n this.panY.set(rect.height / 2 - y * this.zoomLevel());\n }\n\n #getDistance(touch1: Touch, touch2: Touch) {\n const dx = touch1.clientX - touch2.clientX;\n const dy = touch1.clientY - touch2.clientY;\n\n return Math.sqrt(dx * dx + dy * dy);\n }\n\n #clamp(value: number, min: number, max: number) {\n return Math.max(min, Math.min(max, value));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAEM,SAAU,WAAW,CAAC,KAAsB,EAAA;AAChD,IAAA,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;AAAE,QAAA,OAAO,KAAK;AAE9C,IAAA,MAAM,aAAa,GAAG,eAAe,CAAC,KAAK,CAAC;AAC5C,IAAA,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU;IACjC,MAAM,gBAAgB,GAAoB,EAAE;IAC5C,MAAM,eAAe,GAAsB,EAAE;AAE7C,IAAA,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,MAAM,CAAC,CAAC;IACxG,MAAM,SAAS,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAE1E,IAAA,KAAK,MAAM,IAAI,IAAI,aAAa,EAAE;AAChC,QAAA,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE;AAC5B,YAAA,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC;QAC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AsFT,EAAA,eAAA,EACgB,uBAAuB,CAAC,MAAM,EAAA,MAAA,EAAA,CAAA,i1GAAA,CAAA,EAAA;;sBAsD9C,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,iBAAiB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;sBAiG7C,YAAY;uBAAC,kBAAkB,EAAE,CAAC,QAAQ,CAAC;;sBAO3C,YAAY;uBAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC;;sBAczC,YAAY;AAAC,gBAAA,IAAA,EAAA,CAAA,yBAAyB,EAAE,EAAE;;sBAQ1C,YAAY;uBAAC,oBAAoB,EAAE,CAAC,QAAQ,CAAC;;sBAgB7C,YAAY;uBAAC,oBAAoB,EAAE,CAAC,QAAQ,CAAC;;sBAY7C,YAAY;uBAAC,mBAAmB,EAAE,CAAC,QAAQ,CAAC;;;ACjX/C;;AAEG;;;;"}
@@ -21,7 +21,7 @@ class ShipButtonGroup extends ShipSelectionGroup {
21
21
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ShipButtonGroup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
22
22
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: ShipButtonGroup, isStandalone: true, selector: "sh-button-group", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()", "style.--btng-id": "id" } }, usesInheritance: true, ngImport: i0, template: `
23
23
  <ng-content />
24
- `, isInline: true, styles: ["sh-button-group{--btng-bg: var(--base-3);--btng-item-bg: var(--base-1);--btng-c: var(--base-12);--btng-ic: var(--base-12);--btng-bc: var(--base-4);--btng-h: 2.5rem;--btng-p: 0 .75rem;--btng-s: var(--shape-2);--btng-s-a: var(--shape-2);--btng-f: var(--paragraph-30);display:inline-flex;height:var(--btng-h);background:var(--btng-bg);overflow:hidden;position:relative;padding:.1875rem;gap:.25rem;border:0;border-radius:var(--btng-s)}sh-button-group.small{--btng-h: 2rem;--btng-p: 0 .5rem}sh-button-group button{border:0;flex:1 0;appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:.5rem;position:relative;padding:var(--btng-p);min-width:auto;cursor:pointer;outline:none;line-height:inherit;-webkit-user-select:none;user-select:none;overflow:visible;vertical-align:middle;white-space:nowrap;background:transparent;color:var(--btng-c);font:var(--btng-f);border-radius:calc(var(--btng-s) / 3 * 2);transition:color 80ms linear,transform 125ms linear;transform:scale(1)}sh-button-group button:focus-visible{outline:2px solid var(--primary-8);outline-offset:-2px}sh-button-group button:active{transform:scale(.96)}sh-button-group button:hover{--btng-bg: var(--base-2)}sh-button-group button:hover,sh-button-group button.active{--btng-bg: var(--base-1);box-shadow:var(--box-shadow-10)}@supports not (anchor-name: --anchor){sh-button-group button{--btng-item-bg: var(--base-3);background:var(--btng-item-bg)}sh-button-group button:hover,sh-button-group button.active{--btng-c: var(--base-12);--btng-ic: var(--base-12);--btng-bg: var(--base-1);--btng-item-bg: var(--base-1)}}@supports (anchor-name: --anchor){sh-button-group button{z-index:1}sh-button-group button.active{position:relative;anchor-name:var(--btng-id)}}@supports (anchor-name: --anchor){sh-button-group:after{content:\"\";background:var(--btng-item-bg);pointer-events:none;position:absolute;z-index:0;top:anchor(top);bottom:anchor(bottom);left:anchor(left);right:anchor(right);position-anchor:var(--btng-id);transition:left .175s ease-out,right .175s ease-out;border-radius:calc(var(--btng-s) / 3 * 2)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
24
+ `, isInline: true, styles: ["sh-button-group{--btng-bg: var(--base-3);--btng-item-bg: var(--base-1);--btng-c: var(--base-12);--btng-ic: var(--base-12);--btng-bc: var(--base-4);--btng-h: 2.5rem;--btng-p: 0 .75rem;--btng-s: var(--shape-2);--btng-s-a: var(--shape-2);--btng-f: var(--paragraph-30);display:inline-flex;height:var(--btng-h);background:var(--btng-bg);overflow:hidden;position:relative;padding:.1875rem;gap:.25rem;border:0;border-radius:var(--btng-s)}sh-button-group.small{--btng-h: 2rem;--btng-p: 0 .5rem}sh-button-group button{border:0;flex:1 0;appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:.5rem;position:relative;padding:var(--btng-p);min-width:auto;cursor:pointer;outline:none;line-height:inherit;-webkit-user-select:none;user-select:none;overflow:visible;vertical-align:middle;white-space:nowrap;background:transparent;color:var(--btng-c);font:var(--btng-f);border-radius:calc(var(--btng-s) / 3 * 2);transition:color 80ms linear,transform 125ms linear;transform:scale(1)}sh-button-group button:focus-visible{outline:2px solid var(--primary-8);outline-offset:-2px}sh-button-group button:active{transform:scale(.96)}sh-button-group button:hover{--btng-bg: var(--base-2)}sh-button-group button:hover,sh-button-group button.active{--btng-bg: var(--base-1);box-shadow:var(--box-shadow-10)}@supports not (anchor-name: --anchor){sh-button-group button{--btng-item-bg: var(--base-3);background:var(--btng-item-bg)}sh-button-group button:hover,sh-button-group button.active{--btng-c: var(--base-12);--btng-ic: var(--base-12);--btng-bg: var(--base-1);--btng-item-bg: var(--base-1)}}@supports (anchor-name: --anchor){sh-button-group button{z-index:1}sh-button-group button.active{position:relative;anchor-name:var(--btng-id)}}sh-button-group button[disabled]{opacity:.5;pointer-events:none;cursor:not-allowed}@supports (anchor-name: --anchor){sh-button-group:after{content:\"\";background:var(--btng-item-bg);pointer-events:none;position:absolute;z-index:0;top:anchor(top);bottom:anchor(bottom);left:anchor(left);right:anchor(right);position-anchor:var(--btng-id);transition:left .175s ease-out,right .175s ease-out;border-radius:calc(var(--btng-s) / 3 * 2)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
25
25
  }
26
26
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ShipButtonGroup, decorators: [{
27
27
  type: Component,
@@ -30,7 +30,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImpor
30
30
  `, changeDetection: ChangeDetectionStrategy.OnPush, host: {
31
31
  '[class]': 'hostClasses()',
32
32
  '[style.--btng-id]': 'id',
33
- }, styles: ["sh-button-group{--btng-bg: var(--base-3);--btng-item-bg: var(--base-1);--btng-c: var(--base-12);--btng-ic: var(--base-12);--btng-bc: var(--base-4);--btng-h: 2.5rem;--btng-p: 0 .75rem;--btng-s: var(--shape-2);--btng-s-a: var(--shape-2);--btng-f: var(--paragraph-30);display:inline-flex;height:var(--btng-h);background:var(--btng-bg);overflow:hidden;position:relative;padding:.1875rem;gap:.25rem;border:0;border-radius:var(--btng-s)}sh-button-group.small{--btng-h: 2rem;--btng-p: 0 .5rem}sh-button-group button{border:0;flex:1 0;appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:.5rem;position:relative;padding:var(--btng-p);min-width:auto;cursor:pointer;outline:none;line-height:inherit;-webkit-user-select:none;user-select:none;overflow:visible;vertical-align:middle;white-space:nowrap;background:transparent;color:var(--btng-c);font:var(--btng-f);border-radius:calc(var(--btng-s) / 3 * 2);transition:color 80ms linear,transform 125ms linear;transform:scale(1)}sh-button-group button:focus-visible{outline:2px solid var(--primary-8);outline-offset:-2px}sh-button-group button:active{transform:scale(.96)}sh-button-group button:hover{--btng-bg: var(--base-2)}sh-button-group button:hover,sh-button-group button.active{--btng-bg: var(--base-1);box-shadow:var(--box-shadow-10)}@supports not (anchor-name: --anchor){sh-button-group button{--btng-item-bg: var(--base-3);background:var(--btng-item-bg)}sh-button-group button:hover,sh-button-group button.active{--btng-c: var(--base-12);--btng-ic: var(--base-12);--btng-bg: var(--base-1);--btng-item-bg: var(--base-1)}}@supports (anchor-name: --anchor){sh-button-group button{z-index:1}sh-button-group button.active{position:relative;anchor-name:var(--btng-id)}}@supports (anchor-name: --anchor){sh-button-group:after{content:\"\";background:var(--btng-item-bg);pointer-events:none;position:absolute;z-index:0;top:anchor(top);bottom:anchor(bottom);left:anchor(left);right:anchor(right);position-anchor:var(--btng-id);transition:left .175s ease-out,right .175s ease-out;border-radius:calc(var(--btng-s) / 3 * 2)}}\n"] }]
33
+ }, styles: ["sh-button-group{--btng-bg: var(--base-3);--btng-item-bg: var(--base-1);--btng-c: var(--base-12);--btng-ic: var(--base-12);--btng-bc: var(--base-4);--btng-h: 2.5rem;--btng-p: 0 .75rem;--btng-s: var(--shape-2);--btng-s-a: var(--shape-2);--btng-f: var(--paragraph-30);display:inline-flex;height:var(--btng-h);background:var(--btng-bg);overflow:hidden;position:relative;padding:.1875rem;gap:.25rem;border:0;border-radius:var(--btng-s)}sh-button-group.small{--btng-h: 2rem;--btng-p: 0 .5rem}sh-button-group button{border:0;flex:1 0;appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:.5rem;position:relative;padding:var(--btng-p);min-width:auto;cursor:pointer;outline:none;line-height:inherit;-webkit-user-select:none;user-select:none;overflow:visible;vertical-align:middle;white-space:nowrap;background:transparent;color:var(--btng-c);font:var(--btng-f);border-radius:calc(var(--btng-s) / 3 * 2);transition:color 80ms linear,transform 125ms linear;transform:scale(1)}sh-button-group button:focus-visible{outline:2px solid var(--primary-8);outline-offset:-2px}sh-button-group button:active{transform:scale(.96)}sh-button-group button:hover{--btng-bg: var(--base-2)}sh-button-group button:hover,sh-button-group button.active{--btng-bg: var(--base-1);box-shadow:var(--box-shadow-10)}@supports not (anchor-name: --anchor){sh-button-group button{--btng-item-bg: var(--base-3);background:var(--btng-item-bg)}sh-button-group button:hover,sh-button-group button.active{--btng-c: var(--base-12);--btng-ic: var(--base-12);--btng-bg: var(--base-1);--btng-item-bg: var(--base-1)}}@supports (anchor-name: --anchor){sh-button-group button{z-index:1}sh-button-group button.active{position:relative;anchor-name:var(--btng-id)}}sh-button-group button[disabled]{opacity:.5;pointer-events:none;cursor:not-allowed}@supports (anchor-name: --anchor){sh-button-group:after{content:\"\";background:var(--btng-item-bg);pointer-events:none;position:absolute;z-index:0;top:anchor(top);bottom:anchor(bottom);left:anchor(left);right:anchor(right);position-anchor:var(--btng-id);transition:left .175s ease-out,right .175s ease-out;border-radius:calc(var(--btng-s) / 3 * 2)}}\n"] }]
34
34
  }], ctorParameters: () => [], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
35
35
 
36
36
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ship-ui-core-ship-button-group.mjs","sources":["../../../projects/ship-ui/ship-button-group/ship-button-group.ts","../../../projects/ship-ui/ship-button-group/ship-ui-core-ship-button-group.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input, ViewEncapsulation } from '@angular/core';\nimport { shipComponentClasses } from '@ship-ui/core';\nimport { ShipButtonGroupVariant, ShipColor, ShipSize } from '@ship-ui/core';\nimport { ShipSelectionGroup } from '@ship-ui/core';\n\n@Component({\n selector: 'sh-button-group',\n styleUrl: './ship-button-group.scss',\n encapsulation: ViewEncapsulation.None,\n imports: [],\n template: `\n <ng-content />\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'hostClasses()',\n '[style.--btng-id]': 'id',\n },\n})\nexport class ShipButtonGroup extends ShipSelectionGroup<string> {\n id = '--' + Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 12);\n\n color = input<ShipColor | null>(null);\n variant = input<ShipButtonGroupVariant | null>(null);\n size = input<ShipSize | null>(null);\n\n constructor() {\n super('button', 'active', { hostRole: 'group' });\n }\n\n hostClasses = shipComponentClasses('buttonGroup', {\n color: this.color,\n variant: this.variant,\n size: this.size,\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAmBM,MAAO,eAAgB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AAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,eAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAThB;;AAET,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,2iEAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAOU,eAAe,EAAA,UAAA,EAAA,CAAA;kBAd3B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,iBAEZ,iBAAiB,CAAC,IAAI,EAAA,OAAA,EAC5B,EAAE,EAAA,QAAA,EACD;;GAET,EAAA,eAAA,EACgB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,SAAS,EAAE,eAAe;AAC1B,wBAAA,mBAAmB,EAAE,IAAI;AAC1B,qBAAA,EAAA,MAAA,EAAA,CAAA,2iEAAA,CAAA,EAAA;;;ACjBH;;AAEG;;;;"}
1
+ {"version":3,"file":"ship-ui-core-ship-button-group.mjs","sources":["../../../projects/ship-ui/ship-button-group/ship-button-group.ts","../../../projects/ship-ui/ship-button-group/ship-ui-core-ship-button-group.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input, ViewEncapsulation } from '@angular/core';\nimport { shipComponentClasses } from '@ship-ui/core';\nimport { ShipButtonGroupVariant, ShipColor, ShipSize } from '@ship-ui/core';\nimport { ShipSelectionGroup } from '@ship-ui/core';\n\n@Component({\n selector: 'sh-button-group',\n styleUrl: './ship-button-group.scss',\n encapsulation: ViewEncapsulation.None,\n imports: [],\n template: `\n <ng-content />\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'hostClasses()',\n '[style.--btng-id]': 'id',\n },\n})\nexport class ShipButtonGroup extends ShipSelectionGroup<string> {\n id = '--' + Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 12);\n\n color = input<ShipColor | null>(null);\n variant = input<ShipButtonGroupVariant | null>(null);\n size = input<ShipSize | null>(null);\n\n constructor() {\n super('button', 'active', { hostRole: 'group' });\n }\n\n hostClasses = shipComponentClasses('buttonGroup', {\n color: this.color,\n variant: this.variant,\n size: this.size,\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAmBM,MAAO,eAAgB,SAAQ,kBAA0B,CAAA;AAO7D,IAAA,WAAA,GAAA;QACE,KAAK,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;AAPlD,QAAA,IAAA,CAAA,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC;QAErG,IAAA,CAAA,KAAK,GAAG,KAAK,CAAmB,IAAI;kFAAC;QACrC,IAAA,CAAA,OAAO,GAAG,KAAK,CAAgC,IAAI;oFAAC;QACpD,IAAA,CAAA,IAAI,GAAG,KAAK,CAAkB,IAAI;iFAAC;AAMnC,QAAA,IAAA,CAAA,WAAW,GAAG,oBAAoB,CAAC,aAA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IAAA,EAAA,CAAA,CAAA;;2FAOU,eAAe,EAAA,UAAA,EAAA,CAAA;kBAd3B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,iBAEZ,iBAAiB,CAAC,IAAI,EAAA,OAAA,EAC5B,EAAE,EAAA,QAAA,EACD;;GAET,EAAA,eAAA,EACgB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,SAAS,EAAE,eAAe;AAC1B,wBAAA,mBAAmB,EAAE,IAAI;AAC1B,qBAAA,EAAA,MAAA,EAAA,CAAA,8nEAAA,CAAA,EAAA;;;ACjBH;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
2
+ import { input, booleanAttribute, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
3
3
  import { shipComponentClasses } from '@ship-ui/core';
4
4
 
5
5
  class ShipButton {
@@ -12,6 +12,7 @@ class ShipButton {
12
12
  ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
13
13
  this.readonly = input(false, /* @ts-ignore */
14
14
  ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
15
+ this.noBg = input(false, { ...(ngDevMode ? { debugName: "noBg" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
15
16
  this.hostClasses = shipComponentClasses('button', {
16
17
  color: this.color,
17
18
  variant: this.variant,
@@ -20,15 +21,16 @@ class ShipButton {
20
21
  });
21
22
  }
22
23
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ShipButton, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
23
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: ShipButton, isStandalone: true, selector: "[shButton]", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()" }, classAttribute: "sh-sheet-h" }, ngImport: i0, template: '<ng-content />', isInline: true, styles: ["[shButton]{--btn-h: 2.5rem;--btn-mw: 2.5rem;--btn-f: var(--paragraph-20);--btn-a-opacity: .05;--btn-bs: var(--ship-button-shadow, none);display:inline-flex;align-items:center;justify-content:center;gap:.6875rem;position:relative;padding:0 .75rem;transition:color 80ms linear;min-width:var(--btn-mw);cursor:pointer;outline:none;line-height:inherit;-webkit-user-select:none;user-select:none;appearance:none;overflow:visible;vertical-align:middle;text-decoration:none;height:var(--btn-h);box-shadow:var(--btn-bs);font:var(--btn-f);transition:transform .25s ease-in;transform:scale(1)}[shButton]:before{content:\"\";position:absolute;inset:0;background:radial-gradient(#000 30%,#0000);opacity:0;transition:opacity 175ms linear}[shButton]:active{transform:scale(.98)}[shButton]:active:before{opacity:var(--btn-a-opacity)}[shButton].raised,[shButton].flat{--btn-a-opacity: .1}[shButton] sh-icon{rotate:var(--btn-ir);transition:rotate 125ms ease-in-out}[shButton] sh-icon:first-child{margin-left:-.1875rem}[shButton] sh-icon:last-child{margin-right:-.1875rem}[shButton].rotated-icon sh-icon{--btn-ir: 180deg}[shButton].small{--btn-h: 2rem;--btn-mw: 2rem;--btn-f: var(--paragraph-30);padding:0 .5rem;gap:.3125rem}[shButton].small sh-icon{font-size:1rem}[shButton].small sh-icon:first-child{margin-left:-.0625rem}[shButton].small sh-icon:last-child{margin-right:-.0625rem}[shButton].xsmall{--btn-h: 1.5rem;--btn-mw: 1.5rem;--btn-f: var(--paragraph-40);padding:0 .5rem;gap:.25rem}[shButton].xsmall sh-icon{font-size:.75rem}[shButton].xsmall sh-icon:first-child{margin-left:-.1875rem}[shButton].xsmall sh-icon:last-child{margin-right:-.1875rem}[shButton][disabled]{opacity:.5;pointer-events:none;-webkit-user-select:none;user-select:none}[shButton][readonly],[shButton].readonly{pointer-events:none;-webkit-user-select:none;user-select:none}[shButton][disabled]:active,[shButton][readonly]:active{transform:scale(1)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
24
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: ShipButton, isStandalone: true, selector: "[shButton]", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, noBg: { classPropertyName: "noBg", publicName: "noBg", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()", "class.no-bg": "noBg()" }, classAttribute: "sh-sheet-h" }, ngImport: i0, template: '<ng-content />', isInline: true, styles: ["[shButton]{--btn-h: 2.5rem;--btn-mw: 2.5rem;--btn-f: var(--paragraph-20);--btn-a-opacity: .05;--btn-bs: var(--ship-button-shadow, none);display:inline-flex;align-items:center;justify-content:center;gap:.6875rem;position:relative;padding:0 .75rem;transition:color 80ms linear;min-width:var(--btn-mw);cursor:pointer;outline:none;line-height:inherit;-webkit-user-select:none;user-select:none;appearance:none;overflow:visible;vertical-align:middle;text-decoration:none;height:var(--btn-h);box-shadow:var(--btn-bs);font:var(--btn-f);transition:transform .25s ease-in;transform:scale(1)}[shButton]:before{content:\"\";position:absolute;inset:0;background:radial-gradient(#000 30%,#0000);opacity:0;transition:opacity 175ms linear}[shButton]:active{transform:scale(.98)}[shButton]:active:before{opacity:var(--btn-a-opacity)}[shButton].raised,[shButton].flat{--btn-a-opacity: .1}[shButton] sh-icon{rotate:var(--btn-ir);transition:rotate 125ms ease-in-out}[shButton] sh-icon:first-child{margin-left:-.1875rem}[shButton] sh-icon:last-child{margin-right:-.1875rem}[shButton].rotated-icon sh-icon{--btn-ir: 180deg}[shButton].small{--btn-h: 2rem;--btn-mw: 2rem;--btn-f: var(--paragraph-30);padding:0 .5rem;gap:.3125rem}[shButton].small sh-icon{font-size:1rem}[shButton].small sh-icon:first-child{margin-left:-.0625rem}[shButton].small sh-icon:last-child{margin-right:-.0625rem}[shButton].xsmall{--btn-h: 1.5rem;--btn-mw: 1.5rem;--btn-f: var(--paragraph-40);padding:0 .5rem;gap:.25rem}[shButton].xsmall sh-icon{font-size:.75rem}[shButton].xsmall sh-icon:first-child{margin-left:-.1875rem}[shButton].xsmall sh-icon:last-child{margin-right:-.1875rem}[shButton].no-bg{--sheet-bg: transparent;background:transparent}[shButton].no-bg.simple{--sheet-bc: transparent}[shButton][disabled]{opacity:.5;pointer-events:none;-webkit-user-select:none;user-select:none}[shButton][readonly],[shButton].readonly{pointer-events:none;-webkit-user-select:none;user-select:none}[shButton][disabled]:active,[shButton][readonly]:active{transform:scale(1)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
24
25
  }
25
26
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ShipButton, decorators: [{
26
27
  type: Component,
27
28
  args: [{ selector: '[shButton]', encapsulation: ViewEncapsulation.None, imports: [], template: '<ng-content />', changeDetection: ChangeDetectionStrategy.OnPush, host: {
28
29
  class: 'sh-sheet-h',
29
30
  '[class]': 'hostClasses()',
30
- }, styles: ["[shButton]{--btn-h: 2.5rem;--btn-mw: 2.5rem;--btn-f: var(--paragraph-20);--btn-a-opacity: .05;--btn-bs: var(--ship-button-shadow, none);display:inline-flex;align-items:center;justify-content:center;gap:.6875rem;position:relative;padding:0 .75rem;transition:color 80ms linear;min-width:var(--btn-mw);cursor:pointer;outline:none;line-height:inherit;-webkit-user-select:none;user-select:none;appearance:none;overflow:visible;vertical-align:middle;text-decoration:none;height:var(--btn-h);box-shadow:var(--btn-bs);font:var(--btn-f);transition:transform .25s ease-in;transform:scale(1)}[shButton]:before{content:\"\";position:absolute;inset:0;background:radial-gradient(#000 30%,#0000);opacity:0;transition:opacity 175ms linear}[shButton]:active{transform:scale(.98)}[shButton]:active:before{opacity:var(--btn-a-opacity)}[shButton].raised,[shButton].flat{--btn-a-opacity: .1}[shButton] sh-icon{rotate:var(--btn-ir);transition:rotate 125ms ease-in-out}[shButton] sh-icon:first-child{margin-left:-.1875rem}[shButton] sh-icon:last-child{margin-right:-.1875rem}[shButton].rotated-icon sh-icon{--btn-ir: 180deg}[shButton].small{--btn-h: 2rem;--btn-mw: 2rem;--btn-f: var(--paragraph-30);padding:0 .5rem;gap:.3125rem}[shButton].small sh-icon{font-size:1rem}[shButton].small sh-icon:first-child{margin-left:-.0625rem}[shButton].small sh-icon:last-child{margin-right:-.0625rem}[shButton].xsmall{--btn-h: 1.5rem;--btn-mw: 1.5rem;--btn-f: var(--paragraph-40);padding:0 .5rem;gap:.25rem}[shButton].xsmall sh-icon{font-size:.75rem}[shButton].xsmall sh-icon:first-child{margin-left:-.1875rem}[shButton].xsmall sh-icon:last-child{margin-right:-.1875rem}[shButton][disabled]{opacity:.5;pointer-events:none;-webkit-user-select:none;user-select:none}[shButton][readonly],[shButton].readonly{pointer-events:none;-webkit-user-select:none;user-select:none}[shButton][disabled]:active,[shButton][readonly]:active{transform:scale(1)}\n"] }]
31
- }], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }] } });
31
+ '[class.no-bg]': 'noBg()',
32
+ }, styles: ["[shButton]{--btn-h: 2.5rem;--btn-mw: 2.5rem;--btn-f: var(--paragraph-20);--btn-a-opacity: .05;--btn-bs: var(--ship-button-shadow, none);display:inline-flex;align-items:center;justify-content:center;gap:.6875rem;position:relative;padding:0 .75rem;transition:color 80ms linear;min-width:var(--btn-mw);cursor:pointer;outline:none;line-height:inherit;-webkit-user-select:none;user-select:none;appearance:none;overflow:visible;vertical-align:middle;text-decoration:none;height:var(--btn-h);box-shadow:var(--btn-bs);font:var(--btn-f);transition:transform .25s ease-in;transform:scale(1)}[shButton]:before{content:\"\";position:absolute;inset:0;background:radial-gradient(#000 30%,#0000);opacity:0;transition:opacity 175ms linear}[shButton]:active{transform:scale(.98)}[shButton]:active:before{opacity:var(--btn-a-opacity)}[shButton].raised,[shButton].flat{--btn-a-opacity: .1}[shButton] sh-icon{rotate:var(--btn-ir);transition:rotate 125ms ease-in-out}[shButton] sh-icon:first-child{margin-left:-.1875rem}[shButton] sh-icon:last-child{margin-right:-.1875rem}[shButton].rotated-icon sh-icon{--btn-ir: 180deg}[shButton].small{--btn-h: 2rem;--btn-mw: 2rem;--btn-f: var(--paragraph-30);padding:0 .5rem;gap:.3125rem}[shButton].small sh-icon{font-size:1rem}[shButton].small sh-icon:first-child{margin-left:-.0625rem}[shButton].small sh-icon:last-child{margin-right:-.0625rem}[shButton].xsmall{--btn-h: 1.5rem;--btn-mw: 1.5rem;--btn-f: var(--paragraph-40);padding:0 .5rem;gap:.25rem}[shButton].xsmall sh-icon{font-size:.75rem}[shButton].xsmall sh-icon:first-child{margin-left:-.1875rem}[shButton].xsmall sh-icon:last-child{margin-right:-.1875rem}[shButton].no-bg{--sheet-bg: transparent;background:transparent}[shButton].no-bg.simple{--sheet-bc: transparent}[shButton][disabled]{opacity:.5;pointer-events:none;-webkit-user-select:none;user-select:none}[shButton][readonly],[shButton].readonly{pointer-events:none;-webkit-user-select:none;user-select:none}[shButton][disabled]:active,[shButton][readonly]:active{transform:scale(1)}\n"] }]
33
+ }], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], noBg: [{ type: i0.Input, args: [{ isSignal: true, alias: "noBg", required: false }] }] } });
32
34
 
33
35
  /**
34
36
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"ship-ui-core-ship-button.mjs","sources":["../../../projects/ship-ui/ship-button/ship-button.ts","../../../projects/ship-ui/ship-button/ship-ui-core-ship-button.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input, ViewEncapsulation } from '@angular/core';\nimport { shipComponentClasses } from '@ship-ui/core';\nimport { ShipButtonSize, ShipColor, ShipSheetVariant } from '@ship-ui/core';\n\n@Component({\n selector: '[shButton]',\n styleUrl: './ship-button.scss',\n encapsulation: ViewEncapsulation.None,\n imports: [],\n template: '<ng-content />',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'sh-sheet-h',\n '[class]': 'hostClasses()',\n },\n})\nexport class ShipButton {\n color = input<ShipColor | null>(null);\n variant = input<ShipSheetVariant | null>(null);\n size = input<ShipButtonSize | null>(null);\n readonly = input<boolean>(false);\n\n hostClasses = shipComponentClasses('button', {\n color: this.color,\n variant: this.variant,\n size: this.size,\n readonly: this.readonly,\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAgBa,UAAU,CAAA;AAZvB,IAAA,WAAA,GAAA;QAaE,IAAA,CAAA,KAAK,GAAG,KAAK,CAAmB,IAAI;kFAAC;QACrC,IAAA,CAAA,OAAO,GAAG,KAAK,CAA0B,IAAI;oFAAC;QAC9C,IAAA,CAAA,IAAI,GAAG,KAAK,CAAwB,IAAI;iFAAC;QACzC,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK;qFAAC;AAEhC,QAAA,IAAA,CAAA,WAAW,GAAG,oBAAoB,CAAC,QAAQ,EAAE;YAC3C,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;AACxB,SAAA,CAAC;AACH,IAAA;8GAZY,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAV,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAU,gpBAPX,gBAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,q3DAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAOf,UAAU,EAAA,UAAA,EAAA,CAAA;kBAZtB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,EAAA,aAAA,EAEP,iBAAiB,CAAC,IAAI,EAAA,OAAA,EAC5B,EAAE,EAAA,QAAA,EACD,gBAAgB,EAAA,eAAA,EACT,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,KAAK,EAAE,YAAY;AACnB,wBAAA,SAAS,EAAE,eAAe;AAC3B,qBAAA,EAAA,MAAA,EAAA,CAAA,q3DAAA,CAAA,EAAA;;;ACdH;;AAEG;;;;"}
1
+ {"version":3,"file":"ship-ui-core-ship-button.mjs","sources":["../../../projects/ship-ui/ship-button/ship-button.ts","../../../projects/ship-ui/ship-button/ship-ui-core-ship-button.ts"],"sourcesContent":["import { booleanAttribute, ChangeDetectionStrategy, Component, input, ViewEncapsulation } from '@angular/core';\nimport { shipComponentClasses } from '@ship-ui/core';\nimport { ShipButtonSize, ShipColor, ShipSheetVariant } from '@ship-ui/core';\n\n@Component({\n selector: '[shButton]',\n styleUrl: './ship-button.scss',\n encapsulation: ViewEncapsulation.None,\n imports: [],\n template: '<ng-content />',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'sh-sheet-h',\n '[class]': 'hostClasses()',\n '[class.no-bg]': 'noBg()',\n },\n})\nexport class ShipButton {\n color = input<ShipColor | null>(null);\n variant = input<ShipSheetVariant | null>(null);\n size = input<ShipButtonSize | null>(null);\n readonly = input<boolean>(false);\n noBg = input<boolean, boolean | string>(false, { transform: booleanAttribute });\n\n hostClasses = shipComponentClasses('button', {\n color: this.color,\n variant: this.variant,\n size: this.size,\n readonly: this.readonly,\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAiBa,UAAU,CAAA;AAbvB,IAAA,WAAA,GAAA;QAcE,IAAA,CAAA,KAAK,GAAG,KAAK,CAAmB,IAAI;kFAAC;QACrC,IAAA,CAAA,OAAO,GAAG,KAAK,CAA0B,IAAI;oFAAC;QAC9C,IAAA,CAAA,IAAI,GAAG,KAAK,CAAwB,IAAI;iFAAC;QACzC,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK;qFAAC;QAChC,IAAA,CAAA,IAAI,GAAG,KAAK,CAA4B,KAAK,4EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAE/E,QAAA,IAAA,CAAA,WAAW,GAAG,oBAAoB,CAAC,QAAQ,EAAE;YAC3C,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;AACxB,SAAA,CAAC;AACH,IAAA;8GAbY,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAA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