aboutsummaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorCodeTorso <[email protected]>2024-06-12 18:26:17 -0600
committerGitHub <[email protected]>2024-06-12 18:26:17 -0600
commitd376dd1519166ea9838d4bd9e168dc9873c675f3 (patch)
treefa98043032e1e2cc958fe774220175cab435239b /apps
parentMerge pull request #58 from CodeTorso/v2 (diff)
downloadsupermemory-d376dd1519166ea9838d4bd9e168dc9873c675f3.tar.xz
supermemory-d376dd1519166ea9838d4bd9e168dc9873c675f3.zip
Revert "Add code for extension"
Diffstat (limited to 'apps')
-rw-r--r--apps/an-extension/README.md37
-rw-r--r--apps/an-extension/background.ts25
-rw-r--r--apps/an-extension/content/ContentApp.tsx45
-rw-r--r--apps/an-extension/content/base.css3
-rw-r--r--apps/an-extension/content/content.css9
-rw-r--r--apps/an-extension/content/content.tsx15
-rw-r--r--apps/an-extension/extension-env.d.ts9
-rw-r--r--apps/an-extension/index.html11
-rw-r--r--apps/an-extension/manifest.json29
-rw-r--r--apps/an-extension/package.json20
-rw-r--r--apps/an-extension/postcss.config.js6
-rw-r--r--apps/an-extension/public/icon/logo(16).pngbin980 -> 0 bytes
-rw-r--r--apps/an-extension/public/icon/logo(48).pngbin2087 -> 0 bytes
-rw-r--r--apps/an-extension/tailwind.config.js9
-rw-r--r--apps/an-extension/tsconfig.json19
15 files changed, 0 insertions, 237 deletions
diff --git a/apps/an-extension/README.md b/apps/an-extension/README.md
deleted file mode 100644
index 6f11ddab..00000000
--- a/apps/an-extension/README.md
+++ /dev/null
@@ -1,37 +0,0 @@
-# an-extension
-
-> This project was bootstrapped using the Extension.js React-TypeScript template.
-
-## Scripts Available
-
-In the project directory, you can run:
-
-### npm dev
-
-```
-// Runs the app in the development mode.
-// Will open a new browser instance with your extension loaded.
-// The page will reload when you make changes.
-npm dev
-```
-
-### npm start
-
-```
-// Runs the app in the production mode.
-// Will open a new browser instance with your extension loaded.
-// This is how your browser extension will work once published.
-npm start
-```
-
-### npm build
-
-```
-// Builds the app for production.
-// Bundles your browser extension in production mode for the target browser.
-npm run build
-```
-
-## Learn More
-
-You can learn more in the [Extension.js](https://extension.js.org) documentation.
diff --git a/apps/an-extension/background.ts b/apps/an-extension/background.ts
deleted file mode 100644
index 4e453b95..00000000
--- a/apps/an-extension/background.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-chrome.runtime.onInstalled.addListener(function () {
- let context = 'selection';
- let title = "Supermemory - Save Highlight";
- chrome.contextMenus.create({
- title: title,
- contexts: ['selection'],
- id: context,
- });
-});
-
-chrome.contextMenus.onClicked.addListener(function (info, tab) {
- if (info.menuItemId === 'selection') {
- // you can add a link to a cf worker or whatever u want
- // fetch("", {
- // method: "POST",
- // headers: { "Content-Type": "application/json" },
- // body: JSON.stringify({
- // data: info.selectionText,
- // }),
- // });
-
- //so you first save it and then send the reponse to the screen
- chrome.tabs.sendMessage(tab?.id || 1, info.selectionText);
- }
-});
diff --git a/apps/an-extension/content/ContentApp.tsx b/apps/an-extension/content/ContentApp.tsx
deleted file mode 100644
index 45ca64b4..00000000
--- a/apps/an-extension/content/ContentApp.tsx
+++ /dev/null
@@ -1,45 +0,0 @@
-import React, { useEffect } from "react";
-
-export default function ContentApp() {
- const [text, setText] = React.useState("");
- const [hover, setHover] = React.useState(false);
-
- useEffect(() => {
- const messageListener = (message: any) => {
- setText(message);
- setTimeout(() => setText(""), 2000);
- };
- chrome.runtime.onMessage.addListener(messageListener);
-
- document.addEventListener('mousemove', (e)=> {
- const percentageX = (e.clientX / window.innerWidth) * 100;
- const percentageY = (e.clientY / window.innerHeight) * 100;
-
- if (percentageX > 75 && percentageY > 75){
- setHover(true)
- } else {
- setHover(false)
- }
- })
- return () => {
- chrome.runtime.onMessage.removeListener(messageListener);
- };
- }, []);
-
- return (
- <div className="pointer-events-none flex justify-end items-end h-screen w-full absolute z-99999">
- <div className="h-[30vh] absolute flex justify-end items-center">
- <div
- className={`${hover && "opacity-100 "} transition bg-red-600 opacity-0 h-12 w-12 `}
- ></div>
- </div>
-
- <div
- className={`mx-4 my-2 flex flex-col gap-3 rounded-3xl bg-gray-900 text-xl py-4 px-6 overflow-hidden min-w-[20vw] min-h-24 max-w-96 max-h-40 ${text ? "translate-y-0 opacity-100" : "translate-y-[15%] opacity-0"} transition`}
- >
- <h2 className="text-2xl font-extrabold text-white">Saved!</h2>
- <h2 className="text-lg font-medium text-white">{text}</h2>
- </div>
- </div>
- );
-} \ No newline at end of file
diff --git a/apps/an-extension/content/base.css b/apps/an-extension/content/base.css
deleted file mode 100644
index bd6213e1..00000000
--- a/apps/an-extension/content/base.css
+++ /dev/null
@@ -1,3 +0,0 @@
-@tailwind base;
-@tailwind components;
-@tailwind utilities; \ No newline at end of file
diff --git a/apps/an-extension/content/content.css b/apps/an-extension/content/content.css
deleted file mode 100644
index a860749f..00000000
--- a/apps/an-extension/content/content.css
+++ /dev/null
@@ -1,9 +0,0 @@
-#extension-root {
- pointer-events: none;
- position: fixed;
- top: 0;
- left: 0;
- height: 100vh;
- width: 100%;
- z-index: 999999;
-}
diff --git a/apps/an-extension/content/content.tsx b/apps/an-extension/content/content.tsx
deleted file mode 100644
index 17436ef2..00000000
--- a/apps/an-extension/content/content.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-import ReactDOM from 'react-dom/client'
-import ContentApp from './ContentApp'
-import('./base.css')
-import('./content.css')
-
-setTimeout(initial, 1000)
-
-function initial() {
- const rootDiv = document.createElement('div')
- rootDiv.id = 'extension-root'
- document.body.appendChild(rootDiv)
-
- const root = ReactDOM.createRoot(rootDiv)
- root.render(<><ContentApp /></>)
-}
diff --git a/apps/an-extension/extension-env.d.ts b/apps/an-extension/extension-env.d.ts
deleted file mode 100644
index 356fb729..00000000
--- a/apps/an-extension/extension-env.d.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-// Required Extension.js types for TypeScript projects.
-// This file auto-generated and should not be excluded.
-// If you need extra types, consider creating a new *.d.ts and
-// referencing it in the "include" array in your tsconfig.json file.
-// See https://www.typescriptlang.org/tsconfig#include for info.
-/// <reference types="@extension-create/develop/dist/types/index.d.ts" />
-
-// Polyfill types for browser.* APIs.
-/// <reference types="@extension-create/develop/dist/types/polyfill.d.ts" />
diff --git a/apps/an-extension/index.html b/apps/an-extension/index.html
deleted file mode 100644
index bb4c07c7..00000000
--- a/apps/an-extension/index.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>God Bless Vanilla JavaScript!!!</title>
-</head>
-<body>
- <h1>hello World! Follow <a href="https://x.com/supermemoryai">@supermemoryai</a></h1>
-</body>
-</html> \ No newline at end of file
diff --git a/apps/an-extension/manifest.json b/apps/an-extension/manifest.json
deleted file mode 100644
index 9c31c9c9..00000000
--- a/apps/an-extension/manifest.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "name": "Supermemory.ai-Extension",
- "description": "Uses the chrome.contextMenus API to customize the context menu.",
- "version": "0.1",
- "permissions": [
- "contextMenus"
- ],
- "manifest_version": 3,
- "action": {
- "default_popup": "index.html"
- },
- "background": {
- "service_worker": "./background.ts"
- },
- "content_scripts": [
- {
- "matches": [
- "<all_urls>"
- ],
- "js": [
- "./content/content.tsx"
- ]
- }
- ],
- "icons": {
- "16": "public/icon/logo(16).png",
- "48": "public/icon/logo(48).png"
- }
-} \ No newline at end of file
diff --git a/apps/an-extension/package.json b/apps/an-extension/package.json
deleted file mode 100644
index 3625295b..00000000
--- a/apps/an-extension/package.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "devDependencies": {
- "@types/react": "^18.0.9",
- "@types/react-dom": "^18.0.5",
- "react": "^18.1.0",
- "react-dom": "^18.1.0",
- "tailwindcss": "^3.4.1",
- "typescript": "5.3.3",
- "extension": "latest"
- },
- "scripts": {
- "dev": "extension dev",
- "start": "extension start",
- "build": "extension build"
- },
- "dependencies": {},
- "name": "an-extension",
- "private": true,
- "version": "0.0.0"
-} \ No newline at end of file
diff --git a/apps/an-extension/postcss.config.js b/apps/an-extension/postcss.config.js
deleted file mode 100644
index 85f717cc..00000000
--- a/apps/an-extension/postcss.config.js
+++ /dev/null
@@ -1,6 +0,0 @@
-module.exports = {
- plugins: {
- tailwindcss: {},
- autoprefixer: {}
- }
-}
diff --git a/apps/an-extension/public/icon/logo(16).png b/apps/an-extension/public/icon/logo(16).png
deleted file mode 100644
index 3c1610b0..00000000
--- a/apps/an-extension/public/icon/logo(16).png
+++ /dev/null
Binary files differ
diff --git a/apps/an-extension/public/icon/logo(48).png b/apps/an-extension/public/icon/logo(48).png
deleted file mode 100644
index de5a6d2e..00000000
--- a/apps/an-extension/public/icon/logo(48).png
+++ /dev/null
Binary files differ
diff --git a/apps/an-extension/tailwind.config.js b/apps/an-extension/tailwind.config.js
deleted file mode 100644
index 8ddba0a5..00000000
--- a/apps/an-extension/tailwind.config.js
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('tailwindcss').Config} */
-module.exports = {
- content: ['**/*.html', '**/*.tsx'],
- theme: {
- extend: {}
- },
- plugins: []
-}
-module.exports = require("@repo/tailwind-config/tailwind.config");
diff --git a/apps/an-extension/tsconfig.json b/apps/an-extension/tsconfig.json
deleted file mode 100644
index 4d9801e2..00000000
--- a/apps/an-extension/tsconfig.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "extends": "@repo/typescript-config/nextjs.json",
- "compilerOptions": {
- "allowJs": true,
- "allowSyntheticDefaultImports": true,
- "esModuleInterop": true,
- "forceConsistentCasingInFileNames": true,
- "isolatedModules": false,
- "jsx": "react-jsx",
- "lib": ["dom", "dom.iterable", "esnext"],
- "moduleResolution": "node",
- "module": "esnext",
- "resolveJsonModule": true,
- "strict": true,
- "target": "esnext"
- },
- "include": ["./"],
- "exclude": ["node_modules", "dist"]
-}