Skip to content

Commit 2c3f2a0

Browse files
committed
Initial commit
0 parents  commit 2c3f2a0

File tree

197 files changed

+7895
-0
lines changed

Some content is hidden

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

197 files changed

+7895
-0
lines changed

.github/workflows/build.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build and Deploy Dom-Explorer
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout code
13+
uses: actions/[email protected]
14+
15+
- name: Set up Bun
16+
uses: oven-sh/setup-bun@v2
17+
18+
- name: Install dependencies
19+
run: bun install
20+
21+
- name: Build
22+
run: bun run build
23+
24+
- name: Upload GitHub Pages artifact
25+
uses: actions/[email protected]
26+
with:
27+
path: .output/public
28+
29+
deploy:
30+
runs-on: ubuntu-latest
31+
needs: build
32+
permissions:
33+
pages: write
34+
id-token: write
35+
environment:
36+
name: github-pages
37+
url: ${{ steps.deployment.outputs.page_url }}
38+
steps:
39+
- name: Deploy GitHub Pages site
40+
uses: actions/[email protected]

.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Nuxt dev/build outputs
2+
.output
3+
.data
4+
.nuxt
5+
.nitro
6+
.cache
7+
dist
8+
9+
# Node dependencies
10+
node_modules
11+
.angular
12+
13+
# Logs
14+
logs
15+
*.log
16+
17+
# Misc
18+
.DS_Store
19+
.fleet
20+
.idea
21+
22+
# Local env files
23+
.env
24+
.env.*
25+
!.env.example
26+
27+
*.local

.vscode/settings.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"files.exclude": {
3+
"**/.git": true,
4+
"**/.svn": true,
5+
"**/.hg": true,
6+
"**/CVS": true,
7+
"**/.DS_Store": true,
8+
"**/Thumbs.db": true,
9+
"**/node_modules": false,
10+
"**/.nuxt": false
11+
},
12+
"css.customData": [
13+
".vscode/tailwind.json"
14+
],
15+
"typescript.tsdk": "node_modules/typescript/lib",
16+
"liveServer.settings.port": 5501
17+
}

