gardenjs 0.9.1-alpha.8 → 1.0.0
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/.github/ISSUE_TEMPLATE/bug_report.md +25 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +19 -0
- package/CODE_OF_CONDUCT.md +132 -0
- package/LICENSE.md +1 -1
- package/README.md +43 -65
- package/bin/servegarden.js +237 -39
- package/dist/assets/frame-RnYSvR22.js +1 -0
- package/dist/assets/index-3qYjjQWR.css +19 -0
- package/dist/assets/index-CQErw-Lc.js +1 -0
- package/dist/assets/index-D8Rq1txs.js +48 -0
- package/dist/assets/index-DLbPO8Sw.js +9 -0
- package/dist/frame.html +4 -6
- package/dist/index.html +4 -5
- package/examples/garden_button.react.das.js +16 -0
- package/examples/garden_button.react.jsx +5 -0
- package/examples/garden_button.react.md +3 -0
- package/examples/garden_button.svelte.das.js +2 -2
- package/examples/garden_button.vue.das.js +2 -2
- package/frame.html +2 -2
- package/index.html +1 -1
- package/package.json +27 -18
- package/src/client/GardenApp.svelte +91 -41
- package/src/client/GardenFrame.svelte +145 -27
- package/src/client/assets/icons/logo.svg +1 -1
- package/src/client/assets/icons/logo_neg.svg +1 -0
- package/src/client/assets/icons/vegetables.svg +1 -0
- package/src/client/assets/scss/abstracts/root.css +24 -22
- package/src/client/assets/scss/base/general.css +5 -0
- package/src/client/assets/scss/base/typography.css +1 -1
- package/src/client/components/highlight/Highlight.js +7 -9
- package/src/client/components/sidebar/Sidebar.svelte +60 -124
- package/src/client/components/sidebar/SidebarNav.svelte +17 -36
- package/src/client/components/sidebar/SidebarNavLinks.svelte +7 -25
- package/src/client/components/splitpanes/HorizontalSplitPane.svelte +8 -2
- package/src/client/components/stage/Stage.svelte +12 -6
- package/src/client/components/stage/panel/PanelCode.svelte +17 -3
- package/src/client/components/stage/panel/PanelComponent.svelte +25 -34
- package/src/client/components/stage/panel/PanelStoriesNav.svelte +6 -3
- package/src/client/components/stage/raw_component_import_map.js +2 -0
- package/src/client/components/topbar/Topbar.svelte +55 -228
- package/src/client/gardenapp.js +1 -2
- package/src/client/logic/routing.js +7 -7
- package/src/client/logic/stage.js +53 -10
- package/src/client/router.js +15 -19
- package/src/codegenerator/base_generator.js +134 -43
- package/src/codegenerator/copy_base_classes.js +22 -25
- package/src/codegenerator/das_file_finder.js +97 -9
- package/src/codegenerator/shapes/assets/favicon.svg +1 -1
- package/src/codegenerator/shapes/frame.html +1 -1
- package/src/codegenerator/shapes/gardenframe/index.html +1 -1
- package/src/codegenerator/shapes/index.html +1 -1
- package/src/codegenerator/shapes/screenshottests/screenshottest.base.js +3 -3
- package/src/codegenerator/watchcl.js +1 -1
- package/src/config.js +3 -1
- package/src/renderer/HtmlRenderer.js +23 -0
- package/src/renderer/HtmlRenderer.svelte +14 -0
- package/src/server.js +49 -3
- package/vite.config.js +3 -7
- package/.babelrc +0 -3
- package/dist/assets/SvelteRenderer-ce389f35.js +0 -1
- package/dist/assets/frame-f3b8b4d1.js +0 -1
- package/dist/assets/index-25a31add.js +0 -54
- package/dist/assets/index-6f699dee.css +0 -19
- package/dist/assets/index-f4621b5a.js +0 -1
- package/src/renderer/SvelteRenderer.js +0 -16
- package/src/renderer/SvelteRenderer.svelte +0 -79
- package/src/renderer/VueRenderer.js +0 -20
- package/src/renderer/VueRenderer.vue +0 -20
- package/src/renderer/state.js +0 -10
- /package/dist/assets/{frame-1cd873e1.css → frame-BXMwehsH.css} +0 -0
- /package/src/codegenerator/shapes/{Hellogarden.svelte → Hellogarden.html} +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: ''
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
**Describe the bug**
|
|
10
|
+
A clear and concise description of what the bug is.
|
|
11
|
+
|
|
12
|
+
**To Reproduce**
|
|
13
|
+
Steps to reproduce the behavior.
|
|
14
|
+
|
|
15
|
+
**Expected behavior**
|
|
16
|
+
A clear and concise description of what you expected to happen.
|
|
17
|
+
|
|
18
|
+
**Screenshots**
|
|
19
|
+
If applicable, add screenshots to help explain your problem.
|
|
20
|
+
|
|
21
|
+
**System Info**
|
|
22
|
+
System, Binaries, Browsers
|
|
23
|
+
|
|
24
|
+
**Additional context**
|
|
25
|
+
E.g. some background/context of how you ran into this bug.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: ''
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
**Is your feature request related to a problem? Please describe**
|
|
10
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
11
|
+
|
|
12
|
+
**Describe the solution you'd like**
|
|
13
|
+
A clear and concise description of what you want to happen.
|
|
14
|
+
|
|
15
|
+
**Describe alternatives you've considered**
|
|
16
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
17
|
+
|
|
18
|
+
**Additional context**
|
|
19
|
+
Add any other context or screenshots about the feature request here.
|
|
@@ -0,0 +1,132 @@
|
|
|
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, caste, color, religion, or sexual
|
|
10
|
+
identity 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 overall
|
|
26
|
+
community
|
|
27
|
+
|
|
28
|
+
Examples of unacceptable behavior include:
|
|
29
|
+
|
|
30
|
+
- The use of sexualized language or imagery, and sexual attention or advances of
|
|
31
|
+
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 address,
|
|
35
|
+
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 email 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
|
+
[hello@gardenjs.org](mailto:hello@gardenjs.org?Subject=Linked%20from%20the%20Code%20of%20Conduct).
|
|
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 of
|
|
86
|
+
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 permanent
|
|
93
|
+
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 the
|
|
113
|
+
community.
|
|
114
|
+
|
|
115
|
+
## Attribution
|
|
116
|
+
|
|
117
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
118
|
+
version 2.1, available at
|
|
119
|
+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
120
|
+
|
|
121
|
+
Community Impact Guidelines were inspired by
|
|
122
|
+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
|
123
|
+
|
|
124
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
|
125
|
+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
|
126
|
+
[https://www.contributor-covenant.org/translations][translations].
|
|
127
|
+
|
|
128
|
+
[homepage]: https://www.contributor-covenant.org
|
|
129
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
130
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
|
131
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
|
132
|
+
[translations]: https://www.contributor-covenant.org/translations
|
package/LICENSE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2020-present, Robin Danzinger, Martin Farkas
|
|
3
|
+
Copyright (c) 2020-present, Robin Danzinger, Martin Farkas
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -1,76 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
-
|
|
1
|
+
<p>
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="src/client/assets/icons/logo_neg.svg">
|
|
4
|
+
<img src="src/client/assets/icons/logo.svg">
|
|
5
|
+
</picture
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
<div>
|
|
9
|
+
<a href="https://github.com/gardenjs/gardenjs/blob/main/LICENSE.md">
|
|
10
|
+
<img src="https://img.shields.io/badge/License-MIT-green.svg" alt="License" data-canonical-src="https://img.shields.io/github/license/gardenjs/gardenjs.svg" style="max-width: 100%;">
|
|
11
|
+
</a>
|
|
12
|
+
<a href="https://www.npmjs.com/package/gardenjs" target="_blank">
|
|
13
|
+
<img alt="NPM Version" src="https://img.shields.io/npm/v/gardenjs?color=blue">
|
|
14
|
+
</a>
|
|
15
|
+
<a href="https://github.com/gardenjs/gardenjs/actions">
|
|
16
|
+
<img alt="GitHub Actions Workflow Status" src="https://img.shields.io/github/actions/workflow/status/gardenjs/gardenjs/workflow">
|
|
17
|
+
</a>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
## The quick and easy alternative
|
|
21
|
+
|
|
22
|
+
Gardenjs is an open source UI component library explorer for JS frameworks and provides a centralized platform for developers to create, test and present UI components and pages in isolation. Gardenjs promotes modular and reusable code, streamlines collaboration between team members and increases overall productivity. Gardenjs is designed for projects of any size.
|
|
23
|
+
|
|
24
|
+
Watch the <a href="https://www.gardenjs.org/demo/">demo</a>.
|
|
25
|
+
|
|
26
|
+
## Why Gardenjs?
|
|
27
|
+
|
|
28
|
+
- Significantly faster than comparable tools such as Storybook.
|
|
29
|
+
- Simple and efficient working.
|
|
30
|
+
- Many useful features without being complex and bloated.
|
|
31
|
+
- Integration of external libraries within a project.
|
|
32
|
+
- Multiple frameworks running in a single instance.
|
|
33
|
+
- More flexible and extensive work with decorators and hooks.
|
|
34
|
+
- Simply looks good :)
|
|
11
35
|
|
|
12
36
|
## Getting Started
|
|
13
37
|
|
|
14
|
-
Please follow the documentation at
|
|
38
|
+
Please follow the documentation at <a href="https://www.gardenjs.org/docs" target="_blank">gardenjs.org</a>. Happy Gardening!
|
|
15
39
|
|
|
16
|
-
|
|
40
|
+
## Supported Frameworks
|
|
17
41
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
Gardenjs is an open source project and is licensed under the MIT license. Become a sponsor to give us more scope for further development. We are grateful for this and will publish your logo and website URL in our README on Github and on our website/documentation.
|
|
42
|
+
HTML snippets are rendered by default. The support of JS frameworks is realized by renderer plugins. There are currently plugins for <a href="https://github.com/gardenjs/render-plugin-svelte" target="_blank">Svelte</a>, <a href="https://github.com/gardenjs/render-plugin-vue" target="_blank">Vue</a> and <a href="https://github.com/gardenjs/render-plugin-react" target="_blank">React</a>. You can also easily create plugins for other frameworks, see the documentation. Contact us, we will be happy to create a repository for your renderer plugin.
|
|
21
43
|
|
|
22
44
|
## Contributing
|
|
23
45
|
|
|
24
|
-
|
|
46
|
+
Gardenjs was developed and is contributed by <a href="https://www.rabbitdevelopment.com" target="_blank">Rabbit Development</a>. We look forward to your feedback, please report any bugs. We also welcome contributions and are happy about sponsoring.
|
|
25
47
|
|
|
26
48
|
## License
|
|
27
49
|
|
|
28
|
-
[MIT](https://
|
|
29
|
-
|
|
30
|
-
Copyright (C) 2020
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
### v1.0
|
|
35
|
-
|
|
36
|
-
- [task] Gardenjs npm modul. (yarn?)
|
|
37
|
-
- [task] Add renderer plugins for svelte, vue. npm modules (@gardenjs/gardenjs-plugin-svelte/vue).
|
|
38
|
-
- [task] Add hooks before, after.
|
|
39
|
-
- [task] Make Gardenjs compatible with React.
|
|
40
|
-
- [task] Add renderer plugin for react. npm modules (@gardenjs/gardenjs-plugin-react).
|
|
41
|
-
- [refactor] Move logic to own file / use stores?. Handle user interaction.
|
|
42
|
-
- [task] Public Gardenjs docs & set Gardenjs repository public.
|
|
43
|
-
- [task] Public Gardenjs demo of Gardenjs docs & set repository of Gardenjs docs public.
|
|
44
|
-
- [task] Public Rabbit Dev website.
|
|
45
|
-
- [task] Create Linkedin profil for Rabbit Dev & Gardenjs.
|
|
46
|
-
|
|
47
|
-
### v1.1
|
|
48
|
-
|
|
49
|
-
- [feature] Evaluation of "Make Storybook stories compatible with Garden". If relatively easy possible then development. Otherwise prioritize other tasks/features depending on complexity.
|
|
50
|
-
- [task] Add tests (or v1.1 ?).
|
|
51
|
-
|
|
52
|
-
### v1.x
|
|
53
|
-
|
|
54
|
-
- [task] Add [line numbers plugin](https://github.com/wcoder/highlightjs-line-numbers.js) to highlightjs.
|
|
55
|
-
- [task] Sidebarnav is closed by default on narrow display devices.
|
|
56
|
-
- [task] Make setting of default mode possible via garden.config.js.
|
|
57
|
-
- [task] If full mode is active, switching to portrait mode is deactivated.
|
|
58
|
-
- [task] Store selection in panel nav for refresh or if another component is selected.
|
|
59
|
-
- [task] Store selection of stage for refresh or if another component is selected.
|
|
60
|
-
- [task] Make Gardenjs docs link optional via garden.config.js.
|
|
61
|
-
- [task] Show custom favicon.svg configured in garden.config.js.
|
|
62
|
-
- [feature] Screenshot tests:
|
|
63
|
-
- Docker image oder alternativ for screenshot test.
|
|
64
|
-
- Automatic create test file & and folder (like init garden).
|
|
65
|
-
- Settings.
|
|
66
|
-
- [feature] Set width and height of stage by size input.
|
|
67
|
-
- [feature] Add zoom button 100% and if zoomed show size in % with switch possibility.
|
|
68
|
-
- [feature] Vertical dragbar to drag stage horizontical to show rwd behaviour. Already integrated staticly, just needs to be commented out in topbar.svelte: Show 'px' width/height of stage next to rwd-navi.
|
|
69
|
-
- [task] Switch from md to mdx.
|
|
70
|
-
- [feature] Set stagesize values for "mobile, tablet, desktop" inside garden.config.js. Option: Set list of custom values like iPhone 15, iPad, Samsung etc. in garden.config and show dropdown in Gardenjs instead of icons.
|
|
71
|
-
- [task] Integrate Svelte A11y features.
|
|
72
|
-
- [feature] Build kickstarter "carrots". Define components for carrots.
|
|
73
|
-
- [feature] Bookmarks. (siehe ReactCosmos)
|
|
74
|
-
- [feature] Measure.
|
|
75
|
-
|
|
76
|
-
<br><br><br><p align="center"><img src="src/client/assets/icons/logo.svg"></p>
|
|
50
|
+
[MIT](https://github.com/gardenjs/gardenjs?tab=MIT-1-ov-file#readme)
|
|
51
|
+
|
|
52
|
+
Copyright (C) 2020-present, Robin Danzinger & Martin Farkas.
|
|
53
|
+
|
|
54
|
+
<br><br><br><p align="center"><img src="src/client/assets/icons/vegetables.svg"></p>
|