@sps-woodland/rich-text-editor 7.0.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,2 @@
1
+ import type { ComponentManifest } from "@sps-woodland/core";
2
+ export declare const MANIFEST: ComponentManifest;
package/lib/style.css ADDED
@@ -0,0 +1 @@
1
+ .ks637j0{border-radius:.25rem;border-style:solid;border-width:.0625rem;padding:.25rem .5rem}.ks637j0:hover{background-color:#d2d4d4;border-color:#d2d4d4}.ks637j1{background-color:#e6f2f8;border-color:#007db8}.ks637j2{background-color:#fff;border-color:#fff}.ks637j3{background-position:center;background-repeat:no-repeat;display:block;height:1.125rem;width:.875rem}._7hct4e0{background-color:#fff;border-radius:.25rem;border-style:solid;border-width:.0625rem;font-size:.875rem;line-height:1.25rem}._7hct4e1{border-color:#d2d4d4}._7hct4e2{border-color:#717779}._7hct4e3{padding:.25rem .5rem;min-height:8rem}._7hct4e4{color:#717779}._7hct4e5{box-shadow:inset 0 .25rem #e9e9ea}._7hct4e6{align-items:center;border-color:#717779;border-style:solid;border-bottom-width:.0625rem;display:flex;padding:.25rem}._7hct4e7{background-color:#d2d4d4;margin-left:.25rem;margin-right:.25rem;height:1.75rem;width:.0625rem}
@@ -0,0 +1,15 @@
1
+ export declare const button: import("@vanilla-extract/recipes/dist/declarations/src/types").RuntimeFn<{
2
+ active: {
3
+ true: {
4
+ backgroundColor: string;
5
+ borderColor: string;
6
+ };
7
+ false: {
8
+ backgroundColor: string;
9
+ borderColor: string;
10
+ };
11
+ };
12
+ }>;
13
+ export declare const className: {
14
+ icon: string;
15
+ };
@@ -0,0 +1,10 @@
1
+ import type { ComponentProps } from "@sps-woodland/core";
2
+ import * as React from "react";
3
+ import type { ElementTest, SelectionDOMContextFind } from "../hooks/useRTESelectionListener";
4
+ export declare function RTEToolbarButton({ icon, onClick, selectionDOMContextFind, activeTest, isSimpleToggle, ...rest }: ComponentProps<{
5
+ icon: string;
6
+ onClick: (isActive: boolean) => void;
7
+ selectionDOMContextFind: SelectionDOMContextFind;
8
+ activeTest?: ElementTest;
9
+ isSimpleToggle?: boolean;
10
+ }, HTMLButtonElement>): React.ReactElement;
@@ -0,0 +1,2 @@
1
+ export declare const getParentElement: (node: Node, tagOptions: string[]) => HTMLElement | null;
2
+ export declare const getSiblingElementsAfter: (element: HTMLElement) => Element[];
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@sps-woodland/rich-text-editor",
3
+ "description": "SPS Design System rich text editor component",
4
+ "version": "7.0.0",
5
+ "author": "SPS Commerce",
6
+ "license": "UNLICENSED",
7
+ "repository": "https://github.com/SPSCommerce/woodland/tree/main/packages/@sps-woodland/rich-text-editor",
8
+ "homepage": "https://github.com/SPSCommerce/woodland/tree/master/packages/@sps-woodland/rich-text-editor#readme",
9
+ "main": "./lib/index.es.js",
10
+ "module": "./lib/index.es.js",
11
+ "types": "./lib/index.d.ts",
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
15
+ "peerDependencies": {
16
+ "@spscommerce/ds-react": "7.0.0",
17
+ "@sps-woodland/core": "7.0.0",
18
+ "@sps-woodland/tokens": "7.0.0",
19
+ "@spscommerce/utils": "^6.12.1",
20
+ "react": "^16.9.0",
21
+ "react-dom": "^16.9.0"
22
+ },
23
+ "devDependencies": {
24
+ "@spscommerce/ds-react": "7.0.0",
25
+ "@vanilla-extract/css": "^1.9.1",
26
+ "@vanilla-extract/recipes": "^0.2.5",
27
+ "@sps-woodland/core": "7.0.0",
28
+ "@sps-woodland/tokens": "7.0.0",
29
+ "@spscommerce/utils": "^6.12.1",
30
+ "react": "^16.9.0",
31
+ "react-dom": "^16.9.0"
32
+ },
33
+ "dependencies": {
34
+ "rehype-parse": "^8.0.4",
35
+ "rehype-remark": "^9.1.2",
36
+ "rehype-sanitize": "^5.0.1",
37
+ "rehype-stringify": "^9.0.3",
38
+ "remark-parse": "^10.0.1",
39
+ "remark-rehype": "^10.1.0",
40
+ "remark-stringify": "^10.0.2",
41
+ "unified": "^10.1.2",
42
+ "unist-util-visit": "^4.1.1"
43
+ },
44
+ "scripts": {
45
+ "build": "pnpm run build:js && pnpm run build:types",
46
+ "build:js": "vite build",
47
+ "build:types": "tsc --emitDeclarationOnly --declaration --declarationDir lib",
48
+ "watch": "vite build --watch",
49
+ "clean": "git clean -fdX",
50
+ "pub": "node ../../../scripts/publish-package.js"
51
+ }
52
+ }
package/vite.config.js ADDED
@@ -0,0 +1,21 @@
1
+ import path from "path";
2
+ import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin";
3
+ import { defineConfig } from "vite";
4
+
5
+ import pkg from "./package.json";
6
+
7
+ export default defineConfig({
8
+ plugins: [vanillaExtractPlugin()],
9
+ build: {
10
+ lib: {
11
+ entry: path.resolve(__dirname, "src/index.ts"),
12
+ formats: ["es", "cjs"],
13
+ fileName: (format) => `index.${format}.js`,
14
+ },
15
+ outDir: path.resolve(__dirname, "./lib"),
16
+ emptyOutDir: false,
17
+ rollupOptions: {
18
+ external: pkg.peerDependencies ? Object.keys(pkg.peerDependencies) : [],
19
+ },
20
+ },
21
+ });