@hanzo/ui 5.3.36 → 5.3.39
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.
- package/dist/assets/crypto.d.ts.map +1 -1
- package/dist/assets/file.d.ts.map +1 -1
- package/dist/assets/general.d.ts.map +1 -1
- package/dist/assets/hanzo-logo.d.ts.map +1 -1
- package/dist/assets/llm-provider.d.ts.map +1 -1
- package/dist/components/cal-embed.d.ts.map +1 -1
- package/dist/frameworks/react/hooks/index.d.ts.map +1 -1
- package/dist/frameworks/react-native/utils.d.ts.map +1 -1
- package/dist/frameworks/svelte/utils.d.ts.map +1 -1
- package/dist/frameworks/vue/utils.d.ts.map +1 -1
- package/dist/helpers/file.d.ts.map +1 -1
- package/dist/helpers/memoization.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/models/index.js +35 -0
- package/dist/models/index.mjs +35 -0
- package/dist/navigation/index.js +2 -1
- package/dist/navigation/index.mjs +2 -1
- package/dist/primitives/alert.d.ts +1 -1
- package/dist/primitives/cal-embed.d.ts.map +1 -1
- package/dist/primitives/chart.d.ts.map +1 -1
- package/dist/primitives/chat/chat-input.d.ts.map +1 -1
- package/dist/primitives/combobox.d.ts.map +1 -1
- package/dist/primitives/command.d.ts.map +1 -1
- package/dist/primitives/copy-to-clipboard-icon.d.ts.map +1 -1
- package/dist/primitives/dots-loader.d.ts.map +1 -1
- package/dist/primitives/error-message.d.ts.map +1 -1
- package/dist/primitives/file-uploader.d.ts.map +1 -1
- package/dist/primitives/form.d.ts.map +1 -1
- package/dist/primitives/input-otp.d.ts.map +1 -1
- package/dist/primitives/markdown-preview.d.ts.map +1 -1
- package/dist/primitives/pretty-json-print.d.ts.map +1 -1
- package/dist/primitives/resizable.d.ts +4 -20
- package/dist/primitives/resizable.d.ts.map +1 -1
- package/dist/primitives/resizable.js +4 -4
- package/dist/primitives/sonner.d.ts.map +1 -1
- package/dist/primitives/text-link.d.ts.map +1 -1
- package/dist/primitives/textfield.d.ts.map +1 -1
- package/dist/primitives/toast.d.ts.map +1 -1
- package/dist/resizable.js +1 -1
- package/dist/resizable.mjs +1 -1
- package/dist/src/billing/components/account-members.d.ts +10 -0
- package/dist/src/billing/components/account-members.d.ts.map +1 -0
- package/dist/src/billing/components/account-members.js +63 -0
- package/dist/src/billing/components/account-switcher.d.ts +9 -0
- package/dist/src/billing/components/account-switcher.d.ts.map +1 -0
- package/dist/src/billing/components/account-switcher.js +52 -0
- package/dist/src/billing/components/animated-card.d.ts +9 -0
- package/dist/src/billing/components/animated-card.d.ts.map +1 -0
- package/dist/src/billing/components/animated-card.js +161 -0
- package/dist/src/billing/components/billing-settings.d.ts +26 -0
- package/dist/src/billing/components/billing-settings.d.ts.map +1 -0
- package/dist/src/billing/components/billing-settings.js +23 -0
- package/dist/src/billing/components/business-profile-panel.d.ts.map +1 -1
- package/dist/src/billing/components/business-profile-panel.js +9 -8
- package/dist/src/billing/components/card-form.d.ts +18 -0
- package/dist/src/billing/components/card-form.d.ts.map +1 -0
- package/dist/src/billing/components/card-form.js +139 -0
- package/dist/src/billing/components/cost-explorer.d.ts +7 -0
- package/dist/src/billing/components/cost-explorer.d.ts.map +1 -0
- package/dist/src/billing/components/cost-explorer.js +73 -0
- package/dist/src/billing/components/credits-panel.d.ts +8 -0
- package/dist/src/billing/components/credits-panel.d.ts.map +1 -0
- package/dist/src/billing/components/credits-panel.js +58 -0
- package/dist/src/billing/components/guided-setup.d.ts +13 -0
- package/dist/src/billing/components/guided-setup.d.ts.map +1 -0
- package/dist/src/billing/components/guided-setup.js +44 -0
- package/dist/src/billing/components/index.d.ts +34 -0
- package/dist/src/billing/components/index.d.ts.map +1 -1
- package/dist/src/billing/components/index.js +17 -0
- package/dist/src/billing/components/invoice-manager.js +13 -13
- package/dist/src/billing/components/invoices-payments.d.ts +7 -0
- package/dist/src/billing/components/invoices-payments.d.ts.map +1 -0
- package/dist/src/billing/components/invoices-payments.js +44 -0
- package/dist/src/billing/components/overview-dashboard.d.ts +31 -0
- package/dist/src/billing/components/overview-dashboard.d.ts.map +1 -0
- package/dist/src/billing/components/overview-dashboard.js +105 -0
- package/dist/src/billing/components/payment-manager.d.ts.map +1 -1
- package/dist/src/billing/components/payment-manager.js +267 -83
- package/dist/src/billing/components/promotions-panel.d.ts +7 -0
- package/dist/src/billing/components/promotions-panel.d.ts.map +1 -0
- package/dist/src/billing/components/promotions-panel.js +48 -0
- package/dist/src/billing/components/spend-alerts.d.ts +9 -0
- package/dist/src/billing/components/spend-alerts.d.ts.map +1 -0
- package/dist/src/billing/components/spend-alerts.js +99 -0
- package/dist/src/billing/components/square-card-form.d.ts +32 -0
- package/dist/src/billing/components/square-card-form.d.ts.map +1 -0
- package/dist/src/billing/components/square-card-form.js +179 -0
- package/dist/src/billing/components/status-bar.d.ts +12 -0
- package/dist/src/billing/components/status-bar.d.ts.map +1 -0
- package/dist/src/billing/components/status-bar.js +32 -0
- package/dist/src/billing/components/subscription-portal.d.ts +2 -1
- package/dist/src/billing/components/subscription-portal.d.ts.map +1 -1
- package/dist/src/billing/components/subscription-portal.js +123 -26
- package/dist/src/billing/components/support-tiers-panel.d.ts +6 -0
- package/dist/src/billing/components/support-tiers-panel.d.ts.map +1 -0
- package/dist/src/billing/components/support-tiers-panel.js +90 -0
- package/dist/src/billing/components/tax-compliance-panel.js +5 -5
- package/dist/src/billing/components/transactions-panel.d.ts +8 -0
- package/dist/src/billing/components/transactions-panel.d.ts.map +1 -0
- package/dist/src/billing/components/transactions-panel.js +64 -0
- package/dist/src/billing/components/usage-panel.d.ts +7 -0
- package/dist/src/billing/components/usage-panel.d.ts.map +1 -0
- package/dist/src/billing/components/usage-panel.js +64 -0
- package/dist/src/billing/types/index.d.ts +136 -1
- package/dist/src/billing/types/index.d.ts.map +1 -1
- package/dist/src/form/form.d.ts.map +1 -1
- package/dist/src/hooks/use-copy-clipboard.d.ts.map +1 -1
- package/dist/src/hooks/use-fill-ids.d.ts.map +1 -1
- package/dist/src/hooks/use-scroll-restoration.d.ts.map +1 -1
- package/dist/src/models/ModelCard.d.ts +25 -0
- package/dist/src/models/ModelCard.d.ts.map +1 -0
- package/dist/src/models/ModelCard.js +73 -0
- package/dist/src/models/ModelLibrary.d.ts +41 -0
- package/dist/src/models/ModelLibrary.d.ts.map +1 -0
- package/dist/src/models/ModelLibrary.js +63 -0
- package/dist/src/models/ModelTable.d.ts +17 -0
- package/dist/src/models/ModelTable.d.ts.map +1 -0
- package/dist/src/models/ModelTable.js +35 -0
- package/dist/src/models/ZenEnso.d.ts +17 -0
- package/dist/src/models/ZenEnso.d.ts.map +1 -0
- package/dist/src/models/ZenEnso.js +50 -0
- package/dist/src/models/index.d.ts +23 -0
- package/dist/src/models/index.d.ts.map +1 -0
- package/dist/src/models/index.js +18 -0
- package/dist/src/models/types.d.ts +40 -0
- package/dist/src/models/types.d.ts.map +1 -0
- package/dist/src/models/types.js +7 -0
- package/dist/src/navigation/hanzo-shell/AppSwitcher.d.ts +8 -0
- package/dist/src/navigation/hanzo-shell/AppSwitcher.d.ts.map +1 -0
- package/dist/src/navigation/hanzo-shell/AppSwitcher.js +19 -0
- package/dist/src/navigation/hanzo-shell/BeamAvatar.d.ts +9 -0
- package/dist/src/navigation/hanzo-shell/BeamAvatar.d.ts.map +1 -0
- package/dist/src/navigation/hanzo-shell/BeamAvatar.js +38 -0
- package/dist/src/navigation/hanzo-shell/HanzoCommandPalette.d.ts +28 -0
- package/dist/src/navigation/hanzo-shell/HanzoCommandPalette.d.ts.map +1 -0
- package/dist/src/navigation/hanzo-shell/HanzoCommandPalette.js +124 -0
- package/dist/src/navigation/hanzo-shell/HanzoHeader.d.ts +37 -0
- package/dist/src/navigation/hanzo-shell/HanzoHeader.d.ts.map +1 -0
- package/dist/src/navigation/hanzo-shell/HanzoHeader.js +43 -0
- package/dist/src/navigation/hanzo-shell/HanzoMark.d.ts +17 -0
- package/dist/src/navigation/hanzo-shell/HanzoMark.d.ts.map +1 -0
- package/dist/src/navigation/hanzo-shell/HanzoMark.js +57 -0
- package/dist/src/navigation/hanzo-shell/UserAvatar.d.ts +15 -0
- package/dist/src/navigation/hanzo-shell/UserAvatar.d.ts.map +1 -0
- package/dist/src/navigation/hanzo-shell/UserAvatar.js +44 -0
- package/dist/src/navigation/hanzo-shell/UserOrgDropdown.d.ts +11 -0
- package/dist/src/navigation/hanzo-shell/UserOrgDropdown.d.ts.map +1 -0
- package/dist/src/navigation/hanzo-shell/UserOrgDropdown.js +26 -0
- package/dist/src/navigation/hanzo-shell/index.d.ts +14 -0
- package/dist/src/navigation/hanzo-shell/index.d.ts.map +1 -0
- package/dist/src/navigation/hanzo-shell/index.js +9 -0
- package/dist/src/navigation/hanzo-shell/types.d.ts +49 -0
- package/dist/src/navigation/hanzo-shell/types.d.ts.map +1 -0
- package/dist/src/navigation/hanzo-shell/types.js +32 -0
- package/dist/src/navigation/hanzo-shell/useHanzoAuth.d.ts +16 -0
- package/dist/src/navigation/hanzo-shell/useHanzoAuth.d.ts.map +1 -0
- package/dist/src/navigation/hanzo-shell/useHanzoAuth.js +93 -0
- package/dist/src/navigation/index.d.ts +2 -0
- package/dist/src/navigation/index.d.ts.map +1 -1
- package/dist/src/navigation/index.js +2 -0
- package/dist/src/ui/banner.d.ts +1 -1
- package/dist/util/blob.d.ts.map +1 -1
- package/dist/util/blob.js +1 -1
- package/dist/util/date.d.ts.map +1 -1
- package/dist/util/debounce.d.ts.map +1 -1
- package/dist/util/file.d.ts.map +1 -1
- package/dist/util/format-and-abbreviate-as-currency.d.ts +7 -1
- package/dist/util/format-and-abbreviate-as-currency.d.ts.map +1 -1
- package/dist/util/format-text.d.ts.map +1 -1
- package/dist/util/format-to-max-char.d.ts +7 -1
- package/dist/util/format-to-max-char.d.ts.map +1 -1
- package/dist/util/index.mjs +1 -1
- package/dist/util/number-abbreviate.d.ts.map +1 -1
- package/dist/util/specifier.d.ts.map +1 -1
- package/dist/util/step-animation.d.ts.map +1 -1
- package/package.json +20 -7
- package/dist/tailwind/typo-plugin/get-plugin-styles.d.ts +0 -595
- package/dist/tailwind/typo-plugin/get-plugin-styles.d.ts.map +0 -1
- package/dist/tailwind/typo-plugin/get-plugin-styles.js +0 -661
- package/dist/tailwind/typo-plugin/index.d.ts +0 -3
- package/dist/tailwind/typo-plugin/index.d.ts.map +0 -1
- package/dist/tailwind/typo-plugin/index.js +0 -102
- package/dist/tailwind/typo-plugin/utils.d.ts +0 -6
- package/dist/tailwind/typo-plugin/utils.d.ts.map +0 -1
- package/dist/tailwind/typo-plugin/utils.js +0 -47
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import plugin from 'tailwindcss/plugin';
|
|
2
|
-
import merge from 'lodash.merge';
|
|
3
|
-
import castArray from 'lodash.castarray';
|
|
4
|
-
import getStyles from './get-plugin-styles';
|
|
5
|
-
import { commonTrailingPseudos } from './utils';
|
|
6
|
-
let baseFontSize = 16;
|
|
7
|
-
const computed = {
|
|
8
|
-
// Reserved for future "magic properties", for example:
|
|
9
|
-
// bulletColor: (color) => ({ 'ul > li::before': { backgroundColor: color } }),
|
|
10
|
-
};
|
|
11
|
-
function inWhere(selector, { className, modifier, prefix }) {
|
|
12
|
-
let prefixedNot = prefix(`.not-${className}`).slice(1);
|
|
13
|
-
let selectorPrefix = selector.startsWith('>')
|
|
14
|
-
? `${modifier === 'DEFAULT' ? `.${className}` : `.${className}-${modifier}`} `
|
|
15
|
-
: '';
|
|
16
|
-
// Parse the selector, if every component ends in the same pseudo element(s) then move it to the end
|
|
17
|
-
let [trailingPseudo, rebuiltSelector] = commonTrailingPseudos(selector);
|
|
18
|
-
if (trailingPseudo) {
|
|
19
|
-
return `:where(${selectorPrefix}${rebuiltSelector}):not(:where([class~="${prefixedNot}"],[class~="${prefixedNot}"] *))${trailingPseudo}`;
|
|
20
|
-
}
|
|
21
|
-
return `:where(${selectorPrefix}${selector}):not(:where([class~="${prefixedNot}"],[class~="${prefixedNot}"] *))`;
|
|
22
|
-
}
|
|
23
|
-
function isObject(value) {
|
|
24
|
-
return typeof value === 'object' && value !== null;
|
|
25
|
-
}
|
|
26
|
-
function configToCss(config = {}, { target, className, modifier, prefix }) {
|
|
27
|
-
function updateSelector(k, v) {
|
|
28
|
-
if (target === 'legacy') {
|
|
29
|
-
return [k, v];
|
|
30
|
-
}
|
|
31
|
-
if (Array.isArray(v)) {
|
|
32
|
-
return [k, v];
|
|
33
|
-
}
|
|
34
|
-
if (isObject(v)) {
|
|
35
|
-
let nested = Object.values(v).some(isObject);
|
|
36
|
-
if (nested) {
|
|
37
|
-
return [
|
|
38
|
-
inWhere(k, { className, modifier, prefix }),
|
|
39
|
-
v,
|
|
40
|
-
Object.fromEntries(Object.entries(v).map(([k, v]) => updateSelector(k, v))),
|
|
41
|
-
];
|
|
42
|
-
}
|
|
43
|
-
return [inWhere(k, { className, modifier, prefix }), v];
|
|
44
|
-
}
|
|
45
|
-
return [k, v];
|
|
46
|
-
}
|
|
47
|
-
return Object.fromEntries(Object.entries(merge({}, ...Object.keys(config)
|
|
48
|
-
.filter((key) => computed[key])
|
|
49
|
-
.map((key) => computed[key](config[key])), ...castArray(config.css || {}))).map(([k, v]) => updateSelector(k, v)));
|
|
50
|
-
}
|
|
51
|
-
export default plugin.withOptions(({ className = 'prose', target = 'modern', base = 16 } = {}) => {
|
|
52
|
-
baseFontSize = base;
|
|
53
|
-
return function ({ addVariant, addComponents, theme, prefix }) {
|
|
54
|
-
let modifiers = theme('typography');
|
|
55
|
-
let options = { className, prefix };
|
|
56
|
-
for (let [name, ...selectors] of [
|
|
57
|
-
['headings', 'h1', 'h2', 'h3', /* 'h4', 'h5', 'h6', 'th' */],
|
|
58
|
-
['h1'],
|
|
59
|
-
['h2'],
|
|
60
|
-
['h3'],
|
|
61
|
-
['h4'],
|
|
62
|
-
['h5'],
|
|
63
|
-
['h6'],
|
|
64
|
-
['p'],
|
|
65
|
-
['a'],
|
|
66
|
-
['blockquote'],
|
|
67
|
-
['figure'],
|
|
68
|
-
['figcaption'],
|
|
69
|
-
['strong'],
|
|
70
|
-
['em'],
|
|
71
|
-
['code'],
|
|
72
|
-
['pre'],
|
|
73
|
-
['ol'],
|
|
74
|
-
['ul'],
|
|
75
|
-
['li'],
|
|
76
|
-
['table'],
|
|
77
|
-
['thead'],
|
|
78
|
-
['tr'],
|
|
79
|
-
['th'],
|
|
80
|
-
['td'],
|
|
81
|
-
['img'],
|
|
82
|
-
['video'],
|
|
83
|
-
['hr'],
|
|
84
|
-
]) {
|
|
85
|
-
selectors = selectors.length === 0 ? [name] : selectors;
|
|
86
|
-
let selector = target === 'legacy' ? selectors.map((selector) => `& ${selector}`) : selectors.join(', ');
|
|
87
|
-
addVariant(`${className}-${name}`, target === 'legacy' ? selector : `& :is(${inWhere(selector, options)})`);
|
|
88
|
-
}
|
|
89
|
-
addComponents(Object.keys(modifiers).map((modifier) => ({
|
|
90
|
-
[modifier === 'DEFAULT' ? `.${className}` : `.${className}-${modifier}`]: configToCss(modifiers[modifier], {
|
|
91
|
-
target,
|
|
92
|
-
className,
|
|
93
|
-
modifier,
|
|
94
|
-
prefix,
|
|
95
|
-
}),
|
|
96
|
-
})));
|
|
97
|
-
};
|
|
98
|
-
}, () => {
|
|
99
|
-
return {
|
|
100
|
-
theme: { typography: getStyles(baseFontSize) },
|
|
101
|
-
};
|
|
102
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../tailwind/typo-plugin/utils.js"],"names":[],"mappings":"AAKA,4DAEC;AAED;;GAEG;AACH,gDAFW,MAAM,qBAiDhB"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import isPlainObject from 'lodash.isplainobject';
|
|
2
|
-
import parser from 'postcss-selector-parser';
|
|
3
|
-
const parseSelector = parser();
|
|
4
|
-
export function isUsableColor(color, values) {
|
|
5
|
-
return isPlainObject(values) && color !== 'gray' && values[600];
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* @param {string} selector
|
|
9
|
-
*/
|
|
10
|
-
export function commonTrailingPseudos(selector) {
|
|
11
|
-
let ast = parseSelector.astSync(selector);
|
|
12
|
-
/** @type {import('postcss-selector-parser').Pseudo[][]} */
|
|
13
|
-
let matrix = [];
|
|
14
|
-
// Put the pseudo elements in reverse order in a sparse, column-major 2D array
|
|
15
|
-
for (let [i, sel] of ast.nodes.entries()) {
|
|
16
|
-
for (const [j, child] of [...sel.nodes].reverse().entries()) {
|
|
17
|
-
// We only care about pseudo elements
|
|
18
|
-
if (child.type !== 'pseudo' || !child.value.startsWith('::')) {
|
|
19
|
-
break;
|
|
20
|
-
}
|
|
21
|
-
matrix[j] = matrix[j] || [];
|
|
22
|
-
matrix[j][i] = child;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
let trailingPseudos = parser.selector();
|
|
26
|
-
// At this point the pseudo elements are in a column-major 2D array
|
|
27
|
-
// This means each row contains one "column" of pseudo elements from each selector
|
|
28
|
-
// We can compare all the pseudo elements in a row to see if they are the same
|
|
29
|
-
for (const pseudos of matrix) {
|
|
30
|
-
// It's a sparse 2D array so there are going to be holes in the rows
|
|
31
|
-
// We skip those
|
|
32
|
-
if (!pseudos) {
|
|
33
|
-
continue;
|
|
34
|
-
}
|
|
35
|
-
let values = new Set([...pseudos.map((p) => p.value)]);
|
|
36
|
-
// The pseudo elements are not the same
|
|
37
|
-
if (values.size > 1) {
|
|
38
|
-
break;
|
|
39
|
-
}
|
|
40
|
-
pseudos.forEach((pseudo) => pseudo.remove());
|
|
41
|
-
trailingPseudos.prepend(pseudos[0]);
|
|
42
|
-
}
|
|
43
|
-
if (trailingPseudos.nodes.length) {
|
|
44
|
-
return [trailingPseudos.toString(), ast.toString()];
|
|
45
|
-
}
|
|
46
|
-
return [null, selector];
|
|
47
|
-
}
|