@tomehq/theme 0.1.0 → 0.1.2
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/CHANGELOG.md +16 -0
- package/dist/{chunk-MEP7P6A7.js → chunk-JA4PMX6M.js} +2 -2
- package/dist/entry.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/src/AiChat.test.tsx +3 -3
- package/src/AiChat.tsx +1 -1
- package/src/Shell.tsx +1 -1
- package/src/global.d.ts +1 -0
- package/dist/chunk-BZGWSKT2.js +0 -573
- package/dist/chunk-FWBTK5TL.js +0 -1444
- package/dist/chunk-JZRT4WNC.js +0 -1441
- package/dist/chunk-LIMYFTPC.js +0 -1468
- package/dist/chunk-QCWZYABW.js +0 -1468
- package/dist/chunk-RKTT3ZEX.js +0 -1500
- package/dist/chunk-UKYFJSUA.js +0 -509
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# @tomehq/theme
|
|
2
|
+
|
|
3
|
+
## 0.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @tomehq/components@0.1.1
|
|
9
|
+
|
|
10
|
+
## 0.1.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Fix bugs found in functionality audit: invalid search provider, AI key naming mismatch, hardcoded version. Remove dead billing stubs. Add 57 API route tests.
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
- @tomehq/core@0.1.1
|
|
@@ -192,7 +192,7 @@ function AiChat({ provider, model, apiKey, context }) {
|
|
|
192
192
|
const [error, setError] = useState(null);
|
|
193
193
|
const messagesEndRef = useRef(null);
|
|
194
194
|
const inputRef = useRef(null);
|
|
195
|
-
const resolvedKey = apiKey || (typeof window !== "undefined" ? window.
|
|
195
|
+
const resolvedKey = apiKey || (typeof window !== "undefined" ? window.__TOME_AI_API_KEY__ : void 0);
|
|
196
196
|
const resolvedModel = model || getDefaultModel(provider);
|
|
197
197
|
useEffect(() => {
|
|
198
198
|
messagesEndRef.current?.scrollIntoView({ behavior: "smooth" });
|
|
@@ -882,7 +882,7 @@ function Shell({
|
|
|
882
882
|
] }, sec.section)) }),
|
|
883
883
|
/* @__PURE__ */ jsxs2("div", { style: { padding: "12px 16px", borderTop: "1px solid var(--bd)", display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
884
884
|
themeMode === "auto" ? /* @__PURE__ */ jsx2("button", { onClick: () => setDark((d) => !d), style: { background: "none", border: "none", color: "var(--txM)", cursor: "pointer", display: "flex" }, children: isDark ? /* @__PURE__ */ jsx2(SunIcon, {}) : /* @__PURE__ */ jsx2(MoonIcon, {}) }) : /* @__PURE__ */ jsx2("div", {}),
|
|
885
|
-
/* @__PURE__ */ jsx2("span", { style: { fontFamily: "var(--font-code)", fontSize: 10, color: "var(--txM)" }, children: "v0.1.0" })
|
|
885
|
+
/* @__PURE__ */ jsx2("span", { style: { fontFamily: "var(--font-code)", fontSize: 10, color: "var(--txM)" }, children: typeof __TOME_VERSION__ !== "undefined" && __TOME_VERSION__ ? `v${__TOME_VERSION__}` : "v0.1.0" })
|
|
886
886
|
] })
|
|
887
887
|
] }),
|
|
888
888
|
/* @__PURE__ */ jsxs2("div", { style: { flex: 1, display: "flex", flexDirection: "column", overflow: "hidden" }, children: [
|
package/dist/entry.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tomehq/theme",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Tome default theme and React app shell",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.tsx",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"./entry": "./src/entry.tsx"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@tomehq/components": "0.1.
|
|
13
|
-
"@tomehq/core": "0.1.
|
|
12
|
+
"@tomehq/components": "0.1.1",
|
|
13
|
+
"@tomehq/core": "0.1.1"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
16
|
"react": "^18.0.0 || ^19.0.0",
|
package/src/AiChat.test.tsx
CHANGED
|
@@ -80,12 +80,12 @@ describe("AiChat API key handling", () => {
|
|
|
80
80
|
expect(screen.queryByTestId("ai-chat-no-key")).not.toBeInTheDocument();
|
|
81
81
|
});
|
|
82
82
|
|
|
83
|
-
it("reads API key from window.
|
|
84
|
-
(window as any).
|
|
83
|
+
it("reads API key from window.__TOME_AI_API_KEY__ when prop is not set", () => {
|
|
84
|
+
(window as any).__TOME_AI_API_KEY__ = "window-key-456";
|
|
85
85
|
renderChat({ apiKey: undefined });
|
|
86
86
|
fireEvent.click(screen.getByTestId("ai-chat-button"));
|
|
87
87
|
expect(screen.queryByTestId("ai-chat-no-key")).not.toBeInTheDocument();
|
|
88
|
-
delete (window as any).
|
|
88
|
+
delete (window as any).__TOME_AI_API_KEY__;
|
|
89
89
|
});
|
|
90
90
|
|
|
91
91
|
it("disables input when no API key is available", () => {
|
package/src/AiChat.tsx
CHANGED
|
@@ -118,7 +118,7 @@ export function AiChat({ provider, model, apiKey, context }: AiChatProps) {
|
|
|
118
118
|
const messagesEndRef = useRef<HTMLDivElement>(null);
|
|
119
119
|
const inputRef = useRef<HTMLInputElement>(null);
|
|
120
120
|
|
|
121
|
-
const resolvedKey = apiKey || (typeof window !== "undefined" ? (window as any).
|
|
121
|
+
const resolvedKey = apiKey || (typeof window !== "undefined" ? (window as any).__TOME_AI_API_KEY__ : undefined);
|
|
122
122
|
const resolvedModel = model || getDefaultModel(provider);
|
|
123
123
|
|
|
124
124
|
// Scroll to bottom on new messages
|
package/src/Shell.tsx
CHANGED
|
@@ -402,7 +402,7 @@ export function Shell({
|
|
|
402
402
|
{isDark ? <SunIcon /> : <MoonIcon />}
|
|
403
403
|
</button>
|
|
404
404
|
) : <div />}
|
|
405
|
-
<span style={{ fontFamily: "var(--font-code)", fontSize: 10, color: "var(--txM)" }}>v0.1.0</span>
|
|
405
|
+
<span style={{ fontFamily: "var(--font-code)", fontSize: 10, color: "var(--txM)" }}>{typeof __TOME_VERSION__ !== "undefined" && __TOME_VERSION__ ? `v${__TOME_VERSION__}` : "v0.1.0"}</span>
|
|
406
406
|
</div>
|
|
407
407
|
</aside>
|
|
408
408
|
|