@vuetify/v0 0.1.3 → 0.1.4

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.
Files changed (127) hide show
  1. package/dist/adapter-BN-h5JbD.d.mts +344 -0
  2. package/dist/adapter-CJIj5ySf.d.mts +11 -0
  3. package/dist/adapter-D_0ptsPm.mjs +229 -0
  4. package/dist/adapters-BQ-Lr3PW.mjs +1 -0
  5. package/dist/adapters-DEXpW9If.mjs +1 -0
  6. package/dist/adapters-Q9WaOsJp.mjs +1 -0
  7. package/dist/adapters-SSDVth5e.mjs +1 -0
  8. package/dist/browser/index.js +359 -933
  9. package/dist/components/index.d.mts +19 -6
  10. package/dist/components/index.mjs +37 -5
  11. package/dist/{components-C0zEvP7w.mjs → components-CMuzTJdK.mjs} +11 -4
  12. package/dist/composables/index.d.mts +17 -4
  13. package/dist/composables/index.mjs +36 -4
  14. package/dist/consola-DiUk9j3y.d.mts +15 -0
  15. package/dist/consola-GBy8XRuL.mjs +31 -0
  16. package/dist/constants/index.d.mts +1 -1
  17. package/dist/constants/index.mjs +3 -3
  18. package/dist/constants-B8pMSkcW.mjs +1 -0
  19. package/dist/createDataTable-BJnmvxfb.mjs +387 -0
  20. package/dist/createGroup-CPhp6FUh.mjs +363 -0
  21. package/dist/createPagination-cyOWlpfH.mjs +234 -0
  22. package/dist/createSelection-uqEbFgha.mjs +261 -0
  23. package/dist/createSingle-B59ya3aa.mjs +179 -0
  24. package/dist/createTokens-BlhLdHXE.mjs +682 -0
  25. package/dist/createTrinity-EeHQSsb6.mjs +149 -0
  26. package/dist/data-table/adapters/client/index.d.mts +3 -0
  27. package/dist/data-table/adapters/client/index.mjs +9 -0
  28. package/dist/data-table/adapters/index.d.mts +5 -0
  29. package/dist/data-table/adapters/index.mjs +12 -0
  30. package/dist/data-table/adapters/server/index.d.mts +3 -0
  31. package/dist/data-table/adapters/server/index.mjs +7 -0
  32. package/dist/data-table/adapters/virtual/index.d.mts +3 -0
  33. package/dist/data-table/adapters/virtual/index.mjs +9 -0
  34. package/dist/data-table/index.d.mts +7 -0
  35. package/dist/data-table/index.mjs +25 -0
  36. package/dist/date/index.d.mts +1 -1
  37. package/dist/date/index.mjs +2 -2
  38. package/dist/features/adapters/flagsmith/index.d.mts +16 -0
  39. package/dist/features/adapters/flagsmith/index.mjs +3 -0
  40. package/dist/features/adapters/launchdarkly/index.d.mts +15 -0
  41. package/dist/features/adapters/launchdarkly/index.mjs +3 -0
  42. package/dist/features/adapters/posthog/index.d.mts +15 -0
  43. package/dist/features/adapters/posthog/index.mjs +4 -0
  44. package/dist/features/index.d.mts +17 -0
  45. package/dist/features/index.mjs +18 -0
  46. package/dist/flagsmith-CHmpPGR7.mjs +40 -0
  47. package/dist/{globals-BwYsH-rt.mjs → globals-B_GVfG06.mjs} +2 -2
  48. package/dist/index-7mWYFHA6.d.mts +251 -0
  49. package/dist/index-BDTbJClL.d.mts +11 -0
  50. package/dist/index-BuOz3Rgm.d.mts +32 -0
  51. package/dist/{index-Bmem4l8m.d.mts → index-Bv1VN_j5.d.mts} +1 -1
  52. package/dist/{index-DFM5iBqh.d.mts → index-CQrDeqsK.d.mts} +280 -279
  53. package/dist/{index-2wh69fk5.d.mts → index-Dd0m0LIJ.d.mts} +135 -1407
  54. package/dist/{index-DBZTizq2.d.mts → index-UNwEBkQT.d.mts} +16 -2
  55. package/dist/index.d.mts +20 -7
  56. package/dist/index.mjs +39 -7
  57. package/dist/json/web-types.json +1 -1
  58. package/dist/launchdarkly-W8t8ZANX.mjs +28 -0
  59. package/dist/locale/adapters/index.d.mts +3 -0
  60. package/dist/locale/adapters/index.mjs +6 -0
  61. package/dist/locale/adapters/v0/index.d.mts +3 -0
  62. package/dist/locale/adapters/v0/index.mjs +5 -0
  63. package/dist/locale/index.d.mts +17 -0
  64. package/dist/locale/index.mjs +17 -0
  65. package/dist/logger/adapters/consola/index.d.mts +3 -0
  66. package/dist/logger/adapters/consola/index.mjs +3 -0
  67. package/dist/logger/adapters/index.d.mts +5 -0
  68. package/dist/logger/adapters/index.mjs +8 -0
  69. package/dist/logger/adapters/pino/index.d.mts +3 -0
  70. package/dist/logger/adapters/pino/index.mjs +5 -0
  71. package/dist/logger/adapters/v0/index.d.mts +3 -0
  72. package/dist/logger/adapters/v0/index.mjs +5 -0
  73. package/dist/logger/index.d.mts +17 -0
  74. package/dist/logger/index.mjs +10 -0
  75. package/dist/memory-BsZGbGnG.mjs +27 -0
  76. package/dist/memory-DVjquu_v.d.mts +25 -0
  77. package/dist/permissions/adapters/index.d.mts +18 -0
  78. package/dist/permissions/adapters/index.mjs +6 -0
  79. package/dist/permissions/adapters/v0/index.d.mts +18 -0
  80. package/dist/permissions/adapters/v0/index.mjs +5 -0
  81. package/dist/permissions/index.d.mts +17 -0
  82. package/dist/permissions/index.mjs +15 -0
  83. package/dist/pino-01x_NmWp.mjs +49 -0
  84. package/dist/pino-p-jDkNQd.d.mts +24 -0
  85. package/dist/posthog-BrGBPPir.mjs +50 -0
  86. package/dist/server-6cs14bj1.d.mts +20 -0
  87. package/dist/server-ClCwiLMA.mjs +45 -0
  88. package/dist/storage/adapters/index.d.mts +3 -0
  89. package/dist/storage/adapters/index.mjs +3 -0
  90. package/dist/storage/adapters/memory/index.d.mts +2 -0
  91. package/dist/storage/adapters/memory/index.mjs +3 -0
  92. package/dist/storage/index.d.mts +17 -0
  93. package/dist/storage/index.mjs +37 -0
  94. package/dist/theme/adapters/index.d.mts +17 -0
  95. package/dist/theme/adapters/index.mjs +6 -0
  96. package/dist/theme/adapters/v0/index.d.mts +17 -0
  97. package/dist/theme/adapters/v0/index.mjs +5 -0
  98. package/dist/theme/index.d.mts +17 -0
  99. package/dist/theme/index.mjs +16 -0
  100. package/dist/toArray-DIeXVX1C.mjs +38 -0
  101. package/dist/types/index.d.mts +1 -1
  102. package/dist/useClickOutside-p8HP07At.mjs +4680 -0
  103. package/dist/useFeatures-C4JF3Hgr.mjs +122 -0
  104. package/dist/useLocale-DlbShzF-.mjs +85 -0
  105. package/dist/useLogger-CO9JwbSJ.mjs +283 -0
  106. package/dist/usePermissions-DQVT_4nD.mjs +128 -0
  107. package/dist/useTheme-Bcw1Ebyt.mjs +135 -0
  108. package/dist/utilities/index.d.mts +3 -3
  109. package/dist/utilities/index.mjs +3 -3
  110. package/dist/{utilities-BbKjbXTx.mjs → utilities-BqS1sC1W.mjs} +20 -3
  111. package/dist/v0-B40YkIQ-.mjs +21 -0
  112. package/dist/v0-BOxb3nD1.d.mts +33 -0
  113. package/dist/v0-BogbIzpM.mjs +41 -0
  114. package/dist/v0-BtQCSBOG.mjs +37 -0
  115. package/dist/v0-C-9dv_1S.d.mts +10 -0
  116. package/dist/v0-CtjuUUPl.mjs +73 -0
  117. package/dist/v0-DHMoZ7dS.d.mts +22 -0
  118. package/dist/v0-ONBWyQYQ.mjs +83 -0
  119. package/dist/v0-RepwEY1F.d.mts +9 -0
  120. package/dist/virtual-B3IPkHC0.d.mts +9 -0
  121. package/dist/virtual-BP9WXRzN.mjs +44 -0
  122. package/package.json +34 -2
  123. package/dist/useClickOutside-DrkNYxDe.mjs +0 -8871
  124. /package/dist/{adapter-D95FHAtt.d.mts → adapter-DcwxFryd.d.mts} +0 -0
  125. /package/dist/{constants-DHKqjdjH.mjs → adapters-BGJKsBrw.mjs} +0 -0
  126. /package/dist/{htmlElements-DO9n35bD.mjs → htmlElements-d8iBCGpO.mjs} +0 -0
  127. /package/dist/{index-BLK67J_-.d.mts → index-BFBN5Zl3.d.mts} +0 -0
