Skip to content
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,33 @@ Provides routing-related directives, enabling client-side navigation and routing
</div>
```

**[@ramstack/alpinegear-dialog](https://www.npmjs.com/package/@ramstack/alpinegear-dialog)** ([README](https://github.com/rameel/ramstack.alpinegear.js/tree/main/src/plugins/dialog))<br>
Provides a headless dialog directive, built on the native HTML `<dialog>` element.
It enables declarative composition of modal and non-modal dialogs with value-based close semantics,
Promise-based imperative control, and seamless integration with htmx.

```html
<div x-dialog:modal
@close:yes="console.log('Confirmed')"
@close="console.log('Closed with', $event.detail.value)">

<button x-dialog:trigger>Delete</button>

<dialog x-dialog:panel>
Are you sure you want to delete this item?

<div>
<button x-dialog:action value="yes">Yes</button>
<button x-dialog:action>Cancel</button>
</div>
</dialog>
</div>
```

**[@ramstack/alpinegear-destroy](https://www.npmjs.com/package/@ramstack/alpinegear-destroy)** ([README](https://github.com/rameel/ramstack.alpinegear.js/tree/main/src/plugins/destroy))<br>
Provides `x-destroy` provides directive, which is the opposite of `x-init` and allows you to execute code when an element is removed from the DOM.

```html

<template x-if="show">
<div x-destroy="destroyed = true">
<p>Hello, World!</p>
Expand Down
714 changes: 367 additions & 347 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
"@rollup/plugin-virtual": "^3.0.2",
"@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^6.9.1",
"@vitest/coverage-v8": "^4.0.15",
"@vitest/ui": "^4.0.15",
"@vitest/coverage-v8": "^4.0.16",
"@vitest/ui": "^4.0.16",
"cross-env": "^10.1.0",
"glob": "^13.0.0",
"gulp": "^5.0.1",
Expand All @@ -54,10 +54,10 @@
"gulplog": "^2.2.0",
"jsdom": "^27.3.0",
"rimraf": "^6.1.2",
"rollup": "^4.53.3",
"rollup": "^4.53.5",
"rollup-plugin-bundle-size": "^1.0.3",
"strip-comments": "^2.0.1",
"terser": "^5.44.1",
"vitest": "^4.0.15"
"vitest": "^4.0.16"
}
}
8 changes: 4 additions & 4 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ import {

const is_production = process.env.NODE_ENV === "production";

const global_plugins = [
const global_plugins = optimize => [
node_resolve(),
remove_comments(),
trim_ws(),
optimize && remove_comments(),
optimize && trim_ws(),
bundle_size(),
alias({
entries: [
Expand Down Expand Up @@ -73,7 +73,7 @@ function create_configuration({ plugin_name, input, format, optimize }) {
})]
},
plugins: [
...global_plugins,
...global_plugins(optimize),
replace({
preventAssignment: true,
values: {
Expand Down
5 changes: 5 additions & 0 deletions src/plugins/bound/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,11 @@ Provides the `x-hotkey` directive, which allows you to easily handle keyboard sh
**[@ramstack/alpinegear-router](https://www.npmjs.com/package/@ramstack/alpinegear-router)** ([README](https://github.com/rameel/ramstack.alpinegear.js/tree/main/src/plugins/router))<br>
Provides the `x-router` and `x-route` directives, which enable client-side navigation and routing functionality within your Alpine.js application.

**[@ramstack/alpinegear-dialog](https://www.npmjs.com/package/@ramstack/alpinegear-dialog)** ([README](https://github.com/rameel/ramstack.alpinegear.js/tree/main/src/plugins/dialog))<br>
Provides a headless dialog directive for Alpine.js based on the native HTML `<dialog>` element.
It supports declarative composition, value-based close semantics, and both modal and non-modal dialogs,
with optional Promise-based imperative control.


## Contributions
Bug reports and contributions are welcome.
Expand Down
40 changes: 20 additions & 20 deletions src/plugins/bound/package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"name": "@ramstack/alpinegear-bound",
"version": "0.0.0",
"description": "@ramstack/alpinegear-bound provides the 'x-bound' Alpine.js directive, which allows for two-way binding of input elements and their associated data properties.",
"author": "Rameel Burhan",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/rameel/ramstack.alpinegear.js.git",
"directory": "src/plugins/bound"
},
"keywords": [
"alpine.js",
"alpinejs",
"alpinejs-binding",
"alpinejs-directive",
"alpinejs-plugin"
],
"main": "alpinegear-bound.js",
"module": "alpinegear-bound.esm.js"
}
"name": "@ramstack/alpinegear-bound",
"version": "0.0.0",
"description": "@ramstack/alpinegear-bound provides the 'x-bound' Alpine.js directive, which allows for two-way binding of input elements and their associated data properties.",
"author": "Rameel Burhan",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/rameel/ramstack.alpinegear.js.git",
"directory": "src/plugins/bound"
},
"keywords": [
"alpine.js",
"alpinejs",
"alpinejs-binding",
"alpinejs-directive",
"alpinejs-plugin"
],
"main": "alpinegear-bound.js",
"module": "alpinegear-bound.esm.js"
}
5 changes: 5 additions & 0 deletions src/plugins/destroy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ Provides the `x-hotkey` directive, which allows you to easily handle keyboard sh
**[@ramstack/alpinegear-router](https://www.npmjs.com/package/@ramstack/alpinegear-router)** ([README](https://github.com/rameel/ramstack.alpinegear.js/tree/main/src/plugins/router))<br>
Provides the `x-router` and `x-route` directives, which enable client-side navigation and routing functionality within your Alpine.js application.

**[@ramstack/alpinegear-dialog](https://www.npmjs.com/package/@ramstack/alpinegear-dialog)** ([README](https://github.com/rameel/ramstack.alpinegear.js/tree/main/src/plugins/dialog))<br>
Provides a headless dialog directive for Alpine.js based on the native HTML `<dialog>` element.
It supports declarative composition, value-based close semantics, and both modal and non-modal dialogs,
with optional Promise-based imperative control.


## Contributions
Bug reports and contributions are welcome.
Expand Down
38 changes: 19 additions & 19 deletions src/plugins/destroy/package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"name": "@ramstack/alpinegear-destroy",
"version": "0.0.0",
"description": "@ramstack/alpinegear-destroy provides 'x-destroy' Alpine.js directive, which is the opposite of 'x-init' and allows you to execute code when an element is removed from the DOM.",
"author": "Rameel Burhan",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/rameel/ramstack.alpinegear.js.git",
"directory": "src/plugins/destroy"
},
"keywords": [
"alpine.js",
"alpinejs",
"alpinejs-directive",
"alpinejs-plugin"
],
"main": "alpinegear-destroy.js",
"module": "alpinegear-destroy.esm.js"
}
"name": "@ramstack/alpinegear-destroy",
"version": "0.0.0",
"description": "@ramstack/alpinegear-destroy provides 'x-destroy' Alpine.js directive, which is the opposite of 'x-init' and allows you to execute code when an element is removed from the DOM.",
"author": "Rameel Burhan",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/rameel/ramstack.alpinegear.js.git",
"directory": "src/plugins/destroy"
},
"keywords": [
"alpine.js",
"alpinejs",
"alpinejs-directive",
"alpinejs-plugin"
],
"main": "alpinegear-destroy.js",
"module": "alpinegear-destroy.esm.js"
}
Loading