| BEFORE | AFTER |
|---|---|
This file contains hidden or 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
| --- | |
| Clerk CLI vs Notion CLI Design: Key Differences | |
| Things you already do well (matching or exceeding Notion's guidelines) | |
| - Noun-verb structure -- you're already there (clerk users list, clerk apps create) | |
| - stdout vs stderr separation -- your log.data() / log.info() split is clean and enforced by lint rules | |
| - Non-TTY / agent mode -- your mode detection is actually more sophisticated than Notion's (explicit --mode flag, CLERK_MODE env var, auto-detection, structured JSON error | |
| output for agents) | |
| - Confirmation defaults -- destructive prompts default to false, --yes skips them. Matches exactly. |
This file contains hidden or 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
| /** | |
| * Wizard State Machine — Prototype | |
| * | |
| * Unified wizard primitive inspired by XState 5. Steps, guards, | |
| * sub-steps, and transitions are defined as static data. Guard | |
| * implementations are provided separately (like XState's `setup()`) | |
| * where they have access to React hooks and reactive state. | |
| * | |
| * The reducer handles pure navigation. Guards are resolved in the | |
| * hook layer before dispatching — keeping the reducer testable |
This file contains hidden or 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 { | |
| format as dateFnsFormat, | |
| formatDistanceToNow, | |
| isToday, | |
| isValid, | |
| isYesterday, | |
| parseISO, | |
| } from 'date-fns'; | |
| /** |
This file contains hidden or 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.autoDetectColorScheme": true, | |
| "workbench.colorTheme": "GitHub Dark", | |
| "workbench.preferredLightColorTheme": "GitHub Light", | |
| "workbench.preferredDarkColorTheme": "GitHub Dark", | |
| "workbench.tree.indent": 20, | |
| "editor.fontFamily": "JetBrains Mono NL, Menlo, Monaco, 'Courier New', monospace", | |
| "editor.fontSize": 16, | |
| "editor.tabSize": 2, | |
| "editor.cursorStyle": "block", |
This file contains hidden or 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 PropTypes from 'prop-types' | |
| import Link from 'next/link' | |
| | |
| // Checks against absolute URLs that share 👇 so | |
| // we can still pass it along to our internal link component | |
| const domainRegex = /http[s]*:\/\/[www.]*YOURDOMAIN\.com[/]?/ | |
| | |
| const TextLink = ({ href, ...rest }) => { | |
| const sameDomain = domainRegex.test(href) | |
| |
This file contains hidden or 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
| function useBoolean(initialState = false) { | |
| const [state, setState] = React.useState(initialState) | |
| const handlers = React.useMemo( | |
| () => ({ | |
| on: () => { | |
| setState(true) | |
| }, | |
| off: () => { | |
| setState(false) |
This file contains hidden or 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 container = { | |
| hidden: { opacity: 0 }, | |
| show: { | |
| opacity: 1, | |
| transition: { | |
| staggerChildren: 0.25, | |
| }, | |
| }, | |
| } |
This file contains hidden or 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
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| stable_website_preview_cherry_pick: | |
| runs-on: ubuntu-latest | |
| name: Cherry pick main to stable-website-preview branch | |
| steps: |
This file contains hidden or 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
| ####################################################################################################################################### | |
| ####################################################################################################################################### | |
| ####################################################################################################################################### | |
| ####################################################################################################################################### | |
| ####################################################################################################################################### | |
| ####################################################################################################################################### | |
| ########################################################################M@############################################################# | |
| #########################################################x############## |
NewerOlder