Skip to content

Commit 6db5533

Browse files
authored
Release v1.1 (#3)
* chore: add vite-plugin-chrome-extension * chore: install wxt * chore: add .wxt * chore: extend wxt * chore: package.json * chore: add temporary entrypoints * chore: add wxt.config * move: manifest * chore: update to tailwindcss v4 * chore: project setting * chore: edit .gitignore * Move files * Move files * fix: use standard approach * remove unused * temporary fix * Fix build * refactor: chrome to browser * fix: layout * style: use relative * style: use full dvh * remove: unused file tailwind.config is not used in v4 * temporary * Remove unused * Refactor * Add TODO * Add jotai * Use atoms * Remove * Add .wxt * Cleanup wxt config * Add tsc build * Edit gitignore * Run prettier * chore: add prettierignore * chore: bump dependencies * refactor: types * chore: bump * refactor: content script * refactor: sidepanel * chore * chore: add tanstack query * chore: config * chore: resource * fix: remove logging * feat: add event listener for tabs * fix: fix class name and add toast * fix: utils and types * fix: sidepanel * revert * fix: build * fix: callstack behaviour * fix: do not throw error * chore: add build script * remove: unused * temp (wip) * fix: component * remove: alert * change: version 1.1 * fix: use es-meta organization * fix: style * fix: don't run content script if url is not supported * fix: new env * fix: use function syntax to use import meta * ifx: change resource to es-meta org style * bump: dependency * fix: use @wxt-dev/auto-icons * fix: match react 19 types * fix: use tailwind utility * fix: description * remove: unused * chore: add github workflow * chore: run formattor * fix: README * chore: bump dependency * fix: env * fix: vite version to avoid vulnerability * fix: icon * fix: typos
1 parent c4c7d34 commit 6db5533

File tree

99 files changed

+11017
-4741
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+11017
-4741
lines changed

.env

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
VITE_TEST262_RAW_URL = "https://raw.githubusercontent.com/tc39/test262/3a7a72aef5009eb22117231d40f9a5a66a9a595a/test"
2-
VITE_TEST262_URL = "https://github.com/tc39/test262/blob/3a7a72aef5009eb22117231d40f9a5a66a9a595a/test"
1+
VITE_TEST262_RAW_URL = "https://raw.githubusercontent.com/tc39/test262/3a7a72aef5009eb22117231d40f9a5a66a9a595a/test/"
2+
VITE_TEST262_URL = "https://github.com/tc39/test262/blob/3a7a72aef5009eb22117231d40f9a5a66a9a595a/test/"
33
VITE_DOUBLE_DEBUGGER_URL = "https://es-meta.github.io/playground"
4-
VITE_RESOURCE_URL = "https://raw.githubusercontent.com/ku-plrg/ecma-visualizer-resources/refs/heads/main"
5-
VITE_ESMETA_URL = "https://github.com/es-meta/esmeta"
6-
VITE_ECMAVISUALIZER_URL = "https://github.com/ku-plrg/ecma-visualizer"
4+
VITE_RESOURCE_URL = "https://raw.githubusercontent.com/es-meta/ecma-visualizer-resources/refs/heads/main/"
5+
VITE_EXTENSION_VERSION = "1.1"
6+
VITE_ESMETA_URL = "https://es-meta.github.io/"
7+
VITE_ESMETA_GITHUB_URL = "https://github.com/es-meta/esmeta"
78
VITE_ENABLED_SPEC_URL = "https://tc39.es/ecma262/2024|https://262.ecma-international.org/15.0"
89
VITE_DEBUG = "OFF"

.github/workflows/ci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v3
15+
16+
- name: Set up Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: "22"
20+
21+
- name: Install dependencies
22+
run: npm ci
23+
24+
- name: Run build
25+
run: npm run build
26+
27+
format-check:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout code
31+
uses: actions/checkout@v3
32+
33+
- name: Set up Node.js
34+
uses: actions/setup-node@v4
35+
with:
36+
node-version: "22"
37+
38+
- name: Install dependencies
39+
run: npm ci
40+
41+
- name: Run formatter
42+
run: npm run format
43+
44+
- name: Check for uncommitted changes (formatting)
45+
run: |
46+
git diff --exit-code || (echo "❌ Code is not properly formatted. Run 'npm run format' and commit the changes." && exit 1)

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,7 @@ dist-ssr
2222
*.njsproj
2323
*.sln
2424
*.sw?
25+
26+
.output/
27+
tsconfig.tsbuildinfo
28+
.wxt/

.prettierignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Ignore artifacts:
2+
# build
3+
# coverage
4+
*.html
5+
*.mdx
6+
public/**/*.json
7+
package-lock.json

.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"plugins": ["prettier-plugin-tailwindcss"],
33
"tailwindFunctions": ["clsx"]
4-
}
4+
}