@@ -0,0 +1,149 @@
1
+ import { d as isObject, h as isUndefined, m as isSymbol, p as isString } from "./utilities-BqS1sC1W.mjs";
2
+ import { inject, provide } from "vue";
3
+
4
+ //#region src/composables/createContext/index.ts
5
+ /**
6
+ * @module createContext
7
+ *
8
+ * @see https://0.vuetifyjs.com/composables/foundation/create-context
9
+ *
10
+ * @remarks
11
+ * Factory for creating type-safe Vue dependency injection contexts.
12
+ *
13
+ * Provides a wrapper around Vue's provide/inject that throws errors when context is not found,
14
+ * eliminating silent failures and improving developer experience. Supports both app-level and
15
+ * component-level provision.
16
+ *
17
+ * Supports two modes:
18
+ * - **Static key**: `createContext('my-key')` - key is fixed at creation time
19
+ * - **Dynamic key**: `createContext()` or `createContext({ suffix: 'item' })` - key provided at runtime
20
+ */
21
+ /**
22
+ * Injects a context provided by an ancestor component.
23
+ *
24
+ * @param key The key of the context to inject.
25
+ * @param defaultValue Optional default value if context is not found.
26
+ * @template Z The type of the context.
27
+ * @returns The injected context.
28
+ * @throws An error if the context is not found and no default is provided.
29
+ *
30
+ * @see https://vuejs.org/api/composition-api-dependency-injection.html#inject
31
+ * @see https://0.vuetifyjs.com/composables/foundation/create-context#use-context
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * // Without default value
36
+ * const context = useContext<MyContext>('my-context')
37
+ *
38
+ * // With default value
39
+ * const context = useContext<MyContext>('my-context', defaultContext)
40
+ * ```
41
+ */
42
+ function useContext(key, defaultValue) {
43
+ const context = inject(key, defaultValue);
44
+ if (/* @__PURE__ */ isUndefined(context)) throw new Error(`Context "${String(key)}" not found. Ensure it's provided by an ancestor.`);
45
+ return context;
46
+ }
47
+ /**
48
+ * Provides a context to all descendant components.
49
+ *
50
+ * @param key The key of the context to provide.
51
+ * @param context The context to provide.
52
+ * @param app Optional Vue app instance to provide the context at app level instead of component level.
53
+ * @template Z The type of the context.
54
+ * @returns The provided context.
55
+ *
56
+ * @remarks
57
+ * When `app` parameter is provided, the context is made available to all components in the app.
58
+ * When omitted, the context is provided at the current component level and available to descendants only.
59
+ *
60
+ * @see https://vuejs.org/api/composition-api-dependency-injection.html#provide
61
+ * @see https://0.vuetifyjs.com/composables/foundation/create-context#provide-context
62
+ *
63
+ * @example
64
+ * ```ts
65
+ * // Component-level provision
66
+ * provideContext<MyContext>('my-context', context)
67
+ *
68
+ * // App-level provision (typically used in plugins)
69
+ * const app = createApp()
70
+ * provideContext<MyContext>('my-context', context, app)
71
+ * ```
72
+ */
73
+ function provideContext(key, context, app) {
74
+ if (app) app.provide(key, context);
75
+ else provide(key, context);
76
+ return context;
77
+ }
78
+ function createContext(keyOrOptions, defaultValue) {
79
+ if (/* @__PURE__ */ isString(keyOrOptions) || /* @__PURE__ */ isSymbol(keyOrOptions)) {
80
+ const _key = keyOrOptions;
81
+ function _provideContext$1(context, app) {
82
+ return provideContext(_key, context, app);
83
+ }
84
+ function _useContext$1() {
85
+ return useContext(_key, defaultValue);
86
+ }
87
+ return [_useContext$1, _provideContext$1];
88
+ }
89
+ const suffix = /* @__PURE__ */ isObject(keyOrOptions) ? keyOrOptions.suffix : void 0;
90
+ function _provideContext(key, context, app) {
91
+ return provideContext(suffix ? `${key}:${suffix}` : key, context, app);
92
+ }
93
+ function _useContext(key, defaultValue$1) {
94
+ return useContext(suffix ? `${key}:${suffix}` : key, defaultValue$1);
95
+ }
96
+ return [_useContext, _provideContext];
97
+ }
98
+
99
+ //#endregion
100
+ //#region src/composables/createTrinity/index.ts
101
+ /**
102
+ * Creates a new trinity for a context composable and its provider.
103
+ *
104
+ * @param useContext The function that retrieves/uses the context (typically named `useContext`).
105
+ * @param provideContext The function that provides the context to descendants.
106
+ * @param context The default context instance to use when no custom context is provided.
107
+ * @template Z The type of the context.
108
+ * @returns A readonly tuple containing: [useContext function, provideContext wrapper function, default context instance].
109
+ *
110
+ * @remarks The trinity pattern is a foundational pattern used throughout the codebase for creating reusable context systems. It provides three related elements:
111
+ *
112
+ * 1. A function to retrieve/use the context
113
+ * 2. A function to provide the context (with default value support)
114
+ * 3. The default context instance
115
+ *
116
+ * The returned tuple is readonly (using `as const`) to ensure proper type inference.
117
+ *
118
+ * @see https://0.vuetifyjs.com/composables/foundation/create-trinity#create-trinity
119
+ *
120
+ * @example
121
+ * ```ts
122
+ * interface MyContext {
123
+ * foo: string
124
+ * bar: number
125
+ * }
126
+ *
127
+ * export function createMyFeature<E extends MyContext = MyContext>() {
128
+ * const [useContext, _provideContext] = createContext<E>('my-context')
129
+ *
130
+ * const context = { foo: 'hello', bar: 42 }
131
+ *
132
+ * function provideContext (_context: E = context, app?: App): E {
133
+ * return _provideContext(_context, app)
134
+ * }
135
+ *
136
+ * return createTrinity<E>(useContext, provideContext, context)
137
+ * }
138
+ * ```
139
+ */
140
+ function createTrinity(useContext$1, provideContext$1, context) {
141
+ return [
142
+ useContext$1,
143
+ (_context = context, app) => provideContext$1(_context, app),
144
+ context
145
+ ];
146
+ }
147
+
148
+ //#endregion
149
+ export { useContext as i, createContext as n, provideContext as r, createTrinity as t };
@@ -0,0 +1,3 @@
1
+ import "../../../adapter-BN-h5JbD.mjs";
2
+ import { t as ClientAdapter } from "../../../v0-RepwEY1F.mjs";
3
+ export { ClientAdapter };
@@ -0,0 +1,9 @@
1
+ import "../../../globals-B_GVfG06.mjs";
2
+ import "../../../utilities-BqS1sC1W.mjs";
3
+ import "../../../createTrinity-EeHQSsb6.mjs";
4
+ import "../../../toArray-DIeXVX1C.mjs";
5
+ import "../../../createPagination-cyOWlpfH.mjs";
6
+ import "../../../adapter-D_0ptsPm.mjs";
7
+ import { t as ClientAdapter } from "../../../v0-BogbIzpM.mjs";
8
+
9
+ export { ClientAdapter };
@@ -0,0 +1,5 @@
1
+ import { a as SortDirection, i as DataTableAdapterResult, n as DataTableAdapterContext, o as SortEntry, r as DataTableAdapterInterface, t as DataTableAdapter } from "../../adapter-BN-h5JbD.mjs";
2
+ import { n as ServerAdapterOptions, t as ServerAdapter } from "../../server-6cs14bj1.mjs";
3
+ import { t as ClientAdapter } from "../../v0-RepwEY1F.mjs";
4
+ import { t as VirtualAdapter } from "../../virtual-B3IPkHC0.mjs";
5
+ export { ClientAdapter, DataTableAdapter, DataTableAdapterContext, DataTableAdapterInterface, DataTableAdapterResult, ServerAdapter, ServerAdapterOptions, SortDirection, SortEntry, VirtualAdapter };
@@ -0,0 +1,12 @@
1
+ import "../../globals-B_GVfG06.mjs";
2
+ import "../../utilities-BqS1sC1W.mjs";
3
+ import "../../createTrinity-EeHQSsb6.mjs";
4
+ import "../../toArray-DIeXVX1C.mjs";
5
+ import "../../createPagination-cyOWlpfH.mjs";
6
+ import { t as DataTableAdapter } from "../../adapter-D_0ptsPm.mjs";
7
+ import { t as ClientAdapter } from "../../v0-BogbIzpM.mjs";
8
+ import { t as ServerAdapter } from "../../server-ClCwiLMA.mjs";
9
+ import { t as VirtualAdapter } from "../../virtual-BP9WXRzN.mjs";
10
+ import "../../adapters-SSDVth5e.mjs";
11
+
12
+ export { ClientAdapter, DataTableAdapter, ServerAdapter, VirtualAdapter };
@@ -0,0 +1,3 @@
1
+ import "../../../adapter-BN-h5JbD.mjs";
2
+ import { n as ServerAdapterOptions, t as ServerAdapter } from "../../../server-6cs14bj1.mjs";
3
+ export { ServerAdapter, ServerAdapterOptions };
@@ -0,0 +1,7 @@
1
+ import "../../../globals-B_GVfG06.mjs";
2
+ import "../../../utilities-BqS1sC1W.mjs";
3
+ import "../../../createTrinity-EeHQSsb6.mjs";
4
+ import "../../../createPagination-cyOWlpfH.mjs";
5
+ import { t as ServerAdapter } from "../../../server-ClCwiLMA.mjs";
6
+
7
+ export { ServerAdapter };
@@ -0,0 +1,3 @@
1
+ import "../../../adapter-BN-h5JbD.mjs";
2
+ import { t as VirtualAdapter } from "../../../virtual-B3IPkHC0.mjs";
3
+ export { VirtualAdapter };
@@ -0,0 +1,9 @@
1
+ import "../../../globals-B_GVfG06.mjs";
2
+ import "../../../utilities-BqS1sC1W.mjs";
3
+ import "../../../createTrinity-EeHQSsb6.mjs";
4
+ import "../../../toArray-DIeXVX1C.mjs";
5
+ import "../../../createPagination-cyOWlpfH.mjs";
6
+ import "../../../adapter-D_0ptsPm.mjs";
7
+ import { t as VirtualAdapter } from "../../../virtual-BP9WXRzN.mjs";
8
+
9
+ export { VirtualAdapter };
@@ -0,0 +1,7 @@
1
+ import "../index-BFBN5Zl3.mjs";
2
+ import { a as SortDirection, i as DataTableAdapterResult, n as DataTableAdapterContext, o as SortEntry, r as DataTableAdapterInterface, t as DataTableAdapter } from "../adapter-BN-h5JbD.mjs";
3
+ import { n as ServerAdapterOptions, t as ServerAdapter } from "../server-6cs14bj1.mjs";
4
+ import { t as ClientAdapter } from "../v0-RepwEY1F.mjs";
5
+ import { t as VirtualAdapter } from "../virtual-B3IPkHC0.mjs";
6
+ import { a as DataTableGroup, c as DataTableSelection, d as createDataTable, f as createDataTableContext, i as DataTableExpansion, l as DataTableSort, n as DataTableContext, o as DataTableGrouping, p as useDataTable, r as DataTableContextOptions, s as DataTableOptions, t as DataTableColumn, u as SelectStrategy } from "../index-7mWYFHA6.mjs";
7
+ export { ClientAdapter, DataTableAdapter, DataTableAdapterContext, DataTableAdapterInterface, DataTableAdapterResult, DataTableColumn, DataTableContext, DataTableContextOptions, DataTableExpansion, DataTableGroup, DataTableGrouping, DataTableOptions, DataTableSelection, DataTableSort, SelectStrategy, ServerAdapter, ServerAdapterOptions, SortDirection, SortEntry, VirtualAdapter, createDataTable, createDataTableContext, useDataTable };
@@ -0,0 +1,25 @@
1
+ import "../globals-B_GVfG06.mjs";
2
+ import "../utilities-BqS1sC1W.mjs";
3
+ import "../createTrinity-EeHQSsb6.mjs";
4
+ import "../useLogger-CO9JwbSJ.mjs";
5
+ import "../consola-GBy8XRuL.mjs";
6
+ import "../pino-01x_NmWp.mjs";
7
+ import "../v0-CtjuUUPl.mjs";
8
+ import "../adapters-DEXpW9If.mjs";
9
+ import "../createTokens-BlhLdHXE.mjs";
10
+ import "../createSelection-uqEbFgha.mjs";
11
+ import "../createSingle-B59ya3aa.mjs";
12
+ import "../createGroup-CPhp6FUh.mjs";
13
+ import "../toArray-DIeXVX1C.mjs";
14
+ import "../v0-BtQCSBOG.mjs";
15
+ import "../adapters-Q9WaOsJp.mjs";
16
+ import "../useLocale-DlbShzF-.mjs";
17
+ import "../createPagination-cyOWlpfH.mjs";
18
+ import { t as DataTableAdapter } from "../adapter-D_0ptsPm.mjs";
19
+ import { t as ClientAdapter } from "../v0-BogbIzpM.mjs";
20
+ import { t as ServerAdapter } from "../server-ClCwiLMA.mjs";
21
+ import { t as VirtualAdapter } from "../virtual-BP9WXRzN.mjs";
22
+ import "../adapters-SSDVth5e.mjs";
23
+ import { n as createDataTableContext, r as useDataTable, t as createDataTable } from "../createDataTable-BJnmvxfb.mjs";
24
+
25
+ export { ClientAdapter, DataTableAdapter, ServerAdapter, VirtualAdapter, createDataTable, createDataTableContext, useDataTable };
@@ -1,4 +1,4 @@
1
- import { t as DateAdapter } from "../adapter-D95FHAtt.mjs";
1
+ import { t as DateAdapter } from "../adapter-DcwxFryd.mjs";
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
 
