@surfaces-ui/components 0.3.0 → 0.5.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.
package/dist/index.d.ts CHANGED
@@ -26,6 +26,7 @@ export * from "./graph/model.js";
26
26
  export * from "./discovery/AskData.js";
27
27
  export * from "./model/ModelDiagram.js";
28
28
  export * from "./text/Markdown.js";
29
+ export * from "./text/Image.js";
29
30
  export * from "./source/SourceList.js";
30
31
  export * from "./source/ConnectionBuilder.js";
31
32
  export * from "./metric/Metric.js";
package/dist/index.js CHANGED
@@ -26,6 +26,7 @@ export * from "./graph/model.js";
26
26
  export * from "./discovery/AskData.js";
27
27
  export * from "./model/ModelDiagram.js";
28
28
  export * from "./text/Markdown.js";
29
+ export * from "./text/Image.js";
29
30
  export * from "./source/SourceList.js";
30
31
  export * from "./source/ConnectionBuilder.js";
31
32
  export * from "./metric/Metric.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C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,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC","sourcesContent":["export * from \"./locale/locale.js\";\nexport * from \"./locale/SurfacesText.js\";\nexport * from \"./theme/ThemeProvider.js\";\nexport * from \"./theme/ThemePicker.js\";\nexport * from \"./data/DataSourceProvider.js\";\nexport * from \"./data/format.js\";\nexport * from \"./data/useRowWindow.js\";\nexport * from \"./data/messages.js\";\nexport * from \"./data/DataNotes.js\";\nexport * from \"./grid/DataGrid.js\";\nexport * from \"./chart/Chart.js\";\nexport * from \"./chart/option.js\";\nexport * from \"./editor/SqlEditor.js\";\nexport * from \"./schema/SchemaExplorer.js\";\nexport * from \"./schema/ObjectBrowser.js\";\nexport * from \"./filter/FilterBar.js\";\nexport * from \"./pivot/PivotTable.js\";\nexport * from \"./result/QueryResult.js\";\nexport * from \"./discovery/shared.js\";\nexport * from \"./discovery/DataSearch.js\";\nexport * from \"./discovery/ObjectDetail.js\";\nexport * from \"./discovery/ContextBuilder.js\";\nexport * from \"./discovery/RelationshipGraph.js\";\nexport * from \"./graph/NodeGraph.js\";\nexport * from \"./graph/model.js\";\nexport * from \"./discovery/AskData.js\";\nexport * from \"./model/ModelDiagram.js\";\nexport * from \"./text/Markdown.js\";\nexport * from \"./source/SourceList.js\";\nexport * from \"./source/ConnectionBuilder.js\";\nexport * from \"./metric/Metric.js\";\nexport * from \"./rows/RowList.js\";\nexport * from \"./pipeline/Pipeline.js\";\nexport * from \"./panzoom/usePanZoom.js\";\nexport * from \"./data/export.js\";\nexport * from \"./plan/QueryPlan.js\";\nexport * from \"./pipeline/PipelineView.js\";\nexport * from \"./pipeline/DatasetReview.js\";\nexport * from \"./pipeline/IngestWizard.js\";\nexport * from \"./chart/advice.js\";\nexport * from \"./chart/Sparkline.js\";\nexport * from \"./chart/BulletGraph.js\";\nexport * from \"./metric/useMeasure.js\";\nexport * from \"./review/PlanReview.js\";\nexport * from \"./review/PiiReview.js\";\nexport * from \"./review/pii.js\";\nexport * from \"./review/StepFlow.js\";\nexport * from \"./review/ActionReceipt.js\";\nexport * from \"./menu/ContextMenu.js\";\nexport * from \"./schema/ObjectInfo.js\";\n// The plain filter form lives in @surfaces-ui/data, below every package that uses it.\nexport { type FilterOp, type FilterSpec, type SortSpec, FILTER_OPS, chosenValues, filterWords, filtersExcept, filtersFromSpec, filtersToSpec, joinRelative, parseFilterSpecs, parseSortSpecs, sinceLabel, sinceStart, sortsFromSpec, sortsToSpec, selectValues, splitRelative, toggleValueFilter, valueFilter } from \"@surfaces-ui/data\";\nexport * from \"./form/Form.js\";\nexport * from \"./workspace/layout.js\";\nexport * from \"./workspace/icons.js\";\nexport * from \"./workspace/Workspace.js\";\nexport * from \"./workspace/SideNav.js\";\nexport * from \"./workspace/NavBar.js\";\nexport * from \"./site/Site.js\";\nexport * from \"./schema/refs.js\";\nexport * from \"./files/files.js\";\nexport * from \"./files/FileBrowser.js\";\nexport * from \"./filter/QueryFilters.js\";\nexport * from \"./explore/model.js\";\nexport * from \"./explore/Explorer.js\";\nexport * from \"./explore/report.js\";\nexport * from \"./explore/ReportBuilder.js\";\nexport * from \"./explore/semantic.js\";\nexport * from \"./explore/SemanticsProvider.js\";\nexport * from \"./explore/SemanticModelEditor.js\";\nexport * from \"./explore/SemanticRows.js\";\nexport * from \"./explore/ModelLineage.js\";\nexport * from \"./explore/semantic-proposal.js\";\nexport * from \"./controls/ItemControls.js\";\nexport * from \"./controls/context.js\";\nexport * from \"./controls/ResizeHandle.js\";\nexport * from \"./controls/SegmentedControl.js\";\nexport * from \"./controls/ConfirmDialog.js\";\nexport * from \"./controls/StatusBadge.js\";\nexport * from \"./controls/Combobox.js\";\nexport * from \"./controls/Popover.js\";\nexport * from \"./table/DataTable.js\";\nexport * from \"./table/SelectionBar.js\";\nexport * from \"./table/Pagination.js\";\nexport * from \"./controls/resize.js\";\nexport * from \"./appComponents.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA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C;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC","sourcesContent":["export * from \"./locale/locale.js\";\nexport * from \"./locale/SurfacesText.js\";\nexport * from \"./theme/ThemeProvider.js\";\nexport * from \"./theme/ThemePicker.js\";\nexport * from \"./data/DataSourceProvider.js\";\nexport * from \"./data/format.js\";\nexport * from \"./data/useRowWindow.js\";\nexport * from \"./data/messages.js\";\nexport * from \"./data/DataNotes.js\";\nexport * from \"./grid/DataGrid.js\";\nexport * from \"./chart/Chart.js\";\nexport * from \"./chart/option.js\";\nexport * from \"./editor/SqlEditor.js\";\nexport * from \"./schema/SchemaExplorer.js\";\nexport * from \"./schema/ObjectBrowser.js\";\nexport * from \"./filter/FilterBar.js\";\nexport * from \"./pivot/PivotTable.js\";\nexport * from \"./result/QueryResult.js\";\nexport * from \"./discovery/shared.js\";\nexport * from \"./discovery/DataSearch.js\";\nexport * from \"./discovery/ObjectDetail.js\";\nexport * from \"./discovery/ContextBuilder.js\";\nexport * from \"./discovery/RelationshipGraph.js\";\nexport * from \"./graph/NodeGraph.js\";\nexport * from \"./graph/model.js\";\nexport * from \"./discovery/AskData.js\";\nexport * from \"./model/ModelDiagram.js\";\nexport * from \"./text/Markdown.js\";\nexport * from \"./text/Image.js\";\nexport * from \"./source/SourceList.js\";\nexport * from \"./source/ConnectionBuilder.js\";\nexport * from \"./metric/Metric.js\";\nexport * from \"./rows/RowList.js\";\nexport * from \"./pipeline/Pipeline.js\";\nexport * from \"./panzoom/usePanZoom.js\";\nexport * from \"./data/export.js\";\nexport * from \"./plan/QueryPlan.js\";\nexport * from \"./pipeline/PipelineView.js\";\nexport * from \"./pipeline/DatasetReview.js\";\nexport * from \"./pipeline/IngestWizard.js\";\nexport * from \"./chart/advice.js\";\nexport * from \"./chart/Sparkline.js\";\nexport * from \"./chart/BulletGraph.js\";\nexport * from \"./metric/useMeasure.js\";\nexport * from \"./review/PlanReview.js\";\nexport * from \"./review/PiiReview.js\";\nexport * from \"./review/pii.js\";\nexport * from \"./review/StepFlow.js\";\nexport * from \"./review/ActionReceipt.js\";\nexport * from \"./menu/ContextMenu.js\";\nexport * from \"./schema/ObjectInfo.js\";\n// The plain filter form lives in @surfaces-ui/data, below every package that uses it.\nexport { type FilterOp, type FilterSpec, type SortSpec, FILTER_OPS, chosenValues, filterWords, filtersExcept, filtersFromSpec, filtersToSpec, joinRelative, parseFilterSpecs, parseSortSpecs, sinceLabel, sinceStart, sortsFromSpec, sortsToSpec, selectValues, splitRelative, toggleValueFilter, valueFilter } from \"@surfaces-ui/data\";\nexport * from \"./form/Form.js\";\nexport * from \"./workspace/layout.js\";\nexport * from \"./workspace/icons.js\";\nexport * from \"./workspace/Workspace.js\";\nexport * from \"./workspace/SideNav.js\";\nexport * from \"./workspace/NavBar.js\";\nexport * from \"./site/Site.js\";\nexport * from \"./schema/refs.js\";\nexport * from \"./files/files.js\";\nexport * from \"./files/FileBrowser.js\";\nexport * from \"./filter/QueryFilters.js\";\nexport * from \"./explore/model.js\";\nexport * from \"./explore/Explorer.js\";\nexport * from \"./explore/report.js\";\nexport * from \"./explore/ReportBuilder.js\";\nexport * from \"./explore/semantic.js\";\nexport * from \"./explore/SemanticsProvider.js\";\nexport * from \"./explore/SemanticModelEditor.js\";\nexport * from \"./explore/SemanticRows.js\";\nexport * from \"./explore/ModelLineage.js\";\nexport * from \"./explore/semantic-proposal.js\";\nexport * from \"./controls/ItemControls.js\";\nexport * from \"./controls/context.js\";\nexport * from \"./controls/ResizeHandle.js\";\nexport * from \"./controls/SegmentedControl.js\";\nexport * from \"./controls/ConfirmDialog.js\";\nexport * from \"./controls/StatusBadge.js\";\nexport * from \"./controls/Combobox.js\";\nexport * from \"./controls/Popover.js\";\nexport * from \"./table/DataTable.js\";\nexport * from \"./table/SelectionBar.js\";\nexport * from \"./table/Pagination.js\";\nexport * from \"./controls/resize.js\";\nexport * from \"./appComponents.js\";\n"]}
