Skip to content

Commit d1ccf38

Browse files
committed
chore(pplx:ext): update deps
1 parent f1f178a commit d1ccf38

File tree

10 files changed

+409
-231
lines changed

10 files changed

+409
-231
lines changed
Lines changed: 43 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,47 @@
11
---
22
description:
3-
globs: src/**/*
3+
globs: *.ts,*.tsx
44
alwaysApply: false
55
---
6-
## Auto-Import Reference
7-
8-
This document provides a comprehensive list of automatically imported dependencies, configured in `src/types/unimport.config.ts`.
9-
10-
GUIDANCE: When referencing or utilizing the following modules and functions, do **NOT** include explicit import statements. These are globally available due to the auto-import configuration.
11-
12-
### List of Auto-Imports
13-
14-
| Module/Function | Source |
15-
| -------------------- | ------------------------- |
16-
| `useState` | `react` |
17-
| `useEffect` | `react` |
18-
| `useRef` | `react` |
19-
| `useCallback` | `react` |
20-
| `useMemo` | `react` |
21-
| `lazy` | `react` |
22-
| `use` | `react` |
23-
| `createContext` | `react` |
24-
| `useDeferredValue` | `react` |
25-
| `memo` | `react` |
26-
| `onlyMainWorldGuard` | `src/utils/js-context.ts` |
27-
| `onlyExtensionGuard` | `src/utils/js-context.ts` |
28-
| `sleep` | `src/utils/utils.ts` |
29-
| `isMainWorldContext` | `src/utils/utils.ts` |
30-
| `isExtensionContext` | `src/utils/utils.ts` |
31-
| `cn` | `src/utils/cn.ts` |
32-
| `i18n` | `src/utils/i18next.ts` |
33-
| `t` | `src/utils/i18next.ts` |
34-
| `deepEqual` | `src/utils/deep-equal.ts` |
35-
| `$` (default) | `jquery` |
36-
| `Key` | `ts-key-enum` |
6+
# AUTO-IMPORTS
7+
8+
## CRITICAL: NEVER ADD EXPLICIT IMPORTS FOR THESE DEPENDENCIES
9+
10+
This project uses automatic imports via unimport. The following dependencies are AUTOMATICALLY AVAILABLE in all files without explicit imports.
11+
12+
### React Core
13+
- `useState`, `useEffect`, `useRef`, `useMemo`, `useCallback`, `useLayoutEffect`
14+
- `useContext`, `useReducer`, `useImperativeHandle`, `useDebugValue`, `useId`
15+
- `lazy`, `use`, `createContext`, `useDeferredValue`, `memo`
16+
17+
### Utility Functions
18+
- From `src/utils/js-context-guards.ts`:
19+
- `onlyMainWorldGuard`
20+
- `onlyExtensionGuard`
21+
22+
- From `src/utils/utils.ts`:
23+
- `sleep`
24+
- `isMainWorldContext`
25+
- `isExtensionContext`
26+
27+
- From `src/data/i18next.ts`:
28+
- `t`
29+
- `i18n`
30+
31+
- From `src/utils/deep-equal.ts`:
32+
- `deepEqual`
33+
34+
- From `src/utils/cn.ts`:
35+
- `cn`
36+
37+
### External Libraries
38+
- From jquery: `$` (default import)
39+
- From ts-key-enum: `Key`
40+
41+
## IMPORTANT REMINDER
42+
- DO NOT add import statements for any of the above items
43+
- Treat these imports as already present in the global scope
44+
45+
46+
47+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Bug Fixes
2+
3+
- `Image Model Selector` now works as expected.

