@yoopta/headings 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.
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -0
- package/dist/plugin/HeadingOne.d.ts +3 -0
- package/dist/plugin/HeadingOne.d.ts.map +1 -0
- package/dist/plugin/HeadingThree.d.ts +3 -0
- package/dist/plugin/HeadingThree.d.ts.map +1 -0
- package/dist/plugin/HeadingTwo.d.ts +3 -0
- package/dist/plugin/HeadingTwo.d.ts.map +1 -0
- package/dist/types.d.ts +5 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +11 -3
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { HeadingTwo } from './plugin/HeadingTwo';
|
|
2
|
+
import { HeadingOne } from './plugin/HeadingOne';
|
|
3
|
+
import { HeadingThree } from './plugin/HeadingThree';
|
|
4
|
+
import { HeadingOneElement, HeadingThreeElement, HeadingTwoElement } from './types';
|
|
5
|
+
import './styles.css';
|
|
6
|
+
declare module 'slate' {
|
|
7
|
+
interface CustomTypes {
|
|
8
|
+
Element: HeadingOneElement | HeadingTwoElement | HeadingThreeElement;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
declare const Headings: {
|
|
12
|
+
HeadingOne: any;
|
|
13
|
+
HeadingTwo: any;
|
|
14
|
+
HeadingThree: any;
|
|
15
|
+
};
|
|
16
|
+
export default Headings;
|
|
17
|
+
export { HeadingOne, HeadingTwo, HeadingThree, HeadingOneElement, HeadingTwoElement, HeadingThreeElement };
|
|
18
|
+
//# 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,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACpF,OAAO,cAAc,CAAC;AAEtB,OAAO,QAAQ,OAAO,CAAC;IACrB,UAAU,WAAW;QACnB,OAAO,EAAE,iBAAiB,GAAG,iBAAiB,GAAG,mBAAmB,CAAC;KACtE;CACF;AAED,QAAA,MAAM,QAAQ;;;;CAIb,CAAC;AAEF,eAAe,QAAQ,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{YooptaPlugin as t}from"@yoopta/editor";const o=({attributes:t,children:o,element:n})=>e("h2",Object.assign({id:n.id,draggable:!1,className:"yoo-h-scroll-m-20 yoo-h-mt-4 yoo-h-text-3xl yoo-h-font-semibold yoo-h-tracking-tight"},t,{children:o}));o.displayName="HeadingTwo";const n=new t({type:"HeadingTwo",elements:{"heading-two":{render:o,props:{nodeType:"block"}}},options:{displayLabel:"Heading 2",shortcuts:["h2","##"]}}),i=({attributes:t,children:o,element:n})=>e("h1",Object.assign({id:n.id,draggable:!1,className:"yoo-h-mt-6 yoo-h-scroll-m-20 yoo-h-text-4xl yoo-h-font-bold yoo-h-tracking-tight yoo-h-lg:text-5xl"},t,{children:o}));i.displayName="HeadingOne";const r=new t({type:"HeadingOne",elements:{"heading-one":{render:i,props:{nodeType:"block"}}},options:{displayLabel:"Heading 1",shortcuts:["h1","#","*"]}}),a=({attributes:t,children:o,element:n})=>e("h3",Object.assign({id:n.id,draggable:!1,className:"yoo-h-mt-2 yoo-h-scroll-m-20 yoo-h-text-2xl yoo-h-font-semibold yoo-h-tracking-tight"},t,{children:o}));a.displayName="HeadingThree";const h=new t({type:"HeadingThree",elements:{"heading-three":{render:a,props:{nodeType:"block"}}},options:{displayLabel:"Heading 3",shortcuts:["h3","###"]}});!function(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===o&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".yoo-h-mt-2{margin-top:.5rem}.yoo-h-mt-4{margin-top:1rem}.yoo-h-mt-6{margin-top:1.5rem}.yoo-h-scroll-m-20{scroll-margin:5rem}.yoo-h-text-2xl{font-size:1.5rem;line-height:2rem}.yoo-h-text-3xl{font-size:1.875rem;line-height:2.25rem}.yoo-h-text-4xl{font-size:2.25rem;line-height:2.5rem}.yoo-h-font-bold{font-weight:700}.yoo-h-font-semibold{font-weight:600}.yoo-h-tracking-tight{letter-spacing:-.025em}");const l={HeadingOne:r,HeadingTwo:n,HeadingThree:h};export{r as HeadingOne,h as HeadingThree,n as HeadingTwo,l as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeadingOne.d.ts","sourceRoot":"","sources":["../../src/plugin/HeadingOne.tsx"],"names":[],"mappings":"AAiBA,QAAA,MAAM,UAAU,KAcd,CAAC;AAEH,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeadingThree.d.ts","sourceRoot":"","sources":["../../src/plugin/HeadingThree.tsx"],"names":[],"mappings":"AAiBA,QAAA,MAAM,YAAY,KAchB,CAAC;AAEH,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeadingTwo.d.ts","sourceRoot":"","sources":["../../src/plugin/HeadingTwo.tsx"],"names":[],"mappings":"AAiBA,QAAA,MAAM,UAAU,KAcd,CAAC;AAEH,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { SlateElement } from '@yoopta/editor';
|
|
2
|
+
export type HeadingOneElement = SlateElement<'heading-one'>;
|
|
3
|
+
export type HeadingTwoElement = SlateElement<'heading-two'>;
|
|
4
|
+
export type HeadingThreeElement = SlateElement<'heading-three'>;
|
|
5
|
+
//# 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,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC,aAAa,CAAC,CAAC;AAC5D,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC,aAAa,CAAC,CAAC;AAC5D,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yoopta/headings",
|
|
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",
|
|
@@ -20,6 +20,11 @@
|
|
|
20
20
|
"slate": ">=0.72.3",
|
|
21
21
|
"slate-react": ">=0.95.0"
|
|
22
22
|
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"autoprefixer": "^10.0.1",
|
|
25
|
+
"postcss": "^8",
|
|
26
|
+
"tailwindcss": "^3.3.0"
|
|
27
|
+
},
|
|
23
28
|
"publishConfig": {
|
|
24
29
|
"registry": "https://registry.yarnpkg.com"
|
|
25
30
|
},
|
|
@@ -28,9 +33,12 @@
|
|
|
28
33
|
"url": "git+https://github.com/Darginec05/Editor-Yoopta.git"
|
|
29
34
|
},
|
|
30
35
|
"scripts": {
|
|
31
|
-
"test": "node ./__tests__/@yoopta/paragraph.test.js"
|
|
36
|
+
"test": "node ./__tests__/@yoopta/paragraph.test.js",
|
|
37
|
+
"start": "rollup --config rollup.config.js --watch --bundleConfigAsCjs --environment NODE_ENV:development",
|
|
38
|
+
"build": "rollup --config rollup.config.js --bundleConfigAsCjs --environment NODE_ENV:production",
|
|
39
|
+
"publish": "yarn build && npm publish --access public"
|
|
32
40
|
},
|
|
33
41
|
"bugs": {
|
|
34
42
|
"url": "https://github.com/Darginec05/Editor-Yoopta/issues"
|
|
35
43
|
}
|
|
36
|
-
}
|
|
44
|
+
}
|