fix import ordering

This commit is contained in:
Orion Reed 2024-12-18 19:33:33 -05:00
parent 19b29623e0
commit 2a9f0cde75
5 changed files with 19 additions and 18 deletions

View File

@ -1,9 +1,9 @@
import { FolkBaseSet } from './folk-base-set.ts';
import { AnimationFrameController, AnimationFrameControllerHost, TransformIntegrator } from '@lib';
import { PropertyValues } from '@lit/reactive-element';
import { Layout } from 'webcola';
import { FolkShape } from './folk-shape.ts';
import { AnimationFrameController, AnimationFrameControllerHost, TransformIntegrator } from '@lib';
import { FolkBaseConnection } from './folk-base-connection';
import { FolkBaseSet } from './folk-base-set.ts';
import { FolkShape } from './folk-shape.ts';
export class FolkGraph extends FolkBaseSet implements AnimationFrameControllerHost {
static override tagName = 'folk-graph';
@ -71,7 +71,7 @@ export class FolkGraph extends FolkBaseSet implements AnimationFrameControllerHo
console.log(colaNodes, colaLinks);
this.graphSim.nodes(colaNodes).links(colaLinks).linkDistance(150).avoidOverlaps(true).handleDisconnected(true);
this.graphSim.nodes(colaNodes).links(colaLinks).linkDistance(250).avoidOverlaps(true).handleDisconnected(true);
}
private createNodes() {

View File

@ -1,5 +1,6 @@
import { getResizeCursorUrl, getRotateCursorUrl } from '@labs/utils/cursors';
import { DOMRectTransform, DOMRectTransformReadonly, Point, ResizeObserverManager, TransformEvent, Vector } from '@lib';
import { DOMRectTransform, DOMRectTransformReadonly, Point, TransformEvent, Vector } from '@lib';
import { ResizeObserverManager } from '@lib/resize-observer';
import { css, html } from '@lib/tags';
const resizeObserver = new ResizeObserverManager();

View File

@ -121,7 +121,7 @@ class IframeObserver {
callback({
target: this.#iframe,
contentRect,
})
}),
);
}
@ -165,7 +165,7 @@ export class FolkObserver {
observe(
target: Element,
callback: ClientRectObserverEntryCallback,
{ iframeSelector }: FolkObserverOptions = {}
{ iframeSelector }: FolkObserverOptions = {},
): void {
if (target instanceof HTMLIFrameElement && iframeSelector) {
let iframeObserver = this.#iframeMap.get(target);
@ -202,7 +202,7 @@ export class FolkObserver {
unobserve(
target: Element,
callback: ClientRectObserverEntryCallback,
{ iframeSelector }: FolkObserverOptions = {}
{ iframeSelector }: FolkObserverOptions = {},
): void {
if (target instanceof HTMLIFrameElement && iframeSelector) {
let iframeObserver = this.#iframeMap.get(target);

View File

@ -1,6 +1,7 @@
// Animation and timing
export * from './animation-frame-controller';
export * from './rAF';
// Observers (move these to the top since they're dependencies)
export * from './client-rect-observer';
export * from './folk-observer';
export * from './resize-observer';
// Core utilities and types
export * from './Matrix';
@ -12,10 +13,9 @@ export * from '../labs/utils/cursors';
export * from './DOMRectTransform';
export * from './TransformEvent';
// Observers
export * from './client-rect-observer';
export * from './folk-observer';
export * from './resize-observer';
// Animation and timing
export * from './animation-frame-controller';
export * from './rAF';
// Integration and effects
export * from './collision';

View File

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
@ -37,13 +37,13 @@
<folk-shape x="180" y="250" width="65" height="55" rotation="-40"></folk-shape>
<folk-shape x="420" y="150" width="110" height="25" rotation="10"></folk-shape>
<folk-shape x="280" y="380" width="75" height="95" rotation="-50"></folk-shape>
<folk-event-propagator source="#shape1" target="#shape2"></folk-event-propagator>
<folk-rope source="#shape1" target="#shape2"></folk-rope>
</folk-physics>
<script type="module">
import '@labs/standalone/folk-shape.ts';
import '@labs/standalone/folk-physics.ts';
import '@labs/standalone/folk-event-propagator.ts';
import '@labs/standalone/folk-rope.ts';
</script>
</body>
</html>