popup-button-plugin 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -2
- package/dist/popup-button.js +6 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { registerButtonContent, getButtonContent, unregisterButtonContent } from './popup-registry';
|
|
2
|
-
export type { PopupContent } from './popup-registry';
|
|
3
|
-
export { PopupButton } from './popup-button';
|
|
1
|
+
export { registerButtonContent, getButtonContent, unregisterButtonContent } from './popup-registry.js';
|
|
2
|
+
export type { PopupContent } from './popup-registry.js';
|
|
3
|
+
export { PopupButton } from './popup-button.js';
|
package/dist/index.js
CHANGED
|
@@ -2,5 +2,6 @@
|
|
|
2
2
|
// 1. Registers the <popup-button> custom element (side effect of
|
|
3
3
|
// the import below — customElements.define runs once).
|
|
4
4
|
// 2. Gives the app the registry functions it needs to call.
|
|
5
|
-
|
|
6
|
-
export {
|
|
5
|
+
// ".js" extensions required here too, same reason as in popup-button.ts.
|
|
6
|
+
export { registerButtonContent, getButtonContent, unregisterButtonContent } from './popup-registry.js';
|
|
7
|
+
export { PopupButton } from './popup-button.js';
|
package/dist/popup-button.js
CHANGED
|
@@ -19,7 +19,12 @@
|
|
|
19
19
|
// DOM + CSS, so our button/modal styles can't leak out, and page
|
|
20
20
|
// styles can't accidentally break our popup.
|
|
21
21
|
// =====================================================================
|
|
22
|
-
|
|
22
|
+
// NOTE the explicit ".js" extension: native browser <script type="module">
|
|
23
|
+
// imports require the real file extension (unlike bundlers such as
|
|
24
|
+
// Vite/webpack, which resolve extensionless imports for you). Without
|
|
25
|
+
// this, plain-HTML usage (our main selling point — no build tool
|
|
26
|
+
// needed) breaks with a 404 on this import.
|
|
27
|
+
import { getButtonContent } from './popup-registry.js';
|
|
23
28
|
export class PopupButton extends HTMLElement {
|
|
24
29
|
constructor() {
|
|
25
30
|
super();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "popup-button-plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "A tiny, standalone, framework-free button-with-popup web component: register content by name, and <popup-button name=\"...\"> automatically shows it when clicked.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|