diff --git a/labs/folk-event-propagator.ts b/labs/folk-event-propagator.ts index 4056a81..8d1e732 100644 --- a/labs/folk-event-propagator.ts +++ b/labs/folk-event-propagator.ts @@ -1,7 +1,7 @@ import { css, PropertyValues } from '@lit/reactive-element'; import { FolkRope } from './folk-rope.ts'; import { property } from '@lit/reactive-element/decorators.js'; -import { Propagator } from '@propagators/index.ts'; +import { Propagator } from '@propagators'; export class FolkEventPropagator extends FolkRope { static override tagName = 'folk-event-propagator'; diff --git a/labs/folk-shape.ts b/labs/folk-shape.ts index a6ae96a..4f45c22 100644 --- a/labs/folk-shape.ts +++ b/labs/folk-shape.ts @@ -3,7 +3,7 @@ import { ResizeObserverManager } from '@lib/resize-observer'; import { Point } from '@lib/types'; import { DOMRectTransform, DOMRectTransformReadonly } from '@lib/DOMRectTransform'; import { Vector } from '@lib/Vector'; -import { getResizeCursorUrl, getRotateCursorUrl } from '@lib/cursors'; +import { getResizeCursorUrl, getRotateCursorUrl } from '@labs/utils/cursors'; import { TransformEvent } from '@lib/TransformEvent'; const resizeObserver = new ResizeObserverManager(); diff --git a/lib/cursors.ts b/labs/utils/cursors.ts similarity index 100% rename from lib/cursors.ts rename to labs/utils/cursors.ts diff --git a/lib/folk-observer.ts b/lib/folk-observer.ts index 8a2a0d2..5d2ce03 100644 --- a/lib/folk-observer.ts +++ b/lib/folk-observer.ts @@ -1,9 +1,11 @@ import { FolkShape } from '../labs/folk-shape'; -import { ClientRectObserver, ClientRectObserverEntry } from './client-rect-observer'; +import { + ClientRectObserver, + ClientRectObserverEntry, + type ClientRectObserverEntryCallback, +} from './client-rect-observer'; import { TransformEvent } from './TransformEvent'; -export type ClientRectObserverEntryCallback = (entry: ClientRectObserverEntry) => void; - export type FolkObserverOptions = { iframeSelector?: string; }; diff --git a/lib/index.ts b/lib/index.ts new file mode 100644 index 0000000..cfc3859 --- /dev/null +++ b/lib/index.ts @@ -0,0 +1,34 @@ +// Animation and timing +export * from './animation-frame-controller'; +export * from './rAF'; + +// Core utilities and types +export * from './types'; +export * from './utils'; +export * from './Vector'; +export * from './Matrix'; + +// DOM and transformation +export * from './DOMRectTransform'; +export * from './TransformEvent'; +export * from '../labs/utils/cursors'; + +// Observers +export * from './client-rect-observer'; +export * from './resize-observer'; +export * from './folk-observer'; + +// Integration and effects +export * from './EffectIntegrator'; +export * from './collision'; + +// Base elements and components +export * from './folk-element'; + +// WebGL utilities +export * from './webgl'; +// Template literal tags +export * from './tags'; + +// Experimental features +export * from './Experimental'; diff --git a/tsconfig.json b/tsconfig.json index 6f8f4b2..8e3085c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,8 +16,11 @@ "types": ["@webgpu/types", "@types/node", "bun-types"], "baseUrl": ".", "paths": { + "@lib": ["lib"], "@lib/*": ["lib/*"], + "@labs": ["labs"], "@labs/*": ["labs/*"], + "@propagators": ["propagators"], "@propagators/*": ["propagators/*"] } },