doccupine 0.0.35 → 0.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -699,6 +699,7 @@ import configData from "@/config.json";
|
|
|
699
699
|
|
|
700
700
|
interface Config {
|
|
701
701
|
name?: string;
|
|
702
|
+
description?: string;
|
|
702
703
|
icon?: string;
|
|
703
704
|
preview?: string;
|
|
704
705
|
}
|
|
@@ -742,8 +743,8 @@ export default function Page() {
|
|
|
742
743
|
description: frontmatter.description || "",
|
|
743
744
|
categoryOrder: frontmatter.categoryOrder || 0,
|
|
744
745
|
order: frontmatter.order || 0,
|
|
745
|
-
icon: frontmatter.icon
|
|
746
|
-
image: frontmatter.image
|
|
746
|
+
icon: frontmatter.icon,
|
|
747
|
+
image: frontmatter.image,
|
|
747
748
|
};
|
|
748
749
|
}
|
|
749
750
|
}
|
|
@@ -753,6 +754,7 @@ import configData from "@/config.json";
|
|
|
753
754
|
|
|
754
755
|
interface Config {
|
|
755
756
|
name?: string;
|
|
757
|
+
description?: string;
|
|
756
758
|
icon?: string;
|
|
757
759
|
preview?: string;
|
|
758
760
|
}
|
|
@@ -773,13 +775,13 @@ ${indexMDX
|
|
|
773
775
|
},
|
|
774
776
|
};`
|
|
775
777
|
: `export const metadata: Metadata = {
|
|
776
|
-
title: "Doccupine"
|
|
777
|
-
description: "Generated with Doccupine"
|
|
778
|
-
icons: "https://doccupine.com/favicon.ico"
|
|
778
|
+
title: \`\${config.name || "Doccupine"}\`,
|
|
779
|
+
description: \`\${config.description || "Generated with Doccupine"}\`,
|
|
780
|
+
icons: \`\${config.icon || "https://doccupine.com/favicon.ico"}\`,
|
|
779
781
|
openGraph: {
|
|
780
|
-
title: "Doccupine"
|
|
781
|
-
description: "Generated with Doccupine"
|
|
782
|
-
images: "https://doccupine.com/preview.png"
|
|
782
|
+
title: \`\${config.name || "Doccupine"}\`,
|
|
783
|
+
description: \`\${config.description || "Generated with Doccupine"}\`,
|
|
784
|
+
images: \`\${config.preview || "https://doccupine.com/preview.png"}\`,
|
|
783
785
|
},
|
|
784
786
|
};`}
|
|
785
787
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const actionBarTemplate = "\"use client\";\nimport { useContext, useState } from \"react\";\nimport styled, { css } from \"styled-components\";\nimport { Icon } from \"@/components/layout/Icon\";\nimport { mq, Theme } from \"@/app/theme\";\nimport { rgba } from \"polished\";\nimport { resetButton, Textarea } from \"cherry-styled-components/src/lib\";\nimport { ChatContext } from \"@/components/Chat\";\nimport links from \"@/links.json\";\n\ninterface ActionBarProps {\n children: React.ReactNode;\n content: string;\n}\n\nconst StyledActionBar = styled.div<{\n theme: Theme;\n $isChatOpen?: boolean;\n $hasLinks?: boolean;\n}>`\n position: absolute;\n border-bottom: solid 1px ${({ theme }) => theme.colors.grayLight};\n left: 0;\n padding: 70px 20px 20px 20px;\n display: flex;\n justify-content: space-between;\n width: 100%;\n transition: all 0.3s ease;\n\n ${({ $hasLinks }) =>\n $hasLinks &&\n css`\n margin-top: 49px;\n `}\n\n ${mq(\"lg\")} {\n left: 50%;\n transform: translateX(-50%);\n max-width: calc(100vw - 640px);\n width: 100%;\n padding: 0 20px 20px 20px;\n margin: 0;\n\n ${({ $hasLinks }) =>\n $hasLinks &&\n css`\n margin-top: 73px;\n `}\n\n ${({ $isChatOpen }) =>\n $isChatOpen &&\n css`\n padding: 0 120px 20px 20px;\n `}\n }\n`;\n\nconst StyledActionBarContent = styled.div`\n margin: auto 0;\n`;\n\nconst StyledCopyButton = styled.button<{ theme: Theme; $copied: boolean }>`\n background: transparent;\n border: solid 1px\n ${({ theme, $copied }) =>\n $copied ? theme.colors.success : theme.colors.grayLight};\n color: ${({ theme, $copied }) =>\n $copied ? theme.colors.success : theme.colors.primary};\n border-radius: ${({ theme }) => theme.spacing.radius.xs};\n padding: 6px 8px;\n font-size: 12px;\n font-family: inherit;\n font-weight: 600;\n cursor: pointer;\n transition: all 0.2s ease;\n display: flex;\n align-items: center;\n gap: 6px;\n margin-right: -6px;\n\n & svg.lucide {\n color: ${({ theme, $copied }) =>\n $copied ? theme.colors.success : theme.colors.primary};\n }\n\n &:hover {\n border-color: ${({ theme, $copied }) =>\n $copied ? theme.colors.success : theme.colors.primary};\n }\n\n &:active {\n transform: scale(0.95);\n }\n`;\n\nconst StyledToggle = styled.button<{ theme: Theme; $isActive?: boolean }>`\n ${resetButton}\n width: 56px;\n height: 32px;\n border-radius: 30px;\n display: flex;\n position: relative;\n margin: auto 0;\n transform: scale(1);\n background: ${({ theme }) => theme.colors.light};\n border: solid 1px ${({ theme }) => theme.colors.grayLight};\n\n &::after {\n content: \"\";\n position: absolute;\n top: 3px;\n left: 3px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n background: ${({ theme }) => rgba(theme.colors.primaryLight, 0.2)};\n transition: all 0.3s ease;\n z-index: 1;\n ${({ $isActive }) =>\n !$isActive &&\n css`\n transform: translateX(24px);\n `}\n }\n\n & svg {\n width: 16px;\n height: 16px;\n object-fit: contain;\n margin: auto;\n transition: all 0.3s ease;\n position: relative;\n z-index: 2;\n }\n\n & .lucide-eye {\n transform: translateX(1px);\n }\n\n & .lucide-code-xml {\n transform: translateX(-1px);\n }\n\n & svg[stroke] {\n stroke: ${({ theme }) => theme.colors.primary};\n }\n\n &:hover {\n transform: scale(1.05);\n color: ${({ theme }) =>\n theme.isDark ? theme.colors.primaryLight : theme.colors.primaryDark};\n\n & svg[stroke] {\n stroke: ${({ theme }) =>\n theme.isDark ? theme.colors.primaryLight : theme.colors.primaryDark};\n }\n }\n\n &:active {\n transform: scale(0.97);\n }\n`;\n\nconst StyledContent = styled.div<{\n theme: Theme;\n $isChatActive?: boolean;\n $isChatOpen?: boolean;\n $hasLinks?: boolean;\n}>`\n padding-top: 140px;\n transition: all 0.3s ease;\n\n ${({ $hasLinks }) =>\n $hasLinks &&\n css`\n padding-top: calc(49px + 140px);\n `}\n\n ${mq(\"lg\")} {\n padding-top: 70px;\n\n ${({ $hasLinks }) =>\n $hasLinks &&\n css`\n padding-top: calc(73px + 70px);\n `}\n\n ${({ $isChatActive }) =>\n $isChatActive &&\n css`\n padding-top: 140px;\n `}\n\n ${({ $isChatOpen, $isChatActive }) =>\n $isChatOpen &&\n $isChatActive &&\n css`\n padding-top: 70px;\n `}\n\n ${({ $isChatActive, $hasLinks }) =>\n $isChatActive &&\n $hasLinks &&\n css`\n padding-top: calc(73px + 140px);\n `}\n }\n\n & textarea {\n max-width: 640px;\n margin: auto;\n width: 100%;\n height: 100%;\n min-height: calc(100vh - 180px);\n\n ${({ $hasLinks }) =>\n $hasLinks &&\n css`\n min-height: calc(100vh - 229px);\n `}\n\n ${({ $isChatOpen, $isChatActive, $hasLinks }) =>\n !$isChatOpen &&\n $isChatActive &&\n css`\n min-height: calc(100vh - 250px);\n\n ${$hasLinks &&\n css`\n min-height: calc(100vh - 299px);\n `}\n `}\n\n ${mq(\"lg\")} {\n min-height: calc(100vh - 110px);\n\n ${({ $hasLinks }) =>\n $hasLinks &&\n css`\n min-height: calc(100vh - 183px);\n `}\n\n ${({ $isChatOpen, $isChatActive, $hasLinks }) =>\n !$isChatOpen &&\n $isChatActive &&\n css`\n min-height: calc(100vh - 180px);\n\n ${$hasLinks &&\n css`\n min-height: calc(100vh - 253px);\n `}\n `}\n }\n }\n`;\n\nfunction ActionBar({ children, content }: ActionBarProps) {\n const [isView, setIsView] = useState(true);\n const [copied, setCopied] = useState(false);\n const { isOpen, isChatActive } = useContext(ChatContext);\n\n const handleCopyContent = async () => {\n try {\n await navigator.clipboard.writeText(content);\n setCopied(true);\n setTimeout(() => setCopied(false), 2000);\n } catch (err) {\n console.error(\"Failed to copy:\", err);\n }\n };\n\n return (\n <>\n <StyledActionBar $isChatOpen={isOpen} $hasLinks={links.length > 0}>\n <StyledCopyButton onClick={handleCopyContent} $copied={copied}>\n {copied ? (\n <>\n <Icon name=\"check\" size={16} />\n <span>Copied!</span>\n </>\n ) : (\n <>\n <Icon name=\"copy\" size={16} />\n <span>Copy Content</span>\n </>\n )}\n </StyledCopyButton>\n <StyledActionBarContent>\n <StyledToggle\n onClick={() => setIsView(!isView)}\n aria-label=\"Toggle Theme\"\n $isActive={isView}\n >\n <Icon name=\"Eye\" />\n <Icon name=\"CodeXml\" />\n </StyledToggle>\n </StyledActionBarContent>\n </StyledActionBar>\n {isView && (\n <StyledContent\n $isChatActive={isChatActive}\n $isChatOpen={isOpen}\n $hasLinks={links.length > 0}\n >\n {children}\n </StyledContent>\n )}\n {!isView && (\n <StyledContent\n $isChatActive={isChatActive}\n $isChatOpen={isOpen}\n $hasLinks={links.length > 0}\n >\n <Textarea defaultValue={content} $fullWidth />\n </StyledContent>\n )}\n </>\n );\n}\n\nexport { ActionBar };\n";
|
|
1
|
+
export declare const actionBarTemplate = "\"use client\";\nimport { useContext, useState } from \"react\";\nimport styled, { css } from \"styled-components\";\nimport { Icon } from \"@/components/layout/Icon\";\nimport { mq, Theme } from \"@/app/theme\";\nimport { rgba } from \"polished\";\nimport { resetButton, Textarea } from \"cherry-styled-components/src/lib\";\nimport { ChatContext } from \"@/components/Chat\";\nimport links from \"@/links.json\";\n\ninterface ActionBarProps {\n children: React.ReactNode;\n content: string;\n}\n\nconst StyledActionBar = styled.div<{\n theme: Theme;\n $isChatOpen?: boolean;\n $hasLinks?: boolean;\n}>`\n position: absolute;\n border-bottom: solid 1px ${({ theme }) => theme.colors.grayLight};\n left: 0;\n padding: 70px 20px 20px 20px;\n display: flex;\n justify-content: space-between;\n width: 100%;\n transition: all 0.3s ease;\n\n ${({ $hasLinks }) =>\n $hasLinks &&\n css`\n margin-top: 49px;\n `}\n\n ${mq(\"lg\")} {\n left: 50%;\n transform: translateX(-50%);\n max-width: calc(100vw - 640px);\n width: 100%;\n padding: 0 20px 20px 20px;\n margin: 0;\n\n ${({ $hasLinks }) =>\n $hasLinks &&\n css`\n margin-top: 73px;\n `}\n\n ${({ $isChatOpen }) =>\n $isChatOpen &&\n css`\n padding: 0 120px 20px 20px;\n `}\n }\n`;\n\nconst StyledActionBarContent = styled.div`\n margin: auto 0;\n`;\n\nconst StyledCopyButton = styled.button<{ theme: Theme; $copied: boolean }>`\n background: transparent;\n border: solid 1px\n ${({ theme, $copied }) =>\n $copied ? theme.colors.success : theme.colors.grayLight};\n color: ${({ theme, $copied }) =>\n $copied ? theme.colors.success : theme.colors.primary};\n border-radius: ${({ theme }) => theme.spacing.radius.xs};\n padding: 6px 8px;\n font-size: 12px;\n font-family: inherit;\n font-weight: 600;\n cursor: pointer;\n transition: all 0.2s ease;\n display: flex;\n align-items: center;\n gap: 6px;\n margin-right: -6px;\n\n & svg.lucide {\n color: ${({ theme, $copied }) =>\n $copied ? theme.colors.success : theme.colors.primary};\n }\n\n &:hover {\n border-color: ${({ theme, $copied }) =>\n $copied ? theme.colors.success : theme.colors.primary};\n }\n\n &:active {\n transform: scale(0.95);\n }\n`;\n\nconst StyledToggle = styled.button<{ theme: Theme; $isActive?: boolean }>`\n ${resetButton}\n width: 56px;\n height: 32px;\n border-radius: 30px;\n display: flex;\n position: relative;\n margin: auto 0;\n transform: scale(1);\n background: ${({ theme }) => theme.colors.light};\n border: solid 1px ${({ theme }) => theme.colors.grayLight};\n\n &::after {\n content: \"\";\n position: absolute;\n top: 3px;\n left: 3px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n background: ${({ theme }) => rgba(theme.colors.primaryLight, 0.2)};\n transition: all 0.3s ease;\n z-index: 1;\n ${({ $isActive }) =>\n !$isActive &&\n css`\n transform: translateX(24px);\n `}\n }\n\n & svg {\n width: 16px;\n height: 16px;\n object-fit: contain;\n margin: auto;\n transition: all 0.3s ease;\n position: relative;\n z-index: 2;\n }\n\n & .lucide-eye {\n transform: translateX(1px);\n }\n\n & .lucide-code-xml {\n transform: translateX(-1px);\n }\n\n & svg[stroke] {\n stroke: ${({ theme }) => theme.colors.primary};\n }\n\n &:hover {\n transform: scale(1.05);\n color: ${({ theme }) =>\n theme.isDark ? theme.colors.primaryLight : theme.colors.primaryDark};\n\n & svg[stroke] {\n stroke: ${({ theme }) =>\n theme.isDark ? theme.colors.primaryLight : theme.colors.primaryDark};\n }\n }\n\n &:active {\n transform: scale(0.97);\n }\n`;\n\nconst StyledContent = styled.div<{\n theme: Theme;\n $isChatActive?: boolean;\n $isChatOpen?: boolean;\n $hasLinks?: boolean;\n}>`\n padding-top: 140px;\n transition: all 0.3s ease;\n\n ${({ $hasLinks }) =>\n $hasLinks &&\n css`\n padding-top: calc(49px + 140px);\n `}\n\n ${mq(\"lg\")} {\n padding-top: 70px;\n\n ${({ $hasLinks }) =>\n $hasLinks &&\n css`\n padding-top: calc(73px + 70px);\n `}\n\n ${({ $isChatActive }) =>\n $isChatActive &&\n css`\n padding-top: 140px;\n `}\n\n ${({ $isChatOpen, $isChatActive }) =>\n $isChatOpen &&\n $isChatActive &&\n css`\n padding-top: 70px;\n `}\n\n ${({ $isChatActive, $hasLinks, $isChatOpen }) =>\n $isChatActive &&\n $hasLinks &&\n css`\n padding-top: calc(73px + 140px);\n\n ${$isChatOpen &&\n css`\n padding-top: calc(73px + 70px);\n `}\n `}\n }\n\n & textarea {\n max-width: 640px;\n margin: auto;\n width: 100%;\n height: 100%;\n min-height: calc(100vh - 180px);\n\n ${({ $hasLinks }) =>\n $hasLinks &&\n css`\n min-height: calc(100vh - 229px);\n `}\n\n ${({ $isChatOpen, $isChatActive, $hasLinks }) =>\n !$isChatOpen &&\n $isChatActive &&\n css`\n min-height: calc(100vh - 250px);\n\n ${$hasLinks &&\n css`\n min-height: calc(100vh - 299px);\n `}\n `}\n\n ${mq(\"lg\")} {\n min-height: calc(100vh - 110px);\n\n ${({ $hasLinks }) =>\n $hasLinks &&\n css`\n min-height: calc(100vh - 183px);\n `}\n\n ${({ $isChatOpen, $isChatActive, $hasLinks }) =>\n !$isChatOpen &&\n $isChatActive &&\n css`\n min-height: calc(100vh - 180px);\n\n ${$hasLinks &&\n css`\n min-height: calc(100vh - 253px);\n `}\n `}\n }\n }\n`;\n\nfunction ActionBar({ children, content }: ActionBarProps) {\n const [isView, setIsView] = useState(true);\n const [copied, setCopied] = useState(false);\n const { isOpen, isChatActive } = useContext(ChatContext);\n\n const handleCopyContent = async () => {\n try {\n await navigator.clipboard.writeText(content);\n setCopied(true);\n setTimeout(() => setCopied(false), 2000);\n } catch (err) {\n console.error(\"Failed to copy:\", err);\n }\n };\n\n return (\n <>\n <StyledActionBar $isChatOpen={isOpen} $hasLinks={links.length > 0}>\n <StyledCopyButton onClick={handleCopyContent} $copied={copied}>\n {copied ? (\n <>\n <Icon name=\"check\" size={16} />\n <span>Copied!</span>\n </>\n ) : (\n <>\n <Icon name=\"copy\" size={16} />\n <span>Copy Content</span>\n </>\n )}\n </StyledCopyButton>\n <StyledActionBarContent>\n <StyledToggle\n onClick={() => setIsView(!isView)}\n aria-label=\"Toggle Theme\"\n $isActive={isView}\n >\n <Icon name=\"Eye\" />\n <Icon name=\"CodeXml\" />\n </StyledToggle>\n </StyledActionBarContent>\n </StyledActionBar>\n {isView && (\n <StyledContent\n $isChatActive={isChatActive}\n $isChatOpen={isOpen}\n $hasLinks={links.length > 0}\n >\n {children}\n </StyledContent>\n )}\n {!isView && (\n <StyledContent\n $isChatActive={isChatActive}\n $isChatOpen={isOpen}\n $hasLinks={links.length > 0}\n >\n <Textarea defaultValue={content} $fullWidth />\n </StyledContent>\n )}\n </>\n );\n}\n\nexport { ActionBar };\n";
|
|
@@ -198,11 +198,16 @@ const StyledContent = styled.div<{
|
|
|
198
198
|
padding-top: 70px;
|
|
199
199
|
\`}
|
|
200
200
|
|
|
201
|
-
\${({ $isChatActive, $hasLinks }) =>
|
|
201
|
+
\${({ $isChatActive, $hasLinks, $isChatOpen }) =>
|
|
202
202
|
$isChatActive &&
|
|
203
203
|
$hasLinks &&
|
|
204
204
|
css\`
|
|
205
205
|
padding-top: calc(73px + 140px);
|
|
206
|
+
|
|
207
|
+
\${$isChatOpen &&
|
|
208
|
+
css\`
|
|
209
|
+
padding-top: calc(73px + 70px);
|
|
210
|
+
\`}
|
|
206
211
|
\`}
|
|
207
212
|
}
|
|
208
213
|
|
|
@@ -24,7 +24,7 @@ export const packageJsonTemplate = JSON.stringify({
|
|
|
24
24
|
"@types/react": "^19",
|
|
25
25
|
"@types/react-dom": "^19",
|
|
26
26
|
"baseline-browser-mapping": "^2.9.19",
|
|
27
|
-
"cherry-styled-components": "^0.1.
|
|
27
|
+
"cherry-styled-components": "^0.1.7",
|
|
28
28
|
eslint: "^9",
|
|
29
29
|
"eslint-config-next": "16.1.6",
|
|
30
30
|
"lucide-react": "^0.563.0",
|
|
@@ -35,7 +35,7 @@ export const packageJsonTemplate = JSON.stringify({
|
|
|
35
35
|
"rehype-parse": "^9.0.1",
|
|
36
36
|
"rehype-stringify": "^10.0.1",
|
|
37
37
|
"remark-gfm": "^4.0.1",
|
|
38
|
-
"styled-components": "^6.3.
|
|
38
|
+
"styled-components": "^6.3.9",
|
|
39
39
|
typescript: "^5",
|
|
40
40
|
unified: "^11.0.5",
|
|
41
41
|
zod: "^4.3.6",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "doccupine",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.37",
|
|
4
4
|
"description": "Document management system that allows you to store, organize, and share your documentation with ease. AI-ready.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/chokidar": "^2.1.7",
|
|
46
46
|
"@types/fs-extra": "^11.0.4",
|
|
47
|
-
"@types/node": "^25.2.
|
|
47
|
+
"@types/node": "^25.2.2",
|
|
48
48
|
"@types/prompts": "^2.4.9",
|
|
49
49
|
"typescript": "^5.9.3"
|
|
50
50
|
},
|