@@ -8,6 +8,12 @@ const ENGINE_LABEL = {
8
8
  [Engine.DATAFUSION]: "DataFusion",
9
9
  [Engine.TERADATA]: "Teradata",
10
10
  [Engine.POSTGRES]: "Postgres",
11
+ [Engine.MYSQL]: "MySQL",
12
+ [Engine.SQLSERVER]: "SQL Server",
13
+ [Engine.SNOWFLAKE]: "Snowflake",
14
+ [Engine.BIGQUERY]: "BigQuery",
15
+ [Engine.DATABRICKS]: "Databricks",
16
+ [Engine.ORACLE]: "Oracle",
11
17
  };
12
18
  export const CONNECTION_LABEL = {
13
19
  [ConnectionKind.S3]: "Amazon S3",
@@ -1 +1 @@
1
- {"version":3,"file":"SourceList.js","sourceRoot":"","sources":["../../src/source/SourceList.tsx"],"names":[],"mappings":";AACA,OAAO,EAAmB,cAAc,EAAE,MAAM,EAAwC,MAAM,oBAAoB,CAAC;AACnH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE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,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,GAAQ,KAH9C,KAAK,CAAC,IAAI,CAId,CACN,CAAC,GACC,CACN,IACA,CACJ,IACG,KA3EC,MAAM,CAAC,EAAE,CA4Eb,CACN,CAAC;QACJ,CAAC,CAAC,GACC,CACN,CAAC;AACJ,CAAC","sourcesContent":["import type { DataSource } from \"@surfaces-ui/data\";\nimport { type Connection, ConnectionKind, Engine, type Source, type TestSourceResponse } from \"@surfaces-ui/proto\";\nimport { useEffect, useState } from \"react\";\nimport { useDataSource } from \"../data/DataSourceProvider.js\";\nimport { messageOf } from \"../data/useRowWindow.js\";\n\nexport interface SourceListProps {\n /** Called when a source is chosen. */\n onSelect?(source: Source): void;\n dataSource?: DataSource;\n className?: string;\n}\n\nconst ENGINE_LABEL: Partial<Record<Engine, string>> = {\n [Engine.DUCKDB]: \"DuckDB\",\n [Engine.DATAFUSION]: \"DataFusion\",\n [Engine.TERADATA]: \"Teradata\",\n [Engine.POSTGRES]: \"Postgres\",\n};\n\nexport const CONNECTION_LABEL: Partial<Record<ConnectionKind, string>> = {\n [ConnectionKind.S3]: \"Amazon S3\",\n [ConnectionKind.GCS]: \"Google Cloud Storage\",\n [ConnectionKind.AZURE]: \"Azure Storage\",\n [ConnectionKind.HTTP]: \"Web (https)\",\n [ConnectionKind.ICEBERG_REST]: \"Iceberg REST catalog\",\n [ConnectionKind.DATABASE_FILE]: \"Database file\",\n [ConnectionKind.POSTGRES]: \"Postgres database\",\n};\n\n/** How a connection signs in, in words. Only the secret's name is ever known here. */\nexport function credentialText(connection: Connection): string {\n if (connection.ambientCredentials) return \"The server's own cloud credentials\";\n return connection.credentialsSecret ? `Secret ${connection.credentialsSecret}` : \"None (public)\";\n}\n\n/**\n * The data sources a backend offers: what runs their SQL, how they reach\n * storage and catalogs, and whether each table can be reached right now.\n * Credentials are shown by name only; their values never leave the server.\n */\nexport function SourceList(props: SourceListProps) {\n const dataSource = useDataSource(props.dataSource);\n const [sources, setSources] = useState<Source[] | undefined>();\n const [error, setError] = useState<string | undefined>();\n const [tests, setTests] = useState<Record<string, TestSourceResponse | \"running\" | { error: string }>>({});\n\n useEffect(() => {\n let current = true;\n dataSource\n .listSources({})\n .then((response) => current && setSources(response.sources))\n .catch((e: unknown) => current && setError(messageOf(e)));\n return () => {\n current = false;\n };\n }, [dataSource]);\n\n const test = (id: string) => {\n if (!dataSource.testSource) return;\n setTests((previous) => ({ ...previous, [id]: \"running\" }));\n dataSource\n .testSource({ target: { case: \"id\", value: id } })\n .then((response) => setTests((previous) => ({ ...previous, [id]: response })))\n .catch((e: unknown) => setTests((previous) => ({ ...previous, [id]: { error: messageOf(e) } })));\n };\n\n if (error) {\n return (\n <p className=\"sf-search-error\" role=\"alert\">\n {error}\n </p>\n );\n }\n if (!sources) return <p className=\"sf-object-muted\">Loading…</p>;\n if (sources.length === 0) return <p className=\"sf-object-muted\">No sources are configured.</p>;\n\n return (\n <ul className={[\"sf-sources\", props.className].filter(Boolean).join(\" \")}>\n {sources.map((source) => {\n const result = tests[source.id];\n const done = result && result !== \"running\" && !(\"error\" in result) ? result : undefined;\n return (\n <li key={source.id} className=\"sf-source\">\n <header className=\"sf-source-head\">\n <div>\n <h3 className=\"sf-object-title\">{source.displayName || source.id}</h3>\n <p className=\"sf-object-facts\">\n {[source.id, ENGINE_LABEL[source.engine], source.readOnly ? \"Read only\" : undefined, source.capabilities?.timeTravel ? \"Time travel\" : undefined, source.capabilities?.storedResults ? \"Keeps results\" : undefined]\n .filter(Boolean)\n .join(\" · \")}\n </p>\n </div>\n <div className=\"sf-object-buttons\">\n {props.onSelect && (\n <button type=\"button\" className=\"sf-button\" onClick={() => props.onSelect?.(source)}>\n Open\n </button>\n )}\n {dataSource.testSource && (\n <button type=\"button\" className=\"sf-button\" disabled={result === \"running\"} onClick={() => test(source.id)}>\n {result === \"running\" ? \"Testing…\" : \"Test connection\"}\n </button>\n )}\n </div>\n </header>\n\n {source.connections.length > 0 && (\n <div className=\"sf-object-table\" tabIndex={0} role=\"region\" aria-label={`Connections of ${source.displayName || source.id}`}>\n <table>\n <caption className=\"sf-a2-visually-hidden\">Connections of {source.displayName || source.id}</caption>\n <thead>\n <tr>\n <th scope=\"col\">Connection</th>\n <th scope=\"col\">Type</th>\n <th scope=\"col\">Covers</th>\n <th scope=\"col\">Signs in with</th>\n </tr>\n </thead>\n <tbody>\n {source.connections.map((connection) => (\n <tr key={connection.name}>\n <th scope=\"row\">{connection.name}</th>\n <td>{CONNECTION_LABEL[connection.kind] ?? \"Other\"}</td>\n <td className=\"sf-object-type\">{connection.scope}</td>\n <td>{credentialText(connection)}</td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n )}\n\n <div aria-live=\"polite\">\n {result && result !== \"running\" && \"error\" in result && (\n <p className=\"sf-search-error\" role=\"alert\">\n {result.error}\n </p>\n )}\n {done && (\n <>\n <p className=\"sf-source-result\" data-ok={done.ok || undefined}>\n <span aria-hidden=\"true\">{done.ok ? \"✓\" : \"!\"}</span> {done.message}\n {done.engineVersion ? ` · ${ENGINE_LABEL[source.engine] ?? \"Engine\"} ${done.engineVersion}` : \"\"} · {Number(done.elapsedMs)} ms\n </p>\n {done.checks.length > 0 && (\n <ul className=\"sf-source-checks\">\n {done.checks.map((check) => (\n <li key={check.name} data-ok={check.ok || undefined}>\n <span aria-hidden=\"true\">{check.ok ? \"✓\" : \"!\"}</span>\n <strong>{check.name}</strong>\n <span>{check.ok ? \"Reachable\" : check.message}</span>\n </li>\n ))}\n </ul>\n )}\n </>\n )}\n </div>\n </li>\n );\n })}\n </ul>\n );\n}\n"]}
1
+ {"version":3,"file":"SourceList.js","sourceRoot":"","sources":["../../src/source/SourceList.tsx"],"names":[],"mappings":";AACA,OAAO,EAAmB,cAAc,EAAE,MAAM,EAAwC,MAAM,oBAAoB,CAAC;AACnH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,aAAa,EA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C7B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAC1B,yBAA8B,KAAK,CAAC,EAAE,IAAI,SAAS,aACjD,8BAAkB,MAAM,YAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAQ,EACtD,2BAAS,KAAK,CAAC,IAAI,GAAU,EAC7B,yBAAO,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,GAAQ,KAH9C,KAAK,CAAC,IAAI,CAId,CACN,CAAC,GACC,CACN,IACA,CACJ,IACG,KA3EC,MAAM,CAAC,EAAE,CA4Eb,CACN,CAAC;QACJ,CAAC,CAAC,GACC,CACN,CAAC;AACJ,CAAC","sourcesContent":["import type { DataSource } from \"@surfaces-ui/data\";\nimport { type Connection, ConnectionKind, Engine, type Source, type TestSourceResponse } from \"@surfaces-ui/proto\";\nimport { useEffect, useState } from \"react\";\nimport { useDataSource } from \"../data/DataSourceProvider.js\";\nimport { messageOf } from \"../data/useRowWindow.js\";\n\nexport interface SourceListProps {\n /** Called when a source is chosen. */\n onSelect?(source: Source): void;\n dataSource?: DataSource;\n className?: string;\n}\n\nconst ENGINE_LABEL: Partial<Record<Engine, string>> = {\n [Engine.DUCKDB]: \"DuckDB\",\n [Engine.DATAFUSION]: \"DataFusion\",\n [Engine.TERADATA]: \"Teradata\",\n [Engine.POSTGRES]: \"Postgres\",\n [Engine.MYSQL]: \"MySQL\",\n [Engine.SQLSERVER]: \"SQL Server\",\n [Engine.SNOWFLAKE]: \"Snowflake\",\n [Engine.BIGQUERY]: \"BigQuery\",\n [Engine.DATABRICKS]: \"Databricks\",\n [Engine.ORACLE]: \"Oracle\",\n};\n\nexport const CONNECTION_LABEL: Partial<Record<ConnectionKind, string>> = {\n [ConnectionKind.S3]: \"Amazon S3\",\n [ConnectionKind.GCS]: \"Google Cloud Storage\",\n [ConnectionKind.AZURE]: \"Azure Storage\",\n [ConnectionKind.HTTP]: \"Web (https)\",\n [ConnectionKind.ICEBERG_REST]: \"Iceberg REST catalog\",\n [ConnectionKind.DATABASE_FILE]: \"Database file\",\n [ConnectionKind.POSTGRES]: \"Postgres database\",\n};\n\n/** How a connection signs in, in words. Only the secret's name is ever known here. */\nexport function credentialText(connection: Connection): string {\n if (connection.ambientCredentials) return \"The server's own cloud credentials\";\n return connection.credentialsSecret ? `Secret ${connection.credentialsSecret}` : \"None (public)\";\n}\n\n/**\n * The data sources a backend offers: what runs their SQL, how they reach\n * storage and catalogs, and whether each table can be reached right now.\n * Credentials are shown by name only; their values never leave the server.\n */\nexport function SourceList(props: SourceListProps) {\n const dataSource = useDataSource(props.dataSource);\n const [sources, setSources] = useState<Source[] | undefined>();\n const [error, setError] = useState<string | undefined>();\n const [tests, setTests] = useState<Record<string, TestSourceResponse | \"running\" | { error: string }>>({});\n\n useEffect(() => {\n let current = true;\n dataSource\n .listSources({})\n .then((response) => current && setSources(response.sources))\n .catch((e: unknown) => current && setError(messageOf(e)));\n return () => {\n current = false;\n };\n }, [dataSource]);\n\n const test = (id: string) => {\n if (!dataSource.testSource) return;\n setTests((previous) => ({ ...previous, [id]: \"running\" }));\n dataSource\n .testSource({ target: { case: \"id\", value: id } })\n .then((response) => setTests((previous) => ({ ...previous, [id]: response })))\n .catch((e: unknown) => setTests((previous) => ({ ...previous, [id]: { error: messageOf(e) } })));\n };\n\n if (error) {\n return (\n <p className=\"sf-search-error\" role=\"alert\">\n {error}\n </p>\n );\n }\n if (!sources) return <p className=\"sf-object-muted\">Loading…</p>;\n if (sources.length === 0) return <p className=\"sf-object-muted\">No sources are configured.</p>;\n\n return (\n <ul className={[\"sf-sources\", props.className].filter(Boolean).join(\" \")}>\n {sources.map((source) => {\n const result = tests[source.id];\n const done = result && result !== \"running\" && !(\"error\" in result) ? result : undefined;\n return (\n <li key={source.id} className=\"sf-source\">\n <header className=\"sf-source-head\">\n <div>\n <h3 className=\"sf-object-title\">{source.displayName || source.id}</h3>\n <p className=\"sf-object-facts\">\n {[source.id, ENGINE_LABEL[source.engine], source.readOnly ? \"Read only\" : undefined, source.capabilities?.timeTravel ? \"Time travel\" : undefined, source.capabilities?.storedResults ? \"Keeps results\" : undefined]\n .filter(Boolean)\n .join(\" · \")}\n </p>\n </div>\n <div className=\"sf-object-buttons\">\n {props.onSelect && (\n <button type=\"button\" className=\"sf-button\" onClick={() => props.onSelect?.(source)}>\n Open\n </button>\n )}\n {dataSource.testSource && (\n <button type=\"button\" className=\"sf-button\" disabled={result === \"running\"} onClick={() => test(source.id)}>\n {result === \"running\" ? \"Testing…\" : \"Test connection\"}\n </button>\n )}\n </div>\n </header>\n\n {source.connections.length > 0 && (\n <div className=\"sf-object-table\" tabIndex={0} role=\"region\" aria-label={`Connections of ${source.displayName || source.id}`}>\n <table>\n <caption className=\"sf-a2-visually-hidden\">Connections of {source.displayName || source.id}</caption>\n <thead>\n <tr>\n <th scope=\"col\">Connection</th>\n <th scope=\"col\">Type</th>\n <th scope=\"col\">Covers</th>\n <th scope=\"col\">Signs in with</th>\n </tr>\n </thead>\n <tbody>\n {source.connections.map((connection) => (\n <tr key={connection.name}>\n <th scope=\"row\">{connection.name}</th>\n <td>{CONNECTION_LABEL[connection.kind] ?? \"Other\"}</td>\n <td className=\"sf-object-type\">{connection.scope}</td>\n <td>{credentialText(connection)}</td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n )}\n\n <div aria-live=\"polite\">\n {result && result !== \"running\" && \"error\" in result && (\n <p className=\"sf-search-error\" role=\"alert\">\n {result.error}\n </p>\n )}\n {done && (\n <>\n <p className=\"sf-source-result\" data-ok={done.ok || undefined}>\n <span aria-hidden=\"true\">{done.ok ? \"✓\" : \"!\"}</span> {done.message}\n {done.engineVersion ? ` · ${ENGINE_LABEL[source.engine] ?? \"Engine\"} ${done.engineVersion}` : \"\"} · {Number(done.elapsedMs)} ms\n </p>\n {done.checks.length > 0 && (\n <ul className=\"sf-source-checks\">\n {done.checks.map((check) => (\n <li key={check.name} data-ok={check.ok || undefined}>\n <span aria-hidden=\"true\">{check.ok ? \"✓\" : \"!\"}</span>\n <strong>{check.name}</strong>\n <span>{check.ok ? \"Reachable\" : check.message}</span>\n </li>\n ))}\n </ul>\n )}\n </>\n )}\n </div>\n </li>\n );\n })}\n </ul>\n );\n}\n"]}
package/dist/styles.css CHANGED
@@ -2968,6 +2968,56 @@ select.sf-input:disabled {
2968
2968
  margin-block: var(--sf-space-2);
2969
2969
  border-radius: var(--sf-radius);
2970
2970
  }
2971
+ /* The catalog's Image: a picture the host found an address for, or its description in a dashed box. */
2972
+ .sf-image {
2973
+ display: grid;
2974
+ gap: var(--sf-space-2);
2975
+ justify-items: start;
2976
+ max-width: min(100%, var(--sf-image-width, 100%));
2977
+ margin: 0;
2978
+ }
2979
+
2980
+ .sf-image-body {
2981
+ display: block;
2982
+ max-width: 100%;
2983
+ height: auto;
2984
+ max-height: var(--sf-image-max-height, none);
2985
+ border-radius: var(--sf-radius);
2986
+ object-fit: contain;
2987
+ }
2988
+
2989
+ .sf-image[data-fixed] .sf-image-body,
2990
+ .sf-image[data-fixed] .sf-image-missing {
2991
+ width: 100%;
2992
+ height: var(--sf-image-height);
2993
+ }
2994
+
2995
+ .sf-image[data-fit="cover"] .sf-image-body {
2996
+ object-fit: cover;
2997
+ }
2998
+
2999
+ .sf-image-missing {
3000
+ display: grid;
3001
+ place-items: center;
3002
+ box-sizing: border-box;
3003
+ width: 100%;
3004
+ min-height: calc(var(--sf-space-8) * 2);
3005
+ max-height: var(--sf-image-max-height, none);
3006
+ padding: var(--sf-space-4);
3007
+ border: 1px dashed var(--sf-color-border);
3008
+ border-radius: var(--sf-radius);
3009
+ background: var(--sf-color-bg-3);
3010
+ color: var(--sf-color-muted);
3011
+ font-size: var(--sf-font-size-sm);
3012
+ text-align: center;
3013
+ overflow: hidden;
3014
+ }
3015
+
3016
+ .sf-image figcaption {
3017
+ color: var(--sf-color-muted);
3018
+ font-size: var(--sf-font-size-sm);
3019
+ }
3020
+
2971
3021
  .sf-markdown > * {
2972
3022
  margin: 0;
2973
3023
  }
@@ -3024,7 +3074,7 @@ select.sf-input:disabled {
3024
3074
  }
3025
3075
 
3026
3076
  .sf-markdown-table:focus-visible {
3027
- outline: 2px solid var(--sf-color-focus, var(--sf-color-accent));
3077
+ outline: 2px solid var(--sf-color-focus);
3028
3078
  outline-offset: 2px;
3029
3079
  }
3030
3080
 
@@ -3671,6 +3721,25 @@ select.sf-input:disabled {
3671
3721
  color: var(--sf-color-danger);
3672
3722
  }
3673
3723
 
3724
+ /* A picture attached to a message: a small thumbnail in the chip, the file's name beside it. */
3725
+ .sf-chat-reference[data-kind="attachment"] {
3726
+ font-family: var(--sf-font);
3727
+ }
3728
+
3729
+ .sf-chat-reference[data-thumbnail] {
3730
+ padding-inline-start: var(--sf-space-1);
3731
+ }
3732
+
3733
+ .sf-chat-thumbnail {
3734
+ flex: none;
3735
+ box-sizing: border-box;
3736
+ width: var(--sf-control-size);
3737
+ height: var(--sf-control-size);
3738
+ border-radius: var(--sf-radius-sm);
3739
+ object-fit: cover;
3740
+ background: var(--sf-color-bg-3);
3741
+ }
3742
+
3674
3743
  /* What a message is about that is not data reads as words, not a name. */
3675
3744
  .sf-chat-reference[data-kind="context"] {
3676
3745
  font-family: var(--sf-font);
@@ -4285,6 +4354,48 @@ select.sf-input:disabled {
4285
4354
  margin-inline-start: auto;
4286
4355
  }
4287
4356
 
4357
+ .sf-a2-conversation {
4358
+ display: grid;
4359
+ gap: var(--sf-space-3);
4360
+ min-inline-size: 0;
4361
+ }
4362
+
4363
+ .sf-a2-conversation-thread {
4364
+ display: grid;
4365
+ align-content: start;
4366
+ gap: var(--sf-space-3);
4367
+ max-block-size: 32rem;
4368
+ overflow-y: auto;
4369
+ overscroll-behavior: contain;
4370
+ padding: var(--sf-space-1);
4371
+ border-radius: var(--sf-radius-md);
4372
+ }
4373
+
4374
+ .sf-a2-conversation-thread:focus-visible {
4375
+ outline: 2px solid var(--sf-color-focus);
4376
+ outline-offset: 2px;
4377
+ }
4378
+
4379
+ .sf-a2-conversation-waiting {
4380
+ margin: 0;
4381
+ color: var(--sf-color-muted);
4382
+ font-size: var(--sf-font-size-sm);
4383
+ }
4384
+
4385
+ .sf-a2-conversation-composer {
4386
+ display: flex;
4387
+ gap: var(--sf-space-2);
4388
+ align-items: end;
4389
+ }
4390
+
4391
+ .sf-a2-conversation-composer > textarea {
4392
+ flex: 1;
4393
+ min-inline-size: 0;
4394
+ resize: vertical;
4395
+ field-sizing: content;
4396
+ max-block-size: 10rem;
4397
+ }
4398
+
4288
4399
  .sf-a2-message-who {
4289
4400
  display: flex;
4290
4401
  flex-wrap: wrap;
@@ -4346,6 +4457,11 @@ select.sf-input:disabled {
4346
4457
  .sf-a2-grid[data-widths] {
4347
4458
  grid-template-columns: minmax(0, 1fr);
4348
4459
  }
4460
+
4461
+ /* One column: a column's width handle has nothing beside it (see the narrow container rules). */
4462
+ .sf-a2-grid > :is(.sf-arrange-frame, .sf-arrange-view) > .sf-resize-handle[data-edge="right"] {
4463
+ display: none;
4464
+ }
4349
4465
  }
4350
4466
 
4351
4467
  /* Page studio */
@@ -5421,6 +5537,13 @@ select.sf-input:disabled {
5421
5537
  flex: 1 1 100% !important;
5422
5538
  }
5423
5539
 
5540
+ /* Nor the handles that set them: with nothing beside a child, its handle would stand past the page's right edge. */
5541
+ .sf-a2-grid > :is(.sf-arrange-frame, .sf-arrange-view) > .sf-resize-handle[data-edge="right"],
5542
+ .sf-a2-row:where(:not([data-wrap="false"])) > :is(.sf-arrange-frame, .sf-arrange-view) > .sf-resize-handle[data-edge="right"],
5543
+ .sf-a2-row:where(:not([data-wrap="false"])) > .sf-a2-row-cell > :is(.sf-arrange-frame, .sf-arrange-view) > .sf-resize-handle[data-edge="right"] {
5544
+ display: none;
5545
+ }
5546
+
5424
5547
  .sf-plan-review-step {
5425
5548
  grid-template-columns: minmax(0, 1fr);
5426
5549
  }
@@ -6326,12 +6449,17 @@ select.sf-input:disabled {
6326
6449
  flex: 0 0 auto !important;
6327
6450
  }
6328
6451
 
6329
- /* Stacked, a panel is as tall as its content, up to a screenful's worth, and scrolls past that. */
6452
+ /* Stacked, a panel is as tall as its content and the page scrolls past it: a box that scrolls inside a page that
6453
+ scrolls catches a phone's swipe, and its scroll bars took room the content needed. */
6330
6454
  .sf-workspace-panel {
6331
- max-height: min(var(--sf-workspace-height, 32rem), 36rem);
6332
6455
  margin-bottom: var(--sf-space-2);
6333
6456
  }
6334
6457
 
6458
+ .sf-workspace-panel:not([data-fill]),
6459
+ .sf-workspace-panel:not([data-fill]) > .sf-workspace-panel-body {
6460
+ overflow: visible;
6461
+ }
6462
+
6335
6463
  /* Content that scrolls inside itself has no height of its own to grow to, so a panel that fills is about a screenful
6336
6464
  below the host's sticky bar: scrolled to, the whole conversation and its composer are in view. */
6337
6465
  .sf-workspace-panel[data-fill]:not([data-folded]) {
@@ -6559,7 +6687,8 @@ select.sf-input:disabled {
6559
6687
  /* Folded away, the panel waits off the left edge of its stage and slides in when the menu button is pressed: a drawer
6560
6688
  beside a dimmed page where there is room, the whole stage where there is not. The stage is the window, or the part
6561
6689
  on screen of the region the navigation is drawn in (measured when it opens, since a fixed box cannot be told its
6562
- container in CSS), and it clips the drawer, so nothing outside that region is covered even while it slides. Hover
6690
+ container in CSS; the offsets are counted from the stage's own containing block, which a contained or
6691
+ transformed holder is, so they are not always the window's), and it clips the drawer, so nothing outside that region is covered even while it slides. Hover
6563
6692
  and focus do not open it: a drawer that opened under a passing pointer would cover the page by surprise. */
6564
6693
  .sf-sidenav[data-pinned="false"] .sf-sidenav-stage {
6565
6694
  display: block;
@@ -8463,6 +8592,8 @@ button > .sf-item-control-icon:only-child {
8463
8592
  /* Beside a component in a stack: the two will share a row, so the line is on that edge of it. */
8464
8593
  .sf-arrange-insert[data-side="left"] { left: -1px; }
8465
8594
  .sf-arrange-insert[data-side="right"] { right: -1px; }
8595
+ /* Down the whole page's edge: a column beside everything, drawn wider than the line beside one component. */
8596
+ .sf-arrange-insert[data-page] { width: var(--sf-space-1); }
8466
8597
 
8467
8598
  .sf-arrange-frame[data-receiving],
8468
8599
  .sf-arrange-root[data-receiving] {
@@ -8601,6 +8732,26 @@ button > .sf-item-control-icon:only-child {
8601
8732
  color: var(--sf-color-text);
8602
8733
  }
8603
8734
 
8735
+ /*
8736
+ * A container that holds something draws its strip over its own foot rather than in the page's flow, so the page
8737
+ * never moves under the pointer when a drag starts. Only an empty container's strip takes room: it needs it.
8738
+ */
8739
+ .sf-arrange-inside[data-overlay] {
8740
+ position: absolute;
8741
+ inset-inline: var(--sf-space-1);
8742
+ bottom: var(--sf-space-1);
8743
+ z-index: 2;
8744
+ margin: 0;
8745
+ padding: var(--sf-space-1);
8746
+ background: var(--sf-color-surface-raised);
8747
+ font-size: var(--sf-font-size-xs);
8748
+ }
8749
+ .sf-arrange-root:has(> .sf-arrange-inside[data-overlay]) { position: relative; }
8750
+ /* Strips over a foot would cover each other where containers nest, so only the innermost one under the pointer shows
8751
+ its own. Dropping after a container's last child lands in the same place, so nothing is lost where hover is not. */
8752
+ .sf-arrange-inside[data-overlay]:not([data-over]) { visibility: hidden; }
8753
+ :is(.sf-arrange-frame, .sf-arrange-root):hover:not(:has(:is(.sf-arrange-frame, .sf-arrange-root):hover)) > .sf-arrange-inside[data-overlay] { visibility: visible; }
8754
+
8604
8755
  /* Arrange's handles sit in the gap between two frames of a Grid or Row, not on the frame's own edge. */
8605
8756
  .sf-arrange-frame > .sf-resize-handle[data-edge="right"],
8606
8757
  .sf-arrange-view > .sf-resize-handle[data-edge="right"] { --sf-resize-offset: calc(var(--sf-arrange-gap, var(--sf-space-4)) / 2); }
@@ -2970,6 +2970,56 @@ select.sf-input:disabled {
2970
2970
  margin-block: var(--sf-space-2);
2971
2971
  border-radius: var(--sf-radius);
2972
2972
  }
2973
+ /* The catalog's Image: a picture the host found an address for, or its description in a dashed box. */
2974
+ .sf-image {
2975
+ display: grid;
2976
+ gap: var(--sf-space-2);
2977
+ justify-items: start;
2978
+ max-width: min(100%, var(--sf-image-width, 100%));
2979
+ margin: 0;
2980
+ }
2981
+
2982
+ .sf-image-body {
2983
+ display: block;
2984
+ max-width: 100%;
2985
+ height: auto;
2986
+ max-height: var(--sf-image-max-height, none);
2987
+ border-radius: var(--sf-radius);
2988
+ object-fit: contain;
2989
+ }
2990
+
2991
+ .sf-image[data-fixed] .sf-image-body,
2992
+ .sf-image[data-fixed] .sf-image-missing {
2993
+ width: 100%;
2994
+ height: var(--sf-image-height);
2995
+ }
2996
+
2997
+ .sf-image[data-fit="cover"] .sf-image-body {
2998
+ object-fit: cover;
2999
+ }
3000
+
3001
+ .sf-image-missing {
3002
+ display: grid;
3003
+ place-items: center;
3004
+ box-sizing: border-box;
3005
+ width: 100%;
3006
+ min-height: calc(var(--sf-space-8) * 2);
3007
+ max-height: var(--sf-image-max-height, none);
3008
+ padding: var(--sf-space-4);
3009
+ border: 1px dashed var(--sf-color-border);
3010
+ border-radius: var(--sf-radius);
3011
+ background: var(--sf-color-bg-3);
3012
+ color: var(--sf-color-muted);
3013
+ font-size: var(--sf-font-size-sm);
3014
+ text-align: center;
3015
+ overflow: hidden;
3016
+ }
3017
+
3018
+ .sf-image figcaption {
3019
+ color: var(--sf-color-muted);
3020
+ font-size: var(--sf-font-size-sm);
3021
+ }
3022
+
2973
3023
  .sf-markdown > * {
2974
3024
  margin: 0;
2975
3025
  }
@@ -3026,7 +3076,7 @@ select.sf-input:disabled {
3026
3076
  }
3027
3077
 
3028
3078
  .sf-markdown-table:focus-visible {
3029
- outline: 2px solid var(--sf-color-focus, var(--sf-color-accent));
3079
+ outline: 2px solid var(--sf-color-focus);
3030
3080
  outline-offset: 2px;
3031
3081
  }
3032
3082
 
@@ -3673,6 +3723,25 @@ select.sf-input:disabled {
3673
3723
  color: var(--sf-color-danger);
3674
3724
  }
3675
3725
 
3726
+ /* A picture attached to a message: a small thumbnail in the chip, the file's name beside it. */
3727
+ .sf-chat-reference[data-kind="attachment"] {
3728
+ font-family: var(--sf-font);
3729
+ }
3730
+
3731
+ .sf-chat-reference[data-thumbnail] {
3732
+ padding-inline-start: var(--sf-space-1);
3733
+ }
3734
+
3735
+ .sf-chat-thumbnail {
3736
+ flex: none;
3737
+ box-sizing: border-box;
3738
+ width: var(--sf-control-size);
3739
+ height: var(--sf-control-size);
3740
+ border-radius: var(--sf-radius-sm);
3741
+ object-fit: cover;
3742
+ background: var(--sf-color-bg-3);
3743
+ }
3744
+
3676
3745
  /* What a message is about that is not data reads as words, not a name. */
3677
3746
  .sf-chat-reference[data-kind="context"] {
3678
3747
  font-family: var(--sf-font);
@@ -4287,6 +4356,48 @@ select.sf-input:disabled {
4287
4356
  margin-inline-start: auto;
4288
4357
  }
4289
4358
 
4359
+ .sf-a2-conversation {
4360
+ display: grid;
4361
+ gap: var(--sf-space-3);
4362
+ min-inline-size: 0;
4363
+ }
4364
+
4365
+ .sf-a2-conversation-thread {
4366
+ display: grid;
4367
+ align-content: start;
4368
+ gap: var(--sf-space-3);
4369
+ max-block-size: 32rem;
4370
+ overflow-y: auto;
4371
+ overscroll-behavior: contain;
4372
+ padding: var(--sf-space-1);
4373
+ border-radius: var(--sf-radius-md);
4374
+ }
4375
+
4376
+ .sf-a2-conversation-thread:focus-visible {
4377
+ outline: 2px solid var(--sf-color-focus);
4378
+ outline-offset: 2px;
4379
+ }
4380
+
4381
+ .sf-a2-conversation-waiting {
4382
+ margin: 0;
4383
+ color: var(--sf-color-muted);
4384
+ font-size: var(--sf-font-size-sm);
4385
+ }
4386
+
4387
+ .sf-a2-conversation-composer {
4388
+ display: flex;
4389
+ gap: var(--sf-space-2);
4390
+ align-items: end;
4391
+ }
4392
+
4393
+ .sf-a2-conversation-composer > textarea {
4394
+ flex: 1;
4395
+ min-inline-size: 0;
4396
+ resize: vertical;
4397
+ field-sizing: content;
4398
+ max-block-size: 10rem;
4399
+ }
4400
+
4290
4401
  .sf-a2-message-who {
4291
4402
  display: flex;
4292
4403
  flex-wrap: wrap;
@@ -4348,6 +4459,11 @@ select.sf-input:disabled {
4348
4459
  .sf-a2-grid[data-widths] {
4349
4460
  grid-template-columns: minmax(0, 1fr);
4350
4461
  }
4462
+
4463
+ /* One column: a column's width handle has nothing beside it (see the narrow container rules). */
4464
+ .sf-a2-grid > :is(.sf-arrange-frame, .sf-arrange-view) > .sf-resize-handle[data-edge="right"] {
4465
+ display: none;
4466
+ }
4351
4467
  }
4352
4468
 
4353
4469
  /* Page studio */
@@ -5423,6 +5539,13 @@ select.sf-input:disabled {
5423
5539
  flex: 1 1 100% !important;
5424
5540
  }
5425
5541
 
5542
+ /* Nor the handles that set them: with nothing beside a child, its handle would stand past the page's right edge. */
5543
+ .sf-a2-grid > :is(.sf-arrange-frame, .sf-arrange-view) > .sf-resize-handle[data-edge="right"],
5544
+ .sf-a2-row:where(:not([data-wrap="false"])) > :is(.sf-arrange-frame, .sf-arrange-view) > .sf-resize-handle[data-edge="right"],
5545
+ .sf-a2-row:where(:not([data-wrap="false"])) > .sf-a2-row-cell > :is(.sf-arrange-frame, .sf-arrange-view) > .sf-resize-handle[data-edge="right"] {
5546
+ display: none;
5547
+ }
5548
+
5426
5549
  .sf-plan-review-step {
5427
5550
  grid-template-columns: minmax(0, 1fr);
5428
5551
  }
@@ -6328,12 +6451,17 @@ select.sf-input:disabled {
6328
6451
  flex: 0 0 auto !important;
6329
6452
  }
6330
6453
 
6331
- /* Stacked, a panel is as tall as its content, up to a screenful's worth, and scrolls past that. */
6454
+ /* Stacked, a panel is as tall as its content and the page scrolls past it: a box that scrolls inside a page that
6455
+ scrolls catches a phone's swipe, and its scroll bars took room the content needed. */
6332
6456
  .sf-workspace-panel {
6333
- max-height: min(var(--sf-workspace-height, 32rem), 36rem);
6334
6457
  margin-bottom: var(--sf-space-2);
6335
6458
  }
6336
6459
 
6460
+ .sf-workspace-panel:not([data-fill]),
6461
+ .sf-workspace-panel:not([data-fill]) > .sf-workspace-panel-body {
6462
+ overflow: visible;
6463
+ }
6464
+
6337
6465
  /* Content that scrolls inside itself has no height of its own to grow to, so a panel that fills is about a screenful
6338
6466
  below the host's sticky bar: scrolled to, the whole conversation and its composer are in view. */
6339
6467
  .sf-workspace-panel[data-fill]:not([data-folded]) {
@@ -6561,7 +6689,8 @@ select.sf-input:disabled {
6561
6689
  /* Folded away, the panel waits off the left edge of its stage and slides in when the menu button is pressed: a drawer
6562
6690
  beside a dimmed page where there is room, the whole stage where there is not. The stage is the window, or the part
6563
6691
  on screen of the region the navigation is drawn in (measured when it opens, since a fixed box cannot be told its
6564
- container in CSS), and it clips the drawer, so nothing outside that region is covered even while it slides. Hover
6692
+ container in CSS; the offsets are counted from the stage's own containing block, which a contained or
6693
+ transformed holder is, so they are not always the window's), and it clips the drawer, so nothing outside that region is covered even while it slides. Hover
6565
6694
  and focus do not open it: a drawer that opened under a passing pointer would cover the page by surprise. */
6566
6695
  .sf-sidenav[data-pinned="false"] .sf-sidenav-stage {
6567
6696
  display: block;
@@ -8465,6 +8594,8 @@ button > .sf-item-control-icon:only-child {
8465
8594
  /* Beside a component in a stack: the two will share a row, so the line is on that edge of it. */
8466
8595
  .sf-arrange-insert[data-side="left"] { left: -1px; }
8467
8596
  .sf-arrange-insert[data-side="right"] { right: -1px; }
8597
+ /* Down the whole page's edge: a column beside everything, drawn wider than the line beside one component. */
8598
+ .sf-arrange-insert[data-page] { width: var(--sf-space-1); }
8468
8599
 
8469
8600
  .sf-arrange-frame[data-receiving],
8470
8601
  .sf-arrange-root[data-receiving] {
@@ -8603,6 +8734,26 @@ button > .sf-item-control-icon:only-child {
8603
8734
  color: var(--sf-color-text);
8604
8735
  }
8605
8736
 
8737
+ /*
8738
+ * A container that holds something draws its strip over its own foot rather than in the page's flow, so the page
8739
+ * never moves under the pointer when a drag starts. Only an empty container's strip takes room: it needs it.
8740
+ */
8741
+ .sf-arrange-inside[data-overlay] {
8742
+ position: absolute;
8743
+ inset-inline: var(--sf-space-1);
8744
+ bottom: var(--sf-space-1);
8745
+ z-index: 2;
8746
+ margin: 0;
8747
+ padding: var(--sf-space-1);
8748
+ background: var(--sf-color-surface-raised);
8749
+ font-size: var(--sf-font-size-xs);
8750
+ }
8751
+ .sf-arrange-root:has(> .sf-arrange-inside[data-overlay]) { position: relative; }
8752
+ /* Strips over a foot would cover each other where containers nest, so only the innermost one under the pointer shows
8753
+ its own. Dropping after a container's last child lands in the same place, so nothing is lost where hover is not. */
8754
+ .sf-arrange-inside[data-overlay]:not([data-over]) { visibility: hidden; }
8755
+ :is(.sf-arrange-frame, .sf-arrange-root):hover:not(:has(:is(.sf-arrange-frame, .sf-arrange-root):hover)) > .sf-arrange-inside[data-overlay] { visibility: visible; }
8756
+
8606
8757
  /* Arrange's handles sit in the gap between two frames of a Grid or Row, not on the frame's own edge. */
8607
8758
  .sf-arrange-frame > .sf-resize-handle[data-edge="right"],
8608
8759
  .sf-arrange-view > .sf-resize-handle[data-edge="right"] { --sf-resize-offset: calc(var(--sf-arrange-gap, var(--sf-space-4)) / 2); }
@@ -0,0 +1,50 @@
1
+ import { type ReactNode } from "react";
2
+ /**
3
+ * Turns the name or address an image was given into the address to draw, or nothing. The host owns it: it is the
4
+ * only way an address reaches an `<img>` for text or a catalog component an agent wrote.
5
+ */
6
+ export type ImageResolver = (src: string) => string | undefined;
7
+ /**
8
+ * Says, once for everything below it, how an image an agent named is turned into an address: the catalog's `Image`
9
+ * and the images in `Markdown` (`![alt](src)`) both ask it, unless they are given a `resolveImage` of their own.
10
+ * `SurfaceView` takes `resolveImage` and provides it, so a host with one surface needs no provider.
11
+ */
12
+ export declare function ImageResolverProvider({ resolve, children }: {
13
+ resolve: ImageResolver | undefined;
14
+ children: ReactNode;
15
+ }): import("react").JSX.Element;
16
+ /** The resolver a host provided above, if any. */
17
+ export declare function useImageResolver(): ImageResolver | undefined;
18
+ /**
19
+ * Whether an address may be drawn as an image: http(s), a `blob:` the host made from a file, a raster `data:image/`,
20
+ * or a path on the same origin (`/files/1.png`). Never a script, `file:` or a protocol-relative address. Used for
21
+ * what a host's resolver returned and for a preview a host supplies; never for text an agent wrote.
22
+ */
23
+ export declare function safeImageAddress(value: string | undefined): string | undefined;
24
+ /** The address to draw for an image the text or an agent gave, or nothing: the host's resolver is the only source. */
25
+ export declare function resolveImageAddress(resolve: ImageResolver | undefined, src: string): string | undefined;
26
+ export type ImageFit = "contain" | "cover";
27
+ export interface ImageProps {
28
+ /** What the image is called: the name or address the text or agent gave. It is never loaded as written; the resolver turns it into the address to draw. */
29
+ src: string;
30
+ /** What it shows, for anyone who cannot see it. Required; shown in its place when there is no address. An empty string marks decoration. */
31
+ alt: string;
32
+ caption?: ReactNode;
33
+ /** The most the image is wide, in pixels. It never grows past its container. */
34
+ width?: number;
35
+ /** A fixed height in pixels; the image then fills the box by `fit`. */
36
+ height?: number;
37
+ /** How a fixed box is filled: whole (`contain`, the default) or edge to edge, cropped (`cover`). */
38
+ fit?: ImageFit;
39
+ /** The most the image is tall, in pixels. */
40
+ maxHeight?: number;
41
+ /** Overrides the resolver provided above (`ImageResolverProvider`). */
42
+ resolveImage?: ImageResolver;
43
+ className?: string;
44
+ }
45
+ /**
46
+ * A picture the host decides how to find. The address is drawn only when the host's resolver gives one for `src`;
47
+ * without a resolver, or when it gives nothing, the `alt` text stands in its place, so what a model wrote can never
48
+ * load an address of its own choosing.
49
+ */
50
+ export declare function Image({ src, alt, caption, width, height, fit, maxHeight, resolveImage, className }: ImageProps): import("react").JSX.Element;