4
4
  //#region src/composables/useDate/adapters/v0.d.ts
@@ -1,5 +1,5 @@
1
- import { t as IN_BROWSER } from "../globals-BwYsH-rt.mjs";
2
- import { c as isNullOrUndefined, f as isString, l as isNumber, s as isNull } from "../utilities-BbKjbXTx.mjs";
1
+ import { t as IN_BROWSER } from "../globals-B_GVfG06.mjs";
2
+ import { c as isNull, l as isNullOrUndefined, p as isString, u as isNumber } from "../utilities-BqS1sC1W.mjs";
3
3
 
4
4
  //#region rolldown:runtime
5
5
  var __create = Object.create;
@@ -0,0 +1,16 @@
1
+ import "../../../index-BFBN5Zl3.mjs";
2
+ import { n as FeaturesAdapterFlags, r as FeaturesAdapterInterface } from "../../../index-BuOz3Rgm.mjs";
3
+ import { IFlagsmith, IInitConfig } from "flagsmith";
4
+
5
+ //#region src/composables/useFeatures/adapters/flagsmith/index.d.ts
6
+
7
+ declare class FlagsmithFeatureAdapter implements FeaturesAdapterInterface {
8
+ private client;
9
+ private options;
10
+ constructor(client: IFlagsmith, options: IInitConfig);
11
+ setup(onUpdate: (flags: FeaturesAdapterFlags) => void): FeaturesAdapterFlags;
12
+ dispose(): void;
13
+ private disposeFn;
14
+ }
15
+ //#endregion
16
+ export { FlagsmithFeatureAdapter };
@@ -0,0 +1,3 @@
1
+ import { t as FlagsmithFeatureAdapter } from "../../../flagsmith-CHmpPGR7.mjs";
2
+
3
+ export { FlagsmithFeatureAdapter };
@@ -0,0 +1,15 @@
1
+ import "../../../index-BFBN5Zl3.mjs";
2
+ import { n as FeaturesAdapterFlags, r as FeaturesAdapterInterface } from "../../../index-BuOz3Rgm.mjs";
3
+ import { LDClient } from "launchdarkly-js-client-sdk";
4
+
5
+ //#region src/composables/useFeatures/adapters/launchdarkly/index.d.ts
6
+
7
+ declare class LaunchDarklyFeatureAdapter implements FeaturesAdapterInterface {
8
+ private client;
9
+ constructor(client: LDClient);
10
+ setup(onUpdate: (flags: FeaturesAdapterFlags) => void): FeaturesAdapterFlags;
11
+ dispose(): void;
12
+ private disposeFn;
13
+ }
14
+ //#endregion
15
+ export { LaunchDarklyFeatureAdapter };
@@ -0,0 +1,3 @@
1
+ import { t as LaunchDarklyFeatureAdapter } from "../../../launchdarkly-W8t8ZANX.mjs";
2
+
3
+ export { LaunchDarklyFeatureAdapter };
@@ -0,0 +1,15 @@
1
+ import "../../../index-BFBN5Zl3.mjs";
2
+ import { n as FeaturesAdapterFlags, r as FeaturesAdapterInterface } from "../../../index-BuOz3Rgm.mjs";
3
+ import { PostHog } from "posthog-js";
4
+
5
+ //#region src/composables/useFeatures/adapters/posthog/index.d.ts
6
+
7
+ declare class PostHogFeatureAdapter implements FeaturesAdapterInterface {
8
+ private client;
9
+ constructor(client: PostHog);
10
+ setup(onUpdate: (flags: FeaturesAdapterFlags) => void): FeaturesAdapterFlags;
11
+ dispose(): void;
12
+ private disposeFn;
13
+ }
14
+ //#endregion
15
+ export { PostHogFeatureAdapter };
@@ -0,0 +1,4 @@
1
+ import "../../../globals-B_GVfG06.mjs";
2
+ import { t as PostHogFeatureAdapter } from "../../../posthog-BrGBPPir.mjs";
3
+
4
+ export { PostHogFeatureAdapter };
@@ -0,0 +1,17 @@
1
+ import "../index-BFBN5Zl3.mjs";
2
+ import "../adapter-BN-h5JbD.mjs";
3
+ import { _r as FeatureTicketInput, br as createFeaturesPlugin, fr as FeatureContext, gr as FeatureTicket, hr as FeaturePluginOptions, mr as FeatureOptions, pr as FeatureContextOptions, vr as createFeatures, xr as useFeatures, yr as createFeaturesContext } from "../index-Dd0m0LIJ.mjs";
4
+ import "../server-6cs14bj1.mjs";
5
+ import "../v0-RepwEY1F.mjs";
6
+ import "../virtual-B3IPkHC0.mjs";
7
+ import "../index-7mWYFHA6.mjs";
8
+ import "../adapter-DcwxFryd.mjs";
9
+ import { i as FeaturesAdapterValue, n as FeaturesAdapterFlags, r as FeaturesAdapterInterface, t as FeaturesAdapter } from "../index-BuOz3Rgm.mjs";
10
+ import "../v0-DHMoZ7dS.mjs";
11
+ import "../adapter-CJIj5ySf.mjs";
12
+ import "../consola-DiUk9j3y.mjs";
13
+ import "../pino-p-jDkNQd.mjs";
14
+ import "../v0-BOxb3nD1.mjs";
15
+ import "../memory-DVjquu_v.mjs";
16
+ import "../index-BDTbJClL.mjs";
17
+ export { FeatureContext, FeatureContextOptions, FeatureOptions, FeaturePluginOptions, FeatureTicket, FeatureTicketInput, FeaturesAdapter, FeaturesAdapterFlags, FeaturesAdapterInterface, FeaturesAdapterValue, createFeatures, createFeaturesContext, createFeaturesPlugin, useFeatures };
@@ -0,0 +1,18 @@
1
+ import "../globals-B_GVfG06.mjs";
2
+ import "../utilities-BqS1sC1W.mjs";
3
+ import "../createTrinity-EeHQSsb6.mjs";
4
+ import "../useLogger-CO9JwbSJ.mjs";
5
+ import "../consola-GBy8XRuL.mjs";
6
+ import "../pino-01x_NmWp.mjs";
7
+ import "../v0-CtjuUUPl.mjs";
8
+ import "../adapters-DEXpW9If.mjs";
9
+ import "../createTokens-BlhLdHXE.mjs";
10
+ import "../createSelection-uqEbFgha.mjs";
11
+ import "../createGroup-CPhp6FUh.mjs";
12
+ import "../toArray-DIeXVX1C.mjs";
13
+ import { a as FeaturesAdapter, i as useFeatures, n as createFeaturesContext, r as createFeaturesPlugin, t as createFeatures } from "../useFeatures-C4JF3Hgr.mjs";
14
+ import "../flagsmith-CHmpPGR7.mjs";
15
+ import "../launchdarkly-W8t8ZANX.mjs";
16
+ import "../posthog-BrGBPPir.mjs";
17
+
18
+ export { FeaturesAdapter, createFeatures, createFeaturesContext, createFeaturesPlugin, useFeatures };
@@ -0,0 +1,40 @@
1
+ //#region src/composables/useFeatures/adapters/flagsmith/index.ts
2
+ var FlagsmithFeatureAdapter = class {
3
+ client;
4
+ options;
5
+ constructor(client, options) {
6
+ this.client = client;
7
+ this.options = options;
8
+ }
9
+ setup(onUpdate) {
10
+ const updateFlags = () => {
11
+ const flags = this.client.getAllFlags();
12
+ const adapterFlags = {};
13
+ if (flags) for (const [key, flag] of Object.entries(flags)) {
14
+ const isEnabled = flag.enabled;
15
+ const variation = flag.value;
16
+ adapterFlags[key] = variation !== null && variation !== void 0 ? {
17
+ $value: isEnabled,
18
+ $variation: variation
19
+ } : isEnabled;
20
+ }
21
+ return adapterFlags;
22
+ };
23
+ this.client.init({
24
+ ...this.options,
25
+ onChange: (oldFlags, params, loadingState) => {
26
+ onUpdate(updateFlags());
27
+ this.options.onChange?.(oldFlags, params, loadingState);
28
+ }
29
+ });
30
+ this.disposeFn = () => this.client.stopListening();
31
+ return updateFlags();
32
+ }
33
+ dispose() {
34
+ this.disposeFn();
35
+ }
36
+ disposeFn = () => {};
37
+ };
38
+
39
+ //#endregion
40
+ export { FlagsmithFeatureAdapter as t };
@@ -5,9 +5,9 @@ const SUPPORTS_MATCH_MEDIA = IN_BROWSER && "matchMedia" in window && typeof wind
5
5
  const SUPPORTS_OBSERVER = IN_BROWSER && "ResizeObserver" in window;
6
6
  const SUPPORTS_INTERSECTION_OBSERVER = IN_BROWSER && "IntersectionObserver" in window;
7
7
  const SUPPORTS_MUTATION_OBSERVER = IN_BROWSER && "MutationObserver" in window;
8
- const version = "0.1.3";
8
+ const version = "0.1.4";
9
9
  /* v8 ignore next -- build-time constant, __DEV__ short-circuits in tests */
10
- const __LOGGER_ENABLED__ = process.env.NODE_ENV !== "production" || process.env.VITE_LOGGER_ENABLED === "true";
10
+ const __LOGGER_ENABLED__ = typeof (process.env.NODE_ENV !== "production") !== "undefined" && process.env.NODE_ENV !== "production" || typeof process.env.VITE_LOGGER_ENABLED !== "undefined" && process.env.VITE_LOGGER_ENABLED === "true";
11
11
 
12
12
  //#endregion
13
13
  export { SUPPORTS_OBSERVER as a, version as c, SUPPORTS_MUTATION_OBSERVER as i, SUPPORTS_INTERSECTION_OBSERVER as n, SUPPORTS_TOUCH as o, SUPPORTS_MATCH_MEDIA as r, __LOGGER_ENABLED__ as s, IN_BROWSER as t };