@ddict/bubble 0.0.1 → 0.0.2

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/bubble.css CHANGED
@@ -1 +1 @@
1
- .body[data-v-2b1f4ed3]{padding:.7rem!important}
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-4{width:1rem!important}.ddict-w-5\/6{width:83.333333%!important}.ddict-truncate{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.ddict-rounded-lg{border-radius:.5rem!important}.ddict-bg-white{--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important}.ddict-p-2{padding:.5rem!important}.ddict-p-0{padding:0!important}.ddict-text-base{font-size:1rem!important;line-height:1.5rem!important}.ddict-text-sm{font-size:.875rem!important;line-height:1.25rem!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-slate-500{--tw-text-opacity: 1 !important;color:rgb(100 116 139 / var(--tw-text-opacity))!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}.body[data-v-25583db8]{padding:.7rem!important}
package/dist/bubble.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { openBlock, createElementBlock, renderSlot, toDisplayString, createCommentVNode, createElementVNode, Fragment, renderList, createVNode, withCtx, createBlock, pushScopeId, popScopeId } from "vue";
1
+ import { openBlock, createElementBlock, createElementVNode, toDisplayString, createCommentVNode, Fragment, renderList, createBlock, createVNode, pushScopeId, popScopeId } from "vue";
2
2
  var Google = {
3
3
  revise
4
4
  };
@@ -20,6 +20,7 @@ function revise(data) {
20
20
  dicts
21
21
  };
22
22
  }
23
+ var index = "";
23
24
  var _export_sfc = (sfc, props) => {
24
25
  const target = sfc.__vccOpts || sfc;
25
26
  for (const [key, val] of props) {
@@ -31,12 +32,11 @@ const _sfc_main$4 = {
31
32
  name: "Translit",
32
33
  props: ["translits"]
33
34
  };
34
- const _hoisted_1$4 = { class: "text-xs truncate w-5/6" };
35
- const _hoisted_2$2 = { key: 0 };
35
+ const _hoisted_1$4 = { class: "ddict-text-sm ddict-truncate ddict-p-0 ddict-m-0 ddict-w-5/6" };
36
+ const _hoisted_2$3 = { class: "ddict-text-slate-500" };
36
37
  function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
37
38
  return openBlock(), createElementBlock("p", _hoisted_1$4, [
38
- renderSlot(_ctx.$slots, "default"),
39
- $props.translits ? (openBlock(), createElementBlock("span", _hoisted_2$2, " /" + toDisplayString($props.translits) + "/ ", 1)) : createCommentVNode("", true)
39
+ createElementVNode("span", _hoisted_2$3, toDisplayString($props.translits ? `/${$props.translits}/` : "\u200B"), 1)
40
40
  ]);
41
41
  }
42
42
  var Translit = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3]]);