perplexity/extension/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pplx-ext",
3-
"version": "1.13.2",
3+
"version": "1.13.3",
44
"author": "pnd280",
55
"dependencies": {
66
"@ark-ui/react": "^5.7.0",
@@ -16,8 +16,8 @@
1616
"@radix-ui/react-scroll-area": "^1.2.6",
1717
"@radix-ui/react-slot": "^1.2.0",
1818
"@radix-ui/react-toast": "^1.2.11",
19-
"@tanstack/react-query": "^5.74.4",
20-
"@tanstack/react-query-persist-client": "^5.74.6",
19+
"@tanstack/react-query": "^5.74.11",
20+
"@tanstack/react-query-persist-client": "^5.74.11",
2121
"@types/howler": "^2.2.12",
2222
"@uidotdev/usehooks": "^2.4.1",
2323
"@webext-core/match-patterns": "^1.0.3",
@@ -32,7 +32,7 @@
3232
"engine.io-parser": "^5.2.3",
3333
"fast-equals": "^5.2.2",
3434
"howler": "^2.2.4",
35-
"i18next": "^25.0.1",
35+
"i18next": "^25.0.2",
3636
"immer": "^10.1.1",
3737
"jquery": "^3.7.1",
3838
"js-base64": "^3.7.7",
@@ -48,7 +48,7 @@
4848
"react-icons": "^5.5.0",
4949
"react-lazily": "^0.9.2",
5050
"react-markdown": "^10.1.0",
51-
"react-router-dom": "7.5.2",
51+
"react-router-dom": "7.5.3",
5252
"react-syntax-highlighter": "^15.6.1",
5353
"rehype-raw": "^7.0.0",
5454
"rehype-stringify": "^10.0.1",
@@ -76,14 +76,14 @@
7676
"@tailwindcss/cli": "^4.1.4",
7777
"@tailwindcss/typography": "^0.5.16",
7878
"@tailwindcss/vite": "^4.1.4",
79-
"@tanstack/eslint-plugin-query": "^5.73.3",
80-
"@tanstack/react-query-devtools": "^5.74.6",
79+
"@tanstack/eslint-plugin-query": "^5.74.7",
80+
"@tanstack/react-query-devtools": "^5.74.11",
8181
"@types/chrome": "0.0.317",
8282
"@types/culori": "^2.1.1",
8383
"@types/jquery": "^3.5.32",
8484
"@types/lodash": "^4.17.16",
8585
"@types/mdast": "^4.0.4",
86-
"@types/node": "^20.17.31",
86+
"@types/node": "^20.17.32",
8787
"@types/pako": "^2.0.3",
8888
"@types/react": "^19.1.2",
8989
"@types/react-dom": "^19.1.2",
@@ -92,7 +92,7 @@
9292
"@vitejs/plugin-react": "^4.4.1",
9393
"@vitest/ui": "^3.1.2",
9494
"browserslist": "^4.24.4",
95-
"caniuse-lite": "^1.0.30001715",
95+
"caniuse-lite": "^1.0.30001716",
9696
"chalk": "^5.4.1",
9797
"eslint-plugin-boundaries": "^5.0.1",
9898
"glob": "^11.0.2",
@@ -110,7 +110,7 @@
110110
"tailwindcss-animate": "^1.0.7",
111111
"typescript": "5.8.2",
112112
"unimport": "^5.0.0",
113-
"vite": "^6.3.3",
113+
"vite": "^6.3.4",
114114
"vitest": "^3.1.2"
115115
},
116116
"engines": {
Lines changed: 13 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,23 @@
11
@reference "../../../../../assets/index.css";
22

33
[cplx-follow-up-query-box] {
4-
/* Enlarge the query box (tall mode) */
5-
@apply x:rounded-2xl;
6-
7-
> div {
8-
@apply x:rounded-2xl;
9-
10-
> div {
11-
@apply x:rounded-2xl x:p-2.5 x:py-3;
12-
13-
> div {
14-
display: grid !important;
15-
grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
16-
grid-template-rows: 1fr auto !important;
17-
18-
> div:nth-child(1) {
19-
order: 0;
20-
grid-column: span 3 / span 3;
21-
grid-column-start: 1;
22-
23-
@apply x:p-2 x:pt-0;
24-
}
25-
26-
> div:nth-child(2) {
27-
grid-column: span 2 / span 2;
28-
grid-column-start: 1;
29-
align-items: center;
30-
order: 1;
4+
& > div > div {
5+
@apply x:py-3;
6+
}
317

32-
&.-ml-1 {
33-
margin-left: unset;
34-
}
35-
}
8+
[data-cplx-component="query-box-components-wrapper"] {
9+
@apply x:grid x:grid-cols-3 x:grid-rows-[1fr_auto] x:px-4;
3610

37-
> div:nth-child(3) {
38-
grid-column: span 1 / span 1;
11+
> div:nth-child(1) {
12+
@apply x:col-start-1 x:col-end-4 x:p-0 x:pb-2;
13+
}
3914

40-
&.-mr-1 {
41-
margin-right: unset;
42-
}
43-
}
44-
}
15+
> div:nth-child(2) {
16+
@apply x:col-start-1 x:row-start-2 x:-ml-1;
4517
}
46-
}
4718

48-
[data-cplx-component="query-box-components-wrapper"] > div:nth-child(3) {
49-
max-height: max-content;
19+
> div:nth-child(3) {
20+
@apply x:col-start-3 x:row-start-2 x:-mr-1;
21+
}
5022
}
5123
}

perplexity/extension/src/plugins/image-gen-popover/ImageGenModelSelector.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createListCollection } from "@ark-ui/react";
2-
import { LuCpu as Cpu, LuImage as Image } from "react-icons/lu";
2+
import { LuCpu as Cpu, LuImage as Image, LuCpu } from "react-icons/lu";
33

44
import Tooltip from "@/components/Tooltip";
55
import { Portal } from "@/components/ui/portal";
@@ -67,9 +67,6 @@ export function ImageGenModelSelector() {
6767
)?.shortLabel
6868
}
6969
</SelectValue>
70-
<span className="x:self-start x:text-[.5rem] x:text-primary">
71-
{limit}
72-
</span>
7370
</div>
7471
</SelectTrigger>
7572
</Tooltip>
@@ -80,9 +77,7 @@ export function ImageGenModelSelector() {
8077
)}
8178
>
8279
{PplxImageModelsService.allModels.map((model) => {
83-
const Icon = PplxImageModelsService.icons[model.code];
84-
85-
if (Icon == null) return null;
80+
const Icon = PplxImageModelsService.icons[model.code] ?? LuCpu;
8681

8782
return (
8883
<Tooltip

perplexity/extension/src/services/cplx-api/remote-resources/pplx-image-models/defaults.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
export const pplxLocalImageModels = [
2+
{
3+
label: "Auto",
4+
shortLabel: "Auto",
5+
code: "default",
6+
},
27
{
38
label: "GPT-4o",
49
shortLabel: "GPT-4o",
5-
code: "default",
10+
code: "gpt-4o-image",
611
},
712
{
813
label: "FLUX.1",
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
import { AiOutlineOpenAI } from "react-icons/ai";
1+
import { FaShuffle } from "react-icons/fa6";
22
import { SiGooglegemini, SiOpenai } from "react-icons/si";
33

44
import BlackForestLabs from "@/components/icons/BlackForestLabsIcon";
55
import type { ImageModel } from "@/services/cplx-api/remote-resources/pplx-image-models/types";
66

77
export const imageModelIcons: Record<ImageModel["code"], React.ElementType> = {
8-
default: SiOpenai,
8+
default: FaShuffle,
9+
"gpt-4o-image": SiOpenai,
910
flux: BlackForestLabs,
10-
"dall-e-3": AiOutlineOpenAI,
11+
"dall-e-3": SiOpenai,
1112
"gemini-flash": SiGooglegemini,
1213
};

perplexity/extension/src/services/cplx-api/remote-resources/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { errorWrapper } from "@/utils/error-wrapper";
88
export async function getRemoteResource<T>(
99
resourceConfig: RemoteResource<T>,
1010
): Promise<T> {
11-
if (APP_CONFIG.IS_DEV) return resourceConfig.fallback;
11+
// if (APP_CONFIG.IS_DEV) return resourceConfig.fallback;
1212

1313
if (APP_CONFIG.CPLX_CDN_URL == null) return resourceConfig.fallback;
1414

perplexity/extension/src/services/cplx-api/versioned-remote-resources/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { errorWrapper } from "@/utils/error-wrapper";
1111
export async function getVersionedRemoteResource<T>(
1212
resourceConfig: VersionedRemoteResource<T>,
1313
): Promise<T> {
14-
if (APP_CONFIG.IS_DEV) return resourceConfig.fallback;
14+
// if (APP_CONFIG.IS_DEV) return resourceConfig.fallback;
1515

1616
if (APP_CONFIG.CPLX_CDN_URL == null) return resourceConfig.fallback;
1717

0 commit comments

Comments
 (0)