workpeg 0.140.2__tar.gz → 0.141.0__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.
Files changed (114) hide show
  1. {workpeg-0.140.2/src/workpeg.egg-info → workpeg-0.141.0}/PKG-INFO +1 -1
  2. {workpeg-0.140.2 → workpeg-0.141.0}/pyproject.toml +1 -1
  3. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/scaffold.py +80 -154
  4. {workpeg-0.140.2 → workpeg-0.141.0/src/workpeg.egg-info}/PKG-INFO +1 -1
  5. {workpeg-0.140.2 → workpeg-0.141.0}/LICENSE +0 -0
  6. {workpeg-0.140.2 → workpeg-0.141.0}/MANIFEST.in +0 -0
  7. {workpeg-0.140.2 → workpeg-0.141.0}/README.md +0 -0
  8. {workpeg-0.140.2 → workpeg-0.141.0}/setup.cfg +0 -0
  9. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/__init__.py +0 -0
  10. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/auth.py +0 -0
  11. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/build.py +0 -0
  12. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/cdn.py +0 -0
  13. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/cli.py +0 -0
  14. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/config.py +0 -0
  15. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/context.py +0 -0
  16. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/create_new.py +0 -0
  17. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/doctor.py +0 -0
  18. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/project.py +0 -0
  19. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/run.py +0 -0
  20. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/runtime.py +0 -0
  21. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/sandbox/__init__.py +0 -0
  22. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/sandbox/docker_driver.py +0 -0
  23. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/sandbox/driver.py +0 -0
  24. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/submit.py +0 -0
  25. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/templates/__init__.py +0 -0
  26. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/templates/functions/Dockerfile +0 -0
  27. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/templates/functions/LICENSE +0 -0
  28. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/templates/functions/README.md +0 -0
  29. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/templates/functions/app/__init__.py +0 -0
  30. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/templates/functions/app/main.py +0 -0
  31. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/templates/functions/requirements.txt +0 -0
  32. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/templates/project/README.md +0 -0
  33. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/templates/project/function/Dockerfile +0 -0
  34. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/templates/project/function/app/__init__.py +0 -0
  35. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/templates/project/function/app/main.py +0 -0
  36. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/templates/project/function/requirements.txt +0 -0
  37. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/templates/project/ui/main.py +0 -0
  38. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/templates/project/workpeg.json +0 -0
  39. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/__init__.py +0 -0
  40. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/actions.py +0 -0
  41. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/actions_manifest.py +0 -0
  42. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/app.py +0 -0
  43. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/build.py +0 -0
  44. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/compiler/__init__.py +0 -0
  45. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/compiler/ast_parser.py +0 -0
  46. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/compiler/ir.py +0 -0
  47. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/compiler/js_generator.py +0 -0
  48. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/create.py +0 -0
  49. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/fake_cloud.py +0 -0
  50. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/minify.py +0 -0
  51. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/render_nodes.py +0 -0
  52. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/renderers_manifest.py +0 -0
  53. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/runtime/ai-concurrent-replies.md +0 -0
  54. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/runtime/ai-prompt-queue.md +0 -0
  55. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/runtime/ai-question-frame.md +0 -0
  56. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/runtime/ai-subagent-frame.md +0 -0
  57. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/runtime/ai.js +0 -0
  58. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/runtime/fonts/OFL.txt +0 -0
  59. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/runtime/fonts/geist-italic-cyrillic-ext.af944491.woff2 +0 -0
  60. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/runtime/fonts/geist-italic-cyrillic.88be6946.woff2 +0 -0
  61. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/runtime/fonts/geist-italic-latin-ext.370a8962.woff2 +0 -0
  62. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/runtime/fonts/geist-italic-latin.7611b95c.woff2 +0 -0
  63. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/runtime/fonts/geist-italic-vietnamese.8dfcf303.woff2 +0 -0
  64. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/runtime/fonts/geist-normal-cyrillic-ext.b7a545bb.woff2 +0 -0
  65. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/runtime/fonts/geist-normal-cyrillic.6129fc85.woff2 +0 -0
  66. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/runtime/fonts/geist-normal-latin-ext.58a6b173.woff2 +0 -0
  67. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/runtime/fonts/geist-normal-latin.9b6f5ff4.woff2 +0 -0
  68. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/runtime/fonts/geist-normal-vietnamese.f689f638.woff2 +0 -0
  69. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/runtime/icons.css.gz +0 -0
  70. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/runtime/overlay.js +0 -0
  71. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/runtime/pegment.css +0 -0
  72. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/runtime/scaffold.js +0 -0
  73. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/runtime/workpeg-runtime.js +0 -0
  74. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/search_manifest.py +0 -0
  75. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/serve.py +0 -0
  76. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/skills_manifest.py +0 -0
  77. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/state.py +0 -0
  78. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/validators.py +0 -0
  79. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/watcher.py +0 -0
  80. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/widgets/__init__.py +0 -0
  81. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/widgets/base.py +0 -0
  82. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/widgets/canvas.py +0 -0
  83. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/widgets/display.py +0 -0
  84. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/widgets/fields.py +0 -0
  85. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/widgets/forms.py +0 -0
  86. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/widgets/futures.py +0 -0
  87. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/widgets/gestures.py +0 -0
  88. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/widgets/interactive.py +0 -0
  89. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/ui/widgets/layout.py +0 -0
  90. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg/utils.py +0 -0
  91. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg.egg-info/SOURCES.txt +0 -0
  92. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg.egg-info/dependency_links.txt +0 -0
  93. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg.egg-info/entry_points.txt +0 -0
  94. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg.egg-info/requires.txt +0 -0
  95. {workpeg-0.140.2 → workpeg-0.141.0}/src/workpeg.egg-info/top_level.txt +0 -0
  96. {workpeg-0.140.2 → workpeg-0.141.0}/tests/test_auth.py +0 -0
  97. {workpeg-0.140.2 → workpeg-0.141.0}/tests/test_build.py +0 -0
  98. {workpeg-0.140.2 → workpeg-0.141.0}/tests/test_cdn.py +0 -0
  99. {workpeg-0.140.2 → workpeg-0.141.0}/tests/test_cdn_publish.py +0 -0
  100. {workpeg-0.140.2 → workpeg-0.141.0}/tests/test_changelog.py +0 -0
  101. {workpeg-0.140.2 → workpeg-0.141.0}/tests/test_changelog_guard.py +0 -0
  102. {workpeg-0.140.2 → workpeg-0.141.0}/tests/test_cli.py +0 -0
  103. {workpeg-0.140.2 → workpeg-0.141.0}/tests/test_config.py +0 -0
  104. {workpeg-0.140.2 → workpeg-0.141.0}/tests/test_context.py +0 -0
  105. {workpeg-0.140.2 → workpeg-0.141.0}/tests/test_create_new.py +0 -0
  106. {workpeg-0.140.2 → workpeg-0.141.0}/tests/test_doctor.py +0 -0
  107. {workpeg-0.140.2 → workpeg-0.141.0}/tests/test_project_create.py +0 -0
  108. {workpeg-0.140.2 → workpeg-0.141.0}/tests/test_release_script.py +0 -0
  109. {workpeg-0.140.2 → workpeg-0.141.0}/tests/test_run.py +0 -0
  110. {workpeg-0.140.2 → workpeg-0.141.0}/tests/test_runtime.py +0 -0
  111. {workpeg-0.140.2 → workpeg-0.141.0}/tests/test_submit.py +0 -0
  112. {workpeg-0.140.2 → workpeg-0.141.0}/tests/test_utils.py +0 -0
  113. {workpeg-0.140.2 → workpeg-0.141.0}/tests/test_version.py +0 -0
  114. {workpeg-0.140.2 → workpeg-0.141.0}/tests/test_watch_pipeline.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: workpeg