@@ -76,24 +76,24 @@ const _sfc_main$3 = {
76
76
  const _hoisted_1$3 = {
77
77
  key: 0,
78
78
  xmlns: "http://www.w3.org/2000/svg",
79
- class: "h-4 w-4 inline",
79
+ class: "ddict-h-4 ddict-w-4 ddict-inline ddict-mr-1",
80
80
  fill: "none",
81
81
  viewBox: "0 0 24 24",
82
82
  stroke: "currentColor",
83
83
  "stroke-width": "2"
84
84
  };
85
- const _hoisted_2$1 = /* @__PURE__ */ createElementVNode("path", {
85
+ const _hoisted_2$2 = /* @__PURE__ */ createElementVNode("path", {
86
86
  "stroke-linecap": "round",
87
87
  "stroke-linejoin": "round",
88
88
  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"
89
89
  }, null, -1);
90
- const _hoisted_3$1 = [
91
- _hoisted_2$1
90
+ const _hoisted_3$2 = [
91
+ _hoisted_2$2
92
92
  ];
93
93
  const _hoisted_4$1 = {
94
94
  key: 1,
95
95
  xmlns: "http://www.w3.org/2000/svg",
96
- class: "h-4 w-4 inline",
96
+ class: "ddict-h-4 ddict-w-4 ddict-inline ddict-mr-1",
97
97
  fill: "none",
98
98
  viewBox: "0 0 24 24",
99
99
  stroke: "currentColor",
@@ -118,7 +118,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
118
118
  key: 0,
119
119
  onClick: _cache[0] || (_cache[0] = (...args) => $options.play && $options.play(...args))
120
120
  }, [
121
- !$data.playing ? (openBlock(), createElementBlock("svg", _hoisted_1$3, _hoisted_3$1)) : createCommentVNode("", true),
121
+ !$data.playing ? (openBlock(), createElementBlock("svg", _hoisted_1$3, _hoisted_3$2)) : createCommentVNode("", true),
122
122
  $data.playing ? (openBlock(), createElementBlock("svg", _hoisted_4$1, _hoisted_7$1)) : createCommentVNode("", true)
123
123
  ])) : createCommentVNode("", true);
124
124
  }
@@ -127,7 +127,7 @@ const _sfc_main$2 = {
127
127
  name: "Sentences",
128
128
  props: ["sentences"]
129
129
  };
130
- const _hoisted_1$2 = { class: "text-base leading-tight" };
130
+ const _hoisted_1$2 = { class: "ddict-text-base ddict-leading-tight ddict-p-0 ddict-m-0" };
131
131
  function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
132
132
  return openBlock(true), createElementBlock(Fragment, null, renderList($props.sentences, (s) => {
133
133
  return openBlock(), createElementBlock("p", _hoisted_1$2, toDisplayString(s), 1);
@@ -138,23 +138,27 @@ const _sfc_main$1 = {
138
138
  name: "Dict",
139
139
  props: ["dicts"]
140
140
  };
141
- const _hoisted_1$1 = { class: "text-info font-bold italic capitalize" };
141
+ const _hoisted_1$1 = { class: "ddict-mt-1" };
142
+ const _hoisted_2$1 = { class: "ddict-text-base ddict-italic ddict-text-slate-400 ddict-capitalize ddict-p-0 ddict-m-0" };
143
+ const _hoisted_3$1 = { class: "ddict-text-sm ddict-p-0 ddict-m-0" };
142
144
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
143
- return openBlock(true), createElementBlock(Fragment, null, renderList($props.dicts, (d) => {
144
- return openBlock(), createElementBlock("div", null, [
145
- createElementVNode("h3", _hoisted_1$1, toDisplayString(d.pos), 1),
146
- createElementVNode("p", null, toDisplayString(d.terms), 1)
147
- ]);
148
- }), 256);
145
+ return openBlock(), createElementBlock("div", _hoisted_1$1, [
146
+ (openBlock(true), createElementBlock(Fragment, null, renderList($props.dicts, (d) => {
147
+ return openBlock(), createElementBlock("div", null, [
148
+ createElementVNode("p", _hoisted_2$1, toDisplayString(d.pos), 1),
149
+ createElementVNode("p", _hoisted_3$1, toDisplayString(d.terms), 1)
150
+ ]);
151
+ }), 256))
152
+ ]);
149
153
  }
150
154
  var Dict = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render]]);
151
155
  var Bubble_vue_vue_type_style_index_0_scoped_true_lang = "";
152
- const _withScopeId = (n) => (pushScopeId("data-v-2b1f4ed3"), n = n(), popScopeId(), n);
153
- const _hoisted_1 = { class: "absolute card bg-base-100 shadow-xl compact" };
154
- const _hoisted_2 = { class: "absolute top-0 right-0 p-1.5" };
156
+ const _withScopeId = (n) => (pushScopeId("data-v-25583db8"), n = n(), popScopeId(), n);
157
+ const _hoisted_1 = { class: "ddict-absolute ddict-shadow-2xl ddict-rounded-lg ddict-text-slate-900 ddict-bg-white" };
158
+ const _hoisted_2 = { class: "ddict-absolute ddict-top-0 ddict-right-0 ddict-p-2" };
155
159
  const _hoisted_3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("svg", {
156
160
  xmlns: "http://www.w3.org/2000/svg",
157
- class: "h-4 w-4 inline",
161
+ class: "ddict-h-4 ddict-w-4 ddict-inline ddict-mr-1",
158
162
  fill: "none",
159
163
  viewBox: "0 0 24 24",
160
164
  stroke: "currentColor",
@@ -176,7 +180,7 @@ const _hoisted_4 = [
176
180
  ];
177
181
  const _hoisted_5 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("svg", {
178
182
  xmlns: "http://www.w3.org/2000/svg",
179
- class: "h-4 w-4 inline",
183
+ class: "ddict-h-4 ddict-w-4 ddict-inline",
180
184
  fill: "none",
181
185
  viewBox: "0 0 24 24",
182
186
  stroke: "currentColor",
@@ -191,7 +195,7 @@ const _hoisted_5 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElem
191
195
  const _hoisted_6 = [
192
196
  _hoisted_5
193
197
  ];
194
- const _hoisted_7 = { class: "card-body body" };
198
+ const _hoisted_7 = { class: "body" };
195
199
  const __default__ = {
196
200
  name: "Bubble",
197
201
  props: ["google", "tts"],
@@ -210,25 +214,21 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
210
214
  return (_ctx, _cache) => {
211
215
  return openBlock(), createElementBlock("div", _hoisted_1, [
212
216
  createElementVNode("div", _hoisted_2, [
213
- createElementVNode("button", {
217
+ __props.tts ? (openBlock(), createBlock(Player, {
218
+ key: 0,
219
+ tts: __props.tts
220
+ }, null, 8, ["tts"])) : createCommentVNode("", true),
221
+ createElementVNode("span", {
214
222
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("settings"))
215
223
  }, _hoisted_4),
216
- createElementVNode("button", {
224
+ createElementVNode("span", {
217
225
  onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("close"))
218
226
  }, _hoisted_6)
219
227
  ]),
220
228
  createElementVNode("div", _hoisted_7, [
221
229
  createVNode(Translit, {
222
230
  translits: _ctx.data.translits
223
- }, {
224
- default: withCtx(() => [
225
- __props.tts ? (openBlock(), createBlock(Player, {
226
- key: 0,
227
- tts: __props.tts
228
- }, null, 8, ["tts"])) : createCommentVNode("", true)
229
- ]),
230
- _: 1
231
- }, 8, ["translits"]),
231
+ }, null, 8, ["translits"]),
232
232
  createVNode(Sentences, {
233
233
  sentences: _ctx.data.sentences
234
234
  }, null, 8, ["sentences"]),
@@ -240,5 +240,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
240
240
  };
241
241
  }
242
242
  });
243
- var Bubble = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2b1f4ed3"]]);
243
+ var Bubble = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-25583db8"]]);
244
244
  export { Bubble as default };
@@ -1 +1 @@
1
- (function(l,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(l=typeof globalThis!="undefined"?globalThis:l||self,e(l.Bubble={},l.Vue))})(this,function(l,e){"use strict";var p={revise:_};function _(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}}var c=(t,s)=>{const o=t.__vccOpts||t;for(const[r,n]of s)o[r]=n;return o};const h={name:"Translit",props:["translits"]},m={class:"text-xs truncate w-5/6"},k={key:0};function f(t,s,o,r,n,i){return e.openBlock(),e.createElementBlock("p",m,[e.renderSlot(t.$slots,"default"),o.translits?(e.openBlock(),e.createElementBlock("span",k," /"+e.toDisplayString(o.translits)+"/ ",1)):e.createCommentVNode("",!0)])}var g=c(h,[["render",f]]);const u={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}}},y={key:0,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"},w=[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)],$={key:1,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"},B=[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 E(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",y,w)),n.playing?(e.openBlock(),e.createElementBlock("svg",$,B)):e.createCommentVNode("",!0)]))}var b=c(u,[["render",E]]);const V={name:"Sentences",props:["sentences"]},N={class:"text-base leading-tight"};function x(t,s,o,r,n,i){return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.sentences,a=>(e.openBlock(),e.createElementBlock("p",N,e.toDisplayString(a),1))),256)}var C=c(V,[["render",x]]);const S={name:"Dict",props:["dicts"]},j={class:"text-info font-bold italic capitalize"};function M(t,s,o,r,n,i){return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.dicts,a=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("h3",j,e.toDisplayString(a.pos),1),e.createElementVNode("p",null,e.toDisplayString(a.terms),1)]))),256)}var z=c(S,[["render",M]]),G="";const d=t=>(e.pushScopeId("data-v-2b1f4ed3"),t=t(),e.popScopeId(),t),D={class:"absolute card bg-base-100 shadow-xl compact"},T={class:"absolute top-0 right-0 p-1.5"},I=[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:"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))],L=[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))],O={class:"card-body body"};var P=c(Object.assign({name:"Bubble",props:["google","tts"],emits:["settings","close"],data(){return{data:null}},created(){this.data=p.revise(this.google)}},{setup(t){return(s,o)=>(e.openBlock(),e.createElementBlock("div",D,[e.createElementVNode("div",T,[e.createElementVNode("button",{onClick:o[0]||(o[0]=r=>s.$emit("settings"))},I),e.createElementVNode("button",{onClick:o[1]||(o[1]=r=>s.$emit("close"))},L)]),e.createElementVNode("div",O,[e.createVNode(g,{translits:s.data.translits},{default:e.withCtx(()=>[t.tts?(e.openBlock(),e.createBlock(b,{key:0,tts:t.tts},null,8,["tts"])):e.createCommentVNode("",!0)]),_:1},8,["translits"]),e.createVNode(C,{sentences:s.data.sentences},null,8,["sentences"]),e.createVNode(z,{dicts:s.data.dicts},null,8,["dicts"])])]))}}),[["__scopeId","data-v-2b1f4ed3"]]);l.default=P,Object.defineProperties(l,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
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 o=e.sentences.filter(n=>n.trans).map(n=>n.trans),s=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:o,translits:s,dicts:c}}var A="",r=(e,o)=>{const s=e.__vccOpts||e;for(const[c,n]of o)s[c]=n;return s};const m={name:"Translit",props:["translits"]},h={class:"ddict-text-sm ddict-truncate ddict-p-0 ddict-m-0 ddict-w-5/6"},k={class:"ddict-text-slate-500"};function f(e,o,s,c,n,l){return t.openBlock(),t.createElementBlock("p",h,[t.createElementVNode("span",k,t.toDisplayString(s.translits?`/${s.translits}/`:"\u200B"),1)])}var g=r(m,[["render",f]]);const u={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}}},$={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"},w=[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)],y={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 E(e,o,s,c,n,l){return n.err?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",{key:0,onClick:o[0]||(o[0]=(...i)=>l.play&&l.play(...i))},[n.playing?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("svg",$,w)),n.playing?(t.openBlock(),t.createElementBlock("svg",y,B)):t.createCommentVNode("",!0)]))}var V=r(u,[["render",E]]);const N={name:"Sentences",props:["sentences"]},x={class:"ddict-text-base ddict-leading-tight ddict-p-0 ddict-m-0"};function b(e,o,s,c,n,l){return t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.sentences,i=>(t.openBlock(),t.createElementBlock("p",x,t.toDisplayString(i),1))),256)}var C=r(N,[["render",b]]);const j={name:"Dict",props:["dicts"]},S={class:"ddict-mt-1"},M={class:"ddict-text-base ddict-italic ddict-text-slate-400 ddict-capitalize ddict-p-0 ddict-m-0"},z={class:"ddict-text-sm ddict-p-0 ddict-m-0"};function D(e,o,s,c,n,l){return t.openBlock(),t.createElementBlock("div",S,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.dicts,i=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("p",M,t.toDisplayString(i.pos),1),t.createElementVNode("p",z,t.toDisplayString(i.terms),1)]))),256))])}var T=r(j,[["render",D]]),K="";const a=e=>(t.pushScopeId("data-v-25583db8"),e=e(),t.popScopeId(),e),I={class:"ddict-absolute ddict-shadow-2xl ddict-rounded-lg ddict-text-slate-900 ddict-bg-white"},L={class:"ddict-absolute ddict-top-0 ddict-right-0 ddict-p-2"},O=[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))],P=[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))],F={class:"body"};var q=r(Object.assign({name:"Bubble",props:["google","tts"],emits:["settings","close"],data(){return{data:null}},created(){this.data=p.revise(this.google)}},{setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",I,[t.createElementVNode("div",L,[e.tts?(t.openBlock(),t.createBlock(V,{key:0,tts:e.tts},null,8,["tts"])):t.createCommentVNode("",!0),t.createElementVNode("span",{onClick:s[0]||(s[0]=c=>o.$emit("settings"))},O),t.createElementVNode("span",{onClick:s[1]||(s[1]=c=>o.$emit("close"))},P)]),t.createElementVNode("div",F,[t.createVNode(g,{translits:o.data.translits},null,8,["translits"]),t.createVNode(C,{sentences:o.data.sentences},null,8,["sentences"]),t.createVNode(T,{dicts:o.data.dicts},null,8,["dicts"])])]))}}),[["__scopeId","data-v-25583db8"]]);d.default=q,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,7 +1,9 @@
1
1
  {
2
2
  "name": "@ddict/bubble",
3
- "version": "0.0.1",
4
- "files": ["dist"],
3
+ "version": "0.0.2",
4
+ "files": [
5
+ "dist"
6
+ ],
5
7
  "main": "./dist/bubble.umd.js",
6
8
  "module": "./dist/bubble.es.js",
7
9
  "scripts": {
@@ -10,7 +12,6 @@
10
12
  "preview": "vite preview"
11
13
  },
12
14
  "dependencies": {
13
- "daisyui": "^2.8.0",
14
15
  "vue": "^3.2.25"
15
16
  },
16
17
  "devDependencies": {