sqlmesh 0.189.3.dev15__py3-none-any.whl → 0.189.3.dev17__py3-none-any.whl
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.
- sqlmesh/_version.py +2 -2
- sqlmesh/lsp/completions.py +18 -2
- sqlmesh/lsp/context.py +7 -12
- sqlmesh/lsp/custom.py +1 -0
- sqlmesh/lsp/helpers.py +27 -0
- sqlmesh/lsp/main.py +26 -4
- sqlmesh/lsp/reference.py +123 -69
- {sqlmesh-0.189.3.dev15.dist-info → sqlmesh-0.189.3.dev17.dist-info}/METADATA +1 -1
- {sqlmesh-0.189.3.dev15.dist-info → sqlmesh-0.189.3.dev17.dist-info}/RECORD +56 -55
- web/client/dist/assets/{Audits-Bvr7M5Cg.js → Audits-Pgs8N6IE.js} +1 -1
- web/client/dist/assets/{Banner-B_rJvh8O.js → Banner-DVsKo_4f.js} +1 -1
- web/client/dist/assets/{ChevronDownIcon-SZg7zD3B.js → ChevronDownIcon-nW8Gsfc8.js} +1 -1
- web/client/dist/assets/{ChevronRightIcon-BGlTDFlW.js → ChevronRightIcon-dV0VWg50.js} +1 -1
- web/client/dist/assets/{Content-BX5bHEIM.js → Content-C0JdHN-F.js} +1 -1
- web/client/dist/assets/{Content-DuTflNnu.js → Content-DV3whS9M.js} +1 -1
- web/client/dist/assets/{Data--_LvHKB5.js → Data-CGN0CnIX.js} +1 -1
- web/client/dist/assets/{DataCatalog-CDUa7UBO.js → DataCatalog-dshO8o7W.js} +1 -1
- web/client/dist/assets/{Editor-ClU6zMcH.js → Editor-BV_q4XNs.js} +1 -1
- web/client/dist/assets/{Editor---NX-EOB.js → Editor-UXlx6hNl.js} +1 -1
- web/client/dist/assets/{Errors-lzXHPiom.js → Errors-BZn1A8l3.js} +1 -1
- web/client/dist/assets/{FileExplorer-CB7x6Zt5.js → FileExplorer-Bc12UBVw.js} +1 -1
- web/client/dist/assets/{Footer-C0X7AnA5.js → Footer-BEjDDaSE.js} +1 -1
- web/client/dist/assets/{Header-T0redAYU.js → Header-BUnVQQzm.js} +1 -1
- web/client/dist/assets/{Input-BQqcM0yt.js → Input-CYkPiHdu.js} +1 -1
- web/client/dist/assets/Lineage-Bb_XDi8Z.js +1 -0
- web/client/dist/assets/{ListboxShow-DrRCf9sL.js → ListboxShow-BoQTSdAK.js} +1 -1
- web/client/dist/assets/{ModelLineage-DC1kbGVO.js → ModelLineage-Bkj5mIkh.js} +1 -1
- web/client/dist/assets/{Models-nG2g7q6-.js → Models-DnL6WJTs.js} +1 -1
- web/client/dist/assets/{Page-BQKUIqng.js → Page-CGKYDGz-.js} +1 -1
- web/client/dist/assets/{Plan-C0T4Faqg.js → Plan-DcGriIiA.js} +1 -1
- web/client/dist/assets/{PlusCircleIcon-BDES6aDU.js → PlusCircleIcon-G0dx9NQm.js} +1 -1
- web/client/dist/assets/{ReportErrors-Cuv4D77y.js → ReportErrors-B7Mr6CPy.js} +1 -1
- web/client/dist/assets/{Root-q1MHWtlB.js → Root-B7VWZ_LH.js} +1 -1
- web/client/dist/assets/{SearchList-BU76SGzL.js → SearchList-BGwZi6Iv.js} +1 -1
- web/client/dist/assets/{SelectEnvironment-BtI6wkY7.js → SelectEnvironment-Bq5yNhkA.js} +1 -1
- web/client/dist/assets/{SourceList-C1RxJTpZ.js → SourceList-ChD1dovq.js} +1 -1
- web/client/dist/assets/{SourceListItem-BTqd6jLB.js → SourceListItem-BSGVpkoq.js} +1 -1
- web/client/dist/assets/{SplitPane-zgn_nUAw.js → SplitPane-3okSokAv.js} +1 -1
- web/client/dist/assets/{Tests-CK6uzr59.js → Tests-itL38hJI.js} +1 -1
- web/client/dist/assets/{Welcome-DKlRE9Lt.js → Welcome-BP7z8PA1.js} +1 -1
- web/client/dist/assets/{context-CHLxBWS9.js → context-D1hHNguh.js} +1 -1
- web/client/dist/assets/{context-CzXAuYu4.js → context-DxH8yaYv.js} +1 -1
- web/client/dist/assets/{editor-A537AE0N.js → editor-CiPjHBto.js} +1 -1
- web/client/dist/assets/{file-DfM1ePvm.js → file-CafyWkYy.js} +1 -1
- web/client/dist/assets/{floating-ui.react-dom-DhdjjAk5.js → floating-ui.react-dom-C8DFRCmP.js} +1 -1
- web/client/dist/assets/{help-DtSFwTCR.js → help-ClwWI4Vm.js} +1 -1
- web/client/dist/assets/{index-DvOWtL0R.js → index-Cd9H4oK_.js} +1 -1
- web/client/dist/assets/{index-BBxFj1Oj.js → index-GDI1mjkA.js} +2 -2
- web/client/dist/assets/{plan-Bm6MqEdG.js → plan-YZ0KB3_p.js} +1 -1
- web/client/dist/assets/{popover-nHJ-KXbz.js → popover-Cy5cZxvQ.js} +1 -1
- web/client/dist/assets/{project-B1HtWBfw.js → project-BDbQ0VpX.js} +1 -1
- web/client/dist/index.html +1 -1
- web/client/dist/assets/Lineage-Z_rKyQjf.js +0 -1
- {sqlmesh-0.189.3.dev15.dist-info → sqlmesh-0.189.3.dev17.dist-info}/WHEEL +0 -0
- {sqlmesh-0.189.3.dev15.dist-info → sqlmesh-0.189.3.dev17.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.189.3.dev15.dist-info → sqlmesh-0.189.3.dev17.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.189.3.dev15.dist-info → sqlmesh-0.189.3.dev17.dist-info}/top_level.txt +0 -0
sqlmesh/_version.py
CHANGED
|
@@ -17,5 +17,5 @@ __version__: str
|
|
|
17
17
|
__version_tuple__: VERSION_TUPLE
|
|
18
18
|
version_tuple: VERSION_TUPLE
|
|
19
19
|
|
|
20
|
-
__version__ = version = '0.189.3.
|
|
21
|
-
__version_tuple__ = version_tuple = (0, 189, 3, '
|
|
20
|
+
__version__ = version = '0.189.3.dev17'
|
|
21
|
+
__version_tuple__ = version_tuple = (0, 189, 3, 'dev17')
|
sqlmesh/lsp/completions.py
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
from functools import lru_cache
|
|
2
2
|
from sqlglot import Dialect, Tokenizer
|
|
3
3
|
from sqlmesh.lsp.custom import AllModelsResponse
|
|
4
|
+
from sqlmesh import macro
|
|
4
5
|
import typing as t
|
|
5
6
|
from sqlmesh.lsp.context import AuditTarget, LSPContext, ModelTarget
|
|
6
7
|
from sqlmesh.lsp.uri import URI
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
def get_sql_completions(
|
|
10
|
-
context: t.Optional[LSPContext]
|
|
11
|
+
context: t.Optional[LSPContext] = None,
|
|
12
|
+
file_uri: t.Optional[URI] = None,
|
|
13
|
+
content: t.Optional[str] = None,
|
|
11
14
|
) -> AllModelsResponse:
|
|
12
15
|
"""
|
|
13
16
|
Return a list of completions for a given file.
|
|
@@ -26,6 +29,7 @@ def get_sql_completions(
|
|
|
26
29
|
return AllModelsResponse(
|
|
27
30
|
models=list(get_models(context, file_uri)),
|
|
28
31
|
keywords=all_keywords,
|
|
32
|
+
macros=list(get_macros(context, file_uri)),
|
|
29
33
|
)
|
|
30
34
|
|
|
31
35
|
|
|
@@ -56,6 +60,17 @@ def get_models(context: t.Optional[LSPContext], file_uri: t.Optional[URI]) -> t.
|
|
|
56
60
|
return all_models
|
|
57
61
|
|
|
58
62
|
|
|
63
|
+
def get_macros(context: t.Optional[LSPContext], file_uri: t.Optional[URI]) -> t.Set[str]:
|
|
64
|
+
"""Return a set of all macros with the ``@`` prefix."""
|
|
65
|
+
names = set(macro.get_registry())
|
|
66
|
+
try:
|
|
67
|
+
if context is not None:
|
|
68
|
+
names.update(context.context._macros)
|
|
69
|
+
except Exception:
|
|
70
|
+
pass
|
|
71
|
+
return names
|
|
72
|
+
|
|
73
|
+
|
|
59
74
|
def get_keywords(context: t.Optional[LSPContext], file_uri: t.Optional[URI]) -> t.Set[str]:
|
|
60
75
|
"""
|
|
61
76
|
Return a list of sql keywords for a given file.
|
|
@@ -138,6 +153,7 @@ def get_dialect(context: t.Optional[LSPContext], file_uri: t.Optional[URI]) -> t
|
|
|
138
153
|
def extract_keywords_from_content(content: str, dialect: t.Optional[str] = None) -> t.Set[str]:
|
|
139
154
|
"""
|
|
140
155
|
Extract identifiers from SQL content using the tokenizer.
|
|
156
|
+
|
|
141
157
|
Only extracts identifiers (variable names, table names, column names, etc.)
|
|
142
158
|
that are not SQL keywords.
|
|
143
159
|
"""
|
|
@@ -155,7 +171,7 @@ def extract_keywords_from_content(content: str, dialect: t.Optional[str] = None)
|
|
|
155
171
|
keywords.add(token.text)
|
|
156
172
|
|
|
157
173
|
except Exception:
|
|
158
|
-
# If tokenization fails, return empty set
|
|
174
|
+
# If tokenization fails, return an empty set
|
|
159
175
|
pass
|
|
160
176
|
|
|
161
177
|
return keywords
|
sqlmesh/lsp/context.py
CHANGED
|
@@ -176,18 +176,13 @@ class LSPContext:
|
|
|
176
176
|
if audit._path is not None
|
|
177
177
|
]
|
|
178
178
|
|
|
179
|
-
|
|
180
|
-
|
|
179
|
+
@staticmethod
|
|
180
|
+
def get_completions(
|
|
181
|
+
self: t.Optional["LSPContext"] = None,
|
|
182
|
+
uri: t.Optional[URI] = None,
|
|
183
|
+
file_content: t.Optional[str] = None,
|
|
181
184
|
) -> AllModelsResponse:
|
|
182
|
-
"""Get
|
|
183
|
-
|
|
184
|
-
Args:
|
|
185
|
-
uri: The URI of the file to get autocomplete suggestions for.
|
|
186
|
-
content: The content of the file (optional).
|
|
187
|
-
|
|
188
|
-
Returns:
|
|
189
|
-
AllModelsResponse containing models and keywords.
|
|
190
|
-
"""
|
|
185
|
+
"""Get completion suggestions for a file"""
|
|
191
186
|
from sqlmesh.lsp.completions import get_sql_completions
|
|
192
187
|
|
|
193
|
-
return get_sql_completions(self, uri,
|
|
188
|
+
return get_sql_completions(self, uri, file_content)
|
sqlmesh/lsp/custom.py
CHANGED
sqlmesh/lsp/helpers.py
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
from lsprotocol.types import Range, Position
|
|
2
|
+
|
|
3
|
+
from sqlmesh.core.linter.helpers import (
|
|
4
|
+
Range as SQLMeshRange,
|
|
5
|
+
Position as SQLMeshPosition,
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def to_lsp_range(
|
|
10
|
+
range: SQLMeshRange,
|
|
11
|
+
) -> Range:
|
|
12
|
+
"""
|
|
13
|
+
Converts a SQLMesh Range to an LSP Range.
|
|
14
|
+
"""
|
|
15
|
+
return Range(
|
|
16
|
+
start=Position(line=range.start.line, character=range.start.character),
|
|
17
|
+
end=Position(line=range.end.line, character=range.end.character),
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def to_lsp_position(
|
|
22
|
+
position: SQLMeshPosition,
|
|
23
|
+
) -> Position:
|
|
24
|
+
"""
|
|
25
|
+
Converts a SQLMesh Position to an LSP Position.
|
|
26
|
+
"""
|
|
27
|
+
return Position(line=position.line, character=position.character)
|
sqlmesh/lsp/main.py
CHANGED
|
@@ -145,7 +145,7 @@ class SQLMeshLanguageServer:
|
|
|
145
145
|
|
|
146
146
|
try:
|
|
147
147
|
context = self._context_get_or_load(uri)
|
|
148
|
-
return
|
|
148
|
+
return LSPContext.get_completions(context, uri, content)
|
|
149
149
|
except Exception as e:
|
|
150
150
|
from sqlmesh.lsp.completions import get_sql_completions
|
|
151
151
|
|
|
@@ -565,7 +565,10 @@ class SQLMeshLanguageServer:
|
|
|
565
565
|
)
|
|
566
566
|
return types.WorkspaceDiagnosticReport(items=[])
|
|
567
567
|
|
|
568
|
-
@self.server.feature(
|
|
568
|
+
@self.server.feature(
|
|
569
|
+
types.TEXT_DOCUMENT_COMPLETION,
|
|
570
|
+
types.CompletionOptions(trigger_characters=["@"]), # advertise "@" for macros
|
|
571
|
+
)
|
|
569
572
|
def completion(
|
|
570
573
|
ls: LanguageServer, params: types.CompletionParams
|
|
571
574
|
) -> t.Optional[types.CompletionList]:
|
|
@@ -583,7 +586,7 @@ class SQLMeshLanguageServer:
|
|
|
583
586
|
pass
|
|
584
587
|
|
|
585
588
|
# Get completions using the existing completions module
|
|
586
|
-
completion_response =
|
|
589
|
+
completion_response = LSPContext.get_completions(context, uri, content)
|
|
587
590
|
|
|
588
591
|
completion_items = []
|
|
589
592
|
# Add model completions
|
|
@@ -595,7 +598,26 @@ class SQLMeshLanguageServer:
|
|
|
595
598
|
detail="SQLMesh Model",
|
|
596
599
|
)
|
|
597
600
|
)
|
|
598
|
-
# Add
|
|
601
|
+
# Add macro completions
|
|
602
|
+
triggered_by_at = (
|
|
603
|
+
params.context is not None
|
|
604
|
+
and getattr(params.context, "trigger_character", None) == "@"
|
|
605
|
+
)
|
|
606
|
+
|
|
607
|
+
for macro_name in completion_response.macros:
|
|
608
|
+
insert_text = macro_name if triggered_by_at else f"@{macro_name}"
|
|
609
|
+
|
|
610
|
+
completion_items.append(
|
|
611
|
+
types.CompletionItem(
|
|
612
|
+
label=f"@{macro_name}",
|
|
613
|
+
insert_text=insert_text,
|
|
614
|
+
insert_text_format=types.InsertTextFormat.PlainText,
|
|
615
|
+
filter_text=macro_name,
|
|
616
|
+
kind=types.CompletionItemKind.Function,
|
|
617
|
+
detail="SQLMesh Macro",
|
|
618
|
+
)
|
|
619
|
+
)
|
|
620
|
+
|
|
599
621
|
for keyword in completion_response.keywords:
|
|
600
622
|
completion_items.append(
|
|
601
623
|
types.CompletionItem(
|
sqlmesh/lsp/reference.py
CHANGED
|
@@ -7,14 +7,14 @@ from sqlmesh.core.audit import StandaloneAudit
|
|
|
7
7
|
from sqlmesh.core.dialect import normalize_model_name
|
|
8
8
|
from sqlmesh.core.linter.helpers import (
|
|
9
9
|
TokenPositionDetails,
|
|
10
|
-
Range as SQLMeshRange,
|
|
11
|
-
Position as SQLMeshPosition,
|
|
12
10
|
)
|
|
13
11
|
from sqlmesh.core.model.definition import SqlModel
|
|
14
12
|
from sqlmesh.lsp.context import LSPContext, ModelTarget, AuditTarget
|
|
15
13
|
from sqlglot import exp
|
|
16
14
|
from sqlmesh.lsp.description import generate_markdown_description
|
|
17
15
|
from sqlglot.optimizer.scope import build_scope
|
|
16
|
+
|
|
17
|
+
from sqlmesh.lsp.helpers import to_lsp_range, to_lsp_position
|
|
18
18
|
from sqlmesh.lsp.uri import URI
|
|
19
19
|
from sqlmesh.utils.pydantic import PydanticModel
|
|
20
20
|
from sqlglot.optimizer.normalize_identifiers import normalize_identifiers
|
|
@@ -450,75 +450,76 @@ def get_model_find_all_references(
|
|
|
450
450
|
Returns:
|
|
451
451
|
A list of references to the model across all files
|
|
452
452
|
"""
|
|
453
|
-
# First, get the references in the current file to determine what model we're looking for
|
|
454
|
-
current_file_references = [
|
|
455
|
-
ref
|
|
456
|
-
for ref in get_model_definitions_for_a_path(lint_context, document_uri)
|
|
457
|
-
if isinstance(ref, LSPModelReference)
|
|
458
|
-
]
|
|
459
|
-
|
|
460
453
|
# Find the model reference at the cursor position
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
454
|
+
model_at_position = next(
|
|
455
|
+
filter(
|
|
456
|
+
lambda ref: isinstance(ref, LSPModelReference)
|
|
457
|
+
and _position_within_range(position, ref.range),
|
|
458
|
+
get_model_definitions_for_a_path(lint_context, document_uri),
|
|
459
|
+
),
|
|
460
|
+
None,
|
|
461
|
+
)
|
|
467
462
|
|
|
468
|
-
if
|
|
463
|
+
if not model_at_position:
|
|
469
464
|
return []
|
|
470
465
|
|
|
466
|
+
assert isinstance(model_at_position, LSPModelReference) # for mypy
|
|
467
|
+
|
|
468
|
+
target_model_uri = model_at_position.uri
|
|
469
|
+
|
|
471
470
|
# Start with the model definition
|
|
472
471
|
all_references: t.List[LSPModelReference] = [
|
|
473
472
|
LSPModelReference(
|
|
474
|
-
uri=
|
|
473
|
+
uri=model_at_position.uri,
|
|
475
474
|
range=Range(
|
|
476
475
|
start=Position(line=0, character=0),
|
|
477
476
|
end=Position(line=0, character=0),
|
|
478
477
|
),
|
|
479
|
-
markdown_description=
|
|
478
|
+
markdown_description=model_at_position.markdown_description,
|
|
480
479
|
)
|
|
481
480
|
]
|
|
482
481
|
|
|
483
|
-
# Then add the
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
482
|
+
# Then add references from the current file
|
|
483
|
+
current_file_refs = filter(
|
|
484
|
+
lambda ref: isinstance(ref, LSPModelReference) and ref.uri == target_model_uri,
|
|
485
|
+
get_model_definitions_for_a_path(lint_context, document_uri),
|
|
486
|
+
)
|
|
487
|
+
|
|
488
|
+
for ref in current_file_refs:
|
|
489
|
+
assert isinstance(ref, LSPModelReference) # for mypy
|
|
490
|
+
|
|
491
|
+
all_references.append(
|
|
492
|
+
LSPModelReference(
|
|
493
|
+
uri=document_uri.value,
|
|
494
|
+
range=ref.range,
|
|
495
|
+
markdown_description=ref.markdown_description,
|
|
492
496
|
)
|
|
497
|
+
)
|
|
493
498
|
|
|
494
499
|
# Search through the models in the project
|
|
495
|
-
for path,
|
|
496
|
-
if not isinstance(target, (ModelTarget, AuditTarget)):
|
|
497
|
-
continue
|
|
498
|
-
|
|
500
|
+
for path, _ in lint_context.map.items():
|
|
499
501
|
file_uri = URI.from_path(path)
|
|
500
502
|
|
|
501
503
|
# Skip current file, already processed
|
|
502
504
|
if file_uri.value == document_uri.value:
|
|
503
505
|
continue
|
|
504
506
|
|
|
505
|
-
# Get model references
|
|
506
|
-
|
|
507
|
-
ref
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
markdown_description=ref.markdown_description,
|
|
520
|
-
)
|
|
507
|
+
# Get model references that point to the target model
|
|
508
|
+
matching_refs = filter(
|
|
509
|
+
lambda ref: isinstance(ref, LSPModelReference) and ref.uri == target_model_uri,
|
|
510
|
+
get_model_definitions_for_a_path(lint_context, file_uri),
|
|
511
|
+
)
|
|
512
|
+
|
|
513
|
+
for ref in matching_refs:
|
|
514
|
+
assert isinstance(ref, LSPModelReference) # for mypy
|
|
515
|
+
|
|
516
|
+
all_references.append(
|
|
517
|
+
LSPModelReference(
|
|
518
|
+
uri=file_uri.value,
|
|
519
|
+
range=ref.range,
|
|
520
|
+
markdown_description=ref.markdown_description,
|
|
521
521
|
)
|
|
522
|
+
)
|
|
522
523
|
|
|
523
524
|
return all_references
|
|
524
525
|
|
|
@@ -587,13 +588,83 @@ def get_cte_references(
|
|
|
587
588
|
return matching_references
|
|
588
589
|
|
|
589
590
|
|
|
591
|
+
def get_macro_find_all_references(
|
|
592
|
+
lsp_context: LSPContext, document_uri: URI, position: Position
|
|
593
|
+
) -> t.List[LSPMacroReference]:
|
|
594
|
+
"""
|
|
595
|
+
Get all references to a macro at a specific position in a document.
|
|
596
|
+
|
|
597
|
+
This function finds all usages of a macro across the entire project.
|
|
598
|
+
|
|
599
|
+
Args:
|
|
600
|
+
lsp_context: The LSP context
|
|
601
|
+
document_uri: The URI of the document
|
|
602
|
+
position: The position to check for macro references
|
|
603
|
+
|
|
604
|
+
Returns:
|
|
605
|
+
A list of references to the macro across all files
|
|
606
|
+
"""
|
|
607
|
+
# Find the macro reference at the cursor position
|
|
608
|
+
macro_at_position = next(
|
|
609
|
+
filter(
|
|
610
|
+
lambda ref: isinstance(ref, LSPMacroReference)
|
|
611
|
+
and _position_within_range(position, ref.range),
|
|
612
|
+
get_macro_definitions_for_a_path(lsp_context, document_uri),
|
|
613
|
+
),
|
|
614
|
+
None,
|
|
615
|
+
)
|
|
616
|
+
|
|
617
|
+
if not macro_at_position:
|
|
618
|
+
return []
|
|
619
|
+
|
|
620
|
+
assert isinstance(macro_at_position, LSPMacroReference) # for mypy
|
|
621
|
+
|
|
622
|
+
target_macro_uri = macro_at_position.uri
|
|
623
|
+
target_macro_target_range = macro_at_position.target_range
|
|
624
|
+
|
|
625
|
+
# Start with the macro definition
|
|
626
|
+
all_references: t.List[LSPMacroReference] = [
|
|
627
|
+
LSPMacroReference(
|
|
628
|
+
uri=target_macro_uri,
|
|
629
|
+
range=target_macro_target_range,
|
|
630
|
+
target_range=target_macro_target_range,
|
|
631
|
+
markdown_description=None,
|
|
632
|
+
)
|
|
633
|
+
]
|
|
634
|
+
|
|
635
|
+
# Search through all SQL and audit files in the project
|
|
636
|
+
for path, _ in lsp_context.map.items():
|
|
637
|
+
file_uri = URI.from_path(path)
|
|
638
|
+
|
|
639
|
+
# Get macro references that point to the same macro definition
|
|
640
|
+
matching_refs = filter(
|
|
641
|
+
lambda ref: isinstance(ref, LSPMacroReference)
|
|
642
|
+
and ref.uri == target_macro_uri
|
|
643
|
+
and ref.target_range == target_macro_target_range,
|
|
644
|
+
get_macro_definitions_for_a_path(lsp_context, file_uri),
|
|
645
|
+
)
|
|
646
|
+
|
|
647
|
+
for ref in matching_refs:
|
|
648
|
+
assert isinstance(ref, LSPMacroReference) # for mypy
|
|
649
|
+
all_references.append(
|
|
650
|
+
LSPMacroReference(
|
|
651
|
+
uri=file_uri.value,
|
|
652
|
+
range=ref.range,
|
|
653
|
+
target_range=ref.target_range,
|
|
654
|
+
markdown_description=ref.markdown_description,
|
|
655
|
+
)
|
|
656
|
+
)
|
|
657
|
+
|
|
658
|
+
return all_references
|
|
659
|
+
|
|
660
|
+
|
|
590
661
|
def get_all_references(
|
|
591
662
|
lint_context: LSPContext, document_uri: URI, position: Position
|
|
592
663
|
) -> t.Sequence[Reference]:
|
|
593
664
|
"""
|
|
594
665
|
Get all references of a symbol at a specific position in a document.
|
|
595
666
|
|
|
596
|
-
This function determines the type of reference (CTE, model
|
|
667
|
+
This function determines the type of reference (CTE, model or macro) at the cursor
|
|
597
668
|
position and returns all references to that symbol across the project.
|
|
598
669
|
|
|
599
670
|
Args:
|
|
@@ -612,6 +683,10 @@ def get_all_references(
|
|
|
612
683
|
if model_references := get_model_find_all_references(lint_context, document_uri, position):
|
|
613
684
|
return model_references
|
|
614
685
|
|
|
686
|
+
# Finally try macro references (across files)
|
|
687
|
+
if macro_references := get_macro_find_all_references(lint_context, document_uri, position):
|
|
688
|
+
return macro_references
|
|
689
|
+
|
|
615
690
|
return []
|
|
616
691
|
|
|
617
692
|
|
|
@@ -624,24 +699,3 @@ def _position_within_range(position: Position, range: Range) -> bool:
|
|
|
624
699
|
range.end.line > position.line
|
|
625
700
|
or (range.end.line == position.line and range.end.character >= position.character)
|
|
626
701
|
)
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
def to_lsp_range(
|
|
630
|
-
range: SQLMeshRange,
|
|
631
|
-
) -> Range:
|
|
632
|
-
"""
|
|
633
|
-
Converts a SQLMesh Range to an LSP Range.
|
|
634
|
-
"""
|
|
635
|
-
return Range(
|
|
636
|
-
start=Position(line=range.start.line, character=range.start.character),
|
|
637
|
-
end=Position(line=range.end.line, character=range.end.character),
|
|
638
|
-
)
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
def to_lsp_position(
|
|
642
|
-
position: SQLMeshPosition,
|
|
643
|
-
) -> Position:
|
|
644
|
-
"""
|
|
645
|
-
Converts a SQLMesh Position to an LSP Position.
|
|
646
|
-
"""
|
|
647
|
-
return Position(line=position.line, character=position.character)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
sqlmesh/__init__.py,sha256=QjwaamJIdW7voXoS880yAx7tHm-Im4_mqGA-XJgafos,7631
|
|
2
|
-
sqlmesh/_version.py,sha256=
|
|
2
|
+
sqlmesh/_version.py,sha256=N8UCUIxDCkHVZkDTeAirnja5wFsC2qWo2yns2WPq1xk,530
|
|
3
3
|
sqlmesh/magics.py,sha256=gjzoxREb1XT8Yho_PQMlMqhhkLq_sEfBM8S3PTgxvWE,40337
|
|
4
4
|
sqlmesh/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
sqlmesh/cicd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -159,13 +159,14 @@ sqlmesh/integrations/github/cicd/command.py,sha256=rNWb-aMOA9R23YumD5vPwR0PgPGGj
|
|
|
159
159
|
sqlmesh/integrations/github/cicd/config.py,sha256=tRhMZaLf1p6AWXvi67n85Q-lptJNGt1Wk_Jr61ytpiM,2104
|
|
160
160
|
sqlmesh/integrations/github/cicd/controller.py,sha256=IgUWK9orYSMiElO3GaL6Ja-osFgA7je3RDcLChWUi5s,43769
|
|
161
161
|
sqlmesh/lsp/api.py,sha256=LJdECSaEZoPbu_Xl4KscVG-WLt7_g4dY-zKGO68dH14,2162
|
|
162
|
-
sqlmesh/lsp/completions.py,sha256=
|
|
163
|
-
sqlmesh/lsp/context.py,sha256=
|
|
164
|
-
sqlmesh/lsp/custom.py,sha256=
|
|
162
|
+
sqlmesh/lsp/completions.py,sha256=dsGE8f6RWNjOPvs80QdTvv1YaKo1bbTJ5ZzQmnNcpbA,6184
|
|
163
|
+
sqlmesh/lsp/context.py,sha256=QGbNL0sifxzVJ7T1U5oWcJ5FXrOrLrVKt1jtH1qM_50,6099
|
|
164
|
+
sqlmesh/lsp/custom.py,sha256=40ekRrcsJ-lsF4-uPs4mo8CFegTWK_zKzi4am_NO9oo,2196
|
|
165
165
|
sqlmesh/lsp/description.py,sha256=4QIGC9ix8IzmWF6DVUNhY4m1Crk3sNQA6hZ1RbyqU78,827
|
|
166
|
+
sqlmesh/lsp/helpers.py,sha256=igzUgeYAO3LUZFr3qN4l9hzztOy66lRubX93KtCMduY,654
|
|
166
167
|
sqlmesh/lsp/hints.py,sha256=j-blccBUil94yRoDjWfkSM0HqMmsKD6hP2TaWdWWVk4,3734
|
|
167
|
-
sqlmesh/lsp/main.py,sha256=
|
|
168
|
-
sqlmesh/lsp/reference.py,sha256=
|
|
168
|
+
sqlmesh/lsp/main.py,sha256=QpwMayubrXIgapAWuiGtkW_RTrcvvo_8qA8-IpGVG0I,36375
|
|
169
|
+
sqlmesh/lsp/reference.py,sha256=2rAYfwrKRfxlYA3psTDLacxYWvuFaouMyS7plOSYHiQ,23883
|
|
169
170
|
sqlmesh/lsp/uri.py,sha256=mvSLbZGmMTHPpliThOtVWiFcHnfJzp1w39q9l-xD2SI,802
|
|
170
171
|
sqlmesh/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
171
172
|
sqlmesh/migrations/v0001_init.py,sha256=h8FwMYJj9_O8yGpk12guaSaGwX5A3we2GiKeHrXi15o,2048
|
|
@@ -274,53 +275,53 @@ sqlmesh/utils/pydantic.py,sha256=I898jAFqa3qU6lG2uPpRebVFncOUo8ZrLWM_R3K3DHU,116
|
|
|
274
275
|
sqlmesh/utils/rich.py,sha256=xNZyPCqEc4TAlJlsEthg-5eYUWpaizz0QjBzO7a1Yv4,1509
|
|
275
276
|
sqlmesh/utils/windows.py,sha256=r7Yin4WEwbvH7sKA3hOJtRsclmscNuBeCklCfVPvtQs,611
|
|
276
277
|
sqlmesh/utils/yaml.py,sha256=np-WVcwmwsKghCgAj1OBBMsK1SXSRn4wR-H37cGiFr8,2282
|
|
277
|
-
sqlmesh-0.189.3.
|
|
278
|
+
sqlmesh-0.189.3.dev17.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
|
|
278
279
|
web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
279
|
-
web/client/dist/index.html,sha256=
|
|
280
|
-
web/client/dist/assets/Audits-
|
|
281
|
-
web/client/dist/assets/Banner-
|
|
282
|
-
web/client/dist/assets/ChevronDownIcon-
|
|
283
|
-
web/client/dist/assets/ChevronRightIcon-
|
|
284
|
-
web/client/dist/assets/Content-
|
|
285
|
-
web/client/dist/assets/Content-
|
|
286
|
-
web/client/dist/assets/Data
|
|
287
|
-
web/client/dist/assets/DataCatalog-
|
|
288
|
-
web/client/dist/assets/Editor
|
|
289
|
-
web/client/dist/assets/Editor-
|
|
290
|
-
web/client/dist/assets/Errors-
|
|
291
|
-
web/client/dist/assets/FileExplorer-
|
|
292
|
-
web/client/dist/assets/Footer-
|
|
293
|
-
web/client/dist/assets/Header-
|
|
294
|
-
web/client/dist/assets/Input-
|
|
295
|
-
web/client/dist/assets/Lineage-
|
|
296
|
-
web/client/dist/assets/ListboxShow-
|
|
297
|
-
web/client/dist/assets/ModelLineage-
|
|
298
|
-
web/client/dist/assets/Models-
|
|
299
|
-
web/client/dist/assets/Page-
|
|
300
|
-
web/client/dist/assets/Plan-
|
|
301
|
-
web/client/dist/assets/PlusCircleIcon-
|
|
302
|
-
web/client/dist/assets/ReportErrors-
|
|
303
|
-
web/client/dist/assets/Root-
|
|
304
|
-
web/client/dist/assets/SearchList-
|
|
305
|
-
web/client/dist/assets/SelectEnvironment-
|
|
306
|
-
web/client/dist/assets/SourceList-
|
|
307
|
-
web/client/dist/assets/SourceListItem-
|
|
308
|
-
web/client/dist/assets/SplitPane-
|
|
309
|
-
web/client/dist/assets/Tests-
|
|
310
|
-
web/client/dist/assets/Welcome-
|
|
280
|
+
web/client/dist/index.html,sha256=k5bAEoPDJ0BhYQ4hBcKWObITCxIgqOUC28nGXvEDrt0,5472
|
|
281
|
+
web/client/dist/assets/Audits-Pgs8N6IE.js,sha256=BQuc9kiznZSqTnzNrJSDNqAAdOTGjNQJt32M1sHZFok,1041
|
|
282
|
+
web/client/dist/assets/Banner-DVsKo_4f.js,sha256=WzGUKwRxUQiF9a9TD8XNw6dQCFYk8CAjmt0V9FxfkC8,1549
|
|
283
|
+
web/client/dist/assets/ChevronDownIcon-nW8Gsfc8.js,sha256=BLwnCGHfzIz3vnPiZ6_9jVEHOJ5o5PmUzXYljaEXImk,553
|
|
284
|
+
web/client/dist/assets/ChevronRightIcon-dV0VWg50.js,sha256=7KPbZDJjg8-ZxHf-x9W5odr7gtowWUlMowxo2BUeqVs,553
|
|
285
|
+
web/client/dist/assets/Content-C0JdHN-F.js,sha256=98SmlRO1MO4HqEWXrZ9ojLri1VEvxDJbM8yxGBqUvA8,803
|
|
286
|
+
web/client/dist/assets/Content-DV3whS9M.js,sha256=UV6m6aGo2TFGTS_wbmxjinlCCbLpQ82S8ZGgRQdS76Q,37525
|
|
287
|
+
web/client/dist/assets/Data-CGN0CnIX.js,sha256=EabtGqAXqSd1V7nQbb8nrEQTISe8P74ehGmiiYJ3IJQ,984
|
|
288
|
+
web/client/dist/assets/DataCatalog-dshO8o7W.js,sha256=W9oVJTXn4DXUsoQNoO8tTsu4lHNHD9dXDZKvGvuw_jc,122486
|
|
289
|
+
web/client/dist/assets/Editor-BV_q4XNs.js,sha256=CKdxqL7xWBBlcAQZmyFGIcOeNZuGu2gBQAc7YlI3TP0,1490
|
|
290
|
+
web/client/dist/assets/Editor-UXlx6hNl.js,sha256=aUb8Cfd7ByEqVKX1Tq0Vwd6Y79H-zGOd9EySl2SdPLw,43614
|
|
291
|
+
web/client/dist/assets/Errors-BZn1A8l3.js,sha256=GvEHt_fGwPi4Mg1I1b2S4CnJR-Wn1pDlU98pa3XEirE,1361
|
|
292
|
+
web/client/dist/assets/FileExplorer-Bc12UBVw.js,sha256=Jjmhs6Z1VdWpsjJzA9LYTURspwRUuLiKWVidXoyux-8,87619
|
|
293
|
+
web/client/dist/assets/Footer-BEjDDaSE.js,sha256=GI0MjjhVYF54194TbdkZenoztNJuGmGCkWca5pD8l8o,700
|
|
294
|
+
web/client/dist/assets/Header-BUnVQQzm.js,sha256=tu8SHdMqJcXy6b3YtfoZXx_QDqNdwpZD4hDf5dnMC7Q,11424
|
|
295
|
+
web/client/dist/assets/Input-CYkPiHdu.js,sha256=mpE6pAua8E8TDjJH5oI1CGsF5NRCZTqOUDAvhuM58TY,54814
|
|
296
|
+
web/client/dist/assets/Lineage-Bb_XDi8Z.js,sha256=ZeMiyV9St68aRp90uYoOdEKnwJQEGZRdbZYS78oqNXo,1002
|
|
297
|
+
web/client/dist/assets/ListboxShow-BoQTSdAK.js,sha256=s5_piO_zGFKueh5Vc2B2MQ2BUBSOA_NNwQ6IIoAHWP4,29911
|
|
298
|
+
web/client/dist/assets/ModelLineage-Bkj5mIkh.js,sha256=0AnAX0FchJ2VXVFqFCb5esQBKlFzXl-aJjphT1UB7ro,15546
|
|
299
|
+
web/client/dist/assets/Models-DnL6WJTs.js,sha256=h9gdG6AMAdfWkEBwHyUEE4XZEVnOPujUTsEC5Kr7Ngw,2194
|
|
300
|
+
web/client/dist/assets/Page-CGKYDGz-.js,sha256=xtJwlcB14pX5YDLxJnvsMn4-JDmwTGUL797ER_cKEUE,589
|
|
301
|
+
web/client/dist/assets/Plan-DcGriIiA.js,sha256=jTZ3OMFf4NBgFK2o-ErJADudvvYivbxIzsiKt1WhyN0,666
|
|
302
|
+
web/client/dist/assets/PlusCircleIcon-G0dx9NQm.js,sha256=lS6qIgKb0WxcsyYIOSClowefuJHPLtAnH2OYHrXrqto,11698
|
|
303
|
+
web/client/dist/assets/ReportErrors-B7Mr6CPy.js,sha256=zIKiB05tTC_qy9-H9J0S1y1bQbqXAPqdrEUofEIoTG0,5419
|
|
304
|
+
web/client/dist/assets/Root-B7VWZ_LH.js,sha256=0oZVwBcYCKQhF806WuJmMYqllclq_l785GJRlpTU_ag,42195
|
|
305
|
+
web/client/dist/assets/SearchList-BGwZi6Iv.js,sha256=jP6bKW1PEzXKeop9eCBGrwXRtWR7Qype_346DfYNS2Y,291947
|
|
306
|
+
web/client/dist/assets/SelectEnvironment-Bq5yNhkA.js,sha256=VIIdjHRGsfODF1zAvUnMgHicwwjxTft8FDWFxPCQtI4,37637
|
|
307
|
+
web/client/dist/assets/SourceList-ChD1dovq.js,sha256=fPqUQtFstkefsQbIR1oZfQ5FWY0ZyHC51Myx9zuQY0g,3205
|
|
308
|
+
web/client/dist/assets/SourceListItem-BSGVpkoq.js,sha256=QgXSDYNo62s87kvH8XbXT_hZVEWAlL1iNyorKk086rU,1106
|
|
309
|
+
web/client/dist/assets/SplitPane-3okSokAv.js,sha256=PQ4u8FDbj7VP9pswDlhO7ZU8Bfse8Vih2di8VhtH1hE,10439
|
|
310
|
+
web/client/dist/assets/Tests-itL38hJI.js,sha256=tbLDJiTxRedWqWydop82xafnZ5kEwfQsEWZX5hVMkKs,1014
|
|
311
|
+
web/client/dist/assets/Welcome-BP7z8PA1.js,sha256=9luJTr22abU43Pwojq87flVn2JZf4-me1n9RphjsIy8,354
|
|
311
312
|
web/client/dist/assets/_commonjs-dynamic-modules-TDtrdbi3.js,sha256=WQq4BXvAMsPhT58adqrv_QHaYJQT-xKIiBnKBDPB-uk,239
|
|
312
|
-
web/client/dist/assets/context-
|
|
313
|
-
web/client/dist/assets/context-
|
|
314
|
-
web/client/dist/assets/editor-
|
|
315
|
-
web/client/dist/assets/file-
|
|
316
|
-
web/client/dist/assets/floating-ui.react-dom-
|
|
313
|
+
web/client/dist/assets/context-D1hHNguh.js,sha256=_Bgl3secGJrdw9-4Jxzyk7vG0y72f0bm73OVSIt1W6w,4517
|
|
314
|
+
web/client/dist/assets/context-DxH8yaYv.js,sha256=iviwogoZA35TgqCXXJ8Bw9sRcDhuO0e1Ma4rC1vcwFk,2043851
|
|
315
|
+
web/client/dist/assets/editor-CiPjHBto.js,sha256=_9H4AR93_lR29iHcUG0FMJEFD_pgcjzzEmn3CMwpTS4,7858
|
|
316
|
+
web/client/dist/assets/file-CafyWkYy.js,sha256=YfOZDSF-FNWjhcaMNABPIrY7WBX3ks6_aa08O3CiSN8,2349
|
|
317
|
+
web/client/dist/assets/floating-ui.react-dom-C8DFRCmP.js,sha256=Oc05YcNKTp50UoEv5fDhN0AyylYdBRh89Hoc6xEALmk,22266
|
|
317
318
|
web/client/dist/assets/help-6Q7f7fjd.js,sha256=93Iri9PzpAiPgCyRsrQwABjP2jomAUNR7y2OqHxPf34,445
|
|
318
|
-
web/client/dist/assets/help-
|
|
319
|
-
web/client/dist/assets/index-
|
|
320
|
-
web/client/dist/assets/index-
|
|
321
|
-
web/client/dist/assets/plan-
|
|
322
|
-
web/client/dist/assets/popover-
|
|
323
|
-
web/client/dist/assets/project-
|
|
319
|
+
web/client/dist/assets/help-ClwWI4Vm.js,sha256=zJaqc1JyFFHjGvsAKrKNaKsT2563W85vesGmhX3gqpY,57842
|
|
320
|
+
web/client/dist/assets/index-Cd9H4oK_.js,sha256=hMUhywWRWNDiYpHhOg0PVqTt46CmybmrzZ5aIJ2XklU,531620
|
|
321
|
+
web/client/dist/assets/index-GDI1mjkA.js,sha256=_rbcoOfjNcEBIpGZbkwKrMhT4eto2LApS8yP-BdgtM0,13617
|
|
322
|
+
web/client/dist/assets/plan-YZ0KB3_p.js,sha256=NjNHtBmfn8ttCrCXV_naDAoNQUS9HUvCwFQJO0lFdKA,13754
|
|
323
|
+
web/client/dist/assets/popover-Cy5cZxvQ.js,sha256=cd7tJ4f7Mlq7czU0KpNBb61bYvVR16FNmqkrEKxHwP0,68101
|
|
324
|
+
web/client/dist/assets/project-BDbQ0VpX.js,sha256=uJFttGO6UQEv2dWdmWrY3_nvq8nUuAyURU3pmd9T-qk,3338
|
|
324
325
|
web/client/dist/css/base.css,sha256=JApDmQihY7DRy5Bd30uYMm5NdMKm0QsEOMBsOuK7gyU,9048
|
|
325
326
|
web/client/dist/css/design.css,sha256=9VTHN-aYFVW6I53jUWbV8qaqo87tXyZTYSWFLC_sRQY,17057
|
|
326
327
|
web/client/dist/favicons/favicon.svg,sha256=ZPNT00J77RHUj6Nlh6Z4Puxnp_oq9RSqACjomhDRUXE,1586
|
|
@@ -392,8 +393,8 @@ web/server/api/endpoints/models.py,sha256=ud-lRwriyI_OYg9tZchrBgeiXELiRTLNEodraf
|
|
|
392
393
|
web/server/api/endpoints/modules.py,sha256=8hqqgonGay_mJmpCw0IdbjsPhWlQH2VLdKAqha-myac,468
|
|
393
394
|
web/server/api/endpoints/plan.py,sha256=OYuQ_4dgbhG9ibTcX1a8mvYgH3ANxw9Fhbb4wg6QWqc,9222
|
|
394
395
|
web/server/api/endpoints/table_diff.py,sha256=SCy3-pr5x6bEEiOaZGCDbiHQhpgxwmnz3Acqa2Ie6jI,2090
|
|
395
|
-
sqlmesh-0.189.3.
|
|
396
|
-
sqlmesh-0.189.3.
|
|
397
|
-
sqlmesh-0.189.3.
|
|
398
|
-
sqlmesh-0.189.3.
|
|
399
|
-
sqlmesh-0.189.3.
|
|
396
|
+
sqlmesh-0.189.3.dev17.dist-info/METADATA,sha256=YxMqDVQcfw274lWP62d6vFpngbFBNWzmhF1h_iosXjA,26541
|
|
397
|
+
sqlmesh-0.189.3.dev17.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
398
|
+
sqlmesh-0.189.3.dev17.dist-info/entry_points.txt,sha256=pIYKtg-u-uO7BK_Y0qrdmfyj0bYrcMc3Xiqr5WE3VFk,121
|
|
399
|
+
sqlmesh-0.189.3.dev17.dist-info/top_level.txt,sha256=bspjo5vjELQkuN0qKuTFIbsrUt3Zeo8D2mlKeHG1LdE,12
|
|
400
|
+
sqlmesh-0.189.3.dev17.dist-info/RECORD,,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{x as n,j as s,O as f,e as t,H as c,B as p,m as x,l as d}from"./index-
|
|
1
|
+
import{x as n,j as s,O as f,e as t,H as c,B as p,m as x,l as d}from"./index-Cd9H4oK_.js";import{P as j}from"./Page-CGKYDGz-.js";import{u as h}from"./project-BDbQ0VpX.js";import{S as v}from"./SourceList-ChD1dovq.js";import{S as A}from"./SourceListItem-BSGVpkoq.js";import"./SplitPane-3okSokAv.js";import"./file-CafyWkYy.js";import"./Input-CYkPiHdu.js";import"./floating-ui.react-dom-C8DFRCmP.js";import"./index-GDI1mjkA.js";function k(){const{pathname:a}=n(),i=h(e=>e.files),r=Array.from(i.values()).filter(e=>e.path.endsWith("audits"));return s.jsx(j,{sidebar:s.jsxs("div",{className:"flex flex-col w-full h-full",children:[s.jsx(v,{keyId:"basename",keyName:"basename",to:t.Audits,items:r,isActive:e=>`${t.Audits}/${e}`===a,className:"h-full",listItem:({to:e,name:o,description:m,text:l,disabled:u=!1})=>s.jsx(A,{to:e,name:o,text:l,description:m,disabled:u})}),s.jsx(c,{}),s.jsx("div",{className:"py-1 px-1 flex justify-end",children:s.jsx(p,{size:d.sm,variant:x.Neutral,children:"Run All"})})]}),content:s.jsx(f,{})})}export{k as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s,c as i,l as a,m as n,H as p}from"./index-
|
|
1
|
+
import{j as s,c as i,l as a,m as n,H as p}from"./index-Cd9H4oK_.js";function l({variant:t=n.Neutral,size:e=a.md,isFull:r=!1,isCenter:u=!1,hasBackground:x=!0,hasBackgroundOnHover:f=!1,hasBorder:c=!1,children:m,className:b}){return s.jsx("div",{className:i("w-full text-sm px-4 overflow-hidden rounded-lg",e===a.sm&&"py-2",e===a.md&&"py-4",e===a.lg&&"py-6",r&&"h-full",u&&"justify-center items-center",c&&"border-2",w(t,x,f),b),children:m})}function g({className:t}){return s.jsx(p,{className:i("mx-4 w-full",t)})}function d({children:t,className:e}){return s.jsx("h4",{className:i("font-bold text-sm whitespace-nowrap text-left",e),children:t})}function o({children:t,className:e}){return s.jsx("p",{className:i("text-neutral-600",e),children:t})}l.Label=d;l.Description=o;l.Divider=g;function w(t,e=!0,r=!1){switch(t){case n.Primary:return[r?"hover:bg-primary-5":"",e?"bg-primary-5":"","text-primary-600 dark:text-primary-400"];case n.Success:return[r?"hover:bg-success-5":"",e?"bg-success-5":"","text-success-600 dark:text-success-400"];case n.Warning:return[r?"hover:bg-warning-5":"",e?"bg-warning-5":"","text-warning-600 dark:text-warning-400"];case n.Danger:return[r?"hover:bg-danger-5":"",e?"bg-danger-5":"","text-danger-600 dark:text-danger-400"];case n.Info:return[r?"hover:bg-info-5":"",e?"bg-info-5":"","text-info-600 dark:text-info-400"];case n.Neutral:return[r?"hover:bg-neutral-5":"",e?"bg-neutral-5":"","text-neutral-600 dark:text-neutral-400"];default:return["bg-transparent","text-neutral-600 dark:text-neutral-400"]}}export{l as B};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./index-
|
|
1
|
+
import{r as e}from"./index-Cd9H4oK_.js";function t({title:r,titleId:a,...l},o){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},l),r?e.createElement("title",{id:a},r):null,e.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const c=e.forwardRef(t);export{c as F};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./index-
|
|
1
|
+
import{r as e}from"./index-Cd9H4oK_.js";function o({title:r,titleId:a,...t},l){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},t),r?e.createElement("title",{id:a},r):null,e.createElement("path",{fillRule:"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const i=e.forwardRef(o);export{i as F};
|