@yoopta/link 4.0.0-rc.1 → 4.0.0-rc.10

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/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"}}},options:{displayLabel:"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
+ import{useYooptaReadOnly as e,YooptaPlugin as t}from"@yoopta/editor";import{jsx as r}from"react/jsx-runtime";"function"==typeof SuppressedError&&SuppressedError;const n=new t({type:"LinkPlugin",elements:{link:{render:t=>{const n=t.HTMLAttributes||{},{className:o}=n,l=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(n,["className"]),{url:i,target:a,rel:s}=t.element.props||{},p=e();return r("a",Object.assign({"data-element-type":t.element.type,draggable:!1,href:i||"",rel:s,target:a,onClick:e=>{p||e.preventDefault()},className:`yoo-link-underline yoo-link-underline-offset-4 yoo-link-text-[#007AFF] hover:yoo-link-text-[#3b82f6] ${o}`},l,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 r=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".yoo-link-text-\\[\\#007AFF\\]{--tw-text-opacity:1;color:rgb(0 122 255/var(--tw-text-opacity))}.yoo-link-underline{text-decoration-line:underline}.yoo-link-underline-offset-4{text-underline-offset:4px}.hover\\:yoo-link-text-\\[\\#3b82f6\\]:hover{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}");export{n as default};
@@ -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,iEAgBR,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"}
package/dist/types.d.ts CHANGED
@@ -5,6 +5,7 @@ export type LinkElementProps = {
5
5
  target?: string;
6
6
  rel?: string;
7
7
  nodeType: string;
8
+ title?: string | null;
8
9
  };
9
10
  export type LinkElement = SlateElement<'link', LinkElementProps>;
10
11
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAC3C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AACF,MAAM,MAAM,WAAW,GAAG,YAAY,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAC3C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC;AACF,MAAM,MAAM,WAAW,GAAG,YAAY,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC"}
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
1
  import { PluginElementRenderProps } from '@yoopta/editor';
3
- declare const LinkRender: (props: PluginElementRenderProps) => JSX.Element;
2
+ declare const LinkRender: (props: PluginElementRenderProps) => import("react/jsx-runtime").JSX.Element;
4
3
  export { LinkRender };
5
4
  //# sourceMappingURL=LinkRender.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LinkRender.d.ts","sourceRoot":"","sources":["../../src/ui/LinkRender.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAE1D,QAAA,MAAM,UAAU,UAAW,wBAAwB,gBAmBlD,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;AAE7E,QAAA,MAAM,UAAU,UAAW,wBAAwB,4CA0BlD,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@yoopta/link",
3
- "version": "4.0.0-rc.1",
3
+ "version": "4.0.0-rc.10",
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",
10
+ "type": "module",
11
11
  "module": "dist/index.js",
12
12
  "types": "./dist/index.d.ts",
13
13
  "files": [
@@ -16,9 +16,7 @@
16
16
  "peerDependencies": {
17
17
  "@yoopta/editor": ">=4.0.0-rc.0",
18
18
  "react": ">=17.0.2",
19
- "react-dom": ">=17.0.2",
20
- "slate": ">=0.99.0",
21
- "slate-react": ">=0.99.0"
19
+ "react-dom": ">=17.0.2"
22
20
  },
23
21
  "publishConfig": {
24
22
  "registry": "https://registry.yarnpkg.com"
@@ -36,5 +34,5 @@
36
34
  "bugs": {
37
35
  "url": "https://github.com/Darginec05/Editor-Yoopta/issues"
38
36
  },
39
- "gitHead": "c46f09afdb5f60f98f2065e24305a9d02ed57ca7"
37
+ "gitHead": "92fc1c6c6e38b757ae264ffa34f126cf280d348a"
40
38
  }