From d11e4e963c37e75eed3250c5d1d02f4e13238450 Mon Sep 17 00:00:00 2001 From: Eric Woodward Date: Sat, 6 Sep 2025 18:01:21 -0400 Subject: [PATCH] add JSR support --- dist/src/fluent-dom-esm.d.ts | 26 ++------------------------ jsr.json | 5 +++++ src/fluent-dom-esm.ts | 4 ++-- 3 files changed, 9 insertions(+), 26 deletions(-) create mode 100644 jsr.json diff --git a/dist/src/fluent-dom-esm.d.ts b/dist/src/fluent-dom-esm.d.ts index b3aff2a..c6cd407 100644 --- a/dist/src/fluent-dom-esm.d.ts +++ b/dist/src/fluent-dom-esm.d.ts @@ -1,28 +1,6 @@ -/** - * fluent-dom-esm v1.1.0 - * - * Fluent DOM Manipulation, adapted to ESM and cranked up to v1.1(.0). - * - * https://git.itsericwoodward.com/eric/fluent-dom-esm - * - * v1.1.0 Copyright (c) 2025 Eric Woodward - * Original copyright (c) 2009 Tommy Montgomery (https://glacius.tmont.com/articles/fluent-dom-manipulation-in-javascript) - * - * Released under the WTFPL (Do What the Fuck You Want to Public License) - * - * @author Eric Woodward (v1.1.0 update) - * @author Tommy Montgomery (original) - * @license http://sam.zoy.org/wtfpl/ - */ +import { FluentDomObject } from './fluent-dom-esm.types'; /** * IIFE that creates the FluentDomObject as default export */ -declare const _default: { - (node: HTMLElement): any; - /** - * Creates a new HTML element which is wrapped in a FluentDomObject and returned - */ - create: (tagName: string) => any; - c(tagName: string): any; -}; +declare const _default: FluentDomObject; export default _default; diff --git a/jsr.json b/jsr.json new file mode 100644 index 0000000..79c5d70 --- /dev/null +++ b/jsr.json @@ -0,0 +1,5 @@ +{ + "name": "@itsericwoodward/fluent-dom-esm", + "version": "1.1.0", + "exports": "./src/fluent-dom-esm.ts" +} \ No newline at end of file diff --git a/src/fluent-dom-esm.ts b/src/fluent-dom-esm.ts index 802aa5f..8ce2c6d 100644 --- a/src/fluent-dom-esm.ts +++ b/src/fluent-dom-esm.ts @@ -17,7 +17,7 @@ import type { FluentDomObject } from "./fluent-dom-esm.types"; -import { version } from "../package.json"; +import { version } from "../package.json" with { type: "json" }; import { isFluentDomObject, isHTMLElement, @@ -261,4 +261,4 @@ export default (function () { }; return FluentDom; -})(); +})() as unknown as FluentDomObject;