plutonium 0.15.20 → 0.15.21

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.
@@ -0,0 +1,14 @@
1
+ import { Controller } from "@hotwired/stimulus"
2
+
3
+ // Connects to data-controller="easymde"
4
+ export default class extends Controller {
5
+ connect() {
6
+ console.log(`easymde connected: ${this.element}`)
7
+ self.easyMDE = new EasyMDE({ element: this.element })
8
+ }
9
+
10
+ disconnect() {
11
+ self.easyMDE.toTextArea()
12
+ self.easyMDE = null
13
+ }
14
+ }
@@ -21,6 +21,8 @@ import ResourceCollapseController from "./resource_collapse_controller.js"
21
21
  import ResourceDismissController from "./resource_dismiss_controller.js"
22
22
  import FrameNavigatorController from "./frame_navigator_controller.js"
23
23
  import ColorModeController from "./color_mode_controller.js"
24
+ import EasyMDEController from "./easymde_controller.js"
25
+ import SlimSelectController from "./slim_select_controller.js"
24
26
 
25
27
  export default function (application) {
26
28
  // Register controllers here
@@ -46,4 +48,6 @@ export default function (application) {
46
48
  application.register("resource-dismiss", ResourceDismissController)
47
49
  application.register("frame-navigator", FrameNavigatorController)
48
50
  application.register("color-mode", ColorModeController)
51
+ application.register("easymde", EasyMDEController)
52
+ application.register("slim-select", SlimSelectController)
49
53
  }
@@ -0,0 +1,16 @@
1
+ import { Controller } from "@hotwired/stimulus"
2
+
3
+ // Connects to data-controller="slim-select"
4
+ export default class extends Controller {
5
+ connect() {
6
+ console.log(`slim-select connected: ${this.element}`)
7
+ self.slimSelect = new SlimSelect({
8
+ select: this.element
9
+ })
10
+ }
11
+
12
+ disconnect() {
13
+ self.slimSelect.destroy()
14
+ self.slimSelect = null
15
+ }
16
+ }
data/tailwind.options.js CHANGED
@@ -9,21 +9,65 @@ export const content = [
9
9
  // requires users to have flowbite installed in their own project.
10
10
  './node_modules/flowbite/**/*.js',
11
11
  ];
12
+
12
13
  export const darkMode = "selector";
14
+
13
15
  export const plugins = [
14
16
  // requires users to have the required packages installed in their own project.
15
17
  "@tailwindcss/forms",
16
18
  "@tailwindcss/typography",
17
19
  "flowbite/plugin",
20
+ "flowbite-typography",
18
21
  function ({ addVariant }) {
19
22
  // This creates a variant that applies when an ancestor has data-dyna="true"
20
- // addVariant('dyna-frame', '&:has([data-dyna-frame="true"] &)')
21
- // Or if you prefer using a class instead of data attribute:
22
23
  addVariant('dyna', ':where(.dyna, .dyna *) &')
23
24
  }
24
25
  ];
26
+
25
27
  export const theme = {
26
28
  extend: {
29
+ typography: ({ theme }) => ({
30
+ primary: {
31
+ css: {
32
+ '--tw-prose-body': theme('colors.secondary.700'),
33
+ '--tw-prose-headings': theme('colors.secondary.900'),
34
+ '--tw-prose-lead': theme('colors.secondary.600'),
35
+ '--tw-prose-links': theme('colors.primary.600'),
36
+ '--tw-prose-bold': theme('colors.secondary.900'),
37
+ '--tw-prose-counters': theme('colors.primary.500'),
38
+ '--tw-prose-bullets': theme('colors.primary.500'),
39
+ '--tw-prose-hr': theme('colors.primary.200'),
40
+ '--tw-prose-quotes': theme('colors.secondary.900'),
41
+ '--tw-prose-quote-borders': theme('colors.primary.300'),
42
+ '--tw-prose-captions': theme('colors.secondary.700'),
43
+ '--tw-prose-code': theme('colors.secondary.900'),
44
+ '--tw-prose-code-bg': theme('colors.primary.50'),
45
+ '--tw-prose-pre-code': theme('colors.primary.100'),
46
+ '--tw-prose-pre-bg': theme('colors.secondary.900'),
47
+ '--tw-prose-th-borders': theme('colors.primary.300'),
48
+ '--tw-prose-td-borders': theme('colors.primary.200'),
49
+ '--tw-prose-th-bg': theme('colors.primary.50'),
50
+ // Dark mode
51
+ '--tw-prose-invert-body': theme('colors.primary.200'),
52
+ '--tw-prose-invert-headings': theme('colors.white'),
53
+ '--tw-prose-invert-lead': theme('colors.primary.300'),
54
+ '--tw-prose-invert-links': theme('colors.primary.400'),
55
+ '--tw-prose-invert-bold': theme('colors.white'),
56
+ '--tw-prose-invert-counters': theme('colors.primary.400'),
57
+ '--tw-prose-invert-bullets': theme('colors.primary.600'),
58
+ '--tw-prose-invert-hr': theme('colors.primary.700'),
59
+ '--tw-prose-invert-quotes': theme('colors.primary.100'),
60
+ '--tw-prose-invert-quote-borders': theme('colors.primary.700'),
61
+ '--tw-prose-invert-captions': theme('colors.primary.400'),
62
+ '--tw-prose-invert-code': theme('colors.white'),
63
+ '--tw-prose-invert-pre-code': theme('colors.primary.300'),
64
+ '--tw-prose-invert-pre-bg': 'rgb(0 0 0 / 50%)',
65
+ '--tw-prose-invert-th-borders': theme('colors.primary.600'),
66
+ '--tw-prose-invert-td-borders': theme('colors.primary.700'),
67
+ '--tw-prose-invert-th-bg': theme('colors.primary.700'),
68
+ },
69
+ },
70
+ }),
27
71
  colors: {
28
72
  primary: {
29
73
  50: '#F0FDFD',
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plutonium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.20
4
+ version: 0.15.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Froelich
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-11-22 00:00:00.000000000 Z
11
+ date: 2024-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: zeitwerk
@@ -282,6 +282,20 @@ dependencies:
282
282
  - - ">="
283
283
  - !ruby/object:Gem::Version
284
284
  version: '0'
285
+ - !ruby/object:Gem::Dependency
286
+ name: redcarpet
287
+ requirement: !ruby/object:Gem::Requirement
288
+ requirements:
289
+ - - ">="
290
+ - !ruby/object:Gem::Version
291
+ version: '0'
292
+ type: :runtime
293
+ prerelease: false
294
+ version_requirements: !ruby/object:Gem::Requirement
295
+ requirements:
296
+ - - ">="
297
+ - !ruby/object:Gem::Version
298
+ version: '0'
285
299
  - !ruby/object:Gem::Dependency
286
300
  name: rake
287
301
  requirement: !ruby/object:Gem::Requirement
@@ -1387,14 +1401,17 @@ files:
1387
1401
  - lib/plutonium/ui/component/methods.rb
1388
1402
  - lib/plutonium/ui/display/base.rb
1389
1403
  - lib/plutonium/ui/display/component/association.rb
1404
+ - lib/plutonium/ui/display/component/markdown.rb
1390
1405
  - lib/plutonium/ui/display/resource.rb
1391
1406
  - lib/plutonium/ui/display/theme.rb
1392
1407
  - lib/plutonium/ui/dyna_frame/content.rb
1393
1408
  - lib/plutonium/ui/dyna_frame/host.rb
1394
1409
  - lib/plutonium/ui/empty_card.rb
1395
1410
  - lib/plutonium/ui/form/base.rb
1411
+ - lib/plutonium/ui/form/components/easymde.rb
1396
1412
  - lib/plutonium/ui/form/concerns/renders_nested_resource_fields.rb
1397
1413
  - lib/plutonium/ui/form/interaction.rb
1414
+ - lib/plutonium/ui/form/options/inferred_types.rb
1398
1415
  - lib/plutonium/ui/form/query.rb
1399
1416
  - lib/plutonium/ui/form/resource.rb
1400
1417
  - lib/plutonium/ui/form/theme.rb
@@ -1441,7 +1458,9 @@ files:
1441
1458
  - src/css/core.css
1442
1459
  - src/css/easymde.css
1443
1460
  - src/css/plutonium.css
1461
+ - src/css/slim_select.css
1444
1462
  - src/js/controllers/color_mode_controller.js
1463
+ - src/js/controllers/easymde_controller.js
1445
1464
  - src/js/controllers/form_controller.js
1446
1465
  - src/js/controllers/frame_navigator_controller.js
1447
1466
  - src/js/controllers/has_many_panel_controller.js
@@ -1461,6 +1480,7 @@ files:
1461
1480
  - src/js/controllers/sidebar_controller.js
1462
1481
  - src/js/controllers/sidebar_menu_controller.js
1463
1482
  - src/js/controllers/sidebar_menu_item_controller.js
1483
+ - src/js/controllers/slim_select_controller.js
1464
1484
  - src/js/controllers/table_controller.js
1465
1485
  - src/js/controllers/table_search_input_controller.js
1466
1486
  - src/js/controllers/table_toolbar_controller.js