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

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 o}from"react/jsx-runtime";"function"==typeof SuppressedError&&SuppressedError;const r=new t({type:"LinkPlugin",elements:{link:{render:t=>{const r=t.HTMLAttributes||{},{className:n}=r,i=function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]])}return o}(r,["className"]),{url:l,target:a,rel:p}=t.element.props||{},s=e();return o("a",Object.assign({"data-element-type":t.element.type,draggable:!1,href:l||"",rel:p,target:a,onClick:e=>{s||e.preventDefault()},className:`yoo-link-underline yoo-link-underline-offset-4 yoo-link-text-[#007AFF] hover:yoo-link-text-[#3b82f6] ${n}`},i,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 o=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("#yoopta-editor .yoo-link-text-\\[\\#007AFF\\]{--tw-text-opacity:1;color:rgb(0 122 255/var(--tw-text-opacity))}#yoopta-editor .yoo-link-underline{text-decoration-line:underline}#yoopta-editor .yoo-link-underline-offset-4{text-underline-offset:4px}#yoopta-editor .hover\\:yoo-link-text-\\[\\#3b82f6\\]:hover{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}");export{r 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.11",
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": "47486295e1f53b2033ef0c859d1e4c831832b1e3"
40
38
  }