@yoopta/link 2.0.1 → 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.
- package/dist/index.d.ts +3 -10
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -1
- package/dist/plugin/index.d.ts +9 -0
- package/dist/plugin/index.d.ts.map +1 -0
- package/dist/types.d.ts +1 -8
- package/dist/types.d.ts.map +1 -0
- package/dist/ui/LinkRender.d.ts +5 -0
- package/dist/ui/LinkRender.d.ts.map +1 -0
- package/package.json +6 -7
- package/README.md +0 -11
- package/dist/ui/Link.d.ts +0 -3
- package/dist/ui/LinkEditor.d.ts +0 -5
- package/dist/utils/addLink.d.ts +0 -2
- package/dist/utils/removeLink.d.ts +0 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { Link } from './ui/Link';
|
|
4
|
-
declare module 'slate' {
|
|
5
|
-
interface CustomTypes {
|
|
6
|
-
Editor: YooEditor;
|
|
7
|
-
Element: LinkElement;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
1
|
+
import { Link } from './plugin';
|
|
2
|
+
import './styles.css';
|
|
10
3
|
export default Link;
|
|
11
|
-
|
|
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
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
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"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
import { Modify, YooptaBaseElement } from '@yoopta/editor';
|
|
2
|
-
type LinkOptions = {
|
|
3
|
-
url: null | string | undefined;
|
|
4
|
-
skipDrag: boolean;
|
|
5
|
-
};
|
|
6
|
-
export type LinkElement = Modify<YooptaBaseElement<'link'>, {
|
|
7
|
-
data: LinkOptions;
|
|
8
|
-
}>;
|
|
9
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 @@
|
|
|
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": "
|
|
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": ">=
|
|
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-
|
|
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
package/dist/ui/Link.d.ts
DELETED
package/dist/ui/LinkEditor.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { RenderYooptaElementProps } from '@yoopta/editor';
|
|
3
|
-
import { LinkElement } from '../types';
|
|
4
|
-
declare const LinkEditor: ({ attributes, element, children, HTMLAttributes }: RenderYooptaElementProps<LinkElement>) => JSX.Element;
|
|
5
|
-
export { LinkEditor };
|
package/dist/utils/addLink.d.ts
DELETED