@moyarich/console-addon-search 0.0.0-stage → 0.2.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,169 @@
1
+ /* src/components/ConsoleSearchControls/ConsoleSearchControls.css */
2
+ /* Public --console-search-* inputs resolve to private component-local tokens. */
3
+ .console-search-controls {
4
+ --_console-search-background-color: var(
5
+ --console-search-background-color,
6
+ var(--console-panel-background-color, transparent)
7
+ );
8
+ --_console-search-color: var(
9
+ --console-search-color,
10
+ var(--console-panel-color, light-dark(#27272a, #f4f4f5))
11
+ );
12
+ --_console-search-border-color: var(
13
+ --console-search-border-color,
14
+ color-mix(in srgb, var(--_console-search-color) 16%, transparent)
15
+ );
16
+ --_console-search-focus-color: var(--console-search-focus-color, #635bff);
17
+
18
+ box-sizing: border-box;
19
+ flex: 1 1 22rem;
20
+ min-width: 0;
21
+ display: grid;
22
+ gap: 8px;
23
+ padding: 12px;
24
+ background: var(--_console-search-background-color);
25
+ color: var(--_console-search-color);
26
+ font:
27
+ 400 12px/1.4 ui-sans-serif,
28
+ system-ui,
29
+ sans-serif;
30
+ }
31
+
32
+ .console-search-controls-row {
33
+ display: flex;
34
+ align-items: center;
35
+ gap: 4px;
36
+ min-width: 0;
37
+ padding-inline-end: 4px;
38
+ border: 1px solid var(--_console-search-border-color);
39
+ border-radius: 8px;
40
+ background: color-mix(
41
+ in srgb,
42
+ var(--_console-search-color) 3%,
43
+ var(--_console-search-background-color)
44
+ );
45
+ }
46
+
47
+ .console-search-controls-field {
48
+ display: flex;
49
+ align-items: center;
50
+ gap: 8px;
51
+ flex: 1;
52
+ min-width: 0;
53
+ padding-inline-start: 10px;
54
+ }
55
+
56
+ .console-search-controls-field svg {
57
+ flex-shrink: 0;
58
+ opacity: 0.6;
59
+ }
60
+
61
+ .console-search-controls input[type="search"] {
62
+ box-sizing: border-box;
63
+ width: 100%;
64
+ min-width: 0;
65
+ border: 0;
66
+ padding: 9px 0;
67
+ background: transparent;
68
+ color: inherit;
69
+ font: inherit;
70
+ }
71
+
72
+ .console-search-controls input::placeholder {
73
+ color: inherit;
74
+ opacity: 0.55;
75
+ }
76
+
77
+ .console-search-controls-row:focus-within {
78
+ border-color: var(--_console-search-focus-color);
79
+ box-shadow: 0 0 0 2px
80
+ color-mix(in srgb, var(--_console-search-focus-color) 15%, transparent);
81
+ }
82
+
83
+ .console-search-controls-row [role="status"] {
84
+ max-width: 10rem;
85
+ font-size: 11px;
86
+ opacity: 0.65;
87
+ }
88
+
89
+ .console-search-controls button {
90
+ flex-shrink: 0;
91
+ width: 28px;
92
+ height: 28px;
93
+ padding: 0;
94
+ border: 0;
95
+ border-radius: 5px;
96
+ background: transparent;
97
+ color: inherit;
98
+ font: inherit;
99
+ font-size: 16px;
100
+ cursor: pointer;
101
+ }
102
+
103
+ .console-search-controls button:hover:not(:disabled) {
104
+ background: color-mix(in srgb, var(--_console-search-color) 9%, transparent);
105
+ }
106
+
107
+ .console-search-controls-options {
108
+ display: flex;
109
+ flex-wrap: wrap;
110
+ gap: 6px 14px;
111
+ }
112
+
113
+ .console-search-controls-options label {
114
+ display: inline-flex;
115
+ align-items: center;
116
+ gap: 5px;
117
+ cursor: pointer;
118
+ }
119
+
120
+ .console-search-controls input[type="checkbox"] {
121
+ margin: 0;
122
+ accent-color: var(--_console-search-focus-color);
123
+ }
124
+
125
+ .console-search-controls :focus-visible {
126
+ outline: 2px solid var(--_console-search-focus-color);
127
+ outline-offset: 2px;
128
+ }
129
+
130
+ .console-search-controls input[type="search"]:focus-visible {
131
+ outline: none;
132
+ }
133
+
134
+ .console-search-controls button:disabled {
135
+ opacity: 0.3;
136
+ cursor: default;
137
+ }
138
+
139
+ .console-search-controls-error {
140
+ color: var(--console-error-color, light-dark(#b42318, #fda4af));
141
+ overflow-wrap: anywhere;
142
+ }
143
+
144
+ /* src/components/ConsoleSearchHighlight/ConsoleSearchHighlight.css */
145
+ /* Search match colors can be themed independently from the Console panel. */
146
+ .console-search-highlight {
147
+ --_console-search-highlight-background-color: var(
148
+ --console-search-highlight-background-color,
149
+ light-dark(#ffdf70, #745b16)
150
+ );
151
+ --_console-search-highlight-color: var(
152
+ --console-search-highlight-color,
153
+ light-dark(#231c00, #fff7d6)
154
+ );
155
+ --_console-search-highlight-active-color: var(
156
+ --console-search-highlight-active-color,
157
+ var(--console-header-icon-color, currentColor)
158
+ );
159
+
160
+ background: var(--_console-search-highlight-background-color);
161
+ color: var(--_console-search-highlight-color);
162
+ border-radius: 2px;
163
+ padding: 0 0.2em;
164
+ }
165
+
166
+ .console-search-highlight[data-active] {
167
+ outline: 2px solid var(--_console-search-highlight-active-color);
168
+ outline-offset: 1px;
169
+ }
package/package.json CHANGED
@@ -1,6 +1,69 @@
1
1
  {
2
2
  "name": "@moyarich/console-addon-search",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.0",
4
+ "description": "Optional text search and match navigation for Console",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "./dist/index.cjs",
8
+ "module": "./dist/index.js",
9
+ "types": "./dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "import": {
13
+ "types": "./dist/index.d.ts",
14
+ "default": "./dist/index.js"
15
+ },
16
+ "require": {
17
+ "types": "./dist/index.d.cts",
18
+ "default": "./dist/index.cjs"
19
+ }
20
+ },
21
+ "./styles.css": "./dist/styles.css"
22
+ },
23
+ "files": [
24
+ "dist"
25
+ ],
26
+ "publishConfig": {
27
+ "registry": "https://npm.pkg.github.com"
28
+ },
29
+ "scripts": {
30
+ "build": "vite build && tsc -p tsconfig.build.json && node ../../../scripts/prepare-cjs-types.mjs && node ../../../scripts/prepare-addon-styles.mjs",
31
+ "typecheck": "tsc --noEmit"
32
+ },
33
+ "peerDependencies": {
34
+ "@moyarich/console-core": "^0.2.0",
35
+ "react": ">=18"
36
+ },
37
+ "devDependencies": {
38
+ "@moyarich/console-core": "0.2.0",
39
+ "typescript": "^5.9.2",
40
+ "vite": "^7.1.5",
41
+ "react": "^19.2.7",
42
+ "@types/react": "^19.1.12"
43
+ },
44
+ "repository": {
45
+ "type": "git",
46
+ "url": "git+https://github.com/moyarich/console.git",
47
+ "directory": "packages/addons/search"
48
+ },
49
+ "bugs": {
50
+ "url": "https://github.com/moyarich/console/issues"
51
+ },
52
+ "homepage": "https://github.com/moyarich/console#readme",
53
+ "keywords": [
54
+ "console",
55
+ "addon",
56
+ "search"
57
+ ],
58
+ "sideEffects": [
59
+ "./src/components/ConsoleSearchControls/ConsoleSearchControls.css",
60
+ "./src/components/ConsoleSearchHighlight/ConsoleSearchHighlight.css",
61
+ "./dist/styles.css"
62
+ ],
63
+ "publisher": "moyarich",
64
+ "author": "Moya Richards",
65
+ "engines": {
66
+ "node": ">=24"
67
+ },
68
+ "private": false
69
+ }