@lapismd/mira-react 0.0.1

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,68 @@
1
+ @import "@lapismd/mira-editor/styles.css";
2
+
3
+ .mira-react-dropdown {
4
+ display: inline-flex;
5
+ position: relative;
6
+ }
7
+
8
+ .mira-react-dropdown__content {
9
+ left: 0;
10
+ position: absolute;
11
+ top: calc(100% + 0.25rem);
12
+ }
13
+
14
+ .mira-react-dropdown__content--end {
15
+ left: auto;
16
+ right: 0;
17
+ }
18
+
19
+ .mira-react-menu-button {
20
+ background: transparent;
21
+ border: 0;
22
+ color: inherit;
23
+ font: inherit;
24
+ text-align: inherit;
25
+ width: 100%;
26
+ }
27
+
28
+ .mira-react-menu-button:hover {
29
+ background: var(--background-modifier-hover, var(--mira-accent-soft));
30
+ }
31
+
32
+ .mira-react-preview-host,
33
+ .mira-react-preview-host__preview,
34
+ .mira-react-preview-host__preview > .mira-markdown-preview {
35
+ height: 100%;
36
+ }
37
+
38
+ .mira-react-preview-host--outline-sidebar {
39
+ display: grid;
40
+ grid-template-columns: minmax(0, 1fr) minmax(12rem, 16rem);
41
+ }
42
+
43
+ .mira-react-preview-host--outline-sidebar > .mira-react-preview-host__preview {
44
+ min-width: 0;
45
+ }
46
+
47
+ .mira-react-preview-host--outline-sidebar > .mira-react-preview-host__outline {
48
+ background: var(--mira-background);
49
+ border-inline-start: 1px solid var(--mira-border);
50
+ box-sizing: border-box;
51
+ min-width: 0;
52
+ overflow: auto;
53
+ padding: 1rem;
54
+ }
55
+
56
+ @media (max-width: 760px) {
57
+ .mira-react-preview-host--outline-sidebar {
58
+ grid-template-columns: minmax(0, 1fr);
59
+ grid-template-rows: minmax(0, 1fr) auto;
60
+ }
61
+
62
+ .mira-react-preview-host--outline-sidebar
63
+ > .mira-react-preview-host__outline {
64
+ border-inline-start: 0;
65
+ border-top: 1px solid var(--mira-border);
66
+ max-height: 8rem;
67
+ }
68
+ }
package/package.json ADDED
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "@lapismd/mira-react",
3
+ "version": "0.0.1",
4
+ "description": "React adapters for the composable Mira and batteries-included Mira Editor surfaces.",
5
+ "author": "Steve Juma <help@lapis.md>",
6
+ "license": "AGPL-3.0-or-later",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/lapismd/mira-mde.git",
10
+ "directory": "packages/mira-react"
11
+ },
12
+ "type": "module",
13
+ "sideEffects": [
14
+ "*.css"
15
+ ],
16
+ "files": [
17
+ "CHANGELOG.md",
18
+ "dist"
19
+ ],
20
+ "exports": {
21
+ ".": {
22
+ "types": "./dist/index.d.ts",
23
+ "import": "./dist/index.js"
24
+ },
25
+ "./styles.css": "./dist/styles.css"
26
+ },
27
+ "dependencies": {
28
+ "lucide-react": "^0.525.0",
29
+ "@lapismd/mira": "~0.0.1",
30
+ "@lapismd/mira-plugin-mermaid": "~0.0.1",
31
+ "@lapismd/mira-editor": "~0.0.1"
32
+ },
33
+ "peerDependencies": {
34
+ "@codemirror/state": "^6.5.2",
35
+ "react": "^18.3.0 || ^19.0.0",
36
+ "react-dom": "^18.3.0 || ^19.0.0",
37
+ "svelte": "^5.0.0"
38
+ },
39
+ "devDependencies": {
40
+ "@codemirror/state": "^6.5.2",
41
+ "@types/react": "^19.0.0",
42
+ "@types/react-dom": "^19.0.0",
43
+ "react": "^19.0.0",
44
+ "react-dom": "^19.0.0",
45
+ "svelte": "^5.46.1"
46
+ },
47
+ "publishConfig": {
48
+ "access": "public",
49
+ "registry": "https://registry.npmjs.org"
50
+ },
51
+ "scripts": {
52
+ "build": "tsup src/index.ts --format esm --dts --clean && cp src/styles.css dist/styles.css && publint",
53
+ "check": "pnpm check:format && pnpm check:svelte && pnpm check:types",
54
+ "check:format": "prettier --ignore-path ../../.prettierignore . --check",
55
+ "check:types": "tsc -p tsconfig.json --noEmit",
56
+ "check:svelte": "echo \"no svelte files\"",
57
+ "lint": "eslint src --ext .ts,.tsx",
58
+ "test": "vitest run"
59
+ }
60
+ }