@ddict/bubble 0.0.6 → 0.0.8

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/README.md CHANGED
@@ -1,2 +1,52 @@
1
- # bubble
2
- content scripts popover
1
+ # Ddict Bubble (Content Scripts Popover)
2
+ To get the Ddict Bubble project up and running on your local machine, follow these steps:
3
+
4
+ ## Prerequisites
5
+ - Node v20+
6
+
7
+ ### Installation
8
+
9
+ ```
10
+ npm install
11
+ ```
12
+
13
+ ### Running the Project Locally
14
+
15
+ ```
16
+ npm run dev
17
+ ```
18
+ This command will start a local development server. You can now access the application in your web browser at the address provided in the terminal output (usually http://localhost:5173).
19
+
20
+ ### Run Lint Check
21
+
22
+ To check for linting errors, run:
23
+
24
+ ```
25
+ npm run lint
26
+ ```
27
+
28
+ This command will use ESLint to check your code for any linting errors based on the project's configuration.
29
+
30
+ ### Format Code with Prettier
31
+
32
+ To format your code according to the project's Prettier configuration, run:
33
+
34
+ ```
35
+ npm run format
36
+ ```
37
+
38
+ ### Building the Project
39
+
40
+ ```
41
+ npm run build
42
+ ```
43
+ This command compiles the application into static files in the dist directory. These files can then be deployed to a web server.
44
+
45
+ ## Previewing the Build
46
+
47
+ After building the project, you can preview the production build locally by running:
48
+
49
+ ```
50
+ npm run preview
51
+ ```
52
+ Check the terminal output for the local URL to access the preview (usually http://localhost:4173)
package/dist/bubble.css CHANGED
@@ -1 +1 @@
1
- .ddict-absolute{position:absolute!important}.ddict-top-0{top:0px!important}.ddict-right-0{right:0px!important}.ddict-m-0{margin:0!important}.ddict-mr-1{margin-right:.25rem!important}.ddict-mt-1{margin-top:.25rem!important}.ddict-inline{display:inline!important}.ddict-h-4{height:1rem!important}.ddict-w-auto{width:auto!important}.ddict-w-4{width:1rem!important}.ddict-w-2\/3{width:66.666667%!important}.ddict-truncate{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.ddict-rounded-lg{border-radius:.5rem!important}.ddict-rounded-bl-lg{border-bottom-left-radius:.5rem!important}.ddict-bg-white{--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important}.ddict-bg-slate-50{--tw-bg-opacity: 1 !important;background-color:rgb(248 250 252 / var(--tw-bg-opacity))!important}.ddict-bg-blue-600{--tw-bg-opacity: 1 !important;background-color:rgb(37 99 235 / var(--tw-bg-opacity))!important}.ddict-p-2{padding:.5rem!important}.ddict-p-0{padding:0!important}.ddict-text-sm{font-size:.875rem!important;line-height:1.25rem!important}.ddict-text-base{font-size:1rem!important;line-height:1.5rem!important}.ddict-capitalize{text-transform:capitalize!important}.ddict-italic{font-style:italic!important}.ddict-leading-tight{line-height:1.25!important}.ddict-text-slate-900{--tw-text-opacity: 1 !important;color:rgb(15 23 42 / var(--tw-text-opacity))!important}.ddict-text-slate-400{--tw-text-opacity: 1 !important;color:rgb(148 163 184 / var(--tw-text-opacity))!important}.ddict-text-white{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity))!important}.ddict-text-slate-500{--tw-text-opacity: 1 !important;color:rgb(100 116 139 / var(--tw-text-opacity))!important}.ddict-opacity-0{opacity:0!important}.ddict-shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25) !important;--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.hover\:ddict-opacity-100:hover{opacity:1!important}.ddict-body[data-v-c7cd4228]{padding:.7rem!important}
1
+ *,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}:root,[data-theme]{background-color:var(--fallback-b1,oklch(var(--b1)/1));color:var(--fallback-bc,oklch(var(--bc)/1))}@supports not (color: oklch(0% 0 0)){:root{color-scheme:light;--fallback-p: #491eff;--fallback-pc: #d4dbff;--fallback-s: #ff41c7;--fallback-sc: #fff9fc;--fallback-a: #00cfbd;--fallback-ac: #00100d;--fallback-n: #2b3440;--fallback-nc: #d7dde4;--fallback-b1: #ffffff;--fallback-b2: #e5e6e6;--fallback-b3: #e5e6e6;--fallback-bc: #1f2937;--fallback-in: #00b3f0;--fallback-inc: #000000;--fallback-su: #00ca92;--fallback-suc: #000000;--fallback-wa: #ffc22d;--fallback-wac: #000000;--fallback-er: #ff6f70;--fallback-erc: #000000}@media (prefers-color-scheme: dark){:root{color-scheme:dark;--fallback-p: #7582ff;--fallback-pc: #050617;--fallback-s: #ff71cf;--fallback-sc: #190211;--fallback-a: #00c7b5;--fallback-ac: #000e0c;--fallback-n: #2a323c;--fallback-nc: #a6adbb;--fallback-b1: #1d232a;--fallback-b2: #191e24;--fallback-b3: #15191e;--fallback-bc: #a6adbb;--fallback-in: #00b3f0;--fallback-inc: #000000;--fallback-su: #00ca92;--fallback-suc: #000000;--fallback-wa: #ffc22d;--fallback-wac: #000000;--fallback-er: #ff6f70;--fallback-erc: #000000}}}html{-webkit-tap-highlight-color:transparent}*{scrollbar-color:color-mix(in oklch,currentColor 35%,transparent) transparent}*:hover{scrollbar-color:color-mix(in oklch,currentColor 60%,transparent) transparent}:root{color-scheme:light;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 89.824% .06192 275.75;--ac: 15.352% .0368 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 49.12% .3096 275.75;--s: 69.71% .329 342.55;--sc: 98.71% .0106 342.55;--a: 76.76% .184 183.61;--n: 32.1785% .02476 255.701624;--nc: 89.4994% .011585 252.096176;--b1: 100% 0 0;--b2: 96.1151% 0 0;--b3: 92.4169% .00108 197.137559;--bc: 27.8078% .029596 256.847952}@media (prefers-color-scheme: dark){:root{color-scheme:dark;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 13.138% .0392 275.75;--sc: 14.96% .052 342.55;--ac: 14.902% .0334 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 65.69% .196 275.75;--s: 74.8% .26 342.55;--a: 74.51% .167 183.61;--n: 31.3815% .021108 254.139175;--nc: 74.6477% .0216 264.435964;--b1: 25.3267% .015896 252.417568;--b2: 23.2607% .013807 253.100675;--b3: 21.1484% .01165 254.087939;--bc: 74.6477% .0216 264.435964}}[data-theme=light]{color-scheme:light;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 89.824% .06192 275.75;--ac: 15.352% .0368 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 49.12% .3096 275.75;--s: 69.71% .329 342.55;--sc: 98.71% .0106 342.55;--a: 76.76% .184 183.61;--n: 32.1785% .02476 255.701624;--nc: 89.4994% .011585 252.096176;--b1: 100% 0 0;--b2: 96.1151% 0 0;--b3: 92.4169% .00108 197.137559;--bc: 27.8078% .029596 256.847952}[data-theme=dark]{color-scheme:dark;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 13.138% .0392 275.75;--sc: 14.96% .052 342.55;--ac: 14.902% .0334 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 65.69% .196 275.75;--s: 74.8% .26 342.55;--a: 74.51% .167 183.61;--n: 31.3815% .021108 254.139175;--nc: 74.6477% .0216 264.435964;--b1: 25.3267% .015896 252.417568;--b2: 23.2607% .013807 253.100675;--b3: 21.1484% .01165 254.087939;--bc: 74.6477% .0216 264.435964}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.avatar.placeholder>div{display:flex;align-items:center;justify-content:center}@media (hover:hover){.link-hover:hover{text-decoration-line:underline}.label a:hover{--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}}.btn{display:inline-flex;height:3rem;min-height:3rem;flex-shrink:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-wrap:wrap;align-items:center;justify-content:center;border-radius:var(--rounded-btn, .5rem);border-color:transparent;border-color:oklch(var(--btn-color, var(--b2)) / var(--tw-border-opacity));padding-left:1rem;padding-right:1rem;text-align:center;font-size:.875rem;line-height:1em;gap:.5rem;font-weight:600;text-decoration-line:none;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);border-width:var(--border-btn, 1px);transition-property:color,background-color,border-color,opacity,box-shadow,transform;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);outline-color:var(--fallback-bc,oklch(var(--bc)/1));background-color:oklch(var(--btn-color, var(--b2)) / var(--tw-bg-opacity));--tw-bg-opacity: 1;--tw-border-opacity: 1}.btn-disabled,.btn[disabled],.btn:disabled{pointer-events:none}:where(.btn:is(input[type=checkbox])),:where(.btn:is(input[type=radio])){width:auto;-webkit-appearance:none;-moz-appearance:none;appearance:none}.btn:is(input[type=checkbox]):after,.btn:is(input[type=radio]):after{--tw-content: attr(aria-label);content:var(--tw-content)}.card{position:relative;display:flex;flex-direction:column;border-radius:var(--rounded-box, 1rem)}.card:focus{outline:2px solid transparent;outline-offset:2px}.card-body{display:flex;flex:1 1 auto;flex-direction:column;padding:var(--padding-card, 2rem);gap:.5rem}.card-body :where(p){flex-grow:1}.card figure{display:flex;align-items:center;justify-content:center}.card.image-full{display:grid}.card.image-full:before{position:relative;content:"";z-index:10;border-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));opacity:.75}.card.image-full:before,.card.image-full>*{grid-column-start:1;grid-row-start:1}.card.image-full>figure img{height:100%;-o-object-fit:cover;object-fit:cover}.card.image-full>.card-body{position:relative;z-index:20;--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}@media (hover: hover){.btn:hover{--tw-border-opacity: 1;border-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn:hover{background-color:color-mix(in oklab,oklch(var(--btn-color, var(--b2)) / var(--tw-bg-opacity, 1)) 90%,black);border-color:color-mix(in oklab,oklch(var(--btn-color, var(--b2)) / var(--tw-border-opacity, 1)) 90%,black)}}@supports not (color: oklch(0% 0 0)){.btn:hover{background-color:var(--btn-color, var(--fallback-b2));border-color:var(--btn-color, var(--fallback-b2))}}.btn.glass:hover{--glass-opacity: 25%;--glass-border-opacity: 15%}.btn-outline.btn-primary:hover{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-primary:hover{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}}.btn-disabled:hover,.btn[disabled]:hover,.btn:disabled:hover{--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .2;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}@supports (color: color-mix(in oklab,black,black)){.btn:is(input[type=checkbox]:checked):hover,.btn:is(input[type=radio]:checked):hover{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}}}.form-control{display:flex;flex-direction:column}.label{display:flex;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-items:center;justify-content:space-between;padding:.5rem .25rem}.hero{display:grid;width:100%;place-items:center;background-size:cover;background-position:center}.hero>*{grid-column-start:1;grid-row-start:1}.hero-content{z-index:0;display:flex;align-items:center;justify-content:center;max-width:80rem;gap:1rem;padding:1rem}.input{flex-shrink:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:3rem;padding-left:1rem;padding-right:1rem;font-size:1rem;line-height:2;line-height:1.5rem;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.input[type=number]::-webkit-inner-spin-button,.input-md[type=number]::-webkit-inner-spin-button{margin-top:-1rem;margin-bottom:-1rem;margin-inline-end:-1rem}.join{display:inline-flex;align-items:stretch;border-radius:var(--rounded-btn, .5rem)}.join :where(.join-item){border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0;border-start-start-radius:0}.join .join-item:not(:first-child):not(:last-child),.join *:not(:first-child):not(:last-child) .join-item{border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0;border-start-start-radius:0}.join .join-item:first-child:not(:last-child),.join *:first-child:not(:last-child) .join-item{border-start-end-radius:0;border-end-end-radius:0}.join .dropdown .join-item:first-child:not(:last-child),.join *:first-child:not(:last-child) .dropdown .join-item{border-start-end-radius:inherit;border-end-end-radius:inherit}.join :where(.join-item:first-child:not(:last-child)),.join :where(*:first-child:not(:last-child) .join-item){border-end-start-radius:inherit;border-start-start-radius:inherit}.join .join-item:last-child:not(:first-child),.join *:last-child:not(:first-child) .join-item{border-end-start-radius:0;border-start-start-radius:0}.join :where(.join-item:last-child:not(:first-child)),.join :where(*:last-child:not(:first-child) .join-item){border-start-end-radius:inherit;border-end-end-radius:inherit}@supports not selector(:has(*)){:where(.join *){border-radius:inherit}}@supports selector(:has(*)){:where(.join *:has(.join-item)){border-radius:inherit}}.link{cursor:pointer;text-decoration-line:underline}.link-hover{text-decoration-line:none}.mask{-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center}.range{height:1.5rem;width:100%;cursor:pointer;-moz-appearance:none;appearance:none;-webkit-appearance:none;--range-shdw: var(--fallback-bc,oklch(var(--bc)/1));overflow:hidden;border-radius:var(--rounded-box, 1rem);background-color:transparent}.range:focus{outline:none}.textarea{min-height:3rem;flex-shrink:1;padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem;line-height:2;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.btm-nav>* .label{font-size:1rem;line-height:1.5rem}@media (prefers-reduced-motion: no-preference){.btn{animation:button-pop var(--animation-btn, .25s) ease-out}}.btn:active:hover,.btn:active:focus{animation:button-pop 0s ease-out;transform:scale(var(--btn-focus-scale, .97))}@supports not (color: oklch(0% 0 0)){.btn{background-color:var(--btn-color, var(--fallback-b2));border-color:var(--btn-color, var(--fallback-b2))}.btn-primary{--btn-color: var(--fallback-p)}}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-primary.btn-active{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}}.btn:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px}.btn-primary{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)));outline-color:var(--fallback-p,oklch(var(--p)/1))}@supports (color: oklch(0% 0 0)){.btn-primary{--btn-color: var(--p)}}.btn.glass{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);outline-color:currentColor}.btn.glass.btn-active{--glass-opacity: 25%;--glass-border-opacity: 15%}.btn-outline.btn-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity)))}.btn-outline.btn-primary.btn-active{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.btn.btn-disabled,.btn[disabled],.btn:disabled{--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .2;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}.btn:is(input[type=checkbox]:checked),.btn:is(input[type=radio]:checked){--tw-border-opacity: 1;border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.btn:is(input[type=checkbox]:checked):focus-visible,.btn:is(input[type=radio]:checked):focus-visible{outline-color:var(--fallback-p,oklch(var(--p)/1))}@keyframes button-pop{0%{transform:scale(var(--btn-focus-scale, .98))}40%{transform:scale(1.02)}to{transform:scale(1)}}.card :where(figure:first-child){overflow:hidden;border-start-start-radius:inherit;border-start-end-radius:inherit;border-end-start-radius:unset;border-end-end-radius:unset}.card :where(figure:last-child){overflow:hidden;border-start-start-radius:unset;border-start-end-radius:unset;border-end-start-radius:inherit;border-end-end-radius:inherit}.card:focus-visible{outline:2px solid currentColor;outline-offset:2px}.card.bordered{border-width:1px;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}.card.compact .card-body{padding:1rem;font-size:.875rem;line-height:1.25rem}.card.image-full :where(figure){overflow:hidden;border-radius:inherit}@keyframes checkmark{0%{background-position-y:5px}50%{background-position-y:-2px}to{background-position-y:0}}.label-text{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.label-text-alt{font-size:.75rem;line-height:1rem;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.input input{--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));background-color:transparent}.input input:focus{outline:2px solid transparent;outline-offset:2px}.input[list]::-webkit-calendar-picker-indicator{line-height:1em}.input-bordered{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.input:focus,.input:focus-within{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.input:has(>input[disabled]),.input-disabled,.input:disabled,.input[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}.input:has(>input[disabled])::-moz-placeholder,.input-disabled::-moz-placeholder,.input:disabled::-moz-placeholder,.input[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.input:has(>input[disabled])::placeholder,.input-disabled::placeholder,.input:disabled::placeholder,.input[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.input:has(>input[disabled])>input[disabled]{cursor:not-allowed}.input::-webkit-date-and-time-value{text-align:inherit}.join>:where(*:not(:first-child)){margin-top:0;margin-bottom:0;margin-inline-start:-1px}.join>:where(*:not(:first-child)):is(.btn){margin-inline-start:calc(var(--border-btn) * -1)}.link:focus{outline:2px solid transparent;outline-offset:2px}.link:focus-visible{outline:2px solid currentColor;outline-offset:2px}.loading{pointer-events:none;display:inline-block;aspect-ratio:1 / 1;width:1.5rem;background-color:currentColor;-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='%23000' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cstyle%3E.spinner_V8m1%7Btransform-origin:center;animation:spinner_zKoa 2s linear infinite%7D.spinner_V8m1 circle%7Bstroke-linecap:round;animation:spinner_YpZS 1.5s ease-out infinite%7D%40keyframes spinner_zKoa%7B100%25%7Btransform:rotate(360deg)%7D%7D%40keyframes spinner_YpZS%7B0%25%7Bstroke-dasharray:0 150;stroke-dashoffset:0%7D47.5%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-16%7D95%25%2C100%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-59%7D%7D%3C%2Fstyle%3E%3Cg class='spinner_V8m1'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3'%3E%3C%2Fcircle%3E%3C%2Fg%3E%3C%2Fsvg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='%23000' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cstyle%3E.spinner_V8m1%7Btransform-origin:center;animation:spinner_zKoa 2s linear infinite%7D.spinner_V8m1 circle%7Bstroke-linecap:round;animation:spinner_YpZS 1.5s ease-out infinite%7D%40keyframes spinner_zKoa%7B100%25%7Btransform:rotate(360deg)%7D%7D%40keyframes spinner_YpZS%7B0%25%7Bstroke-dasharray:0 150;stroke-dashoffset:0%7D47.5%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-16%7D95%25%2C100%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-59%7D%7D%3C%2Fstyle%3E%3Cg class='spinner_V8m1'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3'%3E%3C%2Fcircle%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.mockup-phone .display{overflow:hidden;border-radius:40px;margin-top:-25px}.mockup-browser .mockup-browser-toolbar .input{position:relative;margin-left:auto;margin-right:auto;display:block;height:1.75rem;width:24rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));padding-left:2rem;direction:ltr}.mockup-browser .mockup-browser-toolbar .input:before{content:"";position:absolute;left:.5rem;top:50%;aspect-ratio:1 / 1;height:.75rem;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:9999px;border-width:2px;border-color:currentColor;opacity:.6}.mockup-browser .mockup-browser-toolbar .input:after{content:"";position:absolute;left:1.25rem;top:50%;height:.5rem;--tw-translate-y: 25%;--tw-rotate: -45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:9999px;border-width:1px;border-color:currentColor;opacity:.6}@keyframes modal-pop{0%{opacity:0}}@keyframes progress-loading{50%{background-position-x:-115%}}@keyframes radiomark{0%{box-shadow:0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset}50%{box-shadow:0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset}to{box-shadow:0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset}}.range:focus-visible::-webkit-slider-thumb{--focus-shadow: 0 0 0 6px var(--fallback-b1,oklch(var(--b1)/1)) inset, 0 0 0 2rem var(--range-shdw) inset}.range:focus-visible::-moz-range-thumb{--focus-shadow: 0 0 0 6px var(--fallback-b1,oklch(var(--b1)/1)) inset, 0 0 0 2rem var(--range-shdw) inset}.range::-webkit-slider-runnable-track{height:.5rem;width:100%;border-radius:var(--rounded-box, 1rem);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}.range::-moz-range-track{height:.5rem;width:100%;border-radius:var(--rounded-box, 1rem);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}.range::-webkit-slider-thumb{position:relative;height:1.5rem;width:1.5rem;border-radius:var(--rounded-box, 1rem);border-style:none;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));-moz-appearance:none;appearance:none;-webkit-appearance:none;top:50%;color:var(--range-shdw);transform:translateY(-50%);--filler-size: 100rem;--filler-offset: .6rem;box-shadow:0 0 0 3px var(--range-shdw) inset,var(--focus-shadow, 0 0),calc(var(--filler-size) * -1 - var(--filler-offset)) 0 0 var(--filler-size)}.range::-moz-range-thumb{position:relative;height:1.5rem;width:1.5rem;border-radius:var(--rounded-box, 1rem);border-style:none;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));top:50%;color:var(--range-shdw);--filler-size: 100rem;--filler-offset: .5rem;box-shadow:0 0 0 3px var(--range-shdw) inset,var(--focus-shadow, 0 0),calc(var(--filler-size) * -1 - var(--filler-offset)) 0 0 var(--filler-size)}@keyframes rating-pop{0%{transform:translateY(-.125em)}40%{transform:translateY(-.125em)}to{transform:translateY(0)}}@keyframes skeleton{0%{background-position:150%}to{background-position:-50%}}.textarea:focus{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.textarea-primary{--tw-border-opacity: 1;border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)))}.textarea-primary:focus{--tw-border-opacity: 1;border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));outline-color:var(--fallback-p,oklch(var(--p)/1))}.textarea-disabled,.textarea:disabled,.textarea[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}.textarea-disabled::-moz-placeholder,.textarea:disabled::-moz-placeholder,.textarea[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.textarea-disabled::placeholder,.textarea:disabled::placeholder,.textarea[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}@keyframes toast-pop{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}.join.join-vertical{flex-direction:column}.join.join-vertical .join-item:first-child:not(:last-child),.join.join-vertical *:first-child:not(:last-child) .join-item{border-end-start-radius:0;border-end-end-radius:0;border-start-start-radius:inherit;border-start-end-radius:inherit}.join.join-vertical .join-item:last-child:not(:first-child),.join.join-vertical *:last-child:not(:first-child) .join-item{border-start-start-radius:0;border-start-end-radius:0;border-end-start-radius:inherit;border-end-end-radius:inherit}.join.join-horizontal{flex-direction:row}.join.join-horizontal .join-item:first-child:not(:last-child),.join.join-horizontal *:first-child:not(:last-child) .join-item{border-end-end-radius:0;border-start-end-radius:0;border-end-start-radius:inherit;border-start-start-radius:inherit}.join.join-horizontal .join-item:last-child:not(:first-child),.join.join-horizontal *:last-child:not(:first-child) .join-item{border-end-start-radius:0;border-start-start-radius:0;border-end-end-radius:inherit;border-start-end-radius:inherit}.card-compact .card-body{padding:1rem;font-size:.875rem;line-height:1.25rem}.card-normal .card-body{padding:var(--padding-card, 2rem);font-size:1rem;line-height:1.5rem}.join.join-vertical>:where(*:not(:first-child)){margin-left:0;margin-right:0;margin-top:-1px}.join.join-vertical>:where(*:not(:first-child)):is(.btn){margin-top:calc(var(--border-btn) * -1)}.join.join-horizontal>:where(*:not(:first-child)){margin-top:0;margin-bottom:0;margin-inline-start:-1px}.join.join-horizontal>:where(*:not(:first-child)):is(.btn){margin-inline-start:calc(var(--border-btn) * -1)}.absolute{position:absolute}.right-0{right:0}.top-0{top:0}.m-0{margin:0}.mr-1{margin-right:.25rem}.mt-2{margin-top:.5rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline{display:inline}.flex{display:flex}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-4{height:1rem}.h-6{height:1.5rem}.min-h-screen{min-height:100vh}.w-12{width:3rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-2\/3{width:66.666667%}.w-4{width:1rem}.w-6{width:1.5rem}.w-auto{width:auto}.w-full{width:100%}.max-w-sm{max-width:24rem}.flex-shrink-0{flex-shrink:0}.rotate-45{--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.justify-center{justify-content:center}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded{border-radius:.25rem}.bg-base-100{--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.bg-base-content{--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)))}.bg-slate-200{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-serif{font-family:ui-serif,Georgia,Cambria,Times New Roman,Times,serif}.text-5xl{font-size:3rem;line-height:1}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-tight{line-height:1.25}.text-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity)))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity))}.text-slate-900{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity))}.opacity-0{opacity:0}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.drop-shadow-2xl{--tw-drop-shadow: drop-shadow(0 25px 25px rgb(0 0 0 / .15));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}body{width:200%}.hover\:opacity-100:hover{opacity:1}@media (min-width: 1024px){.lg\:flex-row-reverse{flex-direction:row-reverse}.lg\:text-left{text-align:left}}.body[data-v-55035939]{padding:.7rem!important}
package/dist/bubble.es.js CHANGED
@@ -1,79 +1,53 @@
1
- import { openBlock, createElementBlock, toDisplayString, createElementVNode, createCommentVNode, Fragment, renderList, createBlock, createVNode, pushScopeId, popScopeId } from "vue";
2
- var Google = {
3
- revise
1
+ import { openBlock as r, createElementBlock as i, createElementVNode as o, toDisplayString as _, createCommentVNode as p, Fragment as w, renderList as $, createBlock as u, createVNode as m, pushScopeId as v, popScopeId as k } from "vue";
2
+ const f = "/ddict-logo.png", c = (t, n) => {
3
+ const e = t.__vccOpts || t;
4
+ for (const [l, s] of n)
5
+ e[l] = s;
6
+ return e;
7
+ }, y = {
8
+ name: "Logo"
9
+ }, x = {
10
+ src: f,
11
+ alt: "DDict Logo",
12
+ class: "w-6 h-6 cursor-pointer"
4
13
  };
5
- function revise(data) {
6
- const sentences = data.sentences.filter((s) => s.trans).map((s) => s.trans);
7
- const translits = data.sentences.filter((s) => s.src_translit).map((s) => s.src_translit).join();
8
- let dicts;
9
- if (data.dict) {
10
- dicts = data.dict.map((d) => {
11
- return {
12
- pos: d.pos,
13
- terms: d.terms.join(", ")
14
- };
15
- });
16
- }
17
- return {
18
- sentences,
19
- translits,
20
- dicts
21
- };
14
+ function b(t, n, e, l, s, a) {
15
+ return r(), i("img", x);
22
16
  }
23
- var index = "";
24
- var _export_sfc = (sfc, props) => {
25
- const target = sfc.__vccOpts || sfc;
26
- for (const [key, val] of props) {
27
- target[key] = val;
28
- }
29
- return target;
30
- };
31
- const _sfc_main$5 = {
32
- name: "Loading",
33
- data() {
34
- return {
35
- index: 0,
36
- texts: [".", "..", "..."],
37
- text: "."
38
- };
39
- },
40
- mounted() {
41
- setInterval(() => {
42
- this.index = (this.index + 1) % this.texts.length;
43
- this.text = this.texts[this.index];
44
- }, 500);
45
- }
46
- };
47
- const _hoisted_1$5 = { class: "ddict-p-2 ddict-shadow-8xl ddict-rounded-lg ddict-text-white ddict-bg-blue-600 ddict-text-bold" };
48
- function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
49
- return openBlock(), createElementBlock("section", _hoisted_1$5, " D" + toDisplayString(this.text), 1);
17
+ const C = /* @__PURE__ */ c(y, [["render", b]]), j = "/ddict-loading.gif", B = {
18
+ name: "Loading"
19
+ }, L = { class: "rounded bg-white p-1" }, M = /* @__PURE__ */ o("img", {
20
+ src: j,
21
+ alt: "Loading",
22
+ class: "w-12"
23
+ }, null, -1), z = [
24
+ M
25
+ ];
26
+ function S(t, n, e, l, s, a) {
27
+ return r(), i("div", L, z);
50
28
  }
51
- var Loading = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4]]);
52
- const _sfc_main$4 = {
29
+ const V = /* @__PURE__ */ c(B, [["render", S]]), D = {
53
30
  name: "Translit",
54
31
  props: ["translits"]
55
- };
56
- const _hoisted_1$4 = { class: "ddict-text-sm ddict-truncate ddict-p-0 ddict-m-0 ddict-w-2/3" };
57
- const _hoisted_2$3 = { class: "ddict-text-slate-500" };
58
- function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
59
- return openBlock(), createElementBlock("p", _hoisted_1$4, [
60
- createElementVNode("span", _hoisted_2$3, "/" + toDisplayString($props.translits) + "/", 1)
32
+ }, I = { class: "text-sm font-mono truncate p-0 m-0 w-2/3" }, N = { class: "text-slate-500" };
33
+ function A(t, n, e, l, s, a) {
34
+ return r(), i("p", I, [
35
+ o("span", N, "/" + _(e.translits) + "/", 1)
61
36
  ]);
62
37
  }
63
- var Translit = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3]]);
64
- const _sfc_main$3 = {
38
+ const E = /* @__PURE__ */ c(D, [["render", A]]), O = {
65
39
  name: "Player",
66
40
  props: ["tts"],
67
41
  data() {
68
42
  return {
69
- playing: false,
43
+ playing: !1,
70
44
  player: new Audio(this.tts),
71
45
  err: null
72
46
  };
73
47
  },
74
48
  watch: {
75
- playing(val) {
76
- if (!val) {
49
+ playing(t) {
50
+ if (!t) {
77
51
  this.player.pause();
78
52
  return;
79
53
  }
@@ -82,10 +56,9 @@ const _sfc_main$3 = {
82
56
  },
83
57
  created() {
84
58
  this.player.onended = () => {
85
- this.playing = false;
86
- };
87
- this.player.onerror = (err) => {
88
- this.err = err;
59
+ this.playing = !1;
60
+ }, this.player.onerror = (t) => {
61
+ this.err = t;
89
62
  };
90
63
  },
91
64
  methods: {
@@ -93,177 +66,210 @@ const _sfc_main$3 = {
93
66
  this.playing = !this.playing;
94
67
  }
95
68
  }
96
- };
97
- const _hoisted_1$3 = {
69
+ }, P = {
98
70
  key: 0,
99
71
  xmlns: "http://www.w3.org/2000/svg",
100
- class: "ddict-h-4 ddict-w-4 ddict-inline ddict-mr-1",
72
+ class: "h-4 w-4 inline mr-1",
101
73
  fill: "none",
102
74
  viewBox: "0 0 24 24",
103
75
  stroke: "currentColor",
104
76
  "stroke-width": "2"
105
- };
106
- const _hoisted_2$2 = /* @__PURE__ */ createElementVNode("path", {
77
+ }, T = /* @__PURE__ */ o("path", {
107
78
  "stroke-linecap": "round",
108
79
  "stroke-linejoin": "round",
109
80
  d: "M15.536 8.464a5 5 0 010 7.072m2.828-9.9a9 9 0 010 12.728M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z"
110
- }, null, -1);
111
- const _hoisted_3$2 = [
112
- _hoisted_2$2
113
- ];
114
- const _hoisted_4$1 = {
81
+ }, null, -1), F = [
82
+ T
83
+ ], G = {
115
84
  key: 1,
116
85
  xmlns: "http://www.w3.org/2000/svg",
117
- class: "ddict-h-4 ddict-w-4 ddict-inline ddict-mr-1",
86
+ class: "h-4 w-4 inline mr-1",
118
87
  fill: "none",
119
88
  viewBox: "0 0 24 24",
120
89
  stroke: "currentColor",
121
90
  "stroke-width": "2"
122
- };
123
- const _hoisted_5$1 = /* @__PURE__ */ createElementVNode("path", {
91
+ }, H = /* @__PURE__ */ o("path", {
124
92
  "stroke-linecap": "round",
125
93
  "stroke-linejoin": "round",
126
94
  d: "M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
127
- }, null, -1);
128
- const _hoisted_6$1 = /* @__PURE__ */ createElementVNode("path", {
95
+ }, null, -1), q = /* @__PURE__ */ o("path", {
129
96
  "stroke-linecap": "round",
130
97
  "stroke-linejoin": "round",
131
98
  d: "M9 10a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-4z"
132
- }, null, -1);
133
- const _hoisted_7$1 = [
134
- _hoisted_5$1,
135
- _hoisted_6$1
99
+ }, null, -1), J = [
100
+ H,
101
+ q
136
102
  ];
137
- function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
138
- return !$data.err ? (openBlock(), createElementBlock("span", {
103
+ function K(t, n, e, l, s, a) {
104
+ return s.err ? p("", !0) : (r(), i("span", {
139
105
  key: 0,
140
- onClick: _cache[0] || (_cache[0] = (...args) => $options.play && $options.play(...args))
106
+ onClick: n[0] || (n[0] = (...d) => a.play && a.play(...d))
141
107
  }, [
142
- !$data.playing ? (openBlock(), createElementBlock("svg", _hoisted_1$3, _hoisted_3$2)) : createCommentVNode("", true),
143
- $data.playing ? (openBlock(), createElementBlock("svg", _hoisted_4$1, _hoisted_7$1)) : createCommentVNode("", true)
144
- ])) : createCommentVNode("", true);
108
+ s.playing ? p("", !0) : (r(), i("svg", P, F)),
109
+ s.playing ? (r(), i("svg", G, J)) : p("", !0)
110
+ ]));
145
111
  }
146
- var Player = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2]]);
147
- const _sfc_main$2 = {
112
+ const Q = /* @__PURE__ */ c(O, [["render", K]]), R = {
148
113
  name: "Sentences",
149
114
  props: ["sentences"]
150
115
  };
151
- const _hoisted_1$2 = { class: "ddict-text-base ddict-leading-tight ddict-p-0 ddict-m-0" };
152
- function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
153
- return openBlock(true), createElementBlock(Fragment, null, renderList($props.sentences, (s) => {
154
- return openBlock(), createElementBlock("p", _hoisted_1$2, toDisplayString(s), 1);
155
- }), 256);
116
+ function U(t, n, e, l, s, a) {
117
+ return r(!0), i(w, null, $(e.sentences, (d, g) => (r(), i("p", {
118
+ key: g,
119
+ class: "text-base leading-tight p-0 m-0"
120
+ }, _(d), 1))), 128);
156
121
  }
157
- var Sentences = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1]]);
158
- const _sfc_main$1 = {
122
+ const W = /* @__PURE__ */ c(R, [["render", U]]), X = {
159
123
  name: "Dict",
160
124
  props: ["dicts"]
161
- };
162
- const _hoisted_1$1 = { class: "ddict-mt-1" };
163
- const _hoisted_2$1 = { class: "ddict-text-base ddict-italic ddict-text-slate-400 ddict-capitalize ddict-p-0 ddict-m-0" };
164
- const _hoisted_3$1 = { class: "ddict-text-sm ddict-p-0 ddict-m-0" };
165
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
166
- return openBlock(), createElementBlock("section", _hoisted_1$1, [
167
- (openBlock(true), createElementBlock(Fragment, null, renderList($props.dicts, (d) => {
168
- return openBlock(), createElementBlock("section", null, [
169
- createElementVNode("p", _hoisted_2$1, toDisplayString(d.pos), 1),
170
- createElementVNode("p", _hoisted_3$1, toDisplayString(d.terms), 1)
171
- ]);
172
- }), 256))
125
+ }, Y = { class: "text-base font-serif italic text-slate-400 capitalize p-0 m-0" }, Z = { class: "text-sm p-0 m-0" };
126
+ function tt(t, n, e, l, s, a) {
127
+ return r(), i("div", null, [
128
+ (r(!0), i(w, null, $(e.dicts, (d, g) => (r(), i("div", {
129
+ key: g,
130
+ class: "mt-2"
131
+ }, [
132
+ o("p", Y, _(d.pos), 1),
133
+ o("p", Z, _(d.terms), 1)
134
+ ]))), 128))
173
135
  ]);
174
136
  }
175
- var Dict = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render]]);
176
- var Bubble_vue_vue_type_style_index_0_scoped_true_lang = "";
177
- const _withScopeId = (n) => (pushScopeId("data-v-c7cd4228"), n = n(), popScopeId(), n);
178
- const _hoisted_1 = { class: "ddict-wrapper ddict-absolute ddict-shadow-2xl ddict-rounded-lg ddict-text-slate-900 ddict-bg-white ddict-text-sm" };
179
- const _hoisted_2 = { key: 1 };
180
- const _hoisted_3 = { class: "ddict-absolute ddict-top-0 ddict-right-0 ddict-p-2 ddict-w-auto ddict-bg-slate-50 ddict-rounded-bl-lg ddict-opacity-0 hover:ddict-opacity-100" };
181
- const _hoisted_4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("svg", {
137
+ const et = /* @__PURE__ */ c(X, [["render", tt]]), st = {
138
+ revise: nt
139
+ };
140
+ function nt(t) {
141
+ const n = t.sentences.filter((s) => s.trans).map((s) => s.trans), e = t.sentences.filter((s) => s.src_translit).map((s) => s.src_translit).join();
142
+ let l;
143
+ return t.dict && (l = t.dict.map((s) => ({
144
+ pos: s.pos,
145
+ terms: s.terms.join(", ")
146
+ }))), {
147
+ sentences: n,
148
+ translits: e,
149
+ dicts: l
150
+ };
151
+ }
152
+ const h = (t) => (v("data-v-55035939"), t = t(), k(), t), ot = {
153
+ key: 0,
154
+ class: "flex justify-center"
155
+ }, rt = {
156
+ key: 1,
157
+ class: "wrapper drop-shadow-2xl rounded text-slate-900 bg-white text-sm"
158
+ }, it = { class: "rounded" }, lt = { class: "absolute top-0 right-0 p-2 w-auto bg-slate-200 rounded-bs-lg rounded-te-lg opacity-0 hover:opacity-100" }, at = {
159
+ key: 0,
182
160
  xmlns: "http://www.w3.org/2000/svg",
183
- class: "ddict-h-4 ddict-w-4 ddict-inline ddict-mr-1",
161
+ fill: "none",
162
+ viewBox: "0 0 24 24",
163
+ "stroke-width": "1.5",
164
+ stroke: "currentColor",
165
+ class: "h-4 w-4 inline mr-1"
166
+ }, ct = /* @__PURE__ */ h(() => /* @__PURE__ */ o("path", {
167
+ "stroke-linecap": "round",
168
+ "stroke-linejoin": "round",
169
+ d: "M17.593 3.322c1.1.128 1.907 1.077 1.907 2.185V21L12 17.25 4.5 21V5.507c0-1.108.806-2.057 1.907-2.185a48.507 48.507 0 0111.186 0z"
170
+ }, null, -1)), dt = [
171
+ ct
172
+ ], pt = {
173
+ key: 1,
174
+ xmlns: "http://www.w3.org/2000/svg",
175
+ viewBox: "0 0 24 24",
176
+ fill: "currentColor",
177
+ class: "h-4 w-4 inline mr-1"
178
+ }, ut = /* @__PURE__ */ h(() => /* @__PURE__ */ o("path", {
179
+ "fill-rule": "evenodd",
180
+ d: "M6.32 2.577a49.255 49.255 0 0111.36 0c1.497.174 2.57 1.46 2.57 2.93V21a.75.75 0 01-1.085.67L12 18.089l-7.165 3.583A.75.75 0 013.75 21V5.507c0-1.47 1.073-2.756 2.57-2.93z",
181
+ "clip-rule": "evenodd"
182
+ }, null, -1)), _t = [
183
+ ut
184
+ ], ht = /* @__PURE__ */ h(() => /* @__PURE__ */ o("svg", {
185
+ xmlns: "http://www.w3.org/2000/svg",
186
+ class: "h-4 w-4 inline mr-1",
184
187
  fill: "none",
185
188
  viewBox: "0 0 24 24",
186
189
  stroke: "currentColor",
187
190
  "stroke-width": "2"
188
191
  }, [
189
- /* @__PURE__ */ createElementVNode("path", {
192
+ /* @__PURE__ */ o("path", {
190
193
  "stroke-linecap": "round",
191
194
  "stroke-linejoin": "round",
192
195
  d: "M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"
193
196
  }),
194
- /* @__PURE__ */ createElementVNode("path", {
197
+ /* @__PURE__ */ o("path", {
195
198
  "stroke-linecap": "round",
196
199
  "stroke-linejoin": "round",
197
200
  d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z"
198
201
  })
199
- ], -1));
200
- const _hoisted_5 = [
201
- _hoisted_4
202
- ];
203
- const _hoisted_6 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("svg", {
202
+ ], -1)), gt = [
203
+ ht
204
+ ], mt = /* @__PURE__ */ h(() => /* @__PURE__ */ o("svg", {
204
205
  xmlns: "http://www.w3.org/2000/svg",
205
- class: "ddict-h-4 ddict-w-4 ddict-inline",
206
+ class: "h-4 w-4 inline",
206
207
  fill: "none",
207
208
  viewBox: "0 0 24 24",
208
209
  stroke: "currentColor",
209
210
  "stroke-width": "2"
210
211
  }, [
211
- /* @__PURE__ */ createElementVNode("path", {
212
+ /* @__PURE__ */ o("path", {
212
213
  "stroke-linecap": "round",
213
214
  "stroke-linejoin": "round",
214
215
  d: "M6 18L18 6M6 6l12 12"
215
216
  })
216
- ], -1));
217
- const _hoisted_7 = [
218
- _hoisted_6
219
- ];
220
- const _hoisted_8 = { class: "ddict-body" };
221
- const __default__ = {
217
+ ], -1)), wt = [
218
+ mt
219
+ ], $t = { class: "body" }, vt = {
222
220
  name: "Bubble",
223
- props: ["google", "tts", "isLoading"],
224
- emits: ["settings", "close"],
221
+ props: ["google", "tts", "status", "isSaved"],
222
+ emits: ["logo", "save", "settings", "close"],
225
223
  data() {
226
224
  return {
227
225
  data: null
228
226
  };
229
227
  },
230
228
  created() {
231
- this.data = Google.revise(this.google);
229
+ this.data = st.revise(this.google);
232
230
  }
233
- };
234
- const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
235
- setup(__props) {
236
- return (_ctx, _cache) => {
237
- return openBlock(), createElementBlock("section", _hoisted_1, [
238
- __props.isLoading ? (openBlock(), createBlock(Loading, { key: 0 })) : (openBlock(), createElementBlock("section", _hoisted_2, [
239
- createElementVNode("section", _hoisted_3, [
240
- __props.tts ? (openBlock(), createBlock(Player, {
241
- key: 0,
242
- tts: __props.tts
243
- }, null, 8, ["tts"])) : createCommentVNode("", true),
244
- createElementVNode("span", {
245
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("settings"))
246
- }, _hoisted_5),
247
- createElementVNode("span", {
248
- onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("close"))
249
- }, _hoisted_7)
231
+ }, kt = /* @__PURE__ */ Object.assign(vt, {
232
+ setup(t) {
233
+ return (n, e) => t.status < 2 ? (r(), i("div", ot, [
234
+ t.status === 0 ? (r(), u(C, {
235
+ key: 0,
236
+ onClick: e[0] || (e[0] = (l) => n.$emit("logo"))
237
+ })) : (r(), u(V, { key: 1 }))
238
+ ])) : (r(), i("div", rt, [
239
+ o("div", it, [
240
+ o("div", lt, [
241
+ t.tts ? (r(), u(Q, {
242
+ key: 0,
243
+ tts: t.tts
244
+ }, null, 8, ["tts"])) : p("", !0),
245
+ o("span", {
246
+ onClick: e[1] || (e[1] = (l) => n.$emit("save"))
247
+ }, [
248
+ t.isSaved ? (r(), i("svg", pt, _t)) : (r(), i("svg", at, dt))
250
249
  ]),
251
- createElementVNode("section", _hoisted_8, [
252
- _ctx.data.translits ? (openBlock(), createBlock(Translit, {
253
- key: 0,
254
- translits: _ctx.data.translits
255
- }, null, 8, ["translits"])) : createCommentVNode("", true),
256
- createVNode(Sentences, {
257
- sentences: _ctx.data.sentences
258
- }, null, 8, ["sentences"]),
259
- createVNode(Dict, {
260
- dicts: _ctx.data.dicts
261
- }, null, 8, ["dicts"])
262
- ])
263
- ]))
264
- ]);
265
- };
250
+ o("span", {
251
+ onClick: e[2] || (e[2] = (l) => n.$emit("settings"))
252
+ }, gt),
253
+ o("span", {
254
+ onClick: e[3] || (e[3] = (l) => n.$emit("close"))
255
+ }, wt)
256
+ ]),
257
+ o("div", $t, [
258
+ n.data.translits ? (r(), u(E, {
259
+ key: 0,
260
+ translits: n.data.translits
261
+ }, null, 8, ["translits"])) : p("", !0),
262
+ m(W, {
263
+ sentences: n.data.sentences
264
+ }, null, 8, ["sentences"]),
265
+ m(et, {
266
+ dicts: n.data.dicts
267
+ }, null, 8, ["dicts"])
268
+ ])
269
+ ])
270
+ ]));
266
271
  }
267
- });
268
- var Bubble = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c7cd4228"]]);
269
- export { Bubble as default };
272
+ }), yt = /* @__PURE__ */ c(kt, [["__scopeId", "data-v-55035939"]]);
273
+ export {
274
+ yt as default
275
+ };
@@ -1 +1 @@
1
- (function(d,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(d=typeof globalThis!="undefined"?globalThis:d||self,t(d.Bubble={},d.Vue))})(this,function(d,t){"use strict";var p={revise:_};function _(e){const s=e.sentences.filter(n=>n.trans).map(n=>n.trans),o=e.sentences.filter(n=>n.src_translit).map(n=>n.src_translit).join();let c;return e.dict&&(c=e.dict.map(n=>({pos:n.pos,terms:n.terms.join(", ")}))),{sentences:s,translits:o,dicts:c}}var Q="",i=(e,s)=>{const o=e.__vccOpts||e;for(const[c,n]of s)o[c]=n;return o};const m={name:"Loading",data(){return{index:0,texts:[".","..","..."],text:"."}},mounted(){setInterval(()=>{this.index=(this.index+1)%this.texts.length,this.text=this.texts[this.index]},500)}},h={class:"ddict-p-2 ddict-shadow-8xl ddict-rounded-lg ddict-text-white ddict-bg-blue-600 ddict-text-bold"};function k(e,s,o,c,n,r){return t.openBlock(),t.createElementBlock("section",h," D"+t.toDisplayString(this.text),1)}var g=i(m,[["render",k]]);const f={name:"Translit",props:["translits"]},$={class:"ddict-text-sm ddict-truncate ddict-p-0 ddict-m-0 ddict-w-2/3"},u={class:"ddict-text-slate-500"};function y(e,s,o,c,n,r){return t.openBlock(),t.createElementBlock("p",$,[t.createElementVNode("span",u,"/"+t.toDisplayString(o.translits)+"/",1)])}var w=i(f,[["render",y]]);const B={name:"Player",props:["tts"],data(){return{playing:!1,player:new Audio(this.tts),err:null}},watch:{playing(e){if(!e){this.player.pause();return}this.player.play()}},created(){this.player.onended=()=>{this.playing=!1},this.player.onerror=e=>{this.err=e}},methods:{play(){this.playing=!this.playing}}},x={key:0,xmlns:"http://www.w3.org/2000/svg",class:"ddict-h-4 ddict-w-4 ddict-inline ddict-mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},E=[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.536 8.464a5 5 0 010 7.072m2.828-9.9a9 9 0 010 12.728M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z"},null,-1)],V={key:1,xmlns:"http://www.w3.org/2000/svg",class:"ddict-h-4 ddict-w-4 ddict-inline ddict-mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},b=[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1),t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 10a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-4z"},null,-1)];function N(e,s,o,c,n,r){return n.err?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",{key:0,onClick:s[0]||(s[0]=(...l)=>r.play&&r.play(...l))},[n.playing?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("svg",x,E)),n.playing?(t.openBlock(),t.createElementBlock("svg",V,b)):t.createCommentVNode("",!0)]))}var C=i(B,[["render",N]]);const S={name:"Sentences",props:["sentences"]},j={class:"ddict-text-base ddict-leading-tight ddict-p-0 ddict-m-0"};function M(e,s,o,c,n,r){return t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.sentences,l=>(t.openBlock(),t.createElementBlock("p",j,t.toDisplayString(l),1))),256)}var D=i(S,[["render",M]]);const L={name:"Dict",props:["dicts"]},z={class:"ddict-mt-1"},I={class:"ddict-text-base ddict-italic ddict-text-slate-400 ddict-capitalize ddict-p-0 ddict-m-0"},T={class:"ddict-text-sm ddict-p-0 ddict-m-0"};function O(e,s,o,c,n,r){return t.openBlock(),t.createElementBlock("section",z,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.dicts,l=>(t.openBlock(),t.createElementBlock("section",null,[t.createElementVNode("p",I,t.toDisplayString(l.pos),1),t.createElementVNode("p",T,t.toDisplayString(l.terms),1)]))),256))])}var P=i(L,[["render",O]]),X="";const a=e=>(t.pushScopeId("data-v-c7cd4228"),e=e(),t.popScopeId(),e),F={class:"ddict-wrapper ddict-absolute ddict-shadow-2xl ddict-rounded-lg ddict-text-slate-900 ddict-bg-white ddict-text-sm"},q={key:1},A={class:"ddict-absolute ddict-top-0 ddict-right-0 ddict-p-2 ddict-w-auto ddict-bg-slate-50 ddict-rounded-bl-lg ddict-opacity-0 hover:ddict-opacity-100"},G=[a(()=>t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"ddict-h-4 ddict-w-4 ddict-inline ddict-mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})],-1))],H=[a(()=>t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"ddict-h-4 ddict-w-4 ddict-inline",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1))],J={class:"ddict-body"};var K=i(Object.assign({name:"Bubble",props:["google","tts","isLoading"],emits:["settings","close"],data(){return{data:null}},created(){this.data=p.revise(this.google)}},{setup(e){return(s,o)=>(t.openBlock(),t.createElementBlock("section",F,[e.isLoading?(t.openBlock(),t.createBlock(g,{key:0})):(t.openBlock(),t.createElementBlock("section",q,[t.createElementVNode("section",A,[e.tts?(t.openBlock(),t.createBlock(C,{key:0,tts:e.tts},null,8,["tts"])):t.createCommentVNode("",!0),t.createElementVNode("span",{onClick:o[0]||(o[0]=c=>s.$emit("settings"))},G),t.createElementVNode("span",{onClick:o[1]||(o[1]=c=>s.$emit("close"))},H)]),t.createElementVNode("section",J,[s.data.translits?(t.openBlock(),t.createBlock(w,{key:0,translits:s.data.translits},null,8,["translits"])):t.createCommentVNode("",!0),t.createVNode(D,{sentences:s.data.sentences},null,8,["sentences"]),t.createVNode(P,{dicts:s.data.dicts},null,8,["dicts"])])]))]))}}),[["__scopeId","data-v-c7cd4228"]]);d.default=K,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(c,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(c=typeof globalThis<"u"?globalThis:c||self,e(c.Bubble={},c.Vue))})(this,function(c,e){"use strict";const _="/ddict-logo.png",l=(t,s)=>{const o=t.__vccOpts||t;for(const[r,n]of s)o[r]=n;return o},m={name:"Logo"},h={src:_,alt:"DDict Logo",class:"w-6 h-6 cursor-pointer"};function k(t,s,o,r,n,i){return e.openBlock(),e.createElementBlock("img",h)}const g=l(m,[["render",k]]),f="/ddict-loading.gif",$={name:"Loading"},w={class:"rounded bg-white p-1"},B=[e.createElementVNode("img",{src:f,alt:"Loading",class:"w-12"},null,-1)];function y(t,s,o,r,n,i){return e.openBlock(),e.createElementBlock("div",w,B)}const u=l($,[["render",y]]),E={name:"Translit",props:["translits"]},V={class:"text-sm font-mono truncate p-0 m-0 w-2/3"},N={class:"text-slate-500"};function x(t,s,o,r,n,i){return e.openBlock(),e.createElementBlock("p",V,[e.createElementVNode("span",N,"/"+e.toDisplayString(o.translits)+"/",1)])}const b=l(E,[["render",x]]),C={name:"Player",props:["tts"],data(){return{playing:!1,player:new Audio(this.tts),err:null}},watch:{playing(t){if(!t){this.player.pause();return}this.player.play()}},created(){this.player.onended=()=>{this.playing=!1},this.player.onerror=t=>{this.err=t}},methods:{play(){this.playing=!this.playing}}},j={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4 inline mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},S=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.536 8.464a5 5 0 010 7.072m2.828-9.9a9 9 0 010 12.728M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z"},null,-1)],L={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4 inline mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},M=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1),e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 10a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-4z"},null,-1)];function z(t,s,o,r,n,i){return n.err?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",{key:0,onClick:s[0]||(s[0]=(...a)=>i.play&&i.play(...a))},[n.playing?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("svg",j,S)),n.playing?(e.openBlock(),e.createElementBlock("svg",L,M)):e.createCommentVNode("",!0)]))}const D=l(C,[["render",z]]),T={name:"Sentences",props:["sentences"]};function I(t,s,o,r,n,i){return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.sentences,(a,p)=>(e.openBlock(),e.createElementBlock("p",{key:p,class:"text-base leading-tight p-0 m-0"},e.toDisplayString(a),1))),128)}const O=l(T,[["render",I]]),P={name:"Dict",props:["dicts"]},A={class:"text-base font-serif italic text-slate-400 capitalize p-0 m-0"},F={class:"text-sm p-0 m-0"};function q(t,s,o,r,n,i){return e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.dicts,(a,p)=>(e.openBlock(),e.createElementBlock("div",{key:p,class:"mt-2"},[e.createElementVNode("p",A,e.toDisplayString(a.pos),1),e.createElementVNode("p",F,e.toDisplayString(a.terms),1)]))),128))])}const G=l(P,[["render",q]]),H={revise:J};function J(t){const s=t.sentences.filter(n=>n.trans).map(n=>n.trans),o=t.sentences.filter(n=>n.src_translit).map(n=>n.src_translit).join();let r;return t.dict&&(r=t.dict.map(n=>({pos:n.pos,terms:n.terms.join(", ")}))),{sentences:s,translits:o,dicts:r}}const d=t=>(e.pushScopeId("data-v-55035939"),t=t(),e.popScopeId(),t),K={key:0,class:"flex justify-center"},Q={key:1,class:"wrapper drop-shadow-2xl rounded text-slate-900 bg-white text-sm"},R={class:"rounded"},U={class:"absolute top-0 right-0 p-2 w-auto bg-slate-200 rounded-bs-lg rounded-te-lg opacity-0 hover:opacity-100"},W={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"h-4 w-4 inline mr-1"},X=[d(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M17.593 3.322c1.1.128 1.907 1.077 1.907 2.185V21L12 17.25 4.5 21V5.507c0-1.108.806-2.057 1.907-2.185a48.507 48.507 0 0111.186 0z"},null,-1))],Y={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",class:"h-4 w-4 inline mr-1"},Z=[d(()=>e.createElementVNode("path",{"fill-rule":"evenodd",d:"M6.32 2.577a49.255 49.255 0 0111.36 0c1.497.174 2.57 1.46 2.57 2.93V21a.75.75 0 01-1.085.67L12 18.089l-7.165 3.583A.75.75 0 013.75 21V5.507c0-1.47 1.073-2.756 2.57-2.93z","clip-rule":"evenodd"},null,-1))],v=[d(()=>e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4 inline mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})],-1))],ee=[d(()=>e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4 inline",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1))],te={class:"body"},oe=l(Object.assign({name:"Bubble",props:["google","tts","status","isSaved"],emits:["logo","save","settings","close"],data(){return{data:null}},created(){this.data=H.revise(this.google)}},{setup(t){return(s,o)=>t.status<2?(e.openBlock(),e.createElementBlock("div",K,[t.status===0?(e.openBlock(),e.createBlock(g,{key:0,onClick:o[0]||(o[0]=r=>s.$emit("logo"))})):(e.openBlock(),e.createBlock(u,{key:1}))])):(e.openBlock(),e.createElementBlock("div",Q,[e.createElementVNode("div",R,[e.createElementVNode("div",U,[t.tts?(e.openBlock(),e.createBlock(D,{key:0,tts:t.tts},null,8,["tts"])):e.createCommentVNode("",!0),e.createElementVNode("span",{onClick:o[1]||(o[1]=r=>s.$emit("save"))},[t.isSaved?(e.openBlock(),e.createElementBlock("svg",Y,Z)):(e.openBlock(),e.createElementBlock("svg",W,X))]),e.createElementVNode("span",{onClick:o[2]||(o[2]=r=>s.$emit("settings"))},v),e.createElementVNode("span",{onClick:o[3]||(o[3]=r=>s.$emit("close"))},ee)]),e.createElementVNode("div",te,[s.data.translits?(e.openBlock(),e.createBlock(b,{key:0,translits:s.data.translits},null,8,["translits"])):e.createCommentVNode("",!0),e.createVNode(O,{sentences:s.data.sentences},null,8,["sentences"]),e.createVNode(G,{dicts:s.data.dicts},null,8,["dicts"])])])]))}}),[["__scopeId","data-v-55035939"]]);c.default=oe,Object.defineProperties(c,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
Binary file
Binary file
package/package.json CHANGED
@@ -1,24 +1,49 @@
1
1
  {
2
- "name": "@ddict/bubble",
3
- "version": "0.0.6",
4
- "files": [
5
- "dist"
6
- ],
7
- "main": "./dist/bubble.umd.js",
8
- "module": "./dist/bubble.es.js",
9
- "scripts": {
10
- "dev": "vite",
11
- "build": "vite build",
12
- "preview": "vite preview"
13
- },
14
- "dependencies": {
15
- "vue": "^3.2.25"
16
- },
17
- "devDependencies": {
18
- "@vitejs/plugin-vue": "^2.2.0",
19
- "autoprefixer": "^10.4.4",
20
- "postcss": "^8.4.12",
21
- "tailwindcss": "^3.0.23",
22
- "vite": "^2.8.0"
23
- }
2
+ "name": "@ddict/bubble",
3
+ "version": "0.0.8",
4
+ "type": "module",
5
+ "files": [
6
+ "dist"
7
+ ],
8
+ "main": "./dist/bubble.umd.js",
9
+ "module": "./dist/bubble.es.js",
10
+ "scripts": {
11
+ "dev": "vite",
12
+ "build": "vite build",
13
+ "test:e2e": "start-server-and-test dev http://localhost:5173 cypress:run",
14
+ "cypress:run": "cypress run",
15
+ "preview": "vite preview",
16
+ "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore",
17
+ "format": "prettier --write src/",
18
+ "format-check": "prettier --check src/"
19
+ },
20
+ "dependencies": {
21
+ "@floating-ui/vue": "^1.1.1",
22
+ "daisyui": "^4.12.10",
23
+ "vue": "^3.4.31"
24
+ },
25
+ "devDependencies": {
26
+ "@cypress/vite-dev-server": "^5.1.1",
27
+ "@cypress/vue": "^6.0.1",
28
+ "@rushstack/eslint-patch": "^1.10.3",
29
+ "@vitejs/plugin-vue": "^5.0.5",
30
+ "@vue/eslint-config-prettier": "^9.0.0",
31
+ "autoprefixer": "^10.4.19",
32
+ "cypress": "^13.13.1",
33
+ "cypress-vite": "^1.5.0",
34
+ "eslint": "^8.57.0",
35
+ "eslint-plugin-cypress": "^3.3.0",
36
+ "eslint-plugin-vue": "^9.23.0",
37
+ "eslint-plugin-vuetify": "^2.4.0",
38
+ "postcss": "^8.4.39",
39
+ "prettier": "^3.3.3",
40
+ "start-server-and-test": "^2.0.4",
41
+ "tailwindcss": "^3.4.4",
42
+ "vite": "^5.3.3"
43
+ },
44
+ "optionalDependencies": {
45
+ "@rollup/rollup-darwin-arm64": "^4.18.1",
46
+ "@rollup/rollup-linux-x64-gnu": "^4.18.1",
47
+ "@rollup/rollup-linux-x64-musl": "^4.18.1"
48
+ }
24
49
  }