├── .editorconfig
├── .eslintignore
├── .eslintrc.js
├── .gitattributes
├── .github
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── FUNDING.yml
├── ISSUE_TEMPLATE
│ └── BUG_REPORT.yaml
└── workflows
│ └── main.yml
├── .gitignore
├── .husky
└── pre-commit
├── .npmrc
├── .nvmrc
├── .prettierrc.js
├── .release-it.json
├── .vscode
└── extensions.json
├── CHANGELOG.md
├── LICENSE.md
├── README.md
├── dist
├── plugin
│ ├── VCodeBlock.vue.d.ts
│ ├── components
│ │ └── StatusIcons.vue.d.ts
│ ├── composables
│ │ ├── classes.d.ts
│ │ ├── helpers.d.ts
│ │ └── styles.d.ts
│ ├── index.d.ts
│ ├── themes
│ │ └── index.d.ts
│ ├── types
│ │ └── index.d.ts
│ └── utils
│ │ ├── globals.d.ts
│ │ └── props.d.ts
├── scss
│ ├── README.md
│ ├── cssVariables.css
│ ├── main.scss
│ ├── themeStyles.scss
│ └── utilities.scss
├── vue-code-block.cjs.js
└── vue-code-block.es.js
├── index.html
├── package.json
├── playground
└── index.html
├── pnpm-lock.yaml
├── public
├── assets
│ ├── brown-papersq.png
│ ├── pojoaque.jpg
│ └── vue.svg
├── brown-papersq.png
├── pojoaque.jpg
└── vue.svg
├── src
├── App.vue
├── assets
│ ├── brown-papersq.png
│ ├── pojoaque.jpg
│ └── vue.svg
├── documentation
│ ├── DocsPage.vue
│ ├── components
│ │ ├── MenuComponent.vue
│ │ ├── PropsTable.vue
│ │ ├── ThemeSelectComponent.vue
│ │ ├── examples
│ │ │ ├── AdditionalLangExamples.vue
│ │ │ ├── BrowserWindowExamples.vue
│ │ │ ├── ButtonExamples.vue
│ │ │ ├── LangExamples.vue
│ │ │ ├── OtherExamples.vue
│ │ │ ├── PluginExamples.vue
│ │ │ ├── TabExamples.vue
│ │ │ └── index.ts
│ │ └── index.js
│ ├── layout
│ │ └── AppBar.vue
│ └── sections
│ │ ├── DependenciesSection.vue
│ │ ├── DescriptionSection.vue
│ │ ├── EventsSection.vue
│ │ ├── ExampleSection.vue
│ │ ├── LegalSection.vue
│ │ ├── LicenseSection.vue
│ │ ├── PlaygroundSection.vue
│ │ ├── PropsSection.vue
│ │ ├── SlotsSection.vue
│ │ ├── UsageSection.vue
│ │ └── index.js
├── libraries
│ └── fontawesome.ts
├── main.ts
├── playground
│ ├── .gitignore
│ └── configs
│ │ ├── PlaygroundApp.vue
│ │ ├── build.sh
│ │ ├── database.json
│ │ ├── playground.ts
│ │ └── templates
│ │ ├── PlaygroundPage.ts.vue
│ │ └── PlaygroundPage.vue
├── plugin
│ ├── VCodeBlock.vue
│ ├── __tests__
│ │ ├── VCodeBlock.test.ts
│ │ ├── __snapshots__
│ │ │ └── VCodeBlock.test.ts.snap
│ │ └── index.test.ts
│ ├── components
│ │ ├── StatusIcons.vue
│ │ └── __tests__
│ │ │ ├── StatusIcons.test.ts
│ │ │ └── __snapshots__
│ │ │ └── StatusIcons.test.ts.snap
│ ├── composables
│ │ ├── __tests__
│ │ │ ├── __snapshots__
│ │ │ │ ├── classes.test.ts.snap
│ │ │ │ └── styles.test.ts.snap
│ │ │ ├── classes.test.ts
│ │ │ ├── helpers.test.ts
│ │ │ └── styles.test.ts
│ │ ├── classes.ts
│ │ ├── helpers.ts
│ │ └── styles.ts
│ ├── index.ts
│ ├── styles
│ │ ├── README.md
│ │ ├── cssVariables.css
│ │ ├── main.scss
│ │ ├── themeStyles.scss
│ │ └── utilities.scss
│ ├── themes
│ │ ├── css
│ │ │ ├── highlight-template.css
│ │ │ ├── min
│ │ │ │ ├── highlight-template.css
│ │ │ │ ├── neon-bunny-carrot-highlight.css
│ │ │ │ ├── neon-bunny-carrot-prism.css
│ │ │ │ ├── neon-bunny-highlight.css
│ │ │ │ └── neon-bunny-prism.css
│ │ │ ├── neon-bunny-carrot-highlight.css
│ │ │ ├── neon-bunny-carrot-prism.css
│ │ │ ├── neon-bunny-highlight.css
│ │ │ └── neon-bunny-prism.css
│ │ ├── index.ts
│ │ └── scss
│ │ │ ├── highlight-template.scss
│ │ │ ├── neon-bunny-carrot-highlight.scss
│ │ │ ├── neon-bunny-carrot-prism.scss
│ │ │ ├── neon-bunny-highlight.scss
│ │ │ └── neon-bunny-prism.scss
│ ├── types
│ │ ├── auto-imports.d.ts
│ │ ├── index.ts
│ │ ├── vite-env.d.ts
│ │ └── vue-shim.d.ts
│ └── utils
│ │ ├── globals.ts
│ │ └── props.ts
├── plugins
│ ├── index.ts
│ ├── theme.ts
│ ├── vuetify.ts
│ └── webfontloader.ts
├── stores
│ ├── index.ts
│ ├── menu.ts
│ └── props.ts
└── vite-env.d.ts
├── stylelint.config.js
├── tsconfig.dist.json
├── tsconfig.json
├── tsconfig.node.json
├── vite.build.config.mts
├── vite.config.mts
└── vitest.config.mts
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | end_of_line = lf
6 | indent_size = 4
7 | indent_style = tab
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | trim_trailing_whitespace = false
13 |
14 | [*.{yml,yaml}]
15 | indent_size = 2
16 |
17 | [*.{js,ts,mts,vue}]
18 | indent_size = 2
19 | indent_style = tab
20 |
21 | [*.{scss,css}]
22 | indent_size = 2
23 | indent_style = space
24 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | # don't ever lint node_modules
2 | node_modules
3 | # don't lint build output (make sure it's set to your correct build folder name)
4 | dist
5 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | env: {
3 | browser: true,
4 | node: true,
5 | },
6 | extends: [
7 | 'eslint:recommended',
8 | 'plugin:vue/essential',
9 | "@vue/typescript/recommended",
10 | "prettier",
11 | ],
12 | ignorePatterns: [
13 | '.eslintrc.js',
14 | 'stylelint.config.js',
15 | 'vite.build.config.mts',
16 | 'vite.config.mts',
17 | '*.bk.vue',
18 | ],
19 | overrides: [
20 | {
21 | files: [
22 | '**/*.spec.{j,t}s?(x)',
23 | ],
24 | env: {
25 | jest: true,
26 | },
27 | },
28 | ],
29 | globals: {
30 | Entry: true,
31 | loadLanguages: true,
32 | Prism: true,
33 | },
34 | parserOptions: {
35 | parser: '@typescript-eslint/parser',
36 | },
37 | plugins: [
38 | '@typescript-eslint',
39 | 'import',
40 | 'prettier',
41 | 'vue',
42 | ],
43 | root: true,
44 | settings: {
45 | 'import/resolver': {
46 | 'babel-module': {},
47 | },
48 | },
49 | rules: {
50 | "@typescript-eslint/ban-types": [
51 | "error",
52 | {
53 | "extendDefaults": true,
54 | "types": {
55 | "{}": false
56 | }
57 | }
58 | ],
59 | '@typescript-eslint/no-empty-function': 0,
60 | 'brace-style': ['error', 'stroustrup'],
61 | 'default-case': [
62 | 'error', {
63 | commentPattern: '^skip\\sdefault',
64 | },
65 | ],
66 | 'func-names': ['error', 'never'],
67 | 'function-paren-newline': 0,
68 | 'import/no-self-import': 0,
69 | 'import/no-extraneous-dependencies': 0,
70 | 'implicit-arrow-linebreak': ['warn', 'beside'],
71 | indent: [2, 'tab', { SwitchCase: 1 }],
72 | 'no-tabs': [0, { allowIndentationTabs: true }],
73 | 'linebreak-style': 0,
74 | 'max-len': 0,
75 | 'no-else-return': ['error', { allowElseIf: true }],
76 | 'no-console': ['warn', { allow: ['warn', 'error', 'info'] }],
77 | 'no-const-assign': 'error',
78 | 'no-debugger': 0,
79 | 'no-new': 0,
80 | 'no-unused-vars': 1,
81 | 'no-use-before-define': 0,
82 | 'no-useless-escape': 0,
83 | 'no-param-reassign': [
84 | 'error', {
85 | props: true,
86 | ignorePropertyModificationsFor: ['field', 'model', 'el', 'item', 'state', 'Vue', 'vue'],
87 | },
88 | ],
89 | 'no-underscore-dangle': [
90 | 'error', {
91 | allow: ['_data'],
92 | allowAfterThis: true,
93 | },
94 | ],
95 | 'no-plusplus': [
96 | 'error', { allowForLoopAfterthoughts: true },
97 | ],
98 | 'object-curly-newline': ['error', {
99 | ObjectPattern: { multiline: false },
100 | }],
101 | 'operator-linebreak': ['error', 'after'],
102 | 'prefer-destructuring': [
103 | 'error', {
104 | array: false,
105 | object: false,
106 | },
107 | {
108 | enforceForRenamedProperties: false,
109 | },
110 | ],
111 | 'space-before-function-paren': ['error', {
112 | anonymous: 'never',
113 | named: 'never',
114 | asyncArrow: 'never',
115 | }],
116 | 'vue/attributes-order': ['error', {
117 | 'alphabetical': true,
118 | 'order': [
119 | 'DEFINITION',
120 | 'LIST_RENDERING',
121 | 'CONDITIONALS',
122 | 'RENDER_MODIFIERS',
123 | 'GLOBAL',
124 | ['UNIQUE', 'SLOT'],
125 | 'TWO_WAY_BINDING',
126 | 'OTHER_DIRECTIVES',
127 | 'OTHER_ATTR',
128 | 'EVENTS',
129 | 'CONTENT',
130 | ],
131 | }],
132 | 'vue/html-closing-bracket-newline': 0,
133 | 'vue/html-indent': 0,
134 | 'vue/html-self-closing': 0,
135 | 'vue/max-attributes-per-line': 0,
136 | 'vue/no-multiple-template-root': 0,
137 | 'vue/no-v-for-template-key': 0,
138 | 'vue/no-template-shadow': 0,
139 | 'vue/no-v-html': 0,
140 | 'vue/singleline-html-element-content-newline': 0,
141 | 'vue/valid-template-root': 0,
142 | },
143 | };
144 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto eol=lf
2 |
--------------------------------------------------------------------------------
/.github/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | We as members, contributors, and leaders pledge to make participation in our
6 | community a harassment-free experience for everyone, regardless of age, body
7 | size, visible or invisible disability, ethnicity, sex characteristics, gender
8 | identity and expression, level of experience, education, socio-economic status,
9 | nationality, personal appearance, race, religion, or sexual identity
10 | and orientation.
11 |
12 | We pledge to act and interact in ways that contribute to an open, welcoming,
13 | diverse, inclusive, and healthy community.
14 |
15 | ## Our Standards
16 |
17 | Examples of behavior that contributes to a positive environment for our
18 | community include:
19 |
20 | * Demonstrating empathy and kindness toward other people
21 | * Being respectful of differing opinions, viewpoints, and experiences
22 | * Giving and gracefully accepting constructive feedback
23 | * Accepting responsibility and apologizing to those affected by our mistakes,
24 | and learning from the experience
25 | * Focusing on what is best not just for us as individuals, but for the
26 | overall community
27 |
28 | Examples of unacceptable behavior include:
29 |
30 | * The use of sexualized language or imagery, and sexual attention or
31 | advances of any kind
32 | * Trolling, insulting or derogatory comments, and personal or political attacks
33 | * Public or private harassment
34 | * Publishing others' private information, such as a physical or email
35 | address, without their explicit permission
36 | * Other conduct which could reasonably be considered inappropriate in a
37 | professional setting
38 |
39 | ## Enforcement Responsibilities
40 |
41 | Community leaders are responsible for clarifying and enforcing our standards of
42 | acceptable behavior and will take appropriate and fair corrective action in
43 | response to any behavior that they deem inappropriate, threatening, offensive,
44 | or harmful.
45 |
46 | Community leaders have the right and responsibility to remove, edit, or reject
47 | comments, commits, code, wiki edits, issues, and other contributions that are
48 | not aligned to this Code of Conduct, and will communicate reasons for moderation
49 | decisions when appropriate.
50 |
51 | ## Scope
52 |
53 | This Code of Conduct applies within all community spaces, and also applies when
54 | an individual is officially representing the community in public spaces.
55 | Examples of representing our community include using an official e-mail address,
56 | posting via an official social media account, or acting as an appointed
57 | representative at an online or offline event.
58 |
59 | ## Enforcement
60 |
61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
62 | reported to the community leaders responsible for enforcement at
63 | webdevnerdstuff@gmail.com.
64 | All complaints will be reviewed and investigated promptly and fairly.
65 |
66 | All community leaders are obligated to respect the privacy and security of the
67 | reporter of any incident.
68 |
69 | ## Enforcement Guidelines
70 |
71 | Community leaders will follow these Community Impact Guidelines in determining
72 | the consequences for any action they deem in violation of this Code of Conduct:
73 |
74 | ### 1. Correction
75 |
76 | **Community Impact**: Use of inappropriate language or other behavior deemed
77 | unprofessional or unwelcome in the community.
78 |
79 | **Consequence**: A private, written warning from community leaders, providing
80 | clarity around the nature of the violation and an explanation of why the
81 | behavior was inappropriate. A public apology may be requested.
82 |
83 | ### 2. Warning
84 |
85 | **Community Impact**: A violation through a single incident or series
86 | of actions.
87 |
88 | **Consequence**: A warning with consequences for continued behavior. No
89 | interaction with the people involved, including unsolicited interaction with
90 | those enforcing the Code of Conduct, for a specified period of time. This
91 | includes avoiding interactions in community spaces as well as external channels
92 | like social media. Violating these terms may lead to a temporary or
93 | permanent ban.
94 |
95 | ### 3. Temporary Ban
96 |
97 | **Community Impact**: A serious violation of community standards, including
98 | sustained inappropriate behavior.
99 |
100 | **Consequence**: A temporary ban from any sort of interaction or public
101 | communication with the community for a specified period of time. No public or
102 | private interaction with the people involved, including unsolicited interaction
103 | with those enforcing the Code of Conduct, is allowed during this period.
104 | Violating these terms may lead to a permanent ban.
105 |
106 | ### 4. Permanent Ban
107 |
108 | **Community Impact**: Demonstrating a pattern of violation of community
109 | standards, including sustained inappropriate behavior, harassment of an
110 | individual, or aggression toward or disparagement of classes of individuals.
111 |
112 | **Consequence**: A permanent ban from any sort of public interaction within
113 | the community.
114 |
115 | ## Attribution
116 |
117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118 | version 2.0, available at
119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120 |
121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct
122 | enforcement ladder](https://github.com/mozilla/diversity).
123 |
124 | [homepage]: https://www.contributor-covenant.org
125 |
126 | For answers to common questions about this code of conduct, see the FAQ at
127 | https://www.contributor-covenant.org/faq. Translations are available at
128 | https://www.contributor-covenant.org/translations.
129 |
--------------------------------------------------------------------------------
/.github/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to this repository
2 |
3 | ## Getting started
4 |
5 | Before you begin:
6 | - Have you read the [code of conduct](CODE_OF_CONDUCT.md)?
7 | - Check out the [existing issues](https://github.com/webdevnerdstuff/vue-code-block/issues).
8 |
9 | ### Don't see your issue? Open one
10 |
11 | If you spot something new, open an issue using a [template](https://github.com/webdevnerdstuff/vue-code-block/issues/new/choose). We'll use the issue to have a conversation about the problem you want to fix.
12 |
13 | ### Ready to make a change? Fork the repo
14 |
15 | Fork using the command line:
16 |
17 | - [Fork the repo](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo#fork-an-example-repository) so that you can make your changes without affecting the original project until you're ready to merge them.
18 |
19 | ### Make your update:
20 |
21 | Make your changes to the file(s) you'd like to update.
22 | Update the CHANGELOG.md with the updates you made, please include the date and Github username.
23 |
24 | ### Open a pull request
25 | When you're done making changes and you'd like to propose them for review, open your PR (pull request).
26 |
27 | ### Submit your PR & get it reviewed
28 | - Once you submit your PR, others from the Vue3 CodeBlock community will review it with you.
29 | - After that, we may have questions, check back on your PR to keep up with the conversation.
30 |
31 | ### Your PR is merged!
32 | Congratulations! The whole GitHub community thanks you. :sparkles:
33 |
34 | Once your PR is merged, you will be proudly listed as a contributor in the [contributor chart](https://github.com/webdevnerdstuff/vue-code-block/graphs/contributors).
35 |
36 | ### Keep contributing as you use Vue3 CodeBlock
37 |
38 | Now that you're a part of the Vue3 CodeBlock community, you can keep participating in many ways.
39 |
40 | ## Types of contributions
41 | You can contribute to the Vue3 CodeBlock content and site in several ways. This repo is a place to discuss and collaborate on Vue3 CodeBlock! Our small, but mighty team is maintaining this repo, to preserve our bandwidth, off topic conversations will be closed.
42 |
43 | ### :mega: Discussions
44 | Discussions are where we have conversations.
45 |
46 | If you'd like help troubleshooting a Vue3 CodeBlock PR you're working on, have a great new idea, or want to share something amazing you've learned, join us in [discussions](https://github.com/webdevnerdstuff/vue-code-block/discussions).
47 |
48 | ### :beetle: Issues
49 | [Issues](https://docs.github.com/en/github/managing-your-work-on-github/about-issues) are used to track tasks that contributors can help with.
50 |
51 | If you've found something in the content or the website that should be updated, search open issues to see if someone else has reported the same thing. If it's something new, open an issue using a [template](https://github.com/webdevnerdstuff/vue-code-block/issues/new/choose). We'll use the issue to have a conversation about the problem you want to fix.
52 |
53 | ### :hammer_and_wrench: Pull requests
54 | A [pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) is a way to suggest changes in our repository.
55 |
56 | To learn more about opening a pull request in this repo, see [Opening a pull request](#opening-a-pull-request) below.
57 |
58 | ### :question: Support
59 | We are a small team working hard to keep up with the documentation demands of a continuously changing product. Unfortunately, we just can't help with support questions in this repository. If you are experiencing a problem with GitHub, unrelated to our documentation, please [contact GitHub Support directly](https://support.github.com/contact). Any issues, discussions, or pull requests opened here requesting support will be given information about how to contact GitHub Support, then closed and locked.
60 |
61 | If you're having trouble with your GitHub account, contact [Support](https://support.github.com/contact).
62 |
63 | ## Starting with an issue
64 | You can browse existing issues to find something that needs help!
65 |
66 | ### Labels
67 | Labels can help you find an issue you'd like to help with.
68 |
69 | - The [`help wanted` label](https://github.com/webdevnerdstuff/vue-code-block/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement) is for problems or updates that anyone in the community can start working on.
70 | - The [`documentation` label](https://github.com/webdevnerdstuff/vue-code-block/issues?q=is%3Aopen+is%3Aissue+label%3Adocumentation) is for problems or updates relating to the README.MD documentation.
71 | - The [`bug` label](https://github.com/webdevnerdstuff/vue-code-block/issues?q=is%3Aopen+is%3Aissue+label%3Abug) is for problems with the code and bugs.
72 | - The [`enhancement` label](https://github.com/webdevnerdstuff/vue-code-block/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement) is for
73 | suggestions to improve the code or adding of additional features.
74 |
75 | ## Opening a pull request
76 | You can use the GitHub user interface for some small changes, like fixing a typo or updating a readme. You can also fork the repo and then clone it locally, to view changes and run your tests on your machine.
77 |
78 | ## Working in the Vue3 CodeBlock repository
79 | Here's some information that might be helpful while working on a Vue3 CodeBlock PR:
80 |
81 |
82 |
83 | ## Reviewing
84 | We (usually the Vue3 CodeBlock team) review every single PR. The purpose of reviews is to create the best content we can for people who use GitHub.
85 |
86 | - Reviews are always respectful, acknowledging that everyone did the best possible job with the knowledge they had at the time.
87 | - Reviews discuss content, not the person who created it.
88 | - Reviews are constructive and start conversation around feedback.
89 |
90 | ### Self review
91 | You should always review your own PR first.
92 |
93 |
95 |
96 | ### Suggested changes
97 | We may ask for changes to be made before a PR can be merged, either using [suggested changes](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/incorporating-feedback-in-your-pull-request) or pull request comments. You can apply suggested changes directly through the UI. You can make any other changes in your fork, then commit them to your branch.
98 |
99 | As you update your PR and apply changes, mark each conversation as [resolved](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/commenting-on-a-pull-request#resolving-conversations).
100 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | buy_me_a_coffee: webdevnerdstuff
2 | custom: ["paypal.me/webdevnerdstuff"]
3 | patreon: webdevnerdstuff
4 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/BUG_REPORT.yaml:
--------------------------------------------------------------------------------
1 | name: Bug Report
2 | description: File a bug report
3 | title: "[Bug Report]: "
4 | labels: ["bug", "triage"]
5 | assignees:
6 | - webdevnerdstuff
7 | body:
8 | - type: markdown
9 | attributes:
10 | value: |
11 | Thanks for taking the time to fill out this bug report!
12 | - type: input
13 | id: vue-codeblock-version
14 | attributes:
15 | label: Vue Code Block Version
16 | validations:
17 | required: true
18 | - type: input
19 | id: vue-version
20 | attributes:
21 | label: Vue Version
22 | validations:
23 | required: true
24 | - type: textarea
25 | id: bug-description
26 | attributes:
27 | label: Bug description
28 | description: What happened?
29 | validations:
30 | required: true
31 | - type: textarea
32 | id: steps
33 | attributes:
34 | label: Steps to reproduce
35 | description: Which steps do we need to take to reproduce this error?
36 | placeholder: "Steps to reproduce the behavior:\n1. Go to '...'\n2. Click on '....'\n3. Scroll down to '....'"
37 | validations:
38 | required: true
39 | - type: textarea
40 | id: logs
41 | attributes:
42 | label: Relevant log output
43 | description: If applicable, please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
44 | render: shell
45 | - type: textarea
46 | id: additional-context
47 | attributes:
48 | label: Additional context
49 | description: Add any other context about the problem here.
50 | - type: checkboxes
51 | id: terms
52 | attributes:
53 | label: Code of Conduct
54 | description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/webdevnerdstuff/vue-code-block/blob/main/.github/CODE_OF_CONDUCT.md)
55 | options:
56 | - label: I agree to follow this project's Code of Conduct
57 | required: true
58 |
--------------------------------------------------------------------------------
/.github/workflows/main.yml:
--------------------------------------------------------------------------------
1 | # Simple workflow for deploying static content to GitHub Pages
2 | name: Deploy to GitHub Pages
3 |
4 | on:
5 | push:
6 | branches: [ main ]
7 |
8 | permissions:
9 | contents: write
10 | pages: write
11 | id-token: write
12 | pull-requests: write
13 | repository-projects: write
14 |
15 | jobs:
16 | build:
17 | runs-on: ubuntu-latest
18 |
19 | strategy:
20 | matrix:
21 | node-version: [20]
22 |
23 | steps:
24 | - uses: actions/checkout@v3
25 |
26 | - name: Use Node.js ${{ matrix.node-version }}
27 | uses: actions/setup-node@v3
28 | with:
29 | node-version: ${{ matrix.node-version }}
30 |
31 | - name: Build
32 | run: |
33 | git config --global user.email "webdevnerdstuff@gmail.com"
34 | git config --global user.name "webdevnerdstuff"
35 | mkdir docs
36 | npm install --g gh-pages
37 | npm i
38 | npm run build:docs
39 | git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
40 | npm run deploy -u "github-actions-bot "
41 | env:
42 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | pnpm-debug.log*
8 | lerna-debug.log*
9 |
10 | node_modules
11 | docs
12 | dist-ssr
13 | *.local
14 |
15 | # Editor directories and files
16 | .vscode/*
17 | !.vscode/extensions.json
18 | .idea
19 | .DS_Store
20 | *.suo
21 | *.ntvs*
22 | *.njsproj
23 | *.sln
24 | *.sw?
25 |
26 | .history
27 |
28 | .stylelintcache
29 | src/plugin/themes/scss/highlight-template.scss
30 | dist/themes/scss/highlight-template.scss
31 |
--------------------------------------------------------------------------------
/.husky/pre-commit:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 | . "$(dirname -- "$0")/_/husky.sh"
3 |
4 | npx lint-staged && npm run test:commit
5 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | node-version=20.10.0
2 |
--------------------------------------------------------------------------------
/.nvmrc:
--------------------------------------------------------------------------------
1 | 20.10.0
2 |
--------------------------------------------------------------------------------
/.prettierrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | semi: true,
3 | singleQuote: true,
4 | trailingComma: 'all',
5 | };
6 |
--------------------------------------------------------------------------------
/.release-it.json:
--------------------------------------------------------------------------------
1 | {
2 | "git": {
3 | "commitMessage": "chore: release ${version}",
4 | "tagName": "v${version}"
5 | },
6 | "npm": {
7 | "publish": true
8 | },
9 | "github": {
10 | "release": true,
11 | "releaseName": "v${version}"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
3 | }
4 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Change Log
2 | All notable changes to the "vue-code-block" plugin will be documented in this file.
3 |
4 | ## v2.3.3
5 | 03-13-2024
6 | [main] (@kymtwyf)
7 | * Fix cssPath prop not being reactive. Fixes [#49](https://github.com/webdevnerdstuff/vue-code-block/issues/49)
8 |
9 | [main] (@webdevnerdstuff)
10 | * Update packages.
11 |
12 | ## v2.3.2
13 | 03-13-2024
14 | [main] (@webdevnerdstuff)
15 | * Change component to use `defineAsyncComponent`
16 |
17 | ## v2.3.1
18 | 12-02-2023
19 | [main] (@webdevnerdstuff)
20 | * Add default export
21 |
22 | ## v2.3.0
23 | 12-02-2023
24 | [main] (@webdevnerdstuff)
25 | * Improve/Fix TypeScript support
26 |
27 | ## v2.2.15
28 | 11-13-2023
29 | [main] (@webdevnerdstuff)
30 | * Add binding props to slots
31 | * Update docs
32 |
33 | ## v2.2.13
34 | 11-09-2023
35 | [main] (@webdevnerdstuff)
36 | * Add `cssPath` prop to component to allow for custom css file path to be used.
37 | * Update packages.
38 |
39 | ## v2.2.11
40 | 06-11-2023
41 | [main] (@webdevnerdstuff)
42 | * Changing Highlight.js to include all languages by default.
43 | * Unfortunately, adding additional languages was not working as expected, so this is the best solution I can think of for now.
44 | * Updated typings for Props as well as composables.
45 | * Changing compiling to use a Vite config instead of rollup so d.ts file aliases resolve correctly.
46 |
47 | ## v2.1.1
48 | 04-16-2023
49 | [main] (@webdevnerdstuff)
50 | * Changing importing of css/scss/sass to use @use instead of @import.
51 |
52 | ## v2.1.0
53 | 04-16-2023
54 | [main] (@webdevnerdstuff)
55 | * Changing component to use the min version of the default themes.
56 | * Reorganizing default themes to new location.
57 | * This is a breaking change if you are importing the default themes from the `node_modules` folder. You will need to update your import paths to the new location.
58 | * If you are using the default themes without using `import` then you will not be affected by this change.
59 | * Fixing HighlightJS default theme style causing icon to appear over a scrollbar when present.
60 | * Adding sass scripts to package.json to compile scss files to css.
61 |
62 | ## v2.0.1 - v2.0.6
63 | 04-15-2023
64 | [main] (@webdevnerdstuff)
65 | * Minor changes to fix issues after testing npm packaging.
66 |
67 | ## v2.0.0
68 | 04-15-2023
69 | [main] (@webdevnerdstuff)
70 | * Major release update. Added in support to use either PrismJS or HighlightJS.
71 |
72 | ## v1.0.15
73 | 04-02-2023
74 | [main] (@webdevnerdstuff)
75 | * Minor changes to fix issues after testing npm packaging.
76 |
77 | ## v1.0.0
78 | 03-16-2023
79 | [main] (@webdevnerdstuff)
80 | * Initial release
81 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 WebDevNerdStuff
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 | PrismJS does not load all plugins by default. In order to use
11 | additional plugins you will need to import them. Please note that not
12 | all plugins may work with this component.
13 |
14 |
15 |
16 |
17 |
24 |
25 |
26 |
27 |
28 |
36 |
37 | Example using the
38 | line-numbers
42 | Plugin
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | Vue3 CodeBlock currently does not support the Highlight.js plugin API.
51 |
52 |
53 |
54 |
55 |
105 |
--------------------------------------------------------------------------------
/src/documentation/components/examples/TabExamples.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
15 |
16 |
17 | The Vue 3 CodeBlock component leverages the power of
18 | PrismJS
22 | or
23 | Highlight.js
27 | to provide syntax highlighting for code blocks within your
28 | application. The component takes a prop, which is the code to be
29 | highlighted, and uses PrismJS or Highlight.js to render the code with
30 | syntax highlighting. The component supports a variety of programming
31 | languages and can be customized with different themes to match your
32 | application's design. With this component, your users can display
33 | their code snippets with ease and clarity, making it easier to share
34 | and collaborate on code within your application.
35 |
36 |
37 |
38 |
39 |
40 |
44 |
--------------------------------------------------------------------------------
/src/documentation/sections/EventsSection.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |