reflex-components-plotly 0.9.7a1__tar.gz → 0.10.0a1__tar.gz

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.
@@ -7,7 +7,13 @@
7
7
  .mypy_cache/
8
8
  assets/external/*
9
9
  dist/*
10
- examples/
10
+ # Only the tracked examples; private apps under examples/ stay ignored. The
11
+ # pattern has a separator in the middle, so it is anchored to this directory
12
+ # and leaves the examples that live inside packages and tests alone.
13
+ examples/*
14
+ !examples/README.md
15
+ !examples/ruff.toml
16
+ !examples/playground/
11
17
  .web
12
18
  .states
13
19
  .idea
@@ -21,6 +27,7 @@ requirements.txt
21
27
  .pyi_generator_diff
22
28
  reflex.db
23
29
  .codspeed
30
+ .reflex-bench/
24
31
  .env
25
32
  .env.*
26
33
  node_modules
@@ -1,4 +1,11 @@
1
- ## v0.9.7a1 (2026-09-18)
1
+ ## v0.10.0a1 (2026-10-05)
2
+
3
+ ### Bug Fixes
4
+
5
+ - Normalize string Plotly layout titles to the `{"title": {"text": "..."}}` format required by Plotly.js. ([#7226](https://github.com/reflex-dev/reflex/issues/7226))
6
+
7
+
8
+ ## v0.9.7 (2026-09-21)
2
9
 
3
10
  ### Bug Fixes
4
11
 
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: reflex-components-plotly
3
- Version: 0.9.7a1
3
+ Version: 0.10.0a1
4
4
  Summary: Reflex plotly components.
5
5
  Author-email: Khaleel Al-Adhami <khaleel@reflex.dev>
6
6
  Maintainer-email: Khaleel Al-Adhami <khaleel@reflex.dev>
7
7
  License: Apache-2.0
8
8
  Requires-Python: >=3.10
9
- Requires-Dist: reflex-base>=0.9.12a1
9
+ Requires-Dist: reflex-base>=0.9.12
10
10
  Requires-Dist: reflex-components-core>=0.9.0
11
11
  Description-Content-Type: text/markdown
12
12
 
@@ -10,7 +10,7 @@ requires-python = ">=3.10"
10
10
  dependencies = [
11
11
  # The unversioned "mergician" import resolves against the pin in
12
12
  # reflex-base's PackageJson.DEPENDENCIES.
13
- "reflex-base >= 0.9.12a1",
13
+ "reflex-base >= 0.9.12",
14
14
  "reflex-components-core >= 0.9.0",
15
15
  ]
16
16
 
@@ -20,6 +20,7 @@ source = "uv-dynamic-versioning"
20
20
  [tool.uv-dynamic-versioning]
21
21
  pattern-prefix = "reflex-components-plotly-"
22
22
  fallback-version = "0.0.0dev0"
23
+ bump = true
23
24
 
24
25
  [tool.hatch.build]
25
26
  # Include uncommitted pyi stubs generated for this package.
@@ -215,6 +215,15 @@ class Plotly(NoSSRComponent):
215
215
  codes = [
216
216
  "const removeUndefined = (obj) => {Object.keys(obj).forEach(key => obj[key] === undefined && delete obj[key]); return obj}",
217
217
  """
218
+ const _rxNormalizePlotlyLayout = (layout) => {
219
+ if (!layout || typeof layout !== "object" || typeof layout.title !== "string") {
220
+ return layout;
221
+ }
222
+
223
+ return {...layout, title: {text: layout.title}};
224
+ }
225
+ """,
226
+ """
218
227
  const extractPoints = (points) => {
219
228
  if (!points) return [];
220
229
  return points.map(point => {
@@ -323,10 +332,9 @@ const _rxGetPlotlyLocaleConfig = (config, locale, plotlyLocales) => {
323
332
  figure = self.data.to(dict) if self.data is not None else Var.create({})
324
333
  merge_dicts = [] # Data will be merged and spread from these dict Vars
325
334
  if self.layout is not None:
326
- # Why is this not a literal dict? Great question... it didn't work
327
- # reliably because of how _var_name_unwrapped strips the outer curly
328
- # brackets if any of the contained Vars depend on state.
329
- layout_dict = LiteralVar.create({"layout": self.layout})
335
+ layout_dict = Var(
336
+ _js_expr=f"{{layout: _rxNormalizePlotlyLayout({self.layout})}}"
337
+ )
330
338
  merge_dicts.append(layout_dict)
331
339
  if self.template is not None:
332
340
  template_dict = LiteralVar.create({"layout": {"template": self.template}})
@@ -337,8 +345,10 @@ const _rxGetPlotlyLocaleConfig = (config, locale, plotlyLocales) => {
337
345
  *tag.special_props,
338
346
  # Merge all dictionaries and spread the result over props.
339
347
  Var(
340
- _js_expr=f"{{...mergician({figure!s},"
341
- f"{','.join(str(md) for md in merge_dicts)})}}",
348
+ _js_expr=(
349
+ f"{{ ...mergician({figure!s}, "
350
+ f"...{Var.create(merge_dicts)!s}) }}"
351
+ ),
342
352
  ),
343
353
  ]
344
354
  )