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E,UAAU;IA4B5D,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;IAIjC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,GAAG,MAAM,EAAE,GAAG,EAAE,KAAK,IAAI;IAI/C,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI;IAmD/C,WAAW;IA+BX,QAAQ,CAAC,KAAK,EAAE,MAAM;IAUtB,QAAQ;IAKR,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK;IAgBtB,QAAQ;IAKR,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAgBrC,OAAO;IAMP,WAAW,CAAC,WAAW,EAAE,MAAM;IAuB/B,WAAW,CAAC,SAAS,UAAQ;IAY7B,QAAQ;IAgBR,IAAI,CAAC,IAAI,UAAO;IAYhB,IAAI;IAIJ,QAAQ,CAAC,SAAS,EAAE,MAAM;IAI1B,KAAK,CAAC,KAAK,EAAE,OAAO;CAqBrB","sources":["src/src/index.ts","src/index.ts"],"sourcesContent":[null,"import Sortable from \"sortablejs\";\n// @ts-ignore\nimport styles from \"bundle-text:./style.css\";\n\nif (!document) {\n throw Error(\"electron-tabs module must be called in renderer process\");\n}\n\ninterface TabGroupOptions {\n closeButtonText: string,\n defaultTab: TabOptions | ((tabGroup: TabGroup) => TabOptions),\n newTabButton: boolean,\n newTabButtonText: string,\n sortable: boolean,\n sortableOptions?: Sortable.Options\n visibilityThreshold: number,\n}\n\ninterface TabOptions {\n active?: boolean;\n badge?: Badge;\n closable?: boolean;\n icon?: string;\n iconURL?: string;\n ready?: ((tab: Tab) => void);\n src?: string;\n title?: string;\n visible?: boolean;\n webviewAttributes?: { [key: string]: any };\n}\n\ninterface Badge {\n text: string,\n classname: string\n}\n\nconst CLASSNAMES = {\n ROOT: \"etabs\",\n NAV: \"nav\",\n TABS: \"tabs\",\n TAB: \"tab\",\n BUTTONS: \"buttons\",\n VIEWS: \"views\",\n VIEW: \"view\"\n}\n\nfunction emit(emitter: TabGroup | Tab, type: string, args: any[]) {\n if (type === \"ready\") {\n emitter.isReady = true;\n }\n emitter.dispatchEvent(new CustomEvent(type, { detail: args }));\n}\n\nfunction on(emitter: TabGroup | Tab, type: string, fn: (detail: string) => void, options?: { [key: string]: any }) {\n if (type === \"ready\" && emitter.isReady === true) {\n fn.apply(emitter, [emitter]);\n }\n emitter.
|