.vscode/tailwind.json

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"version": 1.1,
3+
"atDirectives": [
4+
{
5+
"name": "@tailwind",
6+
"description": "Use the `@tailwind` directive to insert Tailwind's `base`, `components`, `utilities` and `screens` styles into your CSS.",
7+
"references": [
8+
{
9+
"name": "Tailwind Documentation",
10+
"url": "https://tailwindcss.com/docs/functions-and-directives#tailwind"
11+
}
12+
]
13+
},
14+
{
15+
"name": "@apply",
16+
"description": "Use the `@apply` directive to inline any existing utility classes into your own custom CSS. This is useful when you find a common utility pattern in your HTML that you’d like to extract to a new component.",
17+
"references": [
18+
{
19+
"name": "Tailwind Documentation",
20+
"url": "https://tailwindcss.com/docs/functions-and-directives#apply"
21+
}
22+
]
23+
},
24+
{
25+
"name": "@responsive",
26+
"description": "You can generate responsive variants of your own classes by wrapping their definitions in the `@responsive` directive:\n```css\n@responsive {\n .alert {\n background-color: #E53E3E;\n }\n}\n```\n",
27+
"references": [
28+
{
29+
"name": "Tailwind Documentation",
30+
"url": "https://tailwindcss.com/docs/functions-and-directives#responsive"
31+
}
32+
]
33+
},
34+
{
35+
"name": "@screen",
36+
"description": "The `@screen` directive allows you to create media queries that reference your breakpoints by **name** instead of duplicating their values in your own CSS:\n```css\n@screen sm {\n /* ... */\n}\n```\n…gets transformed into this:\n```css\n@media (min-width: 640px) {\n /* ... */\n}\n```\n",
37+
"references": [
38+
{
39+
"name": "Tailwind Documentation",
40+
"url": "https://tailwindcss.com/docs/functions-and-directives#screen"
41+
}
42+
]
43+
},
44+
{
45+
"name": "@variants",
46+
"description": "Generate `hover`, `focus`, `active` and other **variants** of your own utilities by wrapping their definitions in the `@variants` directive:\n```css\n@variants hover, focus {\n .btn-brand {\n background-color: #3182CE;\n }\n}\n```\n",
47+
"references": [
48+
{
49+
"name": "Tailwind Documentation",
50+
"url": "https://tailwindcss.com/docs/functions-and-directives#variants"
51+
}
52+
]
53+
}
54+
]
55+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 BitK
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Dom-Explorer
2+
3+
Dom-Explorer is a web-based tool designed for testing various HTML parsers and sanitizers. It displays the results of each parser as a tree and allows users to create pipelines that chain multiple parsers to visualize the transformation of HTML at each step.
4+
5+
This repository contains the source code for the website published at: [Dom-Explorer Website](https://b-i-t-k.github.io/Dom-Explorer/).
6+
7+
## Features
8+
9+
- **Parser/Sanitizer Support:**
10+
- [Ammonia](https://github.com/rust-ammonia/ammonia)
11+
- [Angular](https://angular.io/)
12+
- [DomParser](https://developer.mozilla.org/en-US/docs/Web/API/DOMParser)
13+
- [DomPurify](https://github.com/cure53/DOMPurify)
14+
- [HighlightJs](https://highlightjs.org/)
15+
- [JsXss](https://jsxss.com/en/index.html)
16+
- [Parse5](https://github.com/inikulin/parse5)
17+
- [SafeValues](https://github.com/google/safevalues)
18+
- [SrcdocParser](https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/srcdoc)
19+
- [TemplateParser](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTemplateElement)
20+
21+
- **Tab Sync:**
22+
Synchronizes pipelines and HTML parsing across multiple browser tabs in real-time.
23+
24+
- **Embeddable Pipelines:**
25+
Users can embed pipelines into their websites as an iframe for others to interact with.
26+
27+
- **Presets:**
28+
Save commonly used pipelines for easy reuse.
29+
30+
- **Shareable URL:**
31+
Share pipelines by simply copying and pasting the URL. The state of the pipeline is embedded in the URL, making it easy to share with others.
32+
33+
## Getting Started
34+
35+
To get started with Dom-Explorer:
36+
37+
1. Clone the project and install dependencies:
38+
```bash
39+
git clone https://github.com/b-i-t-k/Dom-Explorer.git
40+
cd Dom-Explorer
41+
bun install
42+
```
43+
44+
2. Run the development server:
45+
```bash
46+
cd web
47+
bun run --bun dev
48+
```
49+
50+
## Contributing
51+
52+
Contributions are welcome! Feel free to open issues or submit pull requests to improve this tool.

app/app.vue

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<template>
2+
<div>
3+
<ClientOnly>
4+
<TooltipProvider>
5+
<NuxtLayout />
6+
</TooltipProvider>
7+
</ClientOnly>
8+
</div>
9+
</template>
10+
<script lang="ts" setup>
11+
import "./assets/style.css";
12+
import "highlight.js/styles/github-dark-dimmed.min.css"
13+
14+
</script>
15+
16+
<style lang="scss"></style>

app/assets/style.css

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;
4+
5+
@layer base {
6+
:root {
7+
/* Name: custom color palette
8+
Author: Ilias Ism
9+
URL: https://gradient.page */
10+
11+
/* CSS: .bg-gradient { background: var(--gradient) } */
12+
--gradient: linear-gradient(to top left,#000C40,#607D8B);
13+
--background: 243 100% 98.26%;
14+
--foreground: 243 10% 0.52%;
15+
16+
--muted: 243 10% 91.3%;
17+
--muted-foreground: 243 5% 41.3%;
18+
19+
--popover: 243 10% 91.3%;
20+
--popover-foreground: 243 10% 0.65%;
21+
22+
--card: 243 10% 91.3%;
23+
--card-foreground: 243 10% 0.65%;
24+
25+
--border: 243 15% 89.52%;
26+
--input: 243 15% 89.52%;
27+
28+
--primary: 243 100% 13%;
29+
--primary-foreground: 243 2% 91.3%;
30+
31+
--secondary: 243 5% 73.9%;
32+
--secondary-foreground: 243 7% 11.3%;
33+
34+
--accent: 243 5% 73.9%;
35+
--accent-foreground: 243 7% 11.3%;
36+
37+
--destructive: 0 84.2% 60.2%;
38+
--destructive-foreground: 0 0% 98%;
39+
40+
--ring: 243 100% 13%;
41+
42+
--radius: 0.5rem;
43+
44+
45+
/* Name: custom color palette
46+
Author: Ilias Ism
47+
URL: https://gradient.page */
48+
49+
/* CSS: .bg-gradient { background: var(--gradient) } */
50+
--gradient: linear-gradient(to top left, #3a6186, #89253e);
51+
52+
--background: 222 26% 3.04%;
53+
--foreground: 222 4% 96.9%;
54+
55+
--muted: 222 20% 11.4%;
56+
--muted-foreground: 222 4% 53.8%;
57+
58+
--popover: 222 57% 4.94%;
59+
--popover-foreground: 222 4% 96.9%;
60+
61+
--card: 222 57% 4.94%;
62+
--card-foreground: 222 4% 96.9%;
63+
64+
--border: 222 20% 11.4%;
65+
--input: 222 20% 11.4%;
66+
67+
--primary: 222 40% 38%;
68+
--primary-foreground: 222 4% 96.9%;
69+
70+
--secondary: 222 20% 11.4%;
71+
--secondary-foreground: 222 4% 96.9%;
72+
73+
--accent: 222 20% 11.4%;
74+
--accent-foreground: 222 4% 96.9%;
75+
76+
--destructive: 0 62.8% 30.6%;
77+
--destructive-foreground: 222 4% 96.9%;
78+
79+
--ring: 222 40% 38%;
80+
}
81+
}
82+
83+
@layer base {
84+
[class*="border"] {
85+
@apply border-border;
86+
}
87+
}
88+
89+
html {
90+
@apply bg-black text-foreground;
91+
}

0 commit comments

Comments
 (0)