Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .changeset/next-prerelease-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
"@tabula/dom-utils": patch
"@tabula/portal-root-for": patch
"@tabula/prettier-config": patch
"@tabula/svgr-config": patch
"@tabula/track-id": patch
"@tabula/tree-utils": patch
"@tabula/typescript-config": patch
"@tabula/ui-ai-chat": patch
"@tabula/ui-analytics": patch
"@tabula/ui-button": patch
"@tabula/ui-checkbox": patch
"@tabula/ui-checkbox-tree": patch
"@tabula/ui-data-type-icon": patch
"@tabula/ui-date-picker": patch
"@tabula/ui-icon": patch
"@tabula/ui-json-view": patch
"@tabula/ui-layout-view": patch
"@tabula/ui-menu": patch
"@tabula/ui-multi-selector": patch
"@tabula/ui-node-icon": patch
"@tabula/ui-selector": patch
"@tabula/ui-separator-icon": patch
"@tabula/ui-slider": patch
"@tabula/ui-status-badge": patch
"@tabula/ui-switch": patch
"@tabula/ui-tag": patch
"@tabula/ui-theme": patch
"@tabula/ui-tree": patch
"@tabula/use-async-state": patch
"@tabula/use-close-on-outside-events": patch
"@tabula/use-flag": patch
"@tabula/use-previous-value": patch
"@tabula/use-side-effect": patch
"@tabula/use-size": patch
"@tabula/use-track-id": patch
"@tabula/use-track-ids": patch
"@tabula/vitest-config": patch
---

Publish next prerelease packages for validation.
46 changes: 46 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"mode": "pre",
"tag": "next",
"initialVersions": {
"@tabula/ui-ai-chat": "2.1.3",
"@tabula/ui-analytics": "0.3.2",
"@tabula/ui-button": "9.1.2",
"@tabula/ui-checkbox": "4.1.2",
"@tabula/ui-checkbox-tree": "4.1.2",
"@tabula/ui-data-type-icon": "0.2.3",
"@tabula/ui-date-picker": "7.1.2",
"@tabula/ui-icon": "8.0.4",
"@tabula/ui-json-view": "7.3.3",
"@tabula/ui-layout-view": "8.1.2",
"@tabula/ui-menu": "1.2.2",
"@tabula/ui-multi-selector": "1.1.2",
"@tabula/ui-node-icon": "12.0.0",
"@tabula/ui-selector": "3.1.1",
"@tabula/ui-separator-icon": "0.2.3",
"@tabula/ui-slider": "2.1.2",
"@tabula/ui-status-badge": "1.1.2",
"@tabula/ui-switch": "1.1.2",
"@tabula/ui-tag": "0.1.2",
"@tabula/ui-theme": "3.3.2",
"@tabula/ui-tree": "0.1.2",
"@tabula/prettier-config": "0.1.7",
"@tabula/svgr-config": "0.3.2",
"@tabula/typescript-config": "0.3.3",
"@tabula/vitest-config": "0.3.0",
"@tabula/use-async-state": "0.1.0",
"@tabula/use-close-on-outside-events": "0.1.0",
"@tabula/use-flag": "0.1.0",
"@tabula/use-previous-value": "0.1.0",
"@tabula/use-side-effect": "0.1.0",
"@tabula/use-size": "0.2.2",
"@tabula/use-track-id": "0.1.1",
"@tabula/use-track-ids": "0.1.1",
"@tabula/dom-utils": "0.1.0",
"@tabula/portal-root-for": "0.1.0",
"@tabula/track-id": "0.1.0",
"@tabula/tree-utils": "0.1.0"
},
"changesets": [
"next-prerelease-check"
]
}
7 changes: 7 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .scaffold/component/.forgerc.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
"watch": {
"production": false,
"storybook": true
}
},
"postBuild": "node ../../scripts/convert-forge-output-to-mjs.mjs"
}
6 changes: 3 additions & 3 deletions .scaffold/component/package.json.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"exports": {
".": {
"types": "./typings/index.d.ts",
"module": "./lib/index.js",
"import": "./lib/index.js",
"default": "./lib/index.js"
"module": "./lib/index.mjs",
"import": "./lib/index.mjs",
"default": "./lib/index.mjs"
},
"./package.json": "./package.json"
},
Expand Down
3 changes: 2 additions & 1 deletion .scaffold/hook/.forgerc.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
"watch": {
"production": false,
"storybook": true
}
},
"postBuild": "node ../../scripts/convert-forge-output-to-mjs.mjs"
}
6 changes: 3 additions & 3 deletions .scaffold/hook/package.json.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"exports": {
".": {
"types": "./typings/index.d.ts",
"module": "./lib/index.js",
"import": "./lib/index.js",
"default": "./lib/index.js"
"module": "./lib/index.mjs",
"import": "./lib/index.mjs",
"default": "./lib/index.mjs"
},
"./package.json": "./package.json"
},
Expand Down
3 changes: 2 additions & 1 deletion .scaffold/library/.forgerc.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
"watch": {
"production": false,
"storybook": true
}
},
"postBuild": "node ../../scripts/convert-forge-output-to-mjs.mjs"
}
6 changes: 3 additions & 3 deletions .scaffold/library/package.json.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"exports": {
".": {
"types": "./typings/index.d.ts",
"module": "./lib/index.js",
"import": "./lib/index.js",
"default": "./lib/index.js"
"module": "./lib/index.mjs",
"import": "./lib/index.mjs",
"default": "./lib/index.mjs"
},
"./package.json": "./package.json"
},
Expand Down
11 changes: 5 additions & 6 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { readdirSync } from 'node:fs';
import { readFileSync, readdirSync } from 'node:fs';
import { dirname, join, relative, resolve, sep } from 'node:path';
import { fileURLToPath } from 'node:url';

