Consolidate all subproject package.json files into root package.json and migrate to unified Vite MPA build
Build and Deploy / build-and-deploy (push) Has been cancelled

This commit is contained in:
2026-05-16 22:31:56 -07:00
parent b3f8be14f7
commit 312c16598c
53 changed files with 10265 additions and 39008 deletions
-2826
View File
File diff suppressed because it is too large Load Diff
-35
View File
@@ -1,35 +0,0 @@
{
"name": "lit-force-graph",
"private": true,
"version": "0.0.0",
"main": "dist/my-element.es.js",
"exports": {
".": "./dist/my-element.es.js"
},
"types": "types/my-element.d.ts",
"files": [
"dist",
"types"
],
"scripts": {
"dev": "vite",
"build": "tsc && vite build"
},
"dependencies": {
"@ar-js-org/ar.js": "^3.4.0-alpha-rc2",
"3d-force-graph": "^1.70.9",
"3d-force-graph-ar": "^1.7.5",
"3d-force-graph-vr": "^2.0.12",
"aframe": "^1.3.0",
"force-graph": "^1.42.9",
"lit": "^2.0.2",
"three": "^0.139.2",
"three-spritetext": "^1.6.5"
},
"devDependencies": {
"@types/node": "^17.0.23",
"@types/three": "^0.139.0",
"typescript": "^4.5.4",
"vite": "^2.9.0"
}
}
+7
View File
@@ -0,0 +1,7 @@
import { GraphData, GraphNode } from "./graph";
export interface RenderContext {
data: GraphData;
element: HTMLElement;
onHover: (node?: GraphNode) => void;
}
export type Renderer = (context: RenderContext) => void;
+25
View File
@@ -0,0 +1,25 @@
export declare class Graph {
private ids;
private graph;
addNode<T = any>(node: GraphNode<T>): GraphNode<any>;
addLink<T = any>(link: GraphLink<T>): GraphLink<T>;
toJSON(): GraphData<any, any>;
}
export interface GraphNode<T = any> {
id: string;
name?: string;
group?: string;
value?: T;
}
export interface GraphLink<T = any> {
source: string;
target: string;
name?: string;
value?: T;
}
export interface GraphData<A = any, B = any> {
name?: string;
description?: string;
nodes: GraphNode<A>[];
links: GraphLink<B>[];
}
+30
View File
@@ -0,0 +1,30 @@
import { LitElement } from "lit";
import { Renderer } from "./classes/context";
import { GraphData, GraphNode } from "./classes/graph";
export declare const tagName = "lit-force-graph";
export declare class LitForceGraph extends LitElement {
static styles: import("lit").CSSResult;
graph: HTMLElement;
src: string;
mode: string;
data?: GraphData;
hovered?: GraphNode;
renderers: Map<string, Renderer>;
render(): import("lit").TemplateResult<1>;
firstUpdated(): Promise<void>;
/**
* Set the graph data and update the renderer
*
* @param data Graph JSON
*/
setData(data: GraphData): void;
private refresh;
private onChangeMode;
private onDrop;
attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
}
declare global {
interface HTMLElementTagNameMap {
"lit-force-graph": LitForceGraph;
}
}
+2
View File
@@ -0,0 +1,2 @@
import { RenderContext } from "../classes/context";
export declare function render(context: RenderContext): void;
+2
View File
@@ -0,0 +1,2 @@
import { RenderContext } from "../classes/context.js";
export declare function render(context: RenderContext): void;
+4
View File
@@ -0,0 +1,4 @@
import "aframe";
import "@ar-js-org/ar.js";
import { RenderContext } from "../classes/context.js";
export declare function renderAR(context: RenderContext): void;
+2
View File
@@ -0,0 +1,2 @@
import { RenderContext } from "../classes/context.js";
export declare function renderVR(context: RenderContext): void;