3
- Version: 0.140.2
3
+ Version: 0.141.0
4
4
  Summary: Workpeg function runtime and SDK
5
5
  Author-email: Workpeg <support@workpeg.com>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "workpeg"
7
- version = "0.140.2"
7
+ version = "0.141.0"
8
8
  description = "Workpeg function runtime and SDK"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -291,9 +291,6 @@ class NavItem(Component):
291
291
  NavItem("Kanban", biz_url("/kanban"), icon="layout-kanban:bolder")
292
292
  NavItem("Vault", biz_url("/vault"), icon="shield-lock:thin")
293
293
 
294
- ``icon=None`` draws no icon and no space for one — what a sub-item
295
- inside a :class:`NavSection` wants, where the group's own icon is the
296
- only one in the column.
297
294
 
298
295
  On collapse the icon stays and re-centres while the label hides. See
299
296
  :class:`StaticNavItem` (never changes) and :class:`HidingNavItem` (the whole
@@ -388,39 +385,6 @@ class NavItem(Component):
388
385
  ),
389
386
  *self.submenu, placement="right",
390
387
  )
391
- # ── plain link, WITHOUT an icon ─────────────────────────────────────
392
- # `icon=None` means no icon at all, and it has to be its own return
393
- # rather than a ternary inside the Row: there is no widget that means
394
- # "nothing here". `icon=""` renders `ti ti-`, an empty glyph box that
395
- # still takes the icon's width — which is how a sub-item under a
396
- # NavSection ends up indented one notch further than its siblings.
397
- if not self.icon:
398
- return Link(
399
- Expanded(Row(
400
- NavLabel(
401
- _NavLabelText(self.label),
402
- Spacer(),
403
- _NavActionTray(self.actions, self.on_action,
404
- self.menu, self.on_menu, self.context),
405
- ),
406
- align="center", gap=8,
407
- )),
408
- href=self.href,
409
- title=self.label,
410
- style={
411
- "display": "flex", "alignItems": "center",
412
- "width": "100%", "boxSizing": "border-box",
413
- "height": "36px",
414
- "paddingTop": "0", "paddingBottom": "0",
415
- "paddingRight": "12px",
416
- "paddingLeft": "var(--pg-collapse-pl)",
417
- "borderRadius": "8px",
418
- "color": "var(--color-text-secondary)",
419
- "textDecoration": "none", "transition": _TR_PAD,
420
- ":hover": {"background": "var(--color-bg-active)"},
421
- ":current": {"background": "var(--color-bg-active)"},
422
- },
423
- )
424
388
  # ── plain link ──────────────────────────────────────────────────────