Expand All @@ -24,7 +24,7 @@ function searchStories(workspace) {
//
// If directory have no `package.json`, then just ignore it.
try {
packageJson = require(join(packageDir, 'package.json'));
packageJson = JSON.parse(readFileSync(join(packageDir, 'package.json'), 'utf8'));
} catch {
continue;
}
Expand All @@ -34,7 +34,7 @@ function searchStories(workspace) {
stories.push({
directory: packageDir,
titlePrefix: `${workspace}/${name}@${packageJson.version}`,
files: 'stories/**/*.@(mdx|stories.@(mdx|ts|tsx))',
files: 'stories/**/*.@(mdx|stories.@(ts|tsx))',
});
}

Expand All @@ -56,16 +56,15 @@ const alias = {

const [ns, pkgName] = relative(ROOT_DIR, importer).split(sep);

const resolvedTarget = target === '' ? 'lib/index.js' : `lib${target}.js`;
const resolvedTarget = target === '' ? 'lib/index.mjs' : `lib${target}.mjs`;

return join(ROOT_DIR, ns, pkgName, resolvedTarget);
},
};

export default {
addons: [
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-docs',
'@storybook/addon-links',
],

Expand Down
2 changes: 1 addition & 1 deletion .storybook/manager.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { addons } from '@storybook/manager-api';
import { addons } from 'storybook/manager-api';

import { theme } from './theme.js';

Expand Down
2 changes: 1 addition & 1 deletion .storybook/theme.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { create } from '@storybook/theming/create';
import { create } from 'storybook/theming';

export const theme = create({
base: 'light',
Expand Down
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
nodejs 22.14.0
pnpm 10.6.4
nodejs 24.14.1
pnpm 10.13.1
3 changes: 2 additions & 1 deletion components/ui-ai-chat/.forgerc
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
"watch": {
"production": false,
"storybook": true
}
},
"postBuild": "node ../../scripts/convert-forge-output-to-mjs.mjs"
}
11 changes: 11 additions & 0 deletions components/ui-ai-chat/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @tabula/ui-ai-chat

## 2.1.4-next.0
### Patch Changes



- Publish next prerelease packages for validation.

- Updated dependencies []:
- @tabula/ui-button@9.1.3-next.0
- @tabula/ui-theme@3.3.3-next.0

## 2.1.3
### Patch Changes

Expand Down
21 changes: 12 additions & 9 deletions components/ui-ai-chat/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@tabula/ui-ai-chat",
"version": "2.1.3",
"version": "2.1.4-next.0",
"description": "Allows to embed UI for conversation with AI assistant",
"type": "module",
"typings": "./typings/index.d.ts",
"exports": {
".": {
"types": "./typings/index.d.ts",
"module": "./lib/index.js",
"import": "./lib/index.js",
"default": "./lib/index.js"
"module": "./lib/index.mjs",
"import": "./lib/index.mjs",
"default": "./lib/index.mjs"
},
"./package.json": "./package.json"
},
Expand Down Expand Up @@ -48,15 +48,18 @@
},
"devDependencies": {
"@tabula/ui-theme": "workspace:^",
"@types/react-transition-group": "catalog:"
"@types/react": "catalog:",
"@types/react-transition-group": "catalog:",
"react": "catalog:",
"react-dom": "catalog:"
},
"dependencies": {
"@tabula/ui-button": "workspace:^",
"clsx": "catalog:",
"dompurify": "^3.2.4",
"js-xxhash": "^4.0.0",
"marked": "^14.1.2",
"react-textarea-autosize": "^8.5.5",
"dompurify": "^3.4.1",
"js-xxhash": "^5.0.1",
"marked": "^18.0.2",
"react-textarea-autosize": "^8.5.9",
"react-transition-group": "catalog:"
}
}
4 changes: 3 additions & 1 deletion components/ui-ai-chat/src/Conversation/Conversation.hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import { Ref, RefObject, useImperativeHandle, useRef } from 'react';

