@lumiastream/ui 0.0.2-alpha.7 → 0.0.2-alpha.9

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
@@ -16,7 +16,7 @@ interface LSButtonProps {
16
16
  /** Primary UI component for user interaction */
17
17
  declare const LSButton: ({ primary, size, backgroundColor, label, ...props }: LSButtonProps) => react_jsx_runtime.JSX.Element;
18
18
 
19
- declare function allowedVariableCompletion(context: CompletionContext, variables: Record<string, any>, extraOptions: {
19
+ declare function allowedVariableCompletion(context: CompletionContext, variables: {
20
20
  label: string;
21
21
  displayLabel: string;
22
22
  type: string;
package/dist/index.js CHANGED
@@ -50,7 +50,7 @@ var LSButton = ({
50
50
  };
51
51
 
52
52
  // src/utils/allowedVariableCompletion.ts
53
- function allowedVariableCompletion(context, variables, extraOptions) {
53
+ function allowedVariableCompletion(context, variables) {
54
54
  const before = context.state.sliceDoc(0, context.pos);
55
55
  const after = context.state.sliceDoc(context.pos, context.pos + 2);
56
56
  const wordMatch = /(\w*)$/.exec(before);
@@ -63,13 +63,12 @@ function allowedVariableCompletion(context, variables, extraOptions) {
63
63
  const closeNeeded = Math.max(0, 2 - closeCount);
64
64
  const braceWrap = (v) => `${"{".repeat(openNeeded)}${v}${"}".repeat(closeNeeded)}`;
65
65
  const options = [
66
- ...Object.keys(variables).map((variable) => ({
67
- label: braceWrap(variable),
68
- displayLabel: variable,
69
- type: "variable",
70
- info: "A variable in Lumia Stream"
71
- })),
72
- ...extraOptions
66
+ ...variables.map((variable) => ({
67
+ label: braceWrap(variable.label),
68
+ displayLabel: variable.displayLabel,
69
+ type: variable.type,
70
+ info: variable.info
71
+ }))
73
72
  ];
74
73
  return {
75
74
  from,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumiastream/ui",
3
- "version": "0.0.2-alpha.7",
3
+ "version": "0.0.2-alpha.9",
4
4
  "author": "Lumia Stream",
5
5
  "license": "ISC",
6
6
  "description": "Lumia UI Kit",