@rulecms/widget-vue 0.5.0 → 0.7.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.cjs +60 -10
- package/dist/index.d.ts +183 -13
- package/dist/index.js +1557 -869
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -945,18 +945,7 @@ export declare function getOverlayLayerZIndex(baseZIndex: number, layerIndex: nu
|
|
|
945
945
|
|
|
946
946
|
export declare interface GetRuleCMSWidgetResponse {
|
|
947
947
|
success: boolean;
|
|
948
|
-
data:
|
|
949
|
-
widget: WidgetData;
|
|
950
|
-
childCollections: {
|
|
951
|
-
[key: string]: ChildCollection;
|
|
952
|
-
};
|
|
953
|
-
libraries?: ConfigLibrariesMap;
|
|
954
|
-
/**
|
|
955
|
-
* Project CSS variable catalog joined at GET time. Omitted when empty or
|
|
956
|
-
* when emission is off.
|
|
957
|
-
*/
|
|
958
|
-
cssVariables?: ProjectCssVariableDefinitions;
|
|
959
|
-
};
|
|
948
|
+
data: RuleCMSWidgetRawData;
|
|
960
949
|
}
|
|
961
950
|
|
|
962
951
|
export declare type GetWidgetKeyForCollection = {
|
|
@@ -1257,8 +1246,88 @@ export declare const pointerEventsAllowlist: readonly ["auto", "none"];
|
|
|
1257
1246
|
/** Transform raw widget API data into render-ready displayItemList + collections. */
|
|
1258
1247
|
export declare function prepareRuleCMSWidgetData(raw: RuleCMSWidgetRawData): RuleCMSWidgetData;
|
|
1259
1248
|
|
|
1249
|
+
declare const PROJECT_CSS_CLASS_LAYERS: readonly ["utilities", "components"];
|
|
1250
|
+
|
|
1251
|
+
declare const PROJECT_CSS_PROPERTY_SYNTAX_VALUES: readonly ["*", "<number>", "<integer>", "<length>", "<percentage>", "<length-percentage>", "<color>", "<angle>", "<time>", "<transform-function>", "<transform-list>"];
|
|
1252
|
+
|
|
1253
|
+
declare const PROJECT_WIDGET_CHROME_COLOR_SCHEME_VALUES: readonly ["light", "dark", "light dark"];
|
|
1254
|
+
|
|
1255
|
+
declare const PROJECT_WIDGET_CHROME_SCROLLBAR_WIDTH_VALUES: readonly ["auto", "thin", "none"];
|
|
1256
|
+
|
|
1257
|
+
declare type ProjectCssClassDefinitions = Record<string, string>;
|
|
1258
|
+
|
|
1259
|
+
declare type ProjectCssClassLayer = (typeof PROJECT_CSS_CLASS_LAYERS)[number];
|
|
1260
|
+
|
|
1261
|
+
declare type ProjectCssKeyframeDefinitions = Record<string, string>;
|
|
1262
|
+
|
|
1263
|
+
declare type ProjectCssPositionTryDefinitions = Record<string, string>;
|
|
1264
|
+
|
|
1265
|
+
declare type ProjectCssPropertyDefinition = {
|
|
1266
|
+
name: string;
|
|
1267
|
+
syntax: ProjectCssPropertySyntax;
|
|
1268
|
+
inherits: boolean;
|
|
1269
|
+
initialValue: string;
|
|
1270
|
+
};
|
|
1271
|
+
|
|
1272
|
+
declare type ProjectCssPropertySyntax = (typeof PROJECT_CSS_PROPERTY_SYNTAX_VALUES)[number];
|
|
1273
|
+
|
|
1260
1274
|
declare type ProjectCssVariableDefinitions = Record<string, string>;
|
|
1261
1275
|
|
|
1276
|
+
declare type ProjectFontFace = {
|
|
1277
|
+
family: string;
|
|
1278
|
+
cssVariable?: string;
|
|
1279
|
+
fallbacks?: string[];
|
|
1280
|
+
applyToWidget?: boolean;
|
|
1281
|
+
source: ProjectFontSource;
|
|
1282
|
+
palettes?: ProjectFontPalette[];
|
|
1283
|
+
};
|
|
1284
|
+
|
|
1285
|
+
declare type ProjectFontPalette = {
|
|
1286
|
+
name: string;
|
|
1287
|
+
overrideColors?: Array<{
|
|
1288
|
+
index: number;
|
|
1289
|
+
color: string;
|
|
1290
|
+
}>;
|
|
1291
|
+
applyToWidget?: boolean;
|
|
1292
|
+
};
|
|
1293
|
+
|
|
1294
|
+
declare type ProjectFontSource = {
|
|
1295
|
+
kind: 'stack-only';
|
|
1296
|
+
} | {
|
|
1297
|
+
kind: 'google';
|
|
1298
|
+
weights: number[];
|
|
1299
|
+
subsets?: string[];
|
|
1300
|
+
};
|
|
1301
|
+
|
|
1302
|
+
declare type ProjectThemeDefinition = {
|
|
1303
|
+
condition: ProjectThemeHostCondition;
|
|
1304
|
+
variables: Record<string, string>;
|
|
1305
|
+
};
|
|
1306
|
+
|
|
1307
|
+
declare type ProjectThemeHostCondition = {
|
|
1308
|
+
kind: 'prefers-color-scheme';
|
|
1309
|
+
value: 'dark' | 'light';
|
|
1310
|
+
} | {
|
|
1311
|
+
kind: 'html-class';
|
|
1312
|
+
value: 'dark';
|
|
1313
|
+
} | {
|
|
1314
|
+
kind: 'data-theme';
|
|
1315
|
+
value: 'dark' | 'light';
|
|
1316
|
+
};
|
|
1317
|
+
|
|
1318
|
+
declare type ProjectWidgetChrome = {
|
|
1319
|
+
colorScheme?: ProjectWidgetChromeColorScheme;
|
|
1320
|
+
selectionBackground?: string;
|
|
1321
|
+
selectionColor?: string;
|
|
1322
|
+
caretColor?: string;
|
|
1323
|
+
scrollbarColor?: string;
|
|
1324
|
+
scrollbarWidth?: ProjectWidgetChromeScrollbarWidth;
|
|
1325
|
+
};
|
|
1326
|
+
|
|
1327
|
+
declare type ProjectWidgetChromeColorScheme = (typeof PROJECT_WIDGET_CHROME_COLOR_SCHEME_VALUES)[number];
|
|
1328
|
+
|
|
1329
|
+
declare type ProjectWidgetChromeScrollbarWidth = (typeof PROJECT_WIDGET_CHROME_SCROLLBAR_WIDTH_VALUES)[number];
|
|
1330
|
+
|
|
1262
1331
|
/**
|
|
1263
1332
|
* Character used to join environmentId and resource key when generating published keys
|
|
1264
1333
|
*/
|
|
@@ -1432,17 +1501,64 @@ export declare interface RuleCMSWidgetContext {
|
|
|
1432
1501
|
libraryRegistry: ComponentLibraryRegistry;
|
|
1433
1502
|
}
|
|
1434
1503
|
|
|
1504
|
+
/** Render-ready widget payload after parsing API / fetch response. */
|
|
1435
1505
|
export declare interface RuleCMSWidgetData {
|
|
1436
1506
|
displayItemList: Items;
|
|
1437
1507
|
widgetCollections: {
|
|
1438
1508
|
[key: string]: WidgetCollection;
|
|
1439
1509
|
};
|
|
1510
|
+
/**
|
|
1511
|
+
* Platform-served library descriptors (optional; absent for configs that
|
|
1512
|
+
* only use the default library, and until the platform serves them).
|
|
1513
|
+
*/
|
|
1440
1514
|
libraries?: ConfigLibrariesMap;
|
|
1441
1515
|
/**
|
|
1442
1516
|
* Project CSS variable catalog joined onto the widget GET. Optional; omit
|
|
1443
|
-
* or `{}` when the project has none. Not stored on itemList.
|
|
1517
|
+
* or `{}` when the project has none. Not stored on itemList. Dropped when
|
|
1518
|
+
* `includeCssVariables` on the raw GET is `false`.
|
|
1444
1519
|
*/
|
|
1445
1520
|
cssVariables?: ProjectCssVariableDefinitions;
|
|
1521
|
+
/**
|
|
1522
|
+
* Project class-definition catalog joined onto the widget GET. Optional;
|
|
1523
|
+
* omit or `{}` when the project has none. Not stored on itemList. Dropped
|
|
1524
|
+
* when `includeClassDefinitions` on the raw GET is `false`.
|
|
1525
|
+
*/
|
|
1526
|
+
classDefinitions?: ProjectCssClassDefinitions;
|
|
1527
|
+
/**
|
|
1528
|
+
* Cascade layer to wrap class definitions. Dropped when
|
|
1529
|
+
* `includeClassLayer` on the raw GET is `false`.
|
|
1530
|
+
*/
|
|
1531
|
+
classLayer?: ProjectCssClassLayer;
|
|
1532
|
+
/**
|
|
1533
|
+
* Project font-face catalog joined onto the widget GET. Dropped when
|
|
1534
|
+
* `includeFontFaces` on the raw GET is `false`.
|
|
1535
|
+
*/
|
|
1536
|
+
fontFaces?: ProjectFontFace[];
|
|
1537
|
+
/**
|
|
1538
|
+
* Project keyframes catalog joined onto the widget GET. Dropped when
|
|
1539
|
+
* `includeKeyframes` on the raw GET is `false`.
|
|
1540
|
+
*/
|
|
1541
|
+
keyframes?: ProjectCssKeyframeDefinitions;
|
|
1542
|
+
/**
|
|
1543
|
+
* Project theme-override catalog joined onto the widget GET. Dropped when
|
|
1544
|
+
* `includeThemes` on the raw GET is `false`.
|
|
1545
|
+
*/
|
|
1546
|
+
themes?: ProjectThemeDefinition[];
|
|
1547
|
+
/**
|
|
1548
|
+
* Project typed `@property` catalog joined onto the widget GET. Dropped when
|
|
1549
|
+
* `includeCssProperties` on the raw GET is `false`.
|
|
1550
|
+
*/
|
|
1551
|
+
cssProperties?: ProjectCssPropertyDefinition[];
|
|
1552
|
+
/**
|
|
1553
|
+
* Project widget-root chrome joined onto the widget GET. Dropped when
|
|
1554
|
+
* `includeWidgetChrome` on the raw GET is `false`.
|
|
1555
|
+
*/
|
|
1556
|
+
widgetChrome?: ProjectWidgetChrome;
|
|
1557
|
+
/**
|
|
1558
|
+
* Project position-try catalog joined onto the widget GET. Dropped when
|
|
1559
|
+
* `includePositionTry` on the raw GET is `false`.
|
|
1560
|
+
*/
|
|
1561
|
+
positionTry?: ProjectCssPositionTryDefinitions;
|
|
1446
1562
|
}
|
|
1447
1563
|
|
|
1448
1564
|
export declare const RuleCMSWidgetProvider: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -1452,8 +1568,62 @@ export declare interface RuleCMSWidgetRawData {
|
|
|
1452
1568
|
childCollections: {
|
|
1453
1569
|
[key: string]: ChildCollection;
|
|
1454
1570
|
};
|
|
1571
|
+
/** Optional platform-served library descriptors (see RuleCMSWidgetData). */
|
|
1455
1572
|
libraries?: ConfigLibrariesMap;
|
|
1456
1573
|
cssVariables?: ProjectCssVariableDefinitions;
|
|
1574
|
+
/**
|
|
1575
|
+
* When `false`, do not emit the catalog even if `cssVariables` is present.
|
|
1576
|
+
* Missing means include (legacy payloads).
|
|
1577
|
+
*/
|
|
1578
|
+
includeCssVariables?: boolean;
|
|
1579
|
+
classDefinitions?: ProjectCssClassDefinitions;
|
|
1580
|
+
/**
|
|
1581
|
+
* When `false`, do not emit class definitions even if `classDefinitions` is
|
|
1582
|
+
* present. Missing means include (legacy payloads).
|
|
1583
|
+
*/
|
|
1584
|
+
includeClassDefinitions?: boolean;
|
|
1585
|
+
classLayer?: ProjectCssClassLayer;
|
|
1586
|
+
/**
|
|
1587
|
+
* When `false`, emit class definitions unlayered even if `classLayer` is
|
|
1588
|
+
* present. Missing means wrap when `classLayer` is set.
|
|
1589
|
+
*/
|
|
1590
|
+
includeClassLayer?: boolean;
|
|
1591
|
+
fontFaces?: ProjectFontFace[];
|
|
1592
|
+
/**
|
|
1593
|
+
* When `false`, do not emit fonts even if `fontFaces` is present.
|
|
1594
|
+
* Missing means include (legacy payloads).
|
|
1595
|
+
*/
|
|
1596
|
+
includeFontFaces?: boolean;
|
|
1597
|
+
keyframes?: ProjectCssKeyframeDefinitions;
|
|
1598
|
+
/**
|
|
1599
|
+
* When `false`, do not emit keyframes even if `keyframes` is present.
|
|
1600
|
+
* Missing means include (legacy payloads).
|
|
1601
|
+
*/
|
|
1602
|
+
includeKeyframes?: boolean;
|
|
1603
|
+
themes?: ProjectThemeDefinition[];
|
|
1604
|
+
/**
|
|
1605
|
+
* When `false`, do not emit theme overrides even if `themes` is present.
|
|
1606
|
+
* Missing means include (legacy payloads).
|
|
1607
|
+
*/
|
|
1608
|
+
includeThemes?: boolean;
|
|
1609
|
+
cssProperties?: ProjectCssPropertyDefinition[];
|
|
1610
|
+
/**
|
|
1611
|
+
* When `false`, do not emit typed CSS properties even if `cssProperties` is
|
|
1612
|
+
* present. Missing means include (legacy payloads).
|
|
1613
|
+
*/
|
|
1614
|
+
includeCssProperties?: boolean;
|
|
1615
|
+
widgetChrome?: ProjectWidgetChrome;
|
|
1616
|
+
/**
|
|
1617
|
+
* When `false`, do not emit widget chrome even if `widgetChrome` is present.
|
|
1618
|
+
* Missing means include (legacy payloads).
|
|
1619
|
+
*/
|
|
1620
|
+
includeWidgetChrome?: boolean;
|
|
1621
|
+
positionTry?: ProjectCssPositionTryDefinitions;
|
|
1622
|
+
/**
|
|
1623
|
+
* When `false`, do not emit position-try fallbacks even if `positionTry` is
|
|
1624
|
+
* present. Missing means include (legacy payloads).
|
|
1625
|
+
*/
|
|
1626
|
+
includePositionTry?: boolean;
|
|
1457
1627
|
}
|
|
1458
1628
|
|
|
1459
1629
|
export declare interface SourceComponentsPlugin {
|