import { InternalConversationController } from '../types';

export function useController(ref: Ref<InternalConversationController>): RefObject<HTMLDivElement> {
export function useController(
ref: Ref<InternalConversationController>,
): RefObject<HTMLDivElement | null> {
const conversationRef = useRef<HTMLDivElement>(null);

useImperativeHandle(
Expand Down
4 changes: 3 additions & 1 deletion components/ui-ai-chat/src/PromptInput/PromptInput.hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import { Ref, RefObject, useImperativeHandle, useRef } from 'react';

import { PromptInputController } from '../types';

export function useController(ref: Ref<PromptInputController>): RefObject<HTMLTextAreaElement> {
export function useController(
ref: Ref<PromptInputController>,
): RefObject<HTMLTextAreaElement | null> {
const inputRef = useRef<HTMLTextAreaElement>(null);

useImperativeHandle(
Expand Down
2 changes: 1 addition & 1 deletion components/ui-ai-chat/src/UiAiChat/hooks/useAutoScroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function shouldToScroll(previous: Request | null, current: Request | null): bool

export function useAutoScroll(
conversation: Request[],
conversationRef: RefObject<InternalConversationController>,
conversationRef: RefObject<InternalConversationController | null>,
): void {
const lastRef = useRef<Request | null>(null);

Expand Down
4 changes: 2 additions & 2 deletions components/ui-ai-chat/src/UiAiChat/hooks/useController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { Controller, ConversationController, PromptInputController } from '../..
type Options = {
ref: Ref<Controller>;

conversationRef: RefObject<ConversationController>;
promptInputRef: RefObject<PromptInputController>;
conversationRef: RefObject<ConversationController | null>;
promptInputRef: RefObject<PromptInputController | null>;
};

export function useController({ ref, conversationRef, promptInputRef }: Options): void {
Expand Down
2 changes: 1 addition & 1 deletion components/ui-ai-chat/src/UiAiChat/hooks/usePrompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type Options = {

onSend: (prompt: string) => void;

promptInputRef: RefObject<PromptInputController>;
promptInputRef: RefObject<PromptInputController | null>;
};

type Result = {
Expand Down
4 changes: 1 addition & 3 deletions components/ui-ai-chat/stories/Chat/Chat.hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ function answerWithTable(noRows = false): string {
const colsCount = randNumber({ min: 1, max: 10 });
const rowsCount = noRows ? 0 : randNumber({ min: 5, max: 20 });

const buffer: string[] = [`${randParagraph()}\n\n`];

buffer.push('|');
const buffer: string[] = [`${randParagraph()}\n\n`, '|'];

for (let c = 0; c < colsCount; c += 1) {
buffer.push(` ${randWord()} |`);
Expand Down
2 changes: 1 addition & 1 deletion components/ui-ai-chat/stories/UiAiChat.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { action } from '@storybook/addon-actions';
import { action } from 'storybook/actions';
import { Decorator, Meta, StoryObj } from '@storybook/react';

import { UiAiChat, UiAiChatProps } from '~';
Expand Down
8 changes: 6 additions & 2 deletions components/ui-ai-chat/tsconfig.forge.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"extends": "./tsconfig.json",

"include": ["src"]
"include": [
"src"
],
"compilerOptions": {
"rootDir": "./src"
}
}
3 changes: 2 additions & 1 deletion components/ui-analytics/.forgerc
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
"watch": {
"production": false,
"storybook": true
}
},
"postBuild": "node ../../scripts/convert-forge-output-to-mjs.mjs"
}
11 changes: 11 additions & 0 deletions components/ui-analytics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @tabula/ui-analytics

## 0.3.3-next.0
### Patch Changes



- Publish next prerelease packages for validation.

- Updated dependencies []:
- @tabula/use-track-id@0.1.2-next.0
- @tabula/use-track-ids@0.1.2-next.0

## 0.3.2

### Patch Changes
Expand Down
Loading
Loading