tailwind_dsl 0.0.30 → 0.0.31
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.
- checksums.yaml +4 -4
- data/.builders/generators/test.rb +26 -0
- data/.builders/generators/utilities.rb +11 -5
- data/.components/tui/application-ui/application-shells/multi-column/01.data.json +37 -0
- data/.components/tui/application-ui/application-shells/stacked/01.data.json +31 -0
- data/CHANGELOG.md +7 -0
- data/lib/tailwind_dsl/etl/extractors/batch_extraction.rb +7 -4
- data/lib/tailwind_dsl/etl/extractors/data_extractor.rb +3 -0
- data/lib/tailwind_dsl/version.rb +1 -1
- data/package-lock.json +2 -2
- data/package.json +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 997022f0d369f05f7a8f024e5d95fdfa4ef8f260d928bc5e8ba12b0cef13b8b1
|
4
|
+
data.tar.gz: 1acdd5ce24924cef66297a22c57580b55d82a6f5a41f6276c73c6d246e6d9c8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1250f3b3874aede08217247d1d48303abf645bf7d59d425a75aa84cf25ba8ea2b1c1e0ae6c4c802c900a07952c066a8f82bef336ba3d079f58fa5f74818d776
|
7
|
+
data.tar.gz: 5a3b5c816a552e6892c0b36b97338dd5f2324f2d2f1634269712d1b8733350e3d332f5c883f8b2461ea6667d78fd18d83b54ec492b1139152639a8e52a4e1b10
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'gpt3/builder'
|
2
|
+
|
3
|
+
# Send an email to the user
|
4
|
+
#
|
5
|
+
# @param [String] use_ses - use AWS SES to send the email, if you are just testing, then set this value to false
|
6
|
+
def send_email(use_ses = nil)
|
7
|
+
use_ses ||= true
|
8
|
+
|
9
|
+
puts 'email sent successfully via Amazon Simple Email Service' if use_ses
|
10
|
+
end
|
11
|
+
|
12
|
+
KManager.action :test do
|
13
|
+
action do
|
14
|
+
|
15
|
+
# Send an email to the user
|
16
|
+
send_email
|
17
|
+
|
18
|
+
# Send an email to the user
|
19
|
+
send_email(true)
|
20
|
+
|
21
|
+
# This is a test, don't send the email
|
22
|
+
send_email(false)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
KManager.opts.sleep = 2
|
@@ -35,8 +35,15 @@ KManager.action :utilities do
|
|
35
35
|
components,
|
36
36
|
target_component_model_path,
|
37
37
|
batch_size: 1,
|
38
|
-
|
39
|
-
|
38
|
+
filter: {
|
39
|
+
design_system: 'tui',
|
40
|
+
exclude_group_key: [
|
41
|
+
'application_ui.application_shells.multi_column',
|
42
|
+
'application_ui.application_shells.sidebar',
|
43
|
+
'application_ui.element.avatars',
|
44
|
+
'application_ui.element.badges'
|
45
|
+
]
|
46
|
+
},
|
40
47
|
extract_handler: TailwindDsl::Etl::Extractors::DataExtractor
|
41
48
|
)
|
42
49
|
# puts target_component_path
|
@@ -79,13 +86,12 @@ KManager.action :utilities do
|
|
79
86
|
# Extracts the next component data using GPT3
|
80
87
|
#
|
81
88
|
# This needs to be supervised and verified, so it will only do a few models at a time
|
82
|
-
def batch_extraction(components, target_folder, batch_size: 1,
|
89
|
+
def batch_extraction(components, target_folder, batch_size: 1, filter: nil, extract_handler: nil)
|
83
90
|
extraction = TailwindDsl::Etl::Extractors::BatchExtraction.new(
|
84
91
|
components,
|
85
92
|
target_folder,
|
86
93
|
batch_size: batch_size,
|
87
|
-
|
88
|
-
filter_design_system: filter_design_system,
|
94
|
+
filter: filter,
|
89
95
|
extract_handler: extract_handler)
|
90
96
|
extraction.extract
|
91
97
|
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
{
|
2
|
+
"todo": "SVG Icons and Profile Name in footer",
|
3
|
+
"sidebar": {
|
4
|
+
"items": [
|
5
|
+
{
|
6
|
+
"title": "Dashboard",
|
7
|
+
"icon": "Dashboard",
|
8
|
+
"url": "/dashboard"
|
9
|
+
},
|
10
|
+
{
|
11
|
+
"title": "Calendar",
|
12
|
+
"icon": "Calendar",
|
13
|
+
"url": "/calendar"
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"title": "Teams",
|
17
|
+
"icon": "Teams",
|
18
|
+
"url": "/teams"
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"title": "Directory",
|
22
|
+
"icon": "Directory",
|
23
|
+
"url": "/directory"
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"title": "Announcements",
|
27
|
+
"icon": "Announcements",
|
28
|
+
"url": "/announcements"
|
29
|
+
},
|
30
|
+
{
|
31
|
+
"title": "Office Map",
|
32
|
+
"icon": "OfficeMap",
|
33
|
+
"url": "/office-map"
|
34
|
+
}
|
35
|
+
]
|
36
|
+
}
|
37
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
|
2
|
+
{
|
3
|
+
"nav": {
|
4
|
+
"logo": "https://tailwindui.com/img/logos/mark.svg?color=indigo&shade=600",
|
5
|
+
"links": [
|
6
|
+
{
|
7
|
+
"text": "Dashboard",
|
8
|
+
"url": "#",
|
9
|
+
"active": true
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"text": "Team",
|
13
|
+
"url": "#"
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"text": "Projects",
|
17
|
+
"url": "#"
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"text": "Calendar",
|
21
|
+
"url": "#"
|
22
|
+
}
|
23
|
+
],
|
24
|
+
"notifications": {
|
25
|
+
"url": "#",
|
26
|
+
"icon": "https://www.w3.org/2000/svg",
|
27
|
+
"icon_viewbox": "0 0 24 24",
|
28
|
+
"icon_stroke_width": "1.5",
|
29
|
+
"icon_stroke": "currentColor",
|
30
|
+
"icon_aria_hidden": true,
|
31
|
+
"icon_path": "M14.857 17.082a23.8
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## [0.0.30](https://github.com/klueless-io/tailwind_dsl/compare/v0.0.29...v0.0.30) (2022-10-26)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* add inclusion and exclusion filters ([f1112bd](https://github.com/klueless-io/tailwind_dsl/commit/f1112bd926e31efa2f2e7e76df91e9ccd02b4dbe))
|
7
|
+
|
1
8
|
## [0.0.29](https://github.com/klueless-io/tailwind_dsl/compare/v0.0.28...v0.0.29) (2022-10-26)
|
2
9
|
|
3
10
|
|
@@ -70,19 +70,22 @@ module TailwindDsl
|
|
70
70
|
raise "Folder does not exist: '#{path}', make sure you run component structure generator first." unless File.exist?(path)
|
71
71
|
end
|
72
72
|
|
73
|
-
# rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity
|
73
|
+
# rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
74
74
|
def filter_components
|
75
75
|
return components unless filter
|
76
76
|
|
77
77
|
result = components
|
78
78
|
# inclusions
|
79
79
|
result = result.select { |component| component.design_system.name == filter[:design_system] } if filter[:design_system]
|
80
|
-
result = result.select { |component| component.group.key == filter[:group_key] } if filter[:group_key]
|
80
|
+
result = result.select { |component| component.group.key == filter[:group_key] } if filter[:group_key].is_a?(String)
|
81
|
+
result = result.select { |component| filter[:group_key].include?(component.group.key) } if filter[:group_key].is_a?(Array)
|
81
82
|
# exclusions
|
82
|
-
result = result.reject { |component| component.group.key == filter[:exclude_group_key] } if filter[:exclude_group_key]
|
83
|
+
result = result.reject { |component| component.group.key == filter[:exclude_group_key] } if filter[:exclude_group_key].is_a?(String)
|
84
|
+
result = result.reject { |component| filter[:exclude_group_key].include?(component.group.key) } if filter[:exclude_group_key].is_a?(Array)
|
85
|
+
|
83
86
|
result
|
84
87
|
end
|
85
|
-
# rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity
|
88
|
+
# rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
86
89
|
end
|
87
90
|
end
|
88
91
|
end
|
@@ -30,6 +30,9 @@ module TailwindDsl
|
|
30
30
|
.message('JSON:')
|
31
31
|
.complete(engine: 'code-davinci-002', max_tokens: tokens, suffix: "\n")
|
32
32
|
.write_result(target_file)
|
33
|
+
|
34
|
+
puts "Extracted data for #{component_type} component: #{component.name} into file"
|
35
|
+
puts target_file
|
33
36
|
end
|
34
37
|
# rubocop:enable Metrics/AbcSize
|
35
38
|
end
|
data/lib/tailwind_dsl/version.rb
CHANGED
data/package-lock.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "tailwind_dsl",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.31",
|
4
4
|
"lockfileVersion": 2,
|
5
5
|
"requires": true,
|
6
6
|
"packages": {
|
7
7
|
"": {
|
8
8
|
"name": "tailwind_dsl",
|
9
|
-
"version": "0.0.
|
9
|
+
"version": "0.0.31",
|
10
10
|
"devDependencies": {
|
11
11
|
"@klueless-js/semantic-release-rubygem": "github:klueless-js/semantic-release-rubygem",
|
12
12
|
"@semantic-release/changelog": "^6.0.1",
|
data/package.json
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tailwind_dsl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.31
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Cruwys
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cmdlet
|
@@ -70,9 +70,11 @@ files:
|
|
70
70
|
- ".builders/generators/domain-model-to-code.rb"
|
71
71
|
- ".builders/generators/domain-model.rb"
|
72
72
|
- ".builders/generators/project-plan.rb"
|
73
|
+
- ".builders/generators/test.rb"
|
73
74
|
- ".builders/generators/utilities.rb"
|
74
75
|
- ".components/readme.md"
|
75
76
|
- ".components/tui/application-ui/application-shells/multi-column/01.clean.html"
|
77
|
+
- ".components/tui/application-ui/application-shells/multi-column/01.data.json"
|
76
78
|
- ".components/tui/application-ui/application-shells/multi-column/01.html"
|
77
79
|
- ".components/tui/application-ui/application-shells/multi-column/01.settings.json"
|
78
80
|
- ".components/tui/application-ui/application-shells/multi-column/02.clean.html"
|
@@ -126,6 +128,7 @@ files:
|
|
126
128
|
- ".components/tui/application-ui/application-shells/sidebar/08.html"
|
127
129
|
- ".components/tui/application-ui/application-shells/sidebar/08.settings.json"
|
128
130
|
- ".components/tui/application-ui/application-shells/stacked/01.clean.html"
|
131
|
+
- ".components/tui/application-ui/application-shells/stacked/01.data.json"
|
129
132
|
- ".components/tui/application-ui/application-shells/stacked/01.html"
|
130
133
|
- ".components/tui/application-ui/application-shells/stacked/01.settings.json"
|
131
134
|
- ".components/tui/application-ui/application-shells/stacked/02.clean.html"
|