425
389
  return Link(
426
390
  Expanded(Row(
@@ -548,40 +512,101 @@ class NavSection(Component):
548
512
  chevron) to fold the items away; the chevron rotates and the content
549
513
  animates shut. Each section owns its own open state — nothing to wire.
550
514
 
551
- Two dresses, one fold. Without an ``icon`` the header is a small caption
552
- above its items — a heading that happens to fold. With one it becomes a
553
- NAV ROW: an icon, a full-size label and the chevron, sized and coloured
554
- exactly like a :class:`NavItem`, with its items indented beneath it::
515
+ The header is a small caption above its items — the design's
516
+ ``.pg-nav-sec``. To draw it as anything else, pass ``header=``: a widget
517
+ that takes the caption's place, composed however the rail needs it::
555
518
 
556
- NavSection("Customer Management", NavItem("Clients", "/clients"),
557
- icon="address-book")
519
+ NavSection("Private", NavItem("Kanban", biz_url("/kanban")))
520
+ NavSection(
521
+ "Customer Management",
522
+ NavItem("Clients", biz_url("/clients"), icon="users"),
523
+ header=Row(Icon("address-book", size=18),
524
+ Text("Customer Management"), align="center", gap=8),
525
+ )
558
526
 
559
- That second form is a menu rather than a heading, and the indent is what
560
- says so — a child at the same inset as its parent reads as a sibling
561
- that happens to sit below it.
527
+ ``title`` stays the accessible name either way. Composition rather than
528
+ an ``icon=`` argument, because an argument fixes one shape and a header
529
+ is any shape — and because a group's look belongs to whoever draws the
530
+ rail, not to this widget.
562
531
 
563
532
  Every group starts open. There is deliberately no ``open=False``: a
564
533
  constructor argument of that name is assigned by the generated
565
534
  ``_applyProps`` on EVERY render, which overwrites the State field of the
566
- same name — so the toggle wrote ``this.state.open`` while ``build()``
567
- read the clobbered ``this.open``, and the section never folded. Seeding
568
- a State from a prop needs a first-render hook the Component API does not
569
- have.
535
+ same name — the toggle wrote ``this.state.open`` while ``build()`` read
536
+ the clobbered ``this.open``, and the section never folded. Use
537
+ :class:`FoldedNavSection` to start shut.
570
538
  """
571
539
 
572
540
  open = State(True)
573
541
 
574
- def __init__(self, title, *items, icon=None):
542
+ def __init__(self, title, *items, header=None):
575
543
  self.title = title
576
544
  self.items = items
577
- self.icon = icon
545
+ self.header = header
578
546
 
579
547
  def _toggle(self):
580
548
  self.open = False if self.open else True
581
549
 
550
+ def _chevron(self):
551
+ return Container(
552
+ Icon("chevron-down", size=14,
553
+ color="var(--color-text-tertiary)"),
554
+ style={
555
+ "display": "flex", "alignItems": "center",
556
+ "justifyContent": "center",
557
+ "width": "16px", "height": "16px",
558
+ "transform": ("rotate(0deg)" if self.open
559
+ else "rotate(-90deg)"),
560
+ "transition": "transform 0.18s "
561
+ "cubic-bezier(0.4, 0, 0.2, 1)",
562
+ },
563
+ )
564
+
565
+ def _items(self):
566
+ # ── content: folds shut under the header ────────────────────────
567
+ return Container(
568
+ Column(*self.items, gap=2, align="stretch"),
569
+ style={
570
+ "overflow": "hidden",
571
+ "maxHeight": "2000px" if self.open else "0px",
572
+ "opacity": "1" if self.open else "0",
573
+ "transition":
574
+ "max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1), "
575
+ "opacity 0.18s cubic-bezier(0.4, 0, 0.2, 1)",
576
+ },
577
+ )
578
+
582
579
  def build(self):
583
- if self.icon:
584
- return self._as_nav_row()
580
+ if self.header:
581
+ # A composed header: whatever was passed, then the chevron. The
582
+ # same padding, cursor and fold as the caption form — only the
583
+ # label changes hands.
584
+ return Column(
585
+ GestureDetector(
586
+ Container(
587
+ Expanded(Row(
588
+ self.header,
589
+ Spacer(),
590
+ self._chevron(),
591
+ align="center", gap=4,
592
+ )),
593
+ style={
594
+ "display": "flex", "alignItems": "center",
595
+ "width": "100%", "boxSizing": "border-box",
596
+ "padding": "8px 8px 4px", "cursor": "pointer",
597
+ "userSelect": "none",
598
+ "transition":
599
+ "opacity 0.18s cubic-bezier(0.4, 0, 0.2, 1)",
600
+ ":rest": {"opacity": "var(--pg-collapse-op)"},
601
+ ":hover": {"opacity": "0.7"},
602
+ },
603
+ ),
604
+ on_tap=self._toggle,
605
+ ),
606
+ self._items(),
607
+ gap=0,
608
+ align="stretch",
609
+ )
585
610
  return Column(
586
611
  # ── header: title + chevron, click to fold ──────────────────────
587
612
  GestureDetector(
@@ -601,19 +626,7 @@ class NavSection(Component):
601
626
  "whiteSpace": "nowrap",
602
627
  }),
603
628
  Spacer(),
604
- Container(
605
- Icon("chevron-down", size=14,
606
- color="var(--color-text-tertiary)"),
607
- style={
608
- "display": "flex", "alignItems": "center",
609
- "justifyContent": "center",
610
- "width": "16px", "height": "16px",
611
- "transform": ("rotate(0deg)" if self.open
612
- else "rotate(-90deg)"),
613
- "transition": "transform 0.18s "
614
- "cubic-bezier(0.4, 0, 0.2, 1)",
615
- },
616
- ),
629
+ self._chevron(),
617
630
  align="center", gap=4,
618
631
  )),
619
632
  style={
@@ -632,100 +645,13 @@ class NavSection(Component):
632
645
  ),
633
646
  on_tap=self._toggle,
634
647
  ),
635
- # ── content: folds shut under the header ────────────────────────
636
- Container(
637
- Column(*self.items, gap=2, align="stretch"),
638
- style={
639
- "overflow": "hidden",
640
- "maxHeight": "2000px" if self.open else "0px",
641
- "opacity": "1" if self.open else "0",
642
- "transition":
643
- "max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1), "
644
- "opacity 0.18s cubic-bezier(0.4, 0, 0.2, 1)",
645
- },
646
- ),
648
+ self._items(),
647
649
  gap=0,
648
650
  # stretch (not start) so a submenu item fills the row and its
649
651
  # chevron lands flush at the end, like items outside a section.
650
652
  align="stretch",
651
653
  )
652
654
 
653
- def _as_nav_row(self):
654
- """The header dressed as a nav item, with its items indented under it.
655
-
656
- Every number here is :class:`NavItem`'s, not a second set that would
657
- drift from it: the 36px row, the 8px radius, the 18px icon, the
658
- collapse-aware left padding, and the same hover background. A group
659
- header that sat a pixel off from the items around it would read as a
660
- different kind of thing, which is exactly what it is not.
661
- """
662
- return Column(
663
- GestureDetector(
664
- Container(
665
- Expanded(Row(
666
- Icon(self.icon, size=18,
667
- color="var(--color-icon-primary)"),
668
- # NavLabel, so the label fades and the icon re-centres
669
- # when the rail closes — the same hide every other nav
670
- # row uses. The chevron rides inside it: a closed rail
671
- # has no room for a disclosure the visitor cannot act
672
- # on, and its items are shown flat there anyway.
673
- NavLabel(
674
- _NavLabelText(self.title),
675
- Spacer(),
676
- Container(
677
- Icon("chevron-down", size=14,
678
- color="var(--color-text-tertiary)"),
679
- style={
680
- "display": "flex",
681
- "alignItems": "center",
682
- "justifyContent": "center",
683
- "width": "16px", "height": "16px",
684
- "transform": ("rotate(0deg)" if self.open
685
- else "rotate(-90deg)"),
686
- "transition": "transform 0.18s "
687
- "cubic-bezier(0.4,0,0.2,1)",
688
- },
689
- ),
690
- ),
691
- align="center", gap=8,
692
- )),
693
- style={
694
- "display": "flex", "alignItems": "center",
695
- "height": "36px", "width": "100%",
696
- "boxSizing": "border-box",
697
- "paddingTop": "0", "paddingBottom": "0",
698
- "paddingRight": "12px",
699
- "paddingLeft": "var(--pg-collapse-pl)",
700
- "borderRadius": "8px", "cursor": "pointer",
701
- "userSelect": "none",
702
- "color": "var(--color-text-secondary)",
703
- "transition": _TR_PAD,
704
- ":hover": {"background": "var(--color-bg-active)"},
705
- },
706
- ),
707
- on_tap=self._toggle,
708
- ),
709
- Container(
710
- # 24px on top of each item's own 12px — the 36px the design
711
- # indents a sub-item to. Put on the WRAPPER rather than on the
712
- # items so an ordinary NavItem can sit in a group unchanged,
713
- # and so the indent cannot disagree between two of them.
714
- Column(*self.items, gap=2, align="stretch"),
715
- style={
716
- "paddingLeft": "24px",
717
- "overflow": "hidden",
718
- "maxHeight": "2000px" if self.open else "0px",
719
- "opacity": "1" if self.open else "0",
720
- "transition":
721
- "max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1), "
722
- "opacity 0.18s cubic-bezier(0.4, 0, 0.2, 1)",
723
- },
724
- ),
725
- gap=2,
726
- align="stretch",
727
- )
728
-
729
655
 
730
656
  class FoldedNavSection(NavSection):
731
657
  """A :class:`NavSection` that starts shut.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: workpeg
3
- Version: 0.140.2
3
+ Version: 0.141.0
4
4
  Summary: Workpeg function runtime and SDK
5
5
  Author-email: Workpeg <support@workpeg.com>
6
6
  License: MIT
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes