@hackersheet/next-document-content-components 0.1.0-alpha.34 → 0.1.0-alpha.36
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/code-block/code-block-header.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\n\nimport CodeBlockCopyButton from './code-block-copy-button';\n\nimport type { ReactNode } from 'react';\n\n
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/code-block/code-block-header.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\n\nimport CodeBlockCopyButton from './code-block-copy-button';\n\nimport type { ReactNode } from 'react';\n\n/**\n * Props for the CodeBlockHeader component.\n */\nexport type CodeBlockHeaderProps = {\n /** Icon element to display on the left side of the header. */\n icon: ReactNode;\n\n /** Optional filename to display in the center of the header. */\n filename?: string;\n\n /** Code string to be copied when the copy button is clicked. */\n code: string;\n\n /** Optional additional actions to display before the copy button. */\n actions?: ReactNode;\n};\n\n/**\n * A shared header component for code blocks and directory trees.\n *\n * Displays an icon, an optional filename, and a copy-to-clipboard button\n * in a consistent layout used across different code block variants.\n *\n * @param props - The component props\n * @param props.icon - Icon element to display on the left\n * @param props.filename - Optional filename to display in the center\n * @param props.code - Code string for the copy button\n * @param props.actions - Optional additional actions to display before copy button\n * @returns The rendered header element\n */\nexport default function CodeBlockHeader({ icon, filename, code, actions }: CodeBlockHeaderProps) {\n return (\n <div className=\"code-block-header\">\n <div>{icon}</div>\n <div className=\"code-block-filename\">{filename}</div>\n {actions && <div className=\"code-block-actions\">{actions}</div>}\n <div>\n <CodeBlockCopyButton code={code} />\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mBAAkB;AAElB,oCAAgC;AAkCjB,SAAR,gBAAiC,EAAE,MAAM,UAAU,MAAM,QAAQ,GAAyB;AAC/F,SACE,6BAAAA,QAAA,cAAC,SAAI,WAAU,uBACb,6BAAAA,QAAA,cAAC,aAAK,IAAK,GACX,6BAAAA,QAAA,cAAC,SAAI,WAAU,yBAAuB,QAAS,GAC9C,WAAW,6BAAAA,QAAA,cAAC,SAAI,WAAU,wBAAsB,OAAQ,GACzD,6BAAAA,QAAA,cAAC,aACC,6BAAAA,QAAA,cAAC,8BAAAC,SAAA,EAAoB,MAAY,CACnC,CACF;AAEJ;","names":["React","CodeBlockCopyButton"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/code-block/code-block-header.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\n\nimport CodeBlockCopyButton from \"./code-block-copy-button.mjs\";\n\nimport type { ReactNode } from 'react';\n\n
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/code-block/code-block-header.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\n\nimport CodeBlockCopyButton from \"./code-block-copy-button.mjs\";\n\nimport type { ReactNode } from 'react';\n\n/**\n * Props for the CodeBlockHeader component.\n */\nexport type CodeBlockHeaderProps = {\n /** Icon element to display on the left side of the header. */\n icon: ReactNode;\n\n /** Optional filename to display in the center of the header. */\n filename?: string;\n\n /** Code string to be copied when the copy button is clicked. */\n code: string;\n\n /** Optional additional actions to display before the copy button. */\n actions?: ReactNode;\n};\n\n/**\n * A shared header component for code blocks and directory trees.\n *\n * Displays an icon, an optional filename, and a copy-to-clipboard button\n * in a consistent layout used across different code block variants.\n *\n * @param props - The component props\n * @param props.icon - Icon element to display on the left\n * @param props.filename - Optional filename to display in the center\n * @param props.code - Code string for the copy button\n * @param props.actions - Optional additional actions to display before copy button\n * @returns The rendered header element\n */\nexport default function CodeBlockHeader({ icon, filename, code, actions }: CodeBlockHeaderProps) {\n return (\n <div className=\"code-block-header\">\n <div>{icon}</div>\n <div className=\"code-block-filename\">{filename}</div>\n {actions && <div className=\"code-block-actions\">{actions}</div>}\n <div>\n <CodeBlockCopyButton code={code} />\n </div>\n </div>\n );\n}\n"],"mappings":";AAEA,OAAO,WAAW;AAElB,OAAO,yBAAyB;AAkCjB,SAAR,gBAAiC,EAAE,MAAM,UAAU,MAAM,QAAQ,GAAyB;AAC/F,SACE,oCAAC,SAAI,WAAU,uBACb,oCAAC,aAAK,IAAK,GACX,oCAAC,SAAI,WAAU,yBAAuB,QAAS,GAC9C,WAAW,oCAAC,SAAI,WAAU,wBAAsB,OAAQ,GACzD,oCAAC,aACC,oCAAC,uBAAoB,MAAY,CACnC,CACF;AAEJ;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hackersheet/next-document-content-components",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.36",
|
|
4
4
|
"description": "Hacker Sheet document content components for Next.js",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"repository": {
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"react-icons": "^5.5.0",
|
|
33
33
|
"react-tweet": "^3.3.0",
|
|
34
34
|
"shiki": "^3.22.0",
|
|
35
|
-
"@hackersheet/
|
|
36
|
-
"@hackersheet/
|
|
35
|
+
"@hackersheet/react-document-content": "0.1.0-alpha.17",
|
|
36
|
+
"@hackersheet/core": "0.1.0-alpha.13"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/react": "^19.2.10",
|