Skip to content

Commit 4e82912

Browse files
committed
Release prep
1 parent 8da5bfe commit 4e82912

File tree

4 files changed

+140
-43
lines changed

4 files changed

+140
-43
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
All notable changes to `filament-syntax-entry` will be documented in this file.
44

5-
## 1.0.0 - 202X-XX-XX
5+
## 1.0.0 - Feb 2, 2024
66

7-
- initial release
7+
- Initial release

README.md

Lines changed: 136 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,174 @@
1-
# Add a Filament infolist entry for syntax highlighting.
1+
# Filament Comments
22

3-
[![Latest Version on Packagist](https://img.shields.io/packagist/v/parallax/filament-syntax-entry.svg?style=flat-square)](https://packagist.org/packages/parallax/filament-syntax-entry)
4-
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/parallax/filament-syntax-entry/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/parallax/filament-syntax-entry/actions?query=workflow%3Arun-tests+branch%3Amain)
5-
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/parallax/filament-syntax-entry/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/parallax/filament-syntax-entry/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
6-
[![Total Downloads](https://img.shields.io/packagist/dt/parallax/filament-syntax-entry.svg?style=flat-square)](https://packagist.org/packages/parallax/filament-syntax-entry)
3+
[![Latest Version on Packagist](https://img.shields.io/packagist/v/parallax/filament-syntax-entry?style=flat-square)](https://packagist.org/packages/parallax/filament-syntax-entry)
4+
[![Software License](https://img.shields.io/packagist/l/parallax/filament-syntax-entry?style=flat-square)](LICENSE.md)
5+
[![Total Downloads](https://img.shields.io/packagist/dt/parallax/filament-syntax-entry?style=flat-square)](https://packagist.org/packages/parallax/filament-syntax-entry)
6+
![Stars](https://img.shields.io/github/stars/parallax/filament-syntax-entry?style=flat-square)
77

8+
Add a Filament infolist entry for themeable syntax highlighting using [highlight.js](https://highlightjs.org).
89

9-
10-
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
10+
<img class="filament-hidden" src="https://github.com/parallax/filament-syntax-entry/raw/main/assets/filament-syntax-entry.jpg"/>
1111

1212
## Installation
1313

14-
You can install the package via composer:
14+
Install the package via composer:
1515

1616
```bash
1717
composer require parallax/filament-syntax-entry
1818
```
1919

20-
You can publish and run the migrations with:
21-
22-
```bash
23-
php artisan vendor:publish --tag="filament-syntax-entry-migrations"
24-
php artisan migrate
25-
```
26-
27-
You can publish the config file with:
28-
29-
```bash
30-
php artisan vendor:publish --tag="filament-syntax-entry-config"
31-
```
32-
3320
Optionally, you can publish the views using
3421

3522
```bash
3623
php artisan vendor:publish --tag="filament-syntax-entry-views"
3724
```
3825

39-
This is the contents of the published config file:
26+
## Quickstart
27+
28+
### Add the Infolist entry
29+
30+
Add the `SyntaxEntry` to the `$infolist->schema()` method.
4031

4132
```php
42-
return [
43-
];
33+
<?php
34+
35+
namespace App\Filament\Resources;
36+
37+
use Parallax\FilamentSyntaxEntry\SyntaxEntry;
38+
39+
class ProductResource extends Resource
40+
{
41+
public static function infolist(Infolist $infolist): Infolist
42+
{
43+
return $infolist
44+
->schema([
45+
SyntaxEntry::make('metadata'),
46+
]);
47+
}
48+
}
4449
```
4550

46-
## Usage
51+
### Setting the language
52+
53+
Automatic language detection is enabled by default so this isn't required, but if you would like to define the language used you may use the `language()` method:
4754

4855
```php
49-
$filamentSyntaxEntry = new Parallax\FilamentSyntaxEntry();
50-
echo $filamentSyntaxEntry->echoPhrase('Hello, Parallax!');
56+
SyntaxEntry::make('metadata')
57+
->language('json');
5158
```
5259

53-
## Testing
60+
To keep the budle size down only the following languages are currently available:
5461

55-
```bash
56-
composer test
57-
```
62+
- `bash`
63+
- `css`
64+
- `dockerfile`
65+
- `graphql`
66+
- `javascript`
67+
- `json`
68+
- `markdown`
69+
- `php`
70+
- `scss`
71+
- `shell`
72+
- `sql`
73+
- `typescript`
74+
- `xml`
75+
- `yaml`
5876

59-
## Changelog
77+
### Setting the theme
6078

61-
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
79+
You may override the default themes using the `theme()` and/or `darkModeTheme()` methods:
6280

63-
## Contributing
81+
```php
82+
SyntaxEntry::make('metadata')
83+
->theme('filament')
84+
->darkModeTheme('filament-dark');
85+
```
6486

65-
Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.
87+
To keep the budle size down only the following languages are currently available:
88+
89+
- `a11y-dark`
90+
- `a11y-light`
91+
- `agate`
92+
- `an-old-hope`
93+
- `androidstudio`
94+
- `arduino-light`
95+
- `arta`
96+
- `ascetic`
97+
- `atom-one-dark-reasonable`
98+
- `atom-one-dark`
99+
- `atom-one-light`
100+
- `brown-paper`
101+
- `codepen-embed`
102+
- `color-brewer`
103+
- `dark`
104+
- `default`
105+
- `devibeans`
106+
- `docco`
107+
- `far`
108+
- `felipec`
109+
- `filament-dark` (default dark mode theme)
110+
- `filament` (default theme)
111+
- `foundation`
112+
- `github-dark-dimmed`
113+
- `github-dark`
114+
- `github`
115+
- `gml`
116+
- `googlecode`
117+
- `gradient-dark`
118+
- `gradient-light`
119+
- `grayscale`
120+
- `hybrid`
121+
- `idea`
122+
- `intellij-light`
123+
- `ir-black`
124+
- `isbl-editor-dark`
125+
- `isbl-editor-light`
126+
- `kimbie-dark`
127+
- `kimbie-light`
128+
- `lightfair`
129+
- `lioshi`
130+
- `magula`
131+
- `mono-blue`
132+
- `monokai-sublime`
133+
- `monokai`
134+
- `night-owl`
135+
- `nnfx-dark`
136+
- `nnfx-light`
137+
- `nord`
138+
- `obsidian`
139+
- `panda-syntax-dark`
140+
- `panda-syntax-light`
141+
- `paraiso-dark`
142+
- `paraiso-light`
143+
- `pojoaque`
144+
- `purebasic`
145+
- `qtcreator-dark`
146+
- `qtcreator-light`
147+
- `rainbow`
148+
- `routeros`
149+
- `school-book`
150+
- `shades-of-purple`
151+
- `srcery`
152+
- `stackoverflow-dark`
153+
- `stackoverflow-light`
154+
- `sunburst`
155+
- `tokyo-night-dark`
156+
- `tokyo-night-light`
157+
- `tomorrow-night-blue`
158+
- `tomorrow-night-bright`
159+
- `vs`
160+
- `vs2015`
161+
- `xcode`
162+
- `xt256`
66163

67-
## Security Vulnerabilities
164+
## Changelog
68165

69-
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
166+
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
70167

71168
## Credits
72169

73-
- [Parallax](https://github.com/parallax)
74-
- [All Contributors](../../contributors)
170+
- [Parallax](https://parall.ax)
171+
- [Contributors](https://github.com/parallax/filament-syntax-entry/graphs/contributors)
75172

76173
## License
77174

assets/filament-syntax-entry.jpg

689 KB
Loading

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "parallax/filament-syntax-entry",
3-
"description": "Add a Filament infolist entry for syntax highlighting.",
3+
"description": "Add a Filament infolist entry for themeable syntax highlighting.",
44
"keywords": [
55
"parallax",
66
"laravel",
@@ -69,4 +69,4 @@
6969
},
7070
"minimum-stability": "dev",
7171
"prefer-stable": true
72-
}
72+
}

0 commit comments

Comments
 (0)