Socket
Socket
Sign inDemoInstall

@ddict/bubble

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ddict/bubble - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

4

dist/bubble.es.js

@@ -156,3 +156,3 @@ import { openBlock, createElementBlock, createElementVNode, toDisplayString, createCommentVNode, Fragment, renderList, createBlock, createVNode, pushScopeId, popScopeId } from "vue";

var Bubble_vue_vue_type_style_index_0_scoped_true_lang = "";
const _withScopeId = (n) => (pushScopeId("data-v-163020e2"), n = n(), popScopeId(), n);
const _withScopeId = (n) => (pushScopeId("data-v-594b3494"), n = n(), popScopeId(), n);
const _hoisted_1 = { class: "ddict-wrapper ddict-absolute ddict-shadow-2xl ddict-rounded-lg ddict-text-slate-900 ddict-bg-white" };

@@ -244,3 +244,3 @@ const _hoisted_2 = { class: "ddict-absolute ddict-top-0 ddict-right-0 ddict-p-2" };

});
var Bubble = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-163020e2"]]);
var Bubble = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-594b3494"]]);
export { Bubble as default };

@@ -1,1 +0,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}}},w={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"},$=[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-163020e2"),e=e(),t.popScopeId(),e),I={class:"ddict-wrapper 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:"ddict-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-163020e2"]]);d.default=q,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
(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}}},w={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"},$=[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-594b3494"),e=e(),t.popScopeId(),e),I={class:"ddict-wrapper 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:"ddict-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-594b3494"]]);d.default=q,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
{
"name": "@ddict/bubble",
"version": "0.0.3",
"version": "0.0.4",
"files": [

@@ -5,0 +5,0 @@ "dist"

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc