@jini-ai/ui 0.6.15-rc.2 → 0.6.16
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/CHANGELOG.md +12 -0
- package/dist/browser/useDismissOnOutsideOrEscape.js +1 -1
- package/dist/browser/useGlobalKeydown.js +2 -2
- package/dist/browser/useModalWindowDragGuard.js +1 -1
- package/dist/core/theme/css-name.d.ts +3 -0
- package/dist/core/theme/css-name.js +5 -0
- package/dist/core/theme/stylesheet.js +2 -1
- package/dist/core/theme/validation.js +15 -4
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/features/about/rules.js +2 -1
- package/dist/features/admin-widgets/components/InfoTip.hooks.js +22 -12
- package/dist/features/admin-widgets/components/Lightbox/Lightbox.hooks.js +1 -1
- package/dist/features/admin-widgets/components/ScrollJump/ScrollJump.hooks.js +1 -1
- package/dist/features/admin-widgets/components/SeeMore/SeeMore.hooks.js +2 -2
- package/dist/features/admin-widgets/components/SeeMore/SeeMore.js +4 -2
- package/dist/features/admin-widgets/components/Select/Select.hooks.js +2 -1
- package/dist/features/admin-widgets/components/Select/Select.js +2 -1
- package/dist/features/admin-widgets/components/SuggestInput/SuggestInput.js +4 -2
- package/dist/features/admin-widgets/components/useDebouncedHtmlPreview.hooks.js +3 -2
- package/dist/features/appearance/constants.d.ts +28 -1
- package/dist/features/appearance/constants.js +12 -9
- package/dist/features/appearance/react/components/AppearanceTab.js +4 -4
- package/dist/features/asset-grid/react/components/AssetGrid.js +8 -3
- package/dist/features/asset-grid/react/hooks/useAssetGridKeyboardShortcuts.js +7 -6
- package/dist/features/asset-grid/react/hooks/useAssetGridLiveUpdates.js +8 -10
- package/dist/features/asset-grid/react/hooks/useRubberBandDrag.js +1 -1
- package/dist/features/asset-tree-browser/react/components/AssetTreeFileRow.js +6 -8
- package/dist/features/asset-tree-browser/react/hooks/useAssetTreeRowMenu.js +1 -1
- package/dist/features/asset-tree-browser/rules.js +1 -3
- package/dist/features/browser-chrome/rules.js +10 -8
- package/dist/features/charts/browser.js +2 -1
- package/dist/features/charts/contract.d.ts +4 -4
- package/dist/features/charts/react.js +5 -3
- package/dist/features/charts/wire.d.ts +19 -0
- package/dist/features/charts/wire.js +20 -2
- package/dist/features/connectors/ConnectorsBrowser.js +3 -1
- package/dist/features/connectors/hooks/useConnectorAuthorization.js +1 -1
- package/dist/features/connectors/hooks/useConnectorCatalog.js +2 -2
- package/dist/features/connectors/rules.js +10 -14
- package/dist/features/execution/constants.js +0 -1
- package/dist/features/execution/react/components/AgentDiagnosticRow.js +2 -0
- package/dist/features/execution/react/components/ByokProviderForm.js +1 -3
- package/dist/features/execution/react/components/LocalCliAgentSettings.js +2 -1
- package/dist/features/execution/react/hooks/use-byok-field-validation.hooks.js +6 -2
- package/dist/features/execution/react/hooks/useExecutionTab.js +9 -5
- package/dist/features/execution/react/hooks/useLocalCliAgentCard.js +3 -6
- package/dist/features/execution/react/hooks/useReasoningControl.js +3 -3
- package/dist/features/execution/rules.js +23 -18
- package/dist/features/external-mcp/react/components/ExternalMcpTab.js +10 -1
- package/dist/features/file-dropzone/rules.js +3 -2
- package/dist/features/folder-path-drop/rules.d.ts +2 -3
- package/dist/features/folder-path-drop/rules.js +3 -4
- package/dist/features/html-editor/canvas-embed-placeholders.js +2 -3
- package/dist/features/html-editor/css.js +7 -5
- package/dist/features/html-editor/editor-blocks.js +60 -6
- package/dist/features/html-editor/protected-elements.js +5 -3
- package/dist/features/html-editor/react/hooks/useInteractiveHtmlEditor.js +3 -3
- package/dist/features/html-editor/source-splice.js +6 -4
- package/dist/features/i18n/dictionaries/settings-dialog.ar.js +8 -0
- package/dist/features/i18n/dictionaries/settings-dialog.bn.js +8 -0
- package/dist/features/i18n/dictionaries/settings-dialog.de.js +8 -0
- package/dist/features/i18n/dictionaries/settings-dialog.en.js +8 -0
- package/dist/features/i18n/dictionaries/settings-dialog.es.js +8 -0
- package/dist/features/i18n/dictionaries/settings-dialog.fa.js +8 -0
- package/dist/features/i18n/dictionaries/settings-dialog.fr.js +8 -0
- package/dist/features/i18n/dictionaries/settings-dialog.hi.js +8 -0
- package/dist/features/i18n/dictionaries/settings-dialog.hu.js +8 -0
- package/dist/features/i18n/dictionaries/settings-dialog.id.js +8 -0
- package/dist/features/i18n/dictionaries/settings-dialog.it.js +8 -0
- package/dist/features/i18n/dictionaries/settings-dialog.ja.js +8 -0
- package/dist/features/i18n/dictionaries/settings-dialog.ko.js +8 -0
- package/dist/features/i18n/dictionaries/settings-dialog.pl.js +8 -0
- package/dist/features/i18n/dictionaries/settings-dialog.pt-BR.js +8 -0
- package/dist/features/i18n/dictionaries/settings-dialog.ru.js +8 -0
- package/dist/features/i18n/dictionaries/settings-dialog.th.js +8 -0
- package/dist/features/i18n/dictionaries/settings-dialog.tr.js +8 -0
- package/dist/features/i18n/dictionaries/settings-dialog.uk.js +8 -0
- package/dist/features/i18n/dictionaries/settings-dialog.ur.js +8 -0
- package/dist/features/i18n/dictionaries/settings-dialog.zh-CN.js +8 -0
- package/dist/features/i18n/dictionaries/settings-dialog.zh-TW.js +8 -0
- package/dist/features/iframe-pool/react/components/IframeKeepAliveProvider.js +5 -5
- package/dist/features/iframe-pool/react/dom-sync.js +2 -2
- package/dist/features/integrations/react/components/IntegrationsTab.js +3 -1
- package/dist/features/integrations/rules.js +6 -4
- package/dist/features/interactive-ui/providers/shadcn/data-table.js +10 -5
- package/dist/features/interactive-ui/table-data.js +1 -1
- package/dist/features/lexical-rich-text-editor/deserialize.js +2 -2
- package/dist/features/lexical-rich-text-editor/mention-parser.js +4 -4
- package/dist/features/lexical-rich-text-editor/react/components/RichTextInput.js +2 -1
- package/dist/features/lexical-rich-text-editor/react/hooks/useCaretFloatingLayerPosition.js +1 -1
- package/dist/features/lexical-rich-text-editor/react/hooks/useMentionColorStamping.js +1 -1
- package/dist/features/lexical-rich-text-editor/serialize.js +13 -10
- package/dist/features/list-detail-panel/react/components/ListDetailPanel.js +1 -1
- package/dist/features/mcp-ui/confirmation-store.js +3 -6
- package/dist/features/mcp-ui/surfaces/checkbox.d.ts +2 -0
- package/dist/features/mcp-ui/surfaces/choice-group.d.ts +2 -0
- package/dist/features/mcp-ui/surfaces/choice-group.js +2 -2
- package/dist/features/mcp-ui/surfaces/confirmation.d.ts +5 -0
- package/dist/features/mcp-ui/surfaces/confirmation.js +1 -0
- package/dist/features/mcp-ui/surfaces/document.d.ts +14 -16
- package/dist/features/mcp-ui/surfaces/document.js +46 -7
- package/dist/features/mcp-ui/surfaces/fields.d.ts +7 -1
- package/dist/features/mcp-ui/surfaces/fields.js +14 -11
- package/dist/features/mcp-ui/surfaces/form.js +6 -1
- package/dist/features/mcp-ui/surfaces/host-theme.js +2 -1
- package/dist/features/mcp-ui/surfaces/index.d.ts +1 -0
- package/dist/features/mcp-ui/surfaces/index.js +1 -0
- package/dist/features/mcp-ui/surfaces/outcome.js +1 -1
- package/dist/features/mcp-ui/surfaces/select.d.ts +2 -0
- package/dist/features/mcp-ui/surfaces/select.js +2 -1
- package/dist/features/mcp-ui/surfaces/structured-details.d.ts +40 -0
- package/dist/features/mcp-ui/surfaces/structured-details.js +159 -0
- package/dist/features/mcp-ui/surfaces/text-input.d.ts +2 -0
- package/dist/features/mcp-ui/surfaces/text-input.js +1 -1
- package/dist/features/mcp-ui/surfaces/tool-approval.d.ts +21 -0
- package/dist/features/mcp-ui/surfaces/tool-approval.js +42 -0
- package/dist/features/media-providers/react/hooks/useMediaProvidersTab.js +2 -1
- package/dist/features/memory/async-commit-guard.js +4 -1
- package/dist/features/memory/formatters.js +5 -1
- package/dist/features/memory/react/components/MemoryConnectedPanel.js +3 -1
- package/dist/features/memory/react/components/MemoryEntryCard.js +1 -1
- package/dist/features/memory/react/components/MemorySettingsPanel.js +3 -1
- package/dist/features/memory/react/hooks/useMemoryConfig.hooks.js +12 -10
- package/dist/features/memory/react/hooks/useMemoryConnectors.hooks.js +2 -5
- package/dist/features/memory/react/hooks/useMemoryConnectors.rules.js +10 -9
- package/dist/features/memory/react/hooks/useMemoryEntries.hooks.js +4 -2
- package/dist/features/memory/react/hooks/useMemoryFlash.hooks.js +1 -1
- package/dist/features/memory/rules.js +2 -1
- package/dist/features/panel-kit/fetch-query/adapter.react.js +3 -2
- package/dist/features/panel-kit/fetch-query/adapter.tanstack.js +3 -2
- package/dist/features/panel-kit/fetch-query/binding.react.js +2 -1
- package/dist/features/panel-kit/helpers/standing-draft-recovery-message.js +13 -4
- package/dist/features/panel-kit/hooks/use-dirty-guard.hooks.js +1 -1
- package/dist/features/panel-kit/hooks/use-focus-trap.hooks.js +1 -1
- package/dist/features/panel-kit/hooks/use-settings-slice.hooks.js +14 -10
- package/dist/features/panel-kit/hooks/use-standing-draft-autosave.hooks.js +2 -2
- package/dist/features/progress-card/components/ProgressCard.d.ts +1 -1
- package/dist/features/progress-card/reference-adapters.js +23 -13
- package/dist/features/progress-card/rules.d.ts +0 -1
- package/dist/features/progress-card/rules.js +14 -20
- package/dist/features/progress-card/types.d.ts +1 -1
- package/dist/features/project-locations/dependencies.js +6 -1
- package/dist/features/project-locations/react/components/ProjectLocationsTab.js +2 -1
- package/dist/features/project-locations/rules.js +2 -1
- package/dist/features/resource-dashboard/react/components/ResourceBoardToolbar.js +8 -1
- package/dist/features/resource-dashboard/react/components/ResourceCardParts.js +2 -1
- package/dist/features/resource-dashboard/react/components/ResourceRowListItem.js +3 -1
- package/dist/features/resource-dashboard/react/components/ResourceRowListItemParts.js +2 -1
- package/dist/features/resource-dashboard/react/components/ResourceRowListView.js +1 -1
- package/dist/features/resource-dashboard/react/hooks/useResourceBoard.js +1 -1
- package/dist/features/schedule-picker/rules.js +13 -7
- package/dist/features/sketch-editor/constants.d.ts +0 -6
- package/dist/features/sketch-editor/constants.js +17 -15
- package/dist/features/sketch-editor/dom.js +4 -7
- package/dist/features/sketch-editor/react/components/SketchMainMenu.js +2 -1
- package/dist/features/sketch-editor/react/components/SketchSaveStateBadge.js +2 -1
- package/dist/features/sketch-editor/react/hooks/useSketchDomEnhancements.js +1 -1
- package/dist/features/sketch-editor/rules.js +13 -12
- package/dist/features/skills/dependencies.js +9 -4
- package/dist/features/skills/react/components/SkillRow.js +2 -1
- package/dist/features/skills/react/components/SkillsTab.js +2 -1
- package/dist/features/skills/rules.js +3 -3
- package/dist/features/source-config-list/agent-handles.js +4 -3
- package/dist/features/source-config-list/react/components/SourceConfigItemCard.js +3 -1
- package/dist/features/tab-strip/react/components/TabBar.hooks.js +4 -2
- package/dist/features/version-manager/react/components/VersionPreviewFrame.js +4 -1
- package/dist/features/version-manager/react/components/VersionSidebar.js +8 -6
- package/dist/features/version-manager/react/hooks/usePreviewCanvasSize.js +1 -1
- package/dist/features/version-manager/react/hooks/useVersionManager.js +5 -7
- package/dist/features/version-manager/rules.js +3 -5
- package/dist/features/viewer-shell/react/components/CommentSidePanel.js +2 -1
- package/dist/features/viewer-shell/react/components/SegmentedToggle.js +2 -1
- package/dist/features/viewer-shell/react/components/ViewerShell.js +2 -1
- package/dist/features/viewer-shell/rules.js +8 -7
- package/dist/react/components/AgentIcon.js +0 -1
- package/dist/react/components/BrandLogo.js +10 -2
- package/dist/react/components/CustomSelect.js +1 -1
- package/dist/react/components/EditorIcon.js +17 -14
- package/dist/react/components/Loading.js +2 -1
- package/dist/react/components/OnboardingChipField.js +5 -1
- package/dist/react/components/OnboardingDropdown.js +6 -4
- package/dist/react/components/PaletteTweaks.js +7 -6
- package/dist/react/components/PillButton.js +2 -1
- package/dist/react/components/PopoverMenu.js +2 -1
- package/dist/react/components/RemixIcon.js +2 -1
- package/dist/react/components/SecretInput.hooks.d.ts +2 -25
- package/dist/react/components/SecretInput.hooks.js +2 -24
- package/dist/react/components/SecretInput.js +5 -4
- package/dist/react/components/Toast.js +4 -2
- package/dist/react/components/TooltipLayer.js +4 -1
- package/dist/react/components/WorkingDirPicker.js +5 -4
- package/dist/react/components/agent-icon-data-uris.generated.js +0 -1
- package/dist/react/components/remixicon-font-recovery.js +9 -1
- package/dist/react/components/select-popover.js +2 -2
- package/dist/react/hooks/useBrandFonts.js +1 -1
- package/dist/react/hooks/useEdgeAutoScroll.js +1 -1
- package/dist/react/hooks/useInView.js +9 -9
- package/dist/react/hooks/useResizableSplitPane.js +12 -20
- package/dist/react/mcp-ui/useHostSurfaceTokens.js +1 -1
- package/dist/renderers/annotation-canvas/react/components/AnnotationCanvas.js +7 -1
- package/dist/renderers/annotation-canvas/react/hooks/useAnnotationCanvas.controller.js +4 -2
- package/dist/renderers/annotation-canvas/react/hooks/useAnnotationCanvas.js +9 -5
- package/dist/renderers/annotation-canvas/rules.js +9 -13
- package/dist/renderers/annotation-canvas/theme.js +5 -2
- package/dist/renderers/renderers/index.js +1 -1
- package/dist/renderers/renderers/markdown.js +4 -6
- package/dist/renderers/shiki.js +7 -1
- package/dist/theme/apply.js +7 -3
- package/dist/utils/class-names.d.ts +3 -0
- package/dist/utils/class-names.js +5 -0
- package/dist/utils/design-md.js +3 -3
- package/dist/utils/ime-composing.d.ts +1 -1
- package/dist/utils/ime-composing.js +1 -2
- package/dist/utils/localized-url.js +2 -11
- package/dist/utils/markdown-scroll-sync.js +1 -1
- package/dist/utils/omit-keys.d.ts +3 -0
- package/dist/utils/omit-keys.js +8 -0
- package/dist/utils/polygon-selection.js +1 -1
- package/dist/utils/sse.js +3 -0
- package/dist/utils/trim-chars.d.ts +13 -0
- package/dist/utils/trim-chars.js +30 -0
- package/dist/utils/unhandled-case.d.ts +10 -0
- package/dist/utils/unhandled-case.js +12 -0
- package/dist/utils/unit-bezier.js +1 -3
- package/dist/utils/zip.js +6 -10
- package/package.json +32 -29
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
// e.g. for linking out to a marketing/docs site in the reader's language.
|
|
3
|
-
//
|
|
4
|
-
// Ported from an origin helper that hardcoded one product's own marketing
|
|
5
|
-
// domain and locale table inline — that's product identity, not reusable
|
|
6
|
-
// logic, so it's dropped here. What's actually generic and worth keeping is
|
|
7
|
-
// the resolution algorithm: map the active locale to a URL segment (falling
|
|
8
|
-
// back to no segment — i.e. the base's default language — for locales the
|
|
9
|
-
// target site doesn't support), then join it onto the base. `baseUrl` and
|
|
10
|
-
// `localeSegments` are supplied by the caller.
|
|
1
|
+
import { trimTrailingChars } from './trim-chars.js';
|
|
11
2
|
export function buildLocalizedUrl(locale, options) {
|
|
12
|
-
const base = options.baseUrl
|
|
3
|
+
const base = trimTrailingChars(options.baseUrl, '/');
|
|
13
4
|
const segment = options.localeSegments?.[locale];
|
|
14
5
|
return segment ? `${base}/${segment}/` : `${base}/`;
|
|
15
6
|
}
|
|
@@ -160,7 +160,7 @@ function buildMirrorMarkup({ blockLines, text }) {
|
|
|
160
160
|
// is escaped, so it cannot inject one), so each index is a valid block index.
|
|
161
161
|
function readMarkerOffsets({ mirror, blockCount }) {
|
|
162
162
|
document.body.appendChild(mirror);
|
|
163
|
-
const offsets =
|
|
163
|
+
const offsets = Array.from({ length: blockCount }, () => 0);
|
|
164
164
|
try {
|
|
165
165
|
for (const marker of Array.from(mirror.querySelectorAll('span[data-md-block]'))) {
|
|
166
166
|
offsets[Number(marker.getAttribute('data-md-block'))] = marker.offsetTop;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** A shallow copy of `value` without `keys` — the rest-destructuring "omit" idiom, minus the unused bindings. */
|
|
2
|
+
export function omitKeys(value, keys) {
|
|
3
|
+
const copy = { ...value };
|
|
4
|
+
for (const key of keys)
|
|
5
|
+
Reflect.deleteProperty(copy, key);
|
|
6
|
+
return copy;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=omit-keys.js.map
|
|
@@ -55,7 +55,7 @@ export function lineIntersectsLine(a1, a2, b1, b2) {
|
|
|
55
55
|
/** Standard even-odd-rule ray-casting point-in-polygon test. */
|
|
56
56
|
export function pointInPolygon(point, polygon) {
|
|
57
57
|
let inside = false;
|
|
58
|
-
for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i
|
|
58
|
+
for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i, i += 1) {
|
|
59
59
|
const pi = polygon[i];
|
|
60
60
|
const pj = polygon[j];
|
|
61
61
|
// No `|| Number.EPSILON` divide-by-zero guard on `(pj.y - pi.y)`: the
|
package/dist/utils/sse.js
CHANGED
|
@@ -15,6 +15,9 @@ function applySseLine({ fields, line }) {
|
|
|
15
15
|
else if (line.startsWith('data: ')) {
|
|
16
16
|
fields.dataLines.push(line.slice(6));
|
|
17
17
|
}
|
|
18
|
+
else {
|
|
19
|
+
// Any other field (e.g. `retry:`) or a malformed line is ignored.
|
|
20
|
+
}
|
|
18
21
|
}
|
|
19
22
|
/** Build the result for a frame that carried no `data:` lines. */
|
|
20
23
|
function dataLessFrame({ comments }) {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Linear-time trimming of a set of characters, in place of `value.replace(/[…]+$/, '')`-style
|
|
3
|
+
* regexes whose engine retries the run from every start position (quadratic on long runs).
|
|
4
|
+
* `chars` is a set of single UTF-16 code units, matched exactly like a non-`u` regex class.
|
|
5
|
+
*/
|
|
6
|
+
export declare function trimTrailingChars(value: string, chars: string): string;
|
|
7
|
+
/** Leading counterpart of {@link trimTrailingChars}. */
|
|
8
|
+
export declare function trimLeadingChars(value: string, chars: string): string;
|
|
9
|
+
/** Both ends — the linear form of `value.replace(/^[…]+|[…]+$/g, '')`. */
|
|
10
|
+
export declare function trimChars(value: string, chars: string): string;
|
|
11
|
+
/** {@link trimTrailingChars} for a character class a plain list cannot spell (e.g. one including `\s`). */
|
|
12
|
+
export declare function trimTrailingWhere(value: string, isTrimmed: (char: string) => boolean): string;
|
|
13
|
+
//# sourceMappingURL=trim-chars.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Linear-time trimming of a set of characters, in place of `value.replace(/[…]+$/, '')`-style
|
|
3
|
+
* regexes whose engine retries the run from every start position (quadratic on long runs).
|
|
4
|
+
* `chars` is a set of single UTF-16 code units, matched exactly like a non-`u` regex class.
|
|
5
|
+
*/
|
|
6
|
+
export function trimTrailingChars(value, chars) {
|
|
7
|
+
let end = value.length;
|
|
8
|
+
while (end > 0 && chars.includes(value[end - 1]))
|
|
9
|
+
end -= 1;
|
|
10
|
+
return value.slice(0, end);
|
|
11
|
+
}
|
|
12
|
+
/** Leading counterpart of {@link trimTrailingChars}. */
|
|
13
|
+
export function trimLeadingChars(value, chars) {
|
|
14
|
+
let start = 0;
|
|
15
|
+
while (start < value.length && chars.includes(value[start]))
|
|
16
|
+
start += 1;
|
|
17
|
+
return value.slice(start);
|
|
18
|
+
}
|
|
19
|
+
/** Both ends — the linear form of `value.replace(/^[…]+|[…]+$/g, '')`. */
|
|
20
|
+
export function trimChars(value, chars) {
|
|
21
|
+
return trimLeadingChars(trimTrailingChars(value, chars), chars);
|
|
22
|
+
}
|
|
23
|
+
/** {@link trimTrailingChars} for a character class a plain list cannot spell (e.g. one including `\s`). */
|
|
24
|
+
export function trimTrailingWhere(value, isTrimmed) {
|
|
25
|
+
let end = value.length;
|
|
26
|
+
while (end > 0 && isTrimmed(value[end - 1]))
|
|
27
|
+
end -= 1;
|
|
28
|
+
return value.slice(0, end);
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=trim-chars.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Closes an exhaustive `switch` over a closed union.
|
|
3
|
+
*
|
|
4
|
+
* `value` is typed `never`, so the compiler still flags any union member the
|
|
5
|
+
* switch forgot. At runtime a value outside the declared union yields
|
|
6
|
+
* `undefined` — exactly what falling off the end of the switch did before — so
|
|
7
|
+
* ending a switch with `return unhandledCase(x)` changes no behaviour.
|
|
8
|
+
*/
|
|
9
|
+
export declare function unhandledCase(_value: never): never;
|
|
10
|
+
//# sourceMappingURL=unhandled-case.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Closes an exhaustive `switch` over a closed union.
|
|
3
|
+
*
|
|
4
|
+
* `value` is typed `never`, so the compiler still flags any union member the
|
|
5
|
+
* switch forgot. At runtime a value outside the declared union yields
|
|
6
|
+
* `undefined` — exactly what falling off the end of the switch did before — so
|
|
7
|
+
* ending a switch with `return unhandledCase(x)` changes no behaviour.
|
|
8
|
+
*/
|
|
9
|
+
export function unhandledCase(_value) {
|
|
10
|
+
return undefined;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=unhandled-case.js.map
|
|
@@ -21,14 +21,12 @@ export function unitBezier(x1, y1, x2, y2) {
|
|
|
21
21
|
let t = x;
|
|
22
22
|
for (let i = 0; i < 8; i += 1) {
|
|
23
23
|
const err = sampleX(t) - x;
|
|
24
|
-
if (Math.abs(err) < 1e-6)
|
|
25
|
-
break;
|
|
26
24
|
const d = sampleDX(t);
|
|
27
25
|
// A flat x-derivative would make the Newton step divide by ~0. For smooth-scroll-to-top's
|
|
28
26
|
// fixed ease-out curve sampleDX stays at least about 0.6095 over [0, 1], so it never fires
|
|
29
27
|
// there; it does for degenerate control points (e.g. x1 = x2 = 0 near x = 0), where the
|
|
30
28
|
// current estimate is kept rather than stepping to Infinity/NaN.
|
|
31
|
-
if (Math.abs(d) < 1e-6)
|
|
29
|
+
if (Math.abs(err) < 1e-6 || Math.abs(d) < 1e-6)
|
|
32
30
|
break;
|
|
33
31
|
t -= err / d;
|
|
34
32
|
}
|
package/dist/utils/zip.js
CHANGED
|
@@ -3,17 +3,13 @@
|
|
|
3
3
|
// few MB — skipping deflate keeps the implementation small and
|
|
4
4
|
// dependency-free, which matters for a package meant to run in any host
|
|
5
5
|
// (browser or Node) without pulling in a compression library.
|
|
6
|
-
const CRC_TABLE = (() => {
|
|
7
|
-
|
|
8
|
-
for (let
|
|
9
|
-
|
|
10
|
-
for (let k = 0; k < 8; k++) {
|
|
11
|
-
c = c & 1 ? 0xedb88320 ^ (c >>> 1) : c >>> 1;
|
|
12
|
-
}
|
|
13
|
-
t[n] = c >>> 0;
|
|
6
|
+
const CRC_TABLE = Array.from({ length: 256 }, (_, n) => {
|
|
7
|
+
let c = n;
|
|
8
|
+
for (let k = 0; k < 8; k++) {
|
|
9
|
+
c = c & 1 ? 0xedb88320 ^ (c >>> 1) : c >>> 1;
|
|
14
10
|
}
|
|
15
|
-
return
|
|
16
|
-
})
|
|
11
|
+
return c >>> 0;
|
|
12
|
+
});
|
|
17
13
|
function crc32(bytes) {
|
|
18
14
|
let c = 0xffffffff;
|
|
19
15
|
for (let i = 0; i < bytes.length; i++) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jini-ai/ui",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.16",
|
|
4
4
|
"description": "Generic, product-neutral React UI primitives and feature domains. Framework-free types, decision rules, catalogs, and host port contracts live behind ./core (no React, no DOM). The Excalidraw and Lexical editors live behind ./sketch-editor and ./lexical-rich-text-editor; the GrapesJS-backed inline HTML editor lives behind ./html-editor.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -58,6 +58,26 @@
|
|
|
58
58
|
"src/theme/validation.ts",
|
|
59
59
|
"src/theme/types.ts"
|
|
60
60
|
]
|
|
61
|
+
},
|
|
62
|
+
"optionalPeers": {
|
|
63
|
+
"@tanstack/react-query": "opt-in: cached react queries; import @jini-ai/ui/fetch-query/tanstack — Cached React queries could not load @tanstack/react-query. Install @tanstack/react-query to enable this feature, or check its installed version and native binaries.",
|
|
64
|
+
"@excalidraw/excalidraw": "opt-in: sketch editor; import @jini-ai/ui/sketch-editor — Sketch editor could not load @excalidraw/excalidraw. Install @excalidraw/excalidraw to enable this feature, or check its installed version and native binaries.",
|
|
65
|
+
"@lexical/react": "opt-in: rich text editor react bindings; import @jini-ai/ui/lexical-rich-text-editor — Rich text editor React bindings could not load @lexical/react. Install @lexical/react to enable this feature, or check its installed version and native binaries.",
|
|
66
|
+
"@lexical/utils": "opt-in: rich text editor utilities; import @jini-ai/ui/lexical-rich-text-editor — Rich text editor utilities could not load @lexical/utils. Install @lexical/utils to enable this feature, or check its installed version and native binaries.",
|
|
67
|
+
"@mcp-ui/client": "opt-in: mcp ui renderer; import @jini-ai/ui/mcp-ui — MCP UI renderer could not load @mcp-ui/client. Install @mcp-ui/client to enable this feature, or check its installed version and native binaries.",
|
|
68
|
+
"@radix-ui/react-checkbox": "opt-in: interactive ui controls; import @jini-ai/ui/interactive-ui — Interactive UI controls could not load @radix-ui/react-checkbox. Install @radix-ui/react-checkbox to enable this feature, or check its installed version and native binaries.",
|
|
69
|
+
"@radix-ui/react-label": "opt-in: interactive ui controls; import @jini-ai/ui/interactive-ui — Interactive UI controls could not load @radix-ui/react-label. Install @radix-ui/react-label to enable this feature, or check its installed version and native binaries.",
|
|
70
|
+
"@radix-ui/react-radio-group": "opt-in: interactive ui controls; import @jini-ai/ui/interactive-ui — Interactive UI controls could not load @radix-ui/react-radio-group. Install @radix-ui/react-radio-group to enable this feature, or check its installed version and native binaries.",
|
|
71
|
+
"@radix-ui/react-select": "opt-in: interactive ui controls; import @jini-ai/ui/interactive-ui — Interactive UI controls could not load @radix-ui/react-select. Install @radix-ui/react-select to enable this feature, or check its installed version and native binaries.",
|
|
72
|
+
"@radix-ui/react-slot": "opt-in: interactive ui controls — Interactive UI controls could not load @radix-ui/react-slot. Install @radix-ui/react-slot to enable this feature, or check its installed version and native binaries.",
|
|
73
|
+
"grapesjs": "opt-in: visual html editor; import @jini-ai/ui/html-editor — Visual HTML editor could not load grapesjs. Install grapesjs to enable this feature, or check its installed version and native binaries.",
|
|
74
|
+
"lexical": "opt-in: rich text editor; import @jini-ai/ui/lexical-rich-text-editor — Rich text editor could not load lexical. Install lexical to enable this feature, or check its installed version and native binaries.",
|
|
75
|
+
"class-variance-authority": "opt-in: styled interactive ui components; import @jini-ai/ui/interactive-ui — Styled interactive UI components could not load class-variance-authority. Install class-variance-authority to enable this feature, or check its installed version and native binaries.",
|
|
76
|
+
"clsx": "opt-in: styled interactive ui components; import @jini-ai/ui/interactive-ui — Styled interactive UI components could not load clsx. Install clsx to enable this feature, or check its installed version and native binaries.",
|
|
77
|
+
"parse5": "opt-in: html parsing; import @jini-ai/ui/html-editor — HTML parsing could not load parse5. Install parse5 to enable this feature, or check its installed version and native binaries.",
|
|
78
|
+
"shiki": "opt-in: syntax highlighting; import @jini-ai/ui/renderers — Syntax highlighting could not load shiki. Install shiki to enable this feature, or check its installed version and native binaries.",
|
|
79
|
+
"tailwind-merge": "opt-in: styled interactive ui components; import @jini-ai/ui/interactive-ui — Styled interactive UI components could not load tailwind-merge. Install tailwind-merge to enable this feature, or check its installed version and native binaries.",
|
|
80
|
+
"zod": "opt-in: schema-based features; import @jini-ai/ui/interactive-ui — Schema-based features could not load zod. Install zod to enable this feature, or check its installed version and native binaries."
|
|
61
81
|
}
|
|
62
82
|
},
|
|
63
83
|
"type": "module",
|
|
@@ -243,14 +263,19 @@
|
|
|
243
263
|
"shiki": "^1.24.4",
|
|
244
264
|
"tailwind-merge": "^2.6.0",
|
|
245
265
|
"zod": "^3.25.76",
|
|
246
|
-
"@jini-ai/
|
|
247
|
-
"@jini-ai/
|
|
248
|
-
"@jini-ai/
|
|
249
|
-
"@jini-ai/
|
|
250
|
-
"@jini-ai/
|
|
266
|
+
"@jini-ai/agentic": "^0.6.16",
|
|
267
|
+
"@jini-ai/platform": "^0.6.16",
|
|
268
|
+
"@jini-ai/core": "^0.6.16",
|
|
269
|
+
"@jini-ai/integrations": "^0.6.16",
|
|
270
|
+
"@jini-ai/agent-runtime": "^0.6.16"
|
|
251
271
|
},
|
|
252
272
|
"dependencies": {
|
|
253
|
-
"
|
|
273
|
+
"micromark": "^4.0.0",
|
|
274
|
+
"micromark-extension-gfm": "^3.0.0",
|
|
275
|
+
"@jini-ai/ui-kit": "^0.6.16",
|
|
276
|
+
"@jini-ai/core": "^0.6.16",
|
|
277
|
+
"@jini-ai/agentic": "^0.6.16",
|
|
278
|
+
"@jini-ai/platform": "^0.6.16"
|
|
254
279
|
},
|
|
255
280
|
"peerDependencies": {
|
|
256
281
|
"@tanstack/react-query": "^5.0.0",
|
|
@@ -267,12 +292,8 @@
|
|
|
267
292
|
"lexical": "0.36.2",
|
|
268
293
|
"react": "^18.3.0 || ^19.0.0",
|
|
269
294
|
"react-dom": "^18.3.0 || ^19.0.0",
|
|
270
|
-
"@jini-ai/platform": "^0.6.15-rc.2",
|
|
271
|
-
"@jini-ai/agentic": "^0.6.15-rc.2",
|
|
272
295
|
"class-variance-authority": "^0.7.1",
|
|
273
296
|
"clsx": "^2.1.1",
|
|
274
|
-
"micromark": "^4.0.0",
|
|
275
|
-
"micromark-extension-gfm": "^3.0.0",
|
|
276
297
|
"parse5": "^7.3.0 || ^8.0.1",
|
|
277
298
|
"shiki": "^1.24.4",
|
|
278
299
|
"tailwind-merge": "^2.6.0",
|
|
@@ -315,30 +336,12 @@
|
|
|
315
336
|
"lexical": {
|
|
316
337
|
"optional": true
|
|
317
338
|
},
|
|
318
|
-
"react": {
|
|
319
|
-
"optional": true
|
|
320
|
-
},
|
|
321
|
-
"react-dom": {
|
|
322
|
-
"optional": true
|
|
323
|
-
},
|
|
324
|
-
"@jini-ai/platform": {
|
|
325
|
-
"optional": true
|
|
326
|
-
},
|
|
327
|
-
"@jini-ai/agentic": {
|
|
328
|
-
"optional": true
|
|
329
|
-
},
|
|
330
339
|
"class-variance-authority": {
|
|
331
340
|
"optional": true
|
|
332
341
|
},
|
|
333
342
|
"clsx": {
|
|
334
343
|
"optional": true
|
|
335
344
|
},
|
|
336
|
-
"micromark": {
|
|
337
|
-
"optional": true
|
|
338
|
-
},
|
|
339
|
-
"micromark-extension-gfm": {
|
|
340
|
-
"optional": true
|
|
341
|
-
},
|
|
342
345
|
"parse5": {
|
|
343
346
|
"optional": true
|
|
344
347
|
},
|