@yoopta/link 2.0.0 → 4.0.0-rc.0

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,4 @@
1
+ import { Link } from './plugin';
2
+ import './styles.css';
3
+ export default Link;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,cAAc,CAAC;AAQtB,eAAe,IAAI,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +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({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};
@@ -0,0 +1,9 @@
1
+ import { YooptaPlugin } from '@yoopta/editor';
2
+ type LinkElementProps = {
3
+ url: string | null;
4
+ target?: string;
5
+ rel?: string;
6
+ };
7
+ declare const Link: YooptaPlugin<LinkElementProps, import("slate").Descendant, Record<string, unknown>>;
8
+ export { Link };
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,KAAK,gBAAgB,GAAG;IACtB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,QAAA,MAAM,IAAI,qFAgBR,CAAC;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC"}
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { RenderElementProps } from 'slate-react';
3
+ declare const LinkRender: (props: RenderElementProps) => JSX.Element;
4
+ export { LinkRender };
5
+ //# sourceMappingURL=LinkRender.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinkRender.d.ts","sourceRoot":"","sources":["../../src/ui/LinkRender.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,QAAA,MAAM,UAAU,UAAW,kBAAkB,gBAoB5C,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yoopta/link",
3
- "version": "2.0.0",
3
+ "version": "4.0.0-rc.0",
4
4
  "description": "> TODO: description",
5
5
  "author": "Darginec05 <devopsbanda@gmail.com>",
6
6
  "homepage": "https://github.com/Darginec05/Editor-Yoopta#readme",
@@ -14,7 +14,7 @@
14
14
  "dist/"
15
15
  ],
16
16
  "peerDependencies": {
17
- "@yoopta/editor": ">=1.9.18-rc",
17
+ "@yoopta/editor": ">=4.0.0-rc.0",
18
18
  "react": ">=17.0.2",
19
19
  "react-dom": ">=17.0.2",
20
20
  "slate": ">=0.72.3",
@@ -28,13 +28,12 @@
28
28
  "url": "git+https://github.com/Darginec05/Editor-Yoopta.git"
29
29
  },
30
30
  "scripts": {
31
- "test": "node ./__tests__/yoopta-code.test.js"
31
+ "test": "node ./__tests__/yoopta-link.test.js",
32
+ "start": "rollup --config rollup.config.js --watch --bundleConfigAsCjs --environment NODE_ENV:development",
33
+ "prepublishOnly": "yarn build",
34
+ "build": "rollup --config rollup.config.js --bundleConfigAsCjs --environment NODE_ENV:production"
32
35
  },
33
36
  "bugs": {
34
37
  "url": "https://github.com/Darginec05/Editor-Yoopta/issues"
35
- },
36
- "dependencies": {
37
- "is-url": "^1.2.4",
38
- "prismjs": "^1.29.0"
39
38
  }
40
- }
39
+ }
package/README.md DELETED
@@ -1,11 +0,0 @@
1
- # `@yoopta/code`
2
-
3
- > TODO: description
4
-
5
- ## Usage
6
-
7
- ```
8
- const blockquote = require('@yoopta/code');
9
-
10
- // TODO: DEMONSTRATE API
11
- ```