@yoopta/link 4.0.0-rc.4 → 4.0.0-rc.6

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.
@@ -0,0 +1 @@
1
+ import{useYooptaReadOnly as e,YooptaPlugin as t}from"@yoopta/editor";import{jsx as n}from"react/jsx-runtime";const r=new t({type:"LinkPlugin",elements:{link:{render:t=>{const{url:r,target:i,rel:l}=t.element.props||{},o=e();return n("a",Object.assign({"data-element-type":t.element.type,draggable:!1,href:r||"",rel:l,target:i,onClick:e=>{o||e.preventDefault()},className:"underline underline-offset-4 text-[#007AFF] hover:text-[#3b82f6]"},t.attributes,{children:t.children}))},props:{url:null,target:"_blank",rel:"noreferrer",nodeType:"inline",title:null}}},options:{display:{title:"Link",description:"Create link"}},parsers:{}});!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".inline{display:inline}.text-\\[\\#007AFF\\]{--tw-text-opacity:1;color:rgb(0 122 255/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.hover\\:text-\\[\\#3b82f6\\]:hover{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}");export{r as default};
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{YooptaPlugin as e}from"@yoopta/editor";import{jsx as t}from"react/jsx-runtime";const n=new e({type:"LinkPlugin",elements:{link:{render:e=>{const{url:n,target:r,rel:i}=e.element.props||{};return t("a",Object.assign({"data-element-type":e.element.type,draggable:!1,href:n||"",rel:i,target:r,onClick:e=>e.preventDefault(),className:"underline underline-offset-4 text-[#007AFF] hover:text-[#3b82f6]"},e.attributes,{children:e.children}))},props:{url:null,target:"_blank",rel:"noreferrer",nodeType:"inline",title:null}}},options:{display:{title:"Link",description:"Create link"}}});!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".inline{display:inline}.text-\\[\\#007AFF\\]{--tw-text-opacity:1;color:rgb(0 122 255/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.hover\\:text-\\[\\#3b82f6\\]:hover{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}");export{n as default};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@yoopta/editor"),t=require("react/jsx-runtime");const r=new e.YooptaPlugin({type:"LinkPlugin",elements:{link:{render:r=>{const{url:n,target:i,rel:l}=r.element.props||{},o=e.useYooptaReadOnly();return t.jsx("a",Object.assign({"data-element-type":r.element.type,draggable:!1,href:n||"",rel:l,target:i,onClick:e=>{o||e.preventDefault()},className:"underline underline-offset-4 text-[#007AFF] hover:text-[#3b82f6]"},r.attributes,{children:r.children}))},props:{url:null,target:"_blank",rel:"noreferrer",nodeType:"inline",title:null}}},options:{display:{title:"Link",description:"Create link"}},parsers:{}});!function(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===r&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".inline{display:inline}.text-\\[\\#007AFF\\]{--tw-text-opacity:1;color:rgb(0 122 255/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.hover\\:text-\\[\\#3b82f6\\]:hover{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}"),exports.default=r;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAyB,MAAM,UAAU,CAAC;AAGnE,QAAA,MAAM,IAAI,iEAoBR,CAAC;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAyB,MAAM,UAAU,CAAC;AAGnE,QAAA,MAAM,IAAI,iEAgDR,CAAC;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"LinkRender.d.ts","sourceRoot":"","sources":["../../src/ui/LinkRender.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAkB,MAAM,gBAAgB,CAAC;AAQ1E,QAAA,MAAM,UAAU,UAAW,wBAAwB,4CAmBlD,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"LinkRender.d.ts","sourceRoot":"","sources":["../../src/ui/LinkRender.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAqB,MAAM,gBAAgB,CAAC;AAQ7E,QAAA,MAAM,UAAU,UAAW,wBAAwB,4CAuBlD,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,14 +1,13 @@
1
1
  {
2
2
  "name": "@yoopta/link",
3
- "version": "4.0.0-rc.4",
3
+ "version": "4.0.0-rc.6",
4
4
  "description": "> TODO: description",
5
5
  "author": "Darginec05 <devopsbanda@gmail.com>",
6
6
  "homepage": "https://github.com/Darginec05/Editor-Yoopta#readme",
7
7
  "license": "MIT",
8
8
  "private": false,
9
- "type": "module",
10
9
  "main": "dist/index.js",
11
- "module": "dist/index.js",
10
+ "module": "dist/index.es.js",
12
11
  "types": "./dist/index.d.ts",
13
12
  "files": [
14
13
  "dist/"
@@ -34,5 +33,5 @@
34
33
  "bugs": {
35
34
  "url": "https://github.com/Darginec05/Editor-Yoopta/issues"
36
35
  },
37
- "gitHead": "301c0cc901a5633c09ae0d7450c9dcbe7a6e47cc"
36
+ "gitHead": "2ab435c70924d16a80928f05657f0f9db1ff42f0"
38
37
  }