Skip to content

Commit

Permalink
Changes:
Browse files Browse the repository at this point in the history
* removed dts-bundle-generator in favor of dedicated vite plugin
* fixing some treeshaking related issues
* update dependencies
* update tooling setup
  • Loading branch information
thednp committed Oct 28, 2024
1 parent 44b45c0 commit 210390b
Show file tree
Hide file tree
Showing 118 changed files with 5,330 additions and 5,946 deletions.
187 changes: 1 addition & 186 deletions dist/bootstrap-native.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/bootstrap-native.cjs.map

Large diffs are not rendered by default.

1,133 changes: 575 additions & 558 deletions dist/bootstrap-native.d.ts

Large diffs are not rendered by default.

187 changes: 1 addition & 186 deletions dist/bootstrap-native.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/bootstrap-native.js.map

Large diffs are not rendered by default.

3,062 changes: 1,334 additions & 1,728 deletions dist/bootstrap-native.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/bootstrap-native.mjs.map

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions dist/components/alert.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
"use strict";var C=Object.defineProperty;var g=(s,t,e)=>t in s?C(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var o=(s,t,e)=>g(s,typeof t!="symbol"?t+"":t,e);const n=require("@thednp/shorty"),a=require("@thednp/event-listener"),E=require("./fadeClass-Co6nOzNJ.js"),l=require("./showClass-D_Ms1FgG.js"),p=require("./dataBsDismiss-CMHF7If_.js"),q=require("./base-component-DBcDoOjV.js"),r="alert",u="Alert",L=`.${r}`,f=`[${p.dataBsDismiss}="${r}"]`,$=s=>n.getInstance(s,u),b=s=>new i(s),d=n.createCustomEvent(`close.bs.${r}`),w=n.createCustomEvent(`closed.bs.${r}`),m=s=>{const{element:t}=s;n.dispatchEvent(t,w),s._toggleEventListeners(),s.dispose(),t.remove()};class i extends q.BaseComponent{constructor(e){super(e);o(this,"dismiss");o(this,"close",()=>{const{element:e}=this;// istanbul ignore else @preserve
e&&n.hasClass(e,l.showClass)&&(n.dispatchEvent(e,d),d.defaultPrevented||(n.removeClass(e,l.showClass),n.hasClass(e,E.fadeClass)?n.emulateTransitionEnd(e,()=>m(this)):m(this)))});o(this,"_toggleEventListeners",e=>{const h=e?a.addListener:a.removeListener,{dismiss:c,close:v}=this;// istanbul ignore else @preserve
c&&h(c,n.mouseclickEvent,v)});this.dismiss=n.querySelector(f,this.element),this._toggleEventListeners(!0)}get name(){return u}dispose(){this._toggleEventListeners(),super.dispose()}}o(i,"selector",L),o(i,"init",b),o(i,"getInstance",$);module.exports=i;
"use strict";const s=require("./base-component-D3rSrWwH.js"),i=require("./event-listener-W3RGkfJ6.js"),h=require("./fadeClass-Co6nOzNJ.js"),r=require("./showClass-D_Ms1FgG.js"),v=require("./dataBsDismiss-CMHF7If_.js"),n="alert",l="Alert",C=`.${n}`,E=`[${v.dataBsDismiss}="${n}"]`,g=t=>s.getInstance(t,l),p=t=>new d(t),c=s.createCustomEvent(`close.bs.${n}`),q=s.createCustomEvent(`closed.bs.${n}`),a=t=>{const{element:e}=t;s.dispatchEvent(e,q),t._toggleEventListeners(),t.dispose(),e.remove()};class d extends s.BaseComponent{static selector=C;static init=p;static getInstance=g;dismiss;constructor(e){super(e),this.dismiss=s.querySelector(E,this.element),this._toggleEventListeners(!0)}get name(){return l}close=()=>{const{element:e}=this;e&&s.hasClass(e,r.showClass)&&(s.dispatchEvent(e,c),c.defaultPrevented||(s.removeClass(e,r.showClass),s.hasClass(e,h.fadeClass)?s.emulateTransitionEnd(e,()=>a(this)):a(this)))};_toggleEventListeners=e=>{const m=e?i.E:i.r,{dismiss:o,close:u}=this;o&&m(o,s.mouseclickEvent,u)};dispose(){this._toggleEventListeners(),super.dispose()}}module.exports=d;
//# sourceMappingURL=alert.cjs.map
2 changes: 1 addition & 1 deletion dist/components/alert.cjs.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

100 changes: 49 additions & 51 deletions dist/components/alert.d.ts
Original file line number Diff line number Diff line change
@@ -1,51 +1,49 @@
export interface BaseOptions {
[key: string]: unknown;
}
declare class BaseComponent {
element: HTMLElement;
options?: BaseOptions;
/**
* @param target `HTMLElement` or selector string
* @param config component instance options
*/
constructor(target: HTMLElement | string, config?: BaseOptions);
get version(): string;
get name(): string;
get defaults(): {};
/** just to have something to extend from */
_toggleEventListeners: () => void;
/** Removes component from target element. */
dispose(): void;
}
/** Creates a new Alert instance. */
declare class Alert extends BaseComponent {
static selector: string;
static init: (element: HTMLElement) => Alert;
static getInstance: (element: HTMLElement) => Alert | null;
dismiss: HTMLElement | null;
constructor(target: HTMLElement | string);
/** Returns component name string. */
get name(): string;
/**
* Public method that hides the `.alert` element from the user,
* disposes the instance once animation is complete, then
* removes the element from the DOM.
*/
close: () => void;
/**
* Toggle on / off the `click` event listener.
*
* @param add when `true`, event listener is added
*/
_toggleEventListeners: (add?: boolean) => void;
/** Remove the component from target element. */
dispose(): void;
}

export {
Alert as default,
};

export as namespace Alert;

export {};
/** Creates a new Alert instance. */
declare class Alert extends BaseComponent {
static selector: string;
static init: (element: HTMLElement) => Alert;
static getInstance: (element: HTMLElement) => Alert | null;
dismiss: HTMLElement | null;
constructor(target: HTMLElement | string);
/** Returns component name string. */
get name(): string;
/**
* Public method that hides the `.alert` element from the user,
* disposes the instance once animation is complete, then
* removes the element from the DOM.
*/
close: () => void;
/**
* Toggle on / off the `click` event listener.
*
* @param add when `true`, event listener is added
*/
_toggleEventListeners: (add?: boolean) => void;
/** Remove the component from target element. */
dispose(): void;
}
export default Alert;

/** Returns a new `BaseComponent` instance. */
declare class BaseComponent {
element: HTMLElement;
options?: BaseOptions;
/**
* @param target `HTMLElement` or selector string
* @param config component instance options
*/
constructor(target: HTMLElement | string, config?: BaseOptions);
get version(): string;
get name(): string;
get defaults(): {};
/** just to have something to extend from */
_toggleEventListeners: () => void;
/** Removes component from target element. */
dispose(): void;
}

declare interface BaseOptions {
[key: string]: unknown;
}

export { }
Loading

0 comments on commit 210390b

Please sign in to comment.