@mechane-ai/elements 0.39.0 → 0.41.0

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 (110) hide show
  1. package/NOTICE +11 -19
  2. package/README.md +49 -25
  3. package/dist/accessibility-P89UG9-r.js +25 -0
  4. package/dist/agent.js +1 -0
  5. package/dist/ai.js +50 -44
  6. package/dist/{categorical-values-BECG-J6R.js → categorical-values-DnGR_pQx.js} +3 -3
  7. package/dist/{chart-frame-CJFnI39T.js → chart-frame-BsyI1Zc8.js} +58 -57
  8. package/dist/{chart-input-DwAobO8Y.js → chart-input-r4S3-QCT.js} +2 -2
  9. package/dist/chart-navigation-D7OkLdSx.js +119 -0
  10. package/dist/charts/cartesian.js +560 -583
  11. package/dist/charts/distribution.js +218 -218
  12. package/dist/charts/graph.js +86 -85
  13. package/dist/charts/hierarchy.js +4 -4
  14. package/dist/charts/matrix.js +148 -147
  15. package/dist/charts/timeline.js +77 -76
  16. package/dist/charts.js +2 -2
  17. package/dist/code-block-C4K1sM9O.js +255 -0
  18. package/dist/collections.js +828 -607
  19. package/dist/constants.stylex-BILvnwUk.js +84 -0
  20. package/dist/content/code.js +1 -1
  21. package/dist/content/diff.js +3 -3
  22. package/dist/content/link.js +1 -1
  23. package/dist/content/markdown.js +2 -2
  24. package/dist/content/tree.js +184 -77
  25. package/dist/{content-link-B3ObdyZY.js → content-link-CBDqSvgP.js} +1 -1
  26. package/dist/content.js +1 -1
  27. package/dist/control-styles-D3q_Qyxi.js +179 -0
  28. package/dist/csp.js +14 -1
  29. package/dist/feedback.js +1 -1
  30. package/dist/forms/dates.js +359 -245
  31. package/dist/forms-I-WMHTkr.js +139 -0
  32. package/dist/forms.js +3 -3
  33. package/dist/index.js +1 -1
  34. package/dist/layout.js +271 -241
  35. package/dist/navigation/commands.js +87 -76
  36. package/dist/{navigation-D2_sGy3C.js → navigation-CveMIuXI.js} +1 -1
  37. package/dist/navigation.js +2 -2
  38. package/dist/overlays.js +1 -1
  39. package/dist/packages/ai/src/message-action.d.ts +1 -1
  40. package/dist/packages/charts/src/chart-navigation.d.ts +18 -2
  41. package/dist/packages/charts/src/chart-surface.d.ts +23 -0
  42. package/dist/packages/charts/src/distribution/distribution-plot.d.ts +3 -2
  43. package/dist/packages/collections/src/data-table.d.ts +7 -2
  44. package/dist/packages/collections/src/index.d.ts +4 -1
  45. package/dist/packages/collections/src/query-controls.d.ts +18 -0
  46. package/dist/packages/collections/src/table-query.d.ts +64 -0
  47. package/dist/packages/collections/src/use-collection-controls.d.ts +3 -8
  48. package/dist/packages/content/src/pierre-theme.d.ts +0 -1
  49. package/dist/packages/core/src/actions.d.ts +15 -13
  50. package/dist/packages/core/src/copy-value.d.ts +3 -2
  51. package/dist/packages/core/src/disclosure.d.ts +14 -11
  52. package/dist/packages/feedback/src/notifications.d.ts +15 -15
  53. package/dist/packages/feedback/src/toast.d.ts +9 -3
  54. package/dist/packages/forms/src/combobox.d.ts +31 -41
  55. package/dist/packages/forms/src/dates/event-month.d.ts +17 -0
  56. package/dist/packages/forms/src/dates/index.d.ts +2 -0
  57. package/dist/packages/forms/src/field-styles.d.ts +0 -19
  58. package/dist/packages/forms/src/form-controls.d.ts +26 -24
  59. package/dist/packages/forms/src/forms.d.ts +17 -14
  60. package/dist/packages/forms/src/select-control.d.ts +6 -4
  61. package/dist/packages/forms/src/select.d.ts +14 -18
  62. package/dist/packages/forms/src/selection-state.d.ts +11 -0
  63. package/dist/packages/forms/src/selection-styles.d.ts +3 -0
  64. package/dist/packages/forms/src/selection.d.ts +21 -19
  65. package/dist/packages/foundations/src/agent/index.d.ts +2 -0
  66. package/dist/packages/foundations/src/control-state.d.ts +2 -3
  67. package/dist/packages/foundations/src/control-styles.d.ts +19 -0
  68. package/dist/packages/foundations/src/csp/index.d.ts +1 -1
  69. package/dist/packages/foundations/src/csp/provider.d.ts +3 -0
  70. package/dist/packages/foundations/src/style-composition.d.ts +4 -1
  71. package/dist/packages/layout/src/app-shell.d.ts +12 -1
  72. package/dist/packages/layout/src/index.d.ts +1 -1
  73. package/dist/packages/layout/src/navigation-rail.d.ts +15 -2
  74. package/dist/packages/layout/src/resizable.d.ts +2 -2
  75. package/dist/packages/layout/src/sidebar.d.ts +4 -3
  76. package/dist/packages/navigation/src/tab-styles.d.ts +1 -1
  77. package/dist/packages/navigation/src/tabs.d.ts +12 -10
  78. package/dist/packages/overlays/src/alert-dialog.d.ts +19 -13
  79. package/dist/packages/overlays/src/dialog.d.ts +39 -24
  80. package/dist/packages/overlays/src/drawer.d.ts +16 -26
  81. package/dist/packages/overlays/src/menu.d.ts +37 -44
  82. package/dist/packages/overlays/src/overlay-root.d.ts +10 -0
  83. package/dist/packages/overlays/src/popover.d.ts +11 -20
  84. package/dist/packages/overlays/src/preview.d.ts +6 -13
  85. package/dist/packages/overlays/src/tooltip.d.ts +12 -15
  86. package/dist/{pierre-diff-CaPsfQRo.js → pierre-diff-DJ3oOfPX.js} +5 -5
  87. package/dist/{src-DPRmO-JY.js → src-CNV1ewzb.js} +379 -407
  88. package/dist/{src-CSWIG_op.js → src-CQQvXi7a.js} +58 -81
  89. package/dist/{src-DWjAoOyd.js → src-D2OHco8V.js} +42 -41
  90. package/dist/src-DfOAlAd2.js +750 -0
  91. package/dist/src-na2DdkKI.js +561 -0
  92. package/dist/{src-C-Sx37kz.js → src-s3tWwnN4.js} +361 -518
  93. package/dist/styles.js +3 -0
  94. package/dist/{elements.css → styles2.css} +195 -97
  95. package/dist/tokens.js +3 -1
  96. package/dist/{tokens.stylex-CJbIDPB9.js → tokens.stylex-dF5CACEJ.js} +13 -93
  97. package/package.json +8 -9
  98. package/skills/elements-workspace/SKILL.md +12 -0
  99. package/dist/accessibility-C-aIZ1Yx.js +0 -15
  100. package/dist/chart-navigation-CBIeNtJq.js +0 -67
  101. package/dist/code-block-aC0Htt4N.js +0 -184
  102. package/dist/forms-BQQFas9g.js +0 -118
  103. package/dist/foundations.css +0 -7
  104. package/dist/packages/content/src/tree/pierre-tree.d.ts +0 -3
  105. package/dist/pierre-theme-BpNaWn1x.js +0 -126
  106. package/dist/pierre-tree-CYCRjdGG.js +0 -106
  107. package/dist/src-d7EAi61b.js +0 -617
  108. package/dist/src-nkgFDl-g.js +0 -1171
  109. package/dist/style-composition-uYlczSsB.js +0 -9
  110. package/styles.css +0 -2
@@ -1,126 +0,0 @@
1
- import { d as e, f as t, i as n, p as r, r as i, u as a } from "./tokens.stylex-CJbIDPB9.js";
2
- // packages/content/src/pierre-theme.ts
3
- var o = {
4
- name: "Elements",
5
- appearance: "light",
6
- cssVariables: {
7
- prefix: "--elements-syntax-",
8
- defaults: {
9
- foreground: i.ink,
10
- background: i.surface,
11
- keyword: e.keyword,
12
- string: e.string,
13
- comment: e.comment,
14
- number: e.number,
15
- type: e.type,
16
- punctuation: i.muted
17
- }
18
- },
19
- style: {
20
- "editor.background": "background",
21
- "editor.foreground": "foreground",
22
- syntax: {
23
- keyword: {
24
- color: "keyword",
25
- font_weight: 600
26
- },
27
- string: "string",
28
- comment: "comment",
29
- number: "number",
30
- type: "type",
31
- function: "foreground",
32
- operator: "punctuation",
33
- punctuation: "punctuation"
34
- }
35
- }
36
- }, s = `
37
- :host {
38
- color-scheme: inherit;
39
- --diffs-font-family: ${t.monoFamily};
40
- --diffs-header-font-family: ${t.fontFamily};
41
- --diffs-font-size: ${t.captionSize};
42
- --diffs-line-height: ${t.bodyLineHeight};
43
- --diffs-gap-inline: ${a.sm};
44
- --diffs-gap-block: ${a.sm};
45
- --diffs-bg: ${i.surface};
46
- --diffs-fg: ${i.ink};
47
- --diffs-fg-number: ${i.muted};
48
- --diffs-bg-addition: ${i.accentSoft};
49
- --diffs-bg-deletion: ${i.dangerSoft};
50
- --diffs-addition-color-override: ${i.accent};
51
- --diffs-deletion-color-override: ${i.danger};
52
- --diffs-modified-color-override: ${i.focus};
53
- --diffs-bg-context-override: ${i.surface};
54
- --diffs-bg-context-gutter-override: ${i.canvas};
55
- --diffs-bg-separator-override: ${i.canvas};
56
- --diffs-selection-background: ${i.accentSoft};
57
- font-family: ${t.monoFamily};
58
- font-size: ${t.captionSize};
59
- color: ${i.ink};
60
- background: ${i.surface};
61
- }
62
- pre { font-family: ${t.monoFamily}; font-size: ${t.captionSize}; line-height: ${t.bodyLineHeight}; }
63
- [data-line-number] { color: ${i.muted}; }
64
- [data-diffs-header] {
65
- min-height: ${n.height};
66
- padding-block: ${a.sm};
67
- padding-inline: ${a.md};
68
- border-bottom: 1px solid ${i.line};
69
- font-size: ${t.captionSize};
70
- line-height: ${t.captionLineHeight};
71
- font-weight: ${t.mediumWeight};
72
- flex-wrap: wrap;
73
- }
74
- [data-header-content] { flex: 1 1 12ch; }
75
- `, c = `
76
- :host {
77
- color-scheme: inherit;
78
- color: ${i.ink};
79
- background: ${i.surface};
80
- font-family: ${t.fontFamily};
81
- font-size: ${t.bodySize};
82
- --trees-font-family-override: ${t.fontFamily};
83
- --trees-font-size-override: ${t.bodySize};
84
- --trees-font-weight-regular-override: ${t.regularWeight};
85
- --trees-font-weight-semibold-override: ${t.strongWeight};
86
- --trees-search-font-weight-override: ${t.strongWeight};
87
- --trees-padding-inline-override: ${a.md};
88
- --trees-item-padding-x-override: ${a.sm};
89
- --trees-item-row-gap-override: ${n.gap};
90
- --trees-bg-override: ${i.surface};
91
- --trees-fg-override: ${i.ink};
92
- --trees-fg-muted-override: ${i.muted};
93
- --trees-bg-muted-override: ${i.canvas};
94
- --trees-input-bg-override: ${i.surface};
95
- --trees-border-color-override: ${i.line};
96
- --trees-border-radius-override: 0px;
97
- --trees-accent-override: ${i.focus};
98
- --trees-focus-ring-color-override: ${i.focus};
99
- --trees-focus-ring-width-override: ${n.focusWidth};
100
- --trees-focus-ring-offset-override: -2px;
101
- --trees-selected-fg-override: ${i.ink};
102
- --trees-selected-bg-override: ${i.canvas};
103
- --trees-selected-focused-border-color-override: ${i.focus};
104
- --trees-status-added-override: ${i.accent};
105
- --trees-status-deleted-override: ${i.danger};
106
- --trees-status-ignored-override: ${i.muted};
107
- --trees-status-modified-override: ${i.warning};
108
- --trees-status-renamed-override: ${i.warning};
109
- --trees-status-untracked-override: ${i.accent};
110
- }
111
- [data-type="item"]:hover:not([data-item-selected="true"]):not([data-item-context-hover="true"]) {
112
- background-color: ${i.surface};
113
- --truncate-marker-background-overlay-color: transparent;
114
- }
115
- ${r.hoverPointer} {
116
- [data-type="item"]:hover:not([data-item-selected="true"]):not([data-item-context-hover="true"]) {
117
- background-color: ${i.canvas};
118
- --truncate-marker-background-overlay-color: ${i.canvas};
119
- }
120
- }
121
- [data-type="item"]:active:not([data-item-selected="true"]):not([data-item-context-hover="true"]) {
122
- background-color: ${i.canvas};
123
- --truncate-marker-background-overlay-color: ${i.canvas};
124
- }
125
- `;
126
- export { s as n, c as r, o as t };
@@ -1,106 +0,0 @@
1
- import { c as e } from "./src-C-Sx37kz.js";
2
- import { n as t } from "./forms-BQQFas9g.js";
3
- import { p as n } from "./tokens.stylex-CJbIDPB9.js";
4
- import { r } from "./pierre-theme-BpNaWn1x.js";
5
- import * as i from "@stylexjs/stylex";
6
- import { useEffect as a, useId as o, useRef as s, useState as c } from "react";
7
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
8
- import { FileTree as d, useFileTree as f, useFileTreeSearch as p } from "@pierre/trees/react";
9
- // packages/content/src/tree/pierre-tree.tsx
10
- var m = {
11
- k1xSpc: "x78zum5",
12
- kXwgrk: "xdt5ytf",
13
- k7Eaqz: "xeuugli",
14
- kVQacm: "xb3r6kr",
15
- $$css: !0
16
- }, h = { root: (e) => [
17
- m,
18
- {
19
- kZKoxP: e == null ? e : "x16ye13r",
20
- $$css: !0
21
- },
22
- { "--x-height": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e) }
23
- ] };
24
- function g({ paths: m, label: g, selectedPaths: _, onSelectedPathsChange: v, statuses: y, height: b = 320 }) {
25
- let x = o(), S = s({
26
- selectedPaths: _,
27
- onSelectedPathsChange: v
28
- }), C = s(!1), w = s(!1), [T] = c(() => globalThis.matchMedia(n.coarsePointer.slice(7)).matches ? 44 : 32), { model: E } = f({
29
- paths: m,
30
- initialSelectedPaths: _,
31
- initialExpansion: 1,
32
- itemHeight: T,
33
- icons: {
34
- set: "minimal",
35
- colored: !1
36
- },
37
- search: !1,
38
- fileTreeSearchMode: "hide-non-matches",
39
- dragAndDrop: !1,
40
- renaming: !1,
41
- unsafeCSS: r,
42
- onSelectionChange: A
43
- }), D = p(E), O = D.value.length === 0 || D.matchingPaths.length > 0;
44
- function k() {
45
- C.current = !0;
46
- let e = new Set(S.current.selectedPaths);
47
- for (let t of E.getSelectedPaths()) if (!e.has(t)) {
48
- let e = E.getItem(t);
49
- e !== null && e.deselect();
50
- }
51
- for (let t of e) {
52
- let e = E.getItem(t);
53
- e !== null && !e.isSelected() && e.select();
54
- }
55
- C.current = !1;
56
- }
57
- function A(e) {
58
- !C.current && w.current && (S.current.onSelectedPathsChange(e), queueMicrotask(() => {
59
- w.current && k();
60
- }));
61
- }
62
- return a(() => (w.current = !0, () => {
63
- w.current = !1;
64
- }), []), a(() => {
65
- S.current = {
66
- selectedPaths: _,
67
- onSelectedPathsChange: v
68
- }, k();
69
- }, [
70
- E,
71
- _,
72
- v
73
- ]), a(() => {
74
- let e = E.getVisibleRows(0, E.getVisibleCount()).filter((e) => e.isExpanded).map((e) => e.path);
75
- C.current = !0, E.resetPaths(m, { initialExpandedPaths: e }), k();
76
- }, [E, m]), a(() => {
77
- E.setGitStatus(y);
78
- }, [E, y]), /* @__PURE__ */ u("div", {
79
- ...i.props(h.root(b)),
80
- children: [/* @__PURE__ */ u("div", {
81
- className: "x78zum5 xdt5ytf xunmzkg xn9t2bk x1doqdfy",
82
- children: [/* @__PURE__ */ l(t, {
83
- type: "search",
84
- "aria-label": `Search ${g}`,
85
- "aria-controls": O ? x : void 0,
86
- placeholder: "Search files…",
87
- value: D.value,
88
- onValueChange: D.setValue,
89
- onKeyDown: (e) => {
90
- e.key === "Escape" && (e.preventDefault(), D.close());
91
- }
92
- }), D.value.length > 0 && /* @__PURE__ */ l(e, {
93
- variant: "caption",
94
- tone: "muted",
95
- role: "status",
96
- children: D.matchingPaths.length === 0 ? "No matching files." : `${D.matchingPaths.length} matches`
97
- })]
98
- }), O && /* @__PURE__ */ l(d, {
99
- id: x,
100
- model: E,
101
- "aria-label": g,
102
- className: "x1lliihq x1iyjqo2 x2lwn1j xeuugli xb3r6kr"
103
- })]
104
- });
105
- }
106
- export { g as PierreTree };