tina4ruby 3.13.97 → 3.13.99

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.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +84 -0
  3. data/lib/tina4/ai.rb +32 -3
  4. data/lib/tina4/api.rb +5 -0
  5. data/lib/tina4/auto_crud.rb +62 -4
  6. data/lib/tina4/background.rb +112 -31
  7. data/lib/tina4/cache.rb +3 -2
  8. data/lib/tina4/cli.rb +55 -67
  9. data/lib/tina4/database.rb +97 -49
  10. data/lib/tina4/database_adapter.rb +169 -15
  11. data/lib/tina4/dev_admin.rb +137 -9
  12. data/lib/tina4/dispatch_pipeline.rb +145 -4
  13. data/lib/tina4/drivers/firebird_driver.rb +59 -12
  14. data/lib/tina4/drivers/mongodb_driver.rb +98 -14
  15. data/lib/tina4/drivers/mssql_driver.rb +39 -2
  16. data/lib/tina4/drivers/mysql_driver.rb +43 -3
  17. data/lib/tina4/drivers/odbc_driver.rb +36 -2
  18. data/lib/tina4/drivers/postgres_driver.rb +5 -0
  19. data/lib/tina4/drivers/sqlite_driver.rb +11 -1
  20. data/lib/tina4/env.rb +1 -1
  21. data/lib/tina4/error_overlay.rb +43 -49
  22. data/lib/tina4/field_types.rb +33 -16
  23. data/lib/tina4/frond.rb +24 -2
  24. data/lib/tina4/gallery/auth/src/routes/api/gallery_auth.rb +1 -1
  25. data/lib/tina4/gallery/templates/src/templates/gallery_page.twig +1 -1
  26. data/lib/tina4/graphql.rb +2 -2
  27. data/lib/tina4/log.rb +652 -485
  28. data/lib/tina4/mcp.rb +9 -1
  29. data/lib/tina4/messenger.rb +25 -0
  30. data/lib/tina4/middleware.rb +189 -76
  31. data/lib/tina4/migration.rb +47 -15
  32. data/lib/tina4/orm.rb +280 -59
  33. data/lib/tina4/port_takeover.rb +202 -0
  34. data/lib/tina4/public/js/tina4-dev-admin.min.js +23 -19
  35. data/lib/tina4/rack_app.rb +201 -59
  36. data/lib/tina4/realtime.rb +6 -1
  37. data/lib/tina4/request.rb +259 -51
  38. data/lib/tina4/router.rb +20 -2
  39. data/lib/tina4/seeder.rb +68 -19
  40. data/lib/tina4/shutdown.rb +4 -0
  41. data/lib/tina4/sql_translator.rb +115 -86
  42. data/lib/tina4/swagger.rb +19 -3
  43. data/lib/tina4/template.rb +61 -6
  44. data/lib/tina4/test_client.rb +49 -3
  45. data/lib/tina4/testing.rb +16 -11
  46. data/lib/tina4/validator.rb +7 -1
  47. data/lib/tina4/version.rb +1 -1
  48. data/lib/tina4/webserver.rb +28 -40
  49. data/lib/tina4.rb +12 -1
  50. metadata +3 -19
  51. data/lib/tina4/scss/tina4css/_alerts.scss +0 -34
  52. data/lib/tina4/scss/tina4css/_badges.scss +0 -22
  53. data/lib/tina4/scss/tina4css/_buttons.scss +0 -69
  54. data/lib/tina4/scss/tina4css/_cards.scss +0 -49
  55. data/lib/tina4/scss/tina4css/_forms.scss +0 -156
  56. data/lib/tina4/scss/tina4css/_grid.scss +0 -81
  57. data/lib/tina4/scss/tina4css/_modals.scss +0 -84
  58. data/lib/tina4/scss/tina4css/_nav.scss +0 -149
  59. data/lib/tina4/scss/tina4css/_pagination.scss +0 -63
  60. data/lib/tina4/scss/tina4css/_reset.scss +0 -94
  61. data/lib/tina4/scss/tina4css/_tables.scss +0 -54
  62. data/lib/tina4/scss/tina4css/_typography.scss +0 -55
  63. data/lib/tina4/scss/tina4css/_utilities.scss +0 -208
  64. data/lib/tina4/scss/tina4css/_variables.scss +0 -117
  65. data/lib/tina4/scss/tina4css/base.scss +0 -1
  66. data/lib/tina4/scss/tina4css/colors.scss +0 -48
  67. data/lib/tina4/scss/tina4css/tina4.scss +0 -18
@@ -1,149 +0,0 @@
1
- // Tina4 CSS Framework - Navigation
2
- // -----------------------------------
3
-
4
- .nav {
5
- display: flex;
6
- flex-wrap: wrap;
7
- padding-left: 0;
8
- margin-bottom: 0;
9
- list-style: none;
10
- }
11
-
12
- .nav-item { }
13
-
14
- .nav-link {
15
- display: block;
16
- padding: 0.5rem 1rem;
17
- color: $link-color;
18
- text-decoration: none;
19
- transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
20
-
21
- &:hover, &:focus {
22
- color: $link-hover-color;
23
- }
24
-
25
- &.disabled {
26
- color: $muted;
27
- pointer-events: none;
28
- cursor: default;
29
- }
30
-
31
- &.active {
32
- color: $primary;
33
- font-weight: $font-weight-bold;
34
- }
35
- }
36
-
37
- // Navbar
38
- .navbar {
39
- position: relative;
40
- display: flex;
41
- flex-wrap: wrap;
42
- align-items: center;
43
- justify-content: space-between;
44
- padding: 0.5rem 1rem;
45
- }
46
-
47
- .navbar-brand {
48
- padding-top: 0.3125rem;
49
- padding-bottom: 0.3125rem;
50
- margin-right: 1rem;
51
- font-size: $font-size-xl;
52
- font-weight: $font-weight-bold;
53
- color: inherit;
54
- text-decoration: none;
55
- white-space: nowrap;
56
- &:hover { color: inherit; opacity: 0.8; }
57
- }
58
-
59
- .navbar-nav {
60
- display: flex;
61
- flex-direction: column;
62
- padding-left: 0;
63
- margin-bottom: 0;
64
- list-style: none;
65
- .nav-link {
66
- padding-right: 0.5rem;
67
- padding-left: 0.5rem;
68
- }
69
- }
70
-
71
- .navbar-toggler {
72
- padding: 0.25rem 0.75rem;
73
- font-size: $font-size-lg;
74
- line-height: 1;
75
- background-color: transparent;
76
- border: 1px solid rgba($black, 0.1);
77
- border-radius: $border-radius;
78
- cursor: pointer;
79
- &:focus { outline: 0; box-shadow: 0 0 0 0.2rem rgba($primary, 0.25); }
80
- }
81
-
82
- .navbar-collapse {
83
- flex-basis: 100%;
84
- flex-grow: 1;
85
- align-items: center;
86
- display: none;
87
- &.show { display: flex; }
88
- }
89
-
90
- // Responsive expand classes
91
- @each $bp, $px in $breakpoints {
92
- .navbar-expand-#{$bp} {
93
- @media (min-width: $px) {
94
- .navbar-nav { flex-direction: row; }
95
- .navbar-collapse { display: flex; flex-basis: auto; }
96
- .navbar-toggler { display: none; }
97
- }
98
- }
99
- }
100
-
101
- // Legacy: bare .navbar also expands at lg
102
- @media (min-width: map-get($breakpoints, lg)) {
103
- .navbar-nav {
104
- flex-direction: row;
105
- }
106
- .navbar-collapse {
107
- display: flex;
108
- flex-basis: auto;
109
- }
110
- .navbar-toggler {
111
- display: none;
112
- }
113
- }
114
-
115
- .navbar-dark {
116
- color: $white;
117
- background-color: $dark;
118
- .navbar-brand { color: $white; }
119
- .nav-link { color: rgba($white, 0.75); &:hover, &.active { color: $white; } }
120
- }
121
-
122
- .navbar-light {
123
- background-color: $light;
124
- .nav-link { color: rgba($black, 0.55); &:hover, &.active { color: rgba($black, 0.9); } }
125
- }
126
-
127
- // Breadcrumb
128
- .breadcrumb {
129
- display: flex;
130
- flex-wrap: wrap;
131
- padding: 0.5rem 1rem;
132
- margin-bottom: 1rem;
133
- list-style: none;
134
- background-color: $light;
135
- border-radius: $border-radius;
136
- }
137
-
138
- .breadcrumb-item {
139
- & + .breadcrumb-item::before {
140
- display: inline-block;
141
- padding-right: 0.5rem;
142
- padding-left: 0.5rem;
143
- color: $muted;
144
- content: "/";
145
- }
146
- &.active {
147
- color: $muted;
148
- }
149
- }
@@ -1,63 +0,0 @@
1
- // Tina4 CSS Framework - Pagination
2
- // ----------------------------------
3
-
4
- .pagination {
5
- display: flex;
6
- flex-wrap: wrap;
7
- padding-left: 0;
8
- list-style: none;
9
- gap: 0.25rem;
10
- }
11
-
12
- .page-item {
13
- &.disabled .page-link {
14
- color: $muted;
15
- pointer-events: none;
16
- background-color: $body-bg;
17
- border-color: rgba($black, 0.1);
18
- }
19
-
20
- &.active .page-link {
21
- color: $white;
22
- background-color: $primary;
23
- border-color: $primary;
24
- }
25
- }
26
-
27
- .page-link {
28
- display: block;
29
- padding: 0.375rem 0.75rem;
30
- color: $primary;
31
- background-color: $body-bg;
32
- border: 1px solid rgba($black, 0.15);
33
- border-radius: $border-radius;
34
- text-decoration: none;
35
- line-height: 1.25;
36
- transition: color 0.15s, background-color 0.15s, border-color 0.15s;
37
-
38
- &:hover {
39
- color: darken($primary, 10%);
40
- background-color: rgba($primary, 0.08);
41
- border-color: rgba($black, 0.2);
42
- }
43
-
44
- &:focus {
45
- outline: 0;
46
- box-shadow: 0 0 0 0.2rem rgba($primary, 0.25);
47
- }
48
- }
49
-
50
- // CRUD component image preview
51
- .crud-img-preview {
52
- max-height: 200px;
53
- max-width: 100%;
54
- border-radius: $border-radius;
55
- object-fit: cover;
56
- }
57
-
58
- .crud-img-preview-sm {
59
- max-height: 180px;
60
- max-width: 100%;
61
- border-radius: $border-radius;
62
- object-fit: cover;
63
- }
@@ -1,94 +0,0 @@
1
- // Tina4 CSS Framework - Modern Reset
2
- // ------------------------------------
3
-
4
- *,
5
- *::before,
6
- *::after {
7
- box-sizing: border-box;
8
- }
9
-
10
- html {
11
- line-height: $line-height-base;
12
- -webkit-text-size-adjust: 100%;
13
- -moz-tab-size: 4;
14
- tab-size: 4;
15
- scroll-behavior: smooth;
16
- }
17
-
18
- body {
19
- margin: 0;
20
- font-family: $font-family-base;
21
- font-size: $font-size-base;
22
- font-weight: $font-weight-normal;
23
- line-height: $line-height-base;
24
- color: $body-color;
25
- background-color: $body-bg;
26
- -webkit-font-smoothing: antialiased;
27
- -moz-osx-font-smoothing: grayscale;
28
- }
29
-
30
- h1, h2, h3, h4, h5, h6 {
31
- margin-top: 0;
32
- margin-bottom: 0.5rem;
33
- font-weight: 500;
34
- line-height: $line-height-sm;
35
- }
36
-
37
- p {
38
- margin-top: 0;
39
- margin-bottom: 1rem;
40
- }
41
-
42
- ol, ul {
43
- padding-left: 2rem;
44
- margin-top: 0;
45
- margin-bottom: 1rem;
46
- }
47
-
48
- a {
49
- color: $link-color;
50
- text-decoration: none;
51
- &:hover {
52
- color: $link-hover-color;
53
- text-decoration: underline;
54
- }
55
- }
56
-
57
- img, svg {
58
- max-width: 100%;
59
- height: auto;
60
- vertical-align: middle;
61
- }
62
-
63
- table {
64
- border-collapse: collapse;
65
- caption-side: bottom;
66
- }
67
-
68
- button, input, optgroup, select, textarea {
69
- margin: 0;
70
- font-family: inherit;
71
- font-size: inherit;
72
- line-height: inherit;
73
- }
74
-
75
- button, select {
76
- text-transform: none;
77
- }
78
-
79
- button, [type="button"], [type="reset"], [type="submit"] {
80
- -webkit-appearance: button;
81
- cursor: pointer;
82
- }
83
-
84
- hr {
85
- margin: 1rem 0;
86
- color: inherit;
87
- border: 0;
88
- border-top: 1px solid rgba($black, 0.1);
89
- opacity: 0.25;
90
- }
91
-
92
- pre, code, kbd, samp { font-family: $font-family-mono; font-size: 1em; }
93
- pre { margin-top: 0; margin-bottom: 1rem; overflow: auto; }
94
- [hidden] { display: none !important; }
@@ -1,54 +0,0 @@
1
- // Tina4 CSS Framework - Tables
2
- // -------------------------------
3
-
4
- .table {
5
- width: 100%;
6
- margin-bottom: 1rem;
7
- vertical-align: top;
8
- border-color: rgba($black, 0.1);
9
-
10
- > :not(caption) > * > * {
11
- padding: 0.5rem;
12
- border-bottom-width: 1px;
13
- border-bottom-style: solid;
14
- border-bottom-color: inherit;
15
- }
16
-
17
- > thead {
18
- vertical-align: bottom;
19
- border-bottom: 2px solid currentColor;
20
- }
21
-
22
- > tbody > tr:last-child > * {
23
- border-bottom-color: transparent;
24
- }
25
- }
26
-
27
- .table-sm {
28
- > :not(caption) > * > * {
29
- padding: 0.25rem;
30
- }
31
- }
32
-
33
- .table-bordered {
34
- border: 1px solid rgba($black, 0.1);
35
- > :not(caption) > * > * {
36
- border-width: 1px;
37
- border-style: solid;
38
- border-color: inherit;
39
- }
40
- }
41
-
42
- .table-striped > tbody > tr:nth-of-type(odd) > * {
43
- background-color: rgba($black, 0.02);
44
- }
45
-
46
- .table-hover > tbody > tr:hover > * {
47
- background-color: rgba($black, 0.04);
48
- }
49
-
50
- .table-responsive {
51
- overflow-x: auto;
52
- -webkit-overflow-scrolling: touch;
53
- }
54
-
@@ -1,55 +0,0 @@
1
- // Tina4 CSS Framework - Typography
2
- // ------------------------------------
3
-
4
- h1 { font-size: $font-size-4xl; }
5
- h2 { font-size: $font-size-3xl; }
6
- h3 { font-size: $font-size-2xl; }
7
- h4 { font-size: $font-size-xl; }
8
- h5 { font-size: $font-size-lg; }
9
- h6 { font-size: $font-size-base; }
10
-
11
- small, .small {
12
- font-size: 0.875em;
13
- }
14
-
15
- mark, .mark {
16
- padding: 0.2em;
17
- background-color: rgba($warning, 0.3);
18
- }
19
-
20
- blockquote {
21
- margin: 0 0 1rem;
22
- padding: 0.5rem 1rem;
23
- border-left: 0.25rem solid rgba($black, 0.1);
24
- font-size: $font-size-lg;
25
- }
26
-
27
- code {
28
- font-size: 0.875em;
29
- color: $danger;
30
- word-wrap: break-word;
31
- }
32
-
33
- pre {
34
- display: block;
35
- padding: 1rem;
36
- font-size: 0.875em;
37
- color: $dark;
38
- background-color: $light;
39
- border-radius: $border-radius;
40
- }
41
-
42
- .list-unstyled {
43
- padding-left: 0;
44
- list-style: none;
45
- }
46
-
47
- .list-inline {
48
- padding-left: 0;
49
- list-style: none;
50
- }
51
-
52
- .list-inline-item {
53
- display: inline-block;
54
- &:not(:last-child) { margin-right: 0.5rem; }
55
- }
@@ -1,208 +0,0 @@
1
- // Tina4 CSS Framework - Utilities
2
- // ----------------------------------
3
-
4
- // Display
5
- $displays: none, block, flex, inline, inline-block;
6
-
7
- @each $d in $displays {
8
- .d-#{$d} { display: $d !important; }
9
- }
10
- .d-grid { display: grid !important; }
11
-
12
- // Responsive display (sm, md, lg only to save size)
13
- @each $bp in sm, md, lg {
14
- @media (min-width: map-get($breakpoints, $bp)) {
15
- @each $d in $displays {
16
- .d-#{$bp}-#{$d} { display: $d !important; }
17
- }
18
- }
19
- }
20
-
21
- // Flex utilities
22
- .flex-row { flex-direction: row !important; }
23
- .flex-column { flex-direction: column !important; }
24
- .flex-wrap { flex-wrap: wrap !important; }
25
- .flex-nowrap { flex-wrap: nowrap !important; }
26
- .flex-grow-0 { flex-grow: 0 !important; }
27
- .flex-grow-1 { flex-grow: 1 !important; }
28
-
29
- .justify-content-start { justify-content: flex-start !important; }
30
- .justify-content-end { justify-content: flex-end !important; }
31
- .justify-content-center { justify-content: center !important; }
32
- .justify-content-between { justify-content: space-between !important; }
33
- .justify-content-around { justify-content: space-around !important; }
34
-
35
- .align-items-start { align-items: flex-start !important; }
36
- .align-items-end { align-items: flex-end !important; }
37
- .align-items-center { align-items: center !important; }
38
-
39
- @each $key, $val in $spacers {
40
- .gap-#{$key} { gap: $val !important; }
41
- }
42
-
43
- // Spacing: margin and padding
44
- $spacing-props: (
45
- "m": "margin",
46
- "p": "padding"
47
- );
48
- $spacing-dirs: (
49
- "t": "-top",
50
- "b": "-bottom",
51
- "s": "-left",
52
- "e": "-right"
53
- );
54
-
55
- @each $abbr, $prop in $spacing-props {
56
- @each $key, $val in $spacers {
57
- .#{$abbr}-#{$key} { #{$prop}: $val !important; }
58
- }
59
- @each $dir, $suffix in $spacing-dirs {
60
- @each $key, $val in $spacers {
61
- .#{$abbr}#{$dir}-#{$key} { #{$prop}#{$suffix}: $val !important; }
62
- }
63
- }
64
- // Axis shortcuts: py-* (top+bottom), px-* (left+right)
65
- @each $key, $val in $spacers {
66
- .#{$abbr}y-#{$key} {
67
- #{$prop}-top: $val !important;
68
- #{$prop}-bottom: $val !important;
69
- }
70
- .#{$abbr}x-#{$key} {
71
- #{$prop}-left: $val !important;
72
- #{$prop}-right: $val !important;
73
- }
74
- }
75
- }
76
-
77
- .mx-auto { margin-left: auto !important; margin-right: auto !important; }
78
-
79
- // Text
80
- .text-start { text-align: left !important; }
81
- .text-center { text-align: center !important; }
82
- .text-end { text-align: right !important; }
83
- .text-uppercase { text-transform: uppercase !important; }
84
- .text-capitalize { text-transform: capitalize !important; }
85
- .text-nowrap { white-space: nowrap !important; }
86
- .text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
87
-
88
- .fw-bold { font-weight: $font-weight-bold !important; }
89
- .fw-normal { font-weight: $font-weight-normal !important; }
90
- .fw-light { font-weight: $font-weight-light !important; }
91
-
92
- @each $key, $size in $font-sizes {
93
- .fs-#{$key} { font-size: $size !important; }
94
- }
95
-
96
- // Text colors
97
- @each $name, $color in $theme-colors {
98
- .text-#{$name} { color: $color !important; }
99
- }
100
- .text-muted { color: $muted !important; }
101
- .text-white { color: $white !important; }
102
-
103
- // Background colors
104
- @each $name, $color in $theme-colors {
105
- .bg-#{$name} { background-color: $color !important; }
106
- }
107
- .bg-white { background-color: $white !important; }
108
-
109
- // Borders
110
- .border { border: 1px solid rgba($black, 0.1) !important; }
111
- .border-0 { border: 0 !important; }
112
- .rounded { border-radius: $border-radius !important; }
113
- .rounded-0 { border-radius: 0 !important; }
114
- .rounded-circle { border-radius: 50% !important; }
115
- .rounded-pill { border-radius: $border-radius-pill !important; }
116
-
117
- // Width and height
118
- @each $val in 25, 50, 75, 100 {
119
- .w-#{$val} { width: percentage($val / 100) !important; }
120
- .h-#{$val} { height: percentage($val / 100) !important; }
121
- }
122
- .mw-100 { max-width: 100% !important; }
123
- .mh-100 { max-height: 100% !important; }
124
-
125
- // Position
126
- .position-relative { position: relative !important; }
127
- .position-absolute { position: absolute !important; }
128
- .position-fixed { position: fixed !important; }
129
- .position-sticky { position: sticky !important; }
130
- .position-static { position: static !important; }
131
-
132
- // Visibility
133
- .visible { visibility: visible !important; }
134
- .invisible { visibility: hidden !important; }
135
-
136
- .overflow-hidden { overflow: hidden !important; }
137
- .overflow-auto { overflow: auto !important; }
138
-
139
- // Shadows
140
- .shadow { box-shadow: $shadow !important; }
141
- .shadow-sm { box-shadow: $shadow-sm !important; }
142
- .shadow-lg { box-shadow: $shadow-lg !important; }
143
- .shadow-none { box-shadow: none !important; }
144
-
145
- // Collapse
146
- .collapse { display: none; &.show { display: block; } }
147
-
148
- // Fade transition
149
- .fade { opacity: 0; transition: opacity 0.15s linear; &.show { opacity: 1; } }
150
-
151
- // Misc
152
- .clearfix::after { display: block; clear: both; content: ""; }
153
- .cursor-pointer { cursor: pointer !important; }
154
-
155
- // Close button (replaces Bootstrap's btn-close)
156
- .btn-close {
157
- box-sizing: content-box;
158
- width: 1em;
159
- height: 1em;
160
- padding: 0.25em;
161
- color: $black;
162
- background: transparent;
163
- border: 0;
164
- opacity: 0.5;
165
- cursor: pointer;
166
- font-size: 1.25rem;
167
- line-height: 1;
168
- &:hover { opacity: 0.75; }
169
- &:focus { opacity: 1; outline: 0; box-shadow: 0 0 0 0.2rem rgba($primary, 0.25); }
170
- }
171
-
172
- // Image utilities
173
- .img-fluid { max-width: 100%; height: auto; }
174
- .img-thumbnail {
175
- padding: 0.25rem;
176
- background-color: $body-bg;
177
- border: 1px solid rgba($black, 0.1);
178
- border-radius: $border-radius;
179
- max-width: 100%;
180
- height: auto;
181
- }
182
-
183
- // Border top/bottom helpers
184
- .border-top { border-top: 1px solid rgba($black, 0.1) !important; }
185
- .border-bottom { border-bottom: 1px solid rgba($black, 0.1) !important; }
186
-
187
- // Vertical alignment
188
- .align-middle { vertical-align: middle !important; }
189
- .align-top { vertical-align: top !important; }
190
- .align-bottom { vertical-align: bottom !important; }
191
-
192
- // Float
193
- .float-start { float: left !important; }
194
- .float-end { float: right !important; }
195
- .float-none { float: none !important; }
196
-
197
- // Screen reader only
198
- .visually-hidden {
199
- position: absolute !important;
200
- width: 1px !important;
201
- height: 1px !important;
202
- padding: 0 !important;
203
- margin: -1px !important;
204
- overflow: hidden !important;
205
- clip: rect(0, 0, 0, 0) !important;
206
- white-space: nowrap !important;
207
- border: 0 !important;
208
- }