This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { AiMessages } from '../ai'; | |
import { ContentMessages } from '../content'; | |
export * from './copy-to-clipboard-formatted'; | |
export const delay = (value: number) => { | |
return new Promise((resolve) => { | |
setTimeout(() => { | |
resolve(undefined); | |
}, value); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const messageToBackground = (type, payload) => { | |
chrome.runtime.sendMessage({ | |
type, | |
payload, | |
}); | |
}; | |
const resendBackgroundMessages = () => { | |
window.addEventListener( | |
'message', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.addEventListener( | |
'message', | |
async (e) => { | |
if (e.data?.type === ContentMessages.UltraToneChange) { | |
tone = e.data?.payload?.tone?.prompt?.toLowerCase() || ''; | |
} | |
}, | |
false, | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const sendContentMessage = (type: ContentMessages | AiMessages, payload: any = {}) => { | |
parent.postMessage({ type, payload }, '*'); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const messageToInput = (type: ContentMessages, payload = {}) => { | |
getIframeInput()?.contentWindow?.postMessage({ type, payload }, '*'); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:root { | |
--ultra-bg-darker: #f9f9f9; | |
--ultra-bg-main: #ffffff; | |
--ultra-black-hover: #858585; | |
--ultra-black-keep: #0d0d0d; | |
--ultra-black-like: #0d0d0d; | |
--ultra-black-text: #0d0d0d; | |
--ultra-black: #5a5a5a; | |
--ultra-blue-disabled: #67b1e0; | |
--ultra-blue-focus: #0061f9; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--ultra-text-dark |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { CheckoutEmailAddress } from './checkout'; | |
import { Price } from './price'; | |
import { Merchandise } from './product'; | |
// Explanations https://shopify.dev/api/storefront/2022-04/objects/Order | |
export interface Order { | |
canceledAt?: string; | |
cancelReason?: string; | |
currencyCode: string; |
NewerOlder