README.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1+
[![Chrome Web Store](https://badgen.net/chrome-web-store/v/nlfpedidieegejndiikebcgclhggaocd)](https://chromewebstore.google.com/detail/nlfpedidieegejndiikebcgclhggaocd)
2+
13
# ECMAScript Visualizer
24

3-
**ECMAScript Visualizer** is a Chrome extension that provides example programs for each part of the ECMAScript/JavaScript specification [(ECMA-262)](https://tc39.es/ecma262). The example programs are served from [`ecma-visualizer-resources`](https://github.com/ku-plrg/ecma-visualizer-resources).
5+
**ECMAScript Visualizer** is a Chrome extension that provides example programs for each step of the ECMAScript/JavaScript specification [(ECMA-262)](https://tc39.es/ecma262), powered by [ESMeta](https://github.com/es-meta/esmeta).
46

5-
## Installation Guide
7+
## Manual Installation Guide
68

79
Download the repository and enter the directory:
810

911
```
10-
git clone https://github.com/ku-plrg/ecma-visualizer
12+
git clone https://github.com/es-meta/ecma-visualizer
1113
cd ecma-visualizer
1214
```
1315

@@ -24,10 +26,3 @@ And follow the instructions below to install the visualizer extension:
2426
3. Click the Load unpacked button and select the `ecma-visualizer/dist` directory.
2527

2628
The chrome extension currently works on ES2024 web page: https://tc39.es/ecma262/2024/.
27-
28-
## Chrome Extension Release Guide
29-
30-
1. Go to the [Chrome Developer Dashboard](https://chrome.google.com/webstore/devconsole)
31-
2. Sign in to the developer account
32-
3. Click the **Add new item** button
33-
4. Click **Choose file** > your zip file > **Upload**

assets/icon.png

172 KB
Loading

components.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
"hooks": "@/hooks"
1919
},
2020
"iconLibrary": "lucide"
21-
}
21+
}

entrypoints/background/index.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { Message } from "@/types/message";
2+
import { CUSTOM_IS_SUPPORTED } from "@/types/custom-event";
3+
4+
export default defineBackground(() => {
5+
browser.sidePanel.setPanelBehavior({ openPanelOnActionClick: true });
6+
7+
browser.tabs.onActivated.addListener(async (activeInfo) => {
8+
const tab = await browser.tabs.get(activeInfo.tabId);
9+
10+
browser.runtime.sendMessage({
11+
from: "background",
12+
targetWindowId: activeInfo.windowId,
13+
payload: {
14+
type: CUSTOM_IS_SUPPORTED,
15+
dataSupported: isUrlSupported(tab.url ?? ""),
16+
},
17+
} satisfies Message);
18+
});
19+
browser.tabs.onUpdated.addListener(async (tabId, changeInfo, tab) => {
20+
if (changeInfo.url) {
21+
browser.runtime.sendMessage({
22+
from: "background",
23+
targetWindowId: tab.windowId,
24+
payload: {
25+
type: CUSTOM_IS_SUPPORTED,
26+
dataSupported: isUrlSupported(changeInfo.url ?? ""),
27+
},
28+
} satisfies Message);
29+
}
30+
});
31+
});

entrypoints/content/constants.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
Follow algorithm extract logic of ESMeta
3+
*/
4+
export const VISID = "visId";
5+
export const VISDEFAULTSDO = "visDefaultSDO";
6+
export const MULTIPLEPROD = "multipleProd";
7+
8+
export const VISSTEP = "visStep";
9+
export const VISSDOSTEP = "visSDOStep";
10+
export const VISPRODUCTION = "visProduction";
11+
export const VISQM = "visQM";
12+
export const VISIF = "visIf";
13+
export const VISTHEN = "visThen";
14+
export const VISELSE = "visElse";
15+
export const VISCALL = "visCall";
16+
17+
export type SDOInfo = {
18+
defaultSDO: string;
19+
isMultipleProd: boolean;
20+
};

0 commit comments

Comments
 (0)