turbo_reflex 0.0.28 → 0.0.30

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,4 @@
1
+ import 'turbo_ready'
1
2
  import './turbo'
2
3
  import schema from './schema'
3
4
  import { dispatch, allEvents as events } from './events'
@@ -74,7 +75,7 @@ delegates.register('change', [
74
75
  delegates.register('submit', [`form[${schema.reflexAttribute}]`])
75
76
  delegates.register('click', [`[${schema.reflexAttribute}]`])
76
77
 
77
- export default self.TurboReflex = {
78
+ self.TurboReflex = {
78
79
  logger,
79
80
  schema,
80
81
  registerEventDelegate: delegates.register,
@@ -92,3 +93,5 @@ export default self.TurboReflex = {
92
93
  return state.delta
93
94
  }
94
95
  }
96
+
97
+ export default self.TurboReflex
@@ -17,11 +17,14 @@ require_relative "attribute_set"
17
17
  # * render ...................... Renders Rails templates, partials, etc. (doesn't halt controller request handling)
18
18
  # * render_response ............. Renders a full controller response
19
19
  # * renderer .................... An ActionController::Renderer
20
- # * prevent_controller_action ... Prevents the rails controller/action from running (i.e. the reflex handles the response entirely)
21
20
  # * turbo_stream ................ A Turbo Stream TagBuilder
22
21
  # * turbo_streams ............... A list of Turbo Streams to append to the response (also aliased as streams)
23
22
  # * state ....................... An object that stores ephemeral `state`
24
23
  #
24
+ # They also have access to the following class methods:
25
+ #
26
+ # * prevent_controller_action ... Prevents the rails controller/action from running (i.e. the reflex handles the response entirely)
27
+ #
25
28
  class TurboReflex::Base
26
29
  class << self
27
30
  def preventers
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "turbo-rails"
4
+ require "turbo_ready"
4
5
  require_relative "version"
5
6
  require_relative "base"
6
7
  require_relative "controller_pack"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TurboReflex
4
- VERSION = "0.0.28"
4
+ VERSION = "0.0.30"
5
5
  end
data/lib/turbo_reflex.rb CHANGED
@@ -1,3 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "turbo_ready"
3
4
  require "turbo_reflex/engine"
data/package.json CHANGED
@@ -1,23 +1,25 @@
1
1
  {
2
2
  "name": "turbo_reflex",
3
- "version": "0.0.27",
3
+ "version": "0.0.29",
4
4
  "description": "Reflexes for Turbo Frames that help you build robust reactive applications",
5
5
  "main": "app/javascript/index.js",
6
6
  "repository": "https://github.com/hopsoft/turbo_reflex",
7
7
  "author": "Nate Hopkins (hopsoft) <natehop@gmail.com>",
8
8
  "license": "MIT",
9
+ "dependencies": {
10
+ "turbo_ready": ">= 0.1.4"
11
+ },
9
12
  "peerDependencies": {
10
- "@hotwired/turbo-rails": ">= 7.1",
11
- "turbo_ready": ">= 0.1"
13
+ "@hotwired/turbo-rails": ">= 7.2.0"
12
14
  },
13
15
  "devDependencies": {
14
- "esbuild": "^0.15.7",
16
+ "esbuild": "^0.16.3",
15
17
  "eslint": "^8.19.0",
16
18
  "flowbite": "^1.5.3",
17
19
  "prettier-standard": "^16.4.1",
18
20
  "rustywind": "^0.15.1"
19
21
  },
20
22
  "scripts": {
21
- "build": "esbuild app/javascript/index.js --bundle --minify --sourcemap --format=esm --outfile=app/assets/builds/turbo_reflex.js"
23
+ "build": "esbuild app/javascript/index.js --bundle --minify --sourcemap --format=esm --target=es2017 --analyze --outfile=app/assets/builds/turbo_reflex.js"
22
24
  }